Documentation

WeightedNetKAT.WNKA

structure WeightedNetKAT.WNKA (F N 𝒮 Q : Type) [Semiring 𝒮] [Listed F] :

Weighted NetKAT Automaton.

  • Q is a set of states.
  • ι is the initial weightings.
  • δ is a family of transition functions B[α,β] : Q → 𝒞 𝒮 Q indexed by packet pairs.
  • 𝒪 is a family of output weightings R[α,β] : 𝒞 𝒮 Q indexed by packet pairs. Note that we use 𝒪 instead of λ, since λ is the function symbol in Lean.
  • ι : Matrix Unit Q 𝒮

    ι is the initial weightings.

  • δ (α β : Pk[F,N]) : Matrix Q Q 𝒮

    δ is a family of transition functions B[α,β] : Q → 𝒞 𝒮 Q indexed by packet pairs.

  • 𝒪 (α β : Pk[F,N]) : Matrix Q Unit 𝒮

    𝒪 is a family of output weightings R[α,β] : 𝒞 𝒮 Q indexed by packet pairs. Note that we use 𝒪 instead of λ, since λ is the function symbol in Lean.

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def WeightedNetKAT.WNKA.sem {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] {Q : Type} [Fintype Q] [DecidableEq N] [DecidableEq F] (𝒜 : WNKA[F,N,𝒮,Q]) :
      GS F N →c 𝒮
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        def WeightedNetKAT.WNKA. {F : Type} [Listed F] {N 𝒮 : Type} [Semiring 𝒮] {Q : Type} [Fintype Q] [DecidableEq Q] (d : Pk[F,N]Pk[F,N]Matrix Q Q 𝒮) (xs : List Pk[F,N]) :
        Matrix Q Q 𝒮
        Equations
        Instances For
          theorem WeightedNetKAT.WNKA.xδ_right {F : Type} [Listed F] {N 𝒮 : Type} [Semiring 𝒮] {Q : Type} [Fintype Q] [DecidableEq Q] (f : Pk[F,N]Pk[F,N]Matrix Q Q 𝒮) (A : List Pk[F,N]) {α₁ α₀ : Pk[F,N]} :
          f (A ++ [α₁, α₀]) = f (A ++ [α₁]) * f α₁ α₀
          theorem WeightedNetKAT.WNKA.xδ_δ'_as_sum_unfolded {F : Type} [Listed F] {N 𝒮 : Type} [Semiring 𝒮] {Q : Type} [Fintype Q] [DecidableEq Q] [Inhabited Pk[F,N]] {xₙ : List Pk[F,N]} {l r : Matrix Pk[F,N] Pk[F,N] (Matrix Q Q 𝒮)} :
          (l + r) xₙ = l xₙ + nFinset.range (xₙ - 1), l (xₙ[..n + 1]) * r xₙ[n]! xₙ[n + 1]! * (l + r) (xₙ[n + 1..])
          @[implicit_reducible]
          instance WeightedNetKAT.S.instDecidableEq {F : Type} [Listed F] {N 𝒮 : Type} (p : RPol 𝒮) :
          Equations
          instance WeightedNetKAT.S.Finite {F : Type} [Listed F] {N 𝒮 : Type} {p : RPol 𝒮} :
          @[implicit_reducible]
          instance WeightedNetKAT.S.listed {F : Type} [Listed F] {N 𝒮 : Type} (p : RPol 𝒮) :
          Listed (S p)
          Equations
          @[reducible, inline]
          abbrev WeightedNetKAT.η₁ {𝒮 : Type} [Semiring 𝒮] {X : Type} [DecidableEq X] (i : X) :
          X𝒮
          Equations
          Instances For
            @[reducible, inline]
            abbrev WeightedNetKAT.η₂ {𝒮 : Type} [Semiring 𝒮] {X Y : Type} [DecidableEq X] [DecidableEq Y] (i : X) (j : Y) :
            Matrix X Y 𝒮
            Equations
            Instances For

              Homebrew matrix operators #

              For the automata construction we define some custom matrix operators that are variants of nested multiplication or nested scalar multiplication.

              def WeightedNetKAT.box {N : Type u_1} {A : Type u_2} {B : Type u_3} [Fintype B] {Q : Type u_5} [AddCommMonoid Q] [Mul Q] [Unique A] (l : Matrix A B Q) (r : Matrix N N (Matrix B A Q)) :
              Matrix N N Q
              Equations
              Instances For
                def WeightedNetKAT.fox {N : Type u_1} {A : Type u_2} {B : Type u_3} {C : Type u_4} [Fintype B] {Q : Type u_5} [AddCommMonoid Q] [Mul Q] (l : Matrix A B Q) (r : Matrix N N (Matrix B C Q)) :
                Matrix N N (Matrix A C Q)
                Equations
                • (l r) α β = l * r α β
                Instances For
                  def WeightedNetKAT.sox {N : Type u_1} [Fintype N] {A : Type u_2} {B : Type u_3} {Q : Type u_5} [AddCommMonoid Q] [Mul Q] (l : Matrix N N Q) (r : Matrix N N (Matrix A B Q)) :
                  Matrix N N (Matrix A B Q)
                  Equations
                  • (l ⊟> r) α β = m : N, l α m r m β
                  Instances For
                    def WeightedNetKAT.sox' {N : Type u_1} [Fintype N] {A : Type u_2} {B : Type u_3} {Q : Type u_5} [AddCommMonoid Q] [Mul Q] (l : Matrix N N (Matrix A B Q)) (r : Matrix N N Q) :
                    Matrix N N (Matrix A B Q)
                    Equations
                    Instances For
                      def WeightedNetKAT.crox {N : Type u_1} [Fintype N] {A : Type u_2} {B : Type u_3} {C : Type u_4} [Fintype B] {Q : Type u_5} [AddCommMonoid Q] [Mul Q] (l : Matrix N N (Matrix A B Q)) (r : Matrix N N (Matrix B C Q)) :
                      Matrix N N (Matrix A C Q)
                      Equations
                      • (l r) α β = m : N, l α m * r m β
                      Instances For
                        theorem WeightedNetKAT.add_sox {N : Type u_1} [Fintype N] {A : Type u_2} {B : Type u_3} {Q : Type u_5} [AddCommMonoid Q] [Mul Q] [RightDistribClass Q] (l l' : Matrix N N Q) (r : Matrix N N (Matrix A B Q)) :
                        (l + l') ⊟> r = l ⊟> r + l' ⊟> r
                        theorem WeightedNetKAT.mul_sox {N : Type u_1} [Fintype N] {A : Type u_2} {B : Type u_3} {Q : Type u_6} [NonUnitalSemiring Q] (l l' : Matrix N N Q) (r : Matrix N N (Matrix A B Q)) :
                        l * l' ⊟> r = l ⊟> (l' ⊟> r)
                        @[simp]
                        theorem WeightedNetKAT.one_sox {N : Type u_1} [Fintype N] {A : Type u_2} {B : Type u_3} [DecidableEq N] {Q : Type u_6} [Semiring Q] (r : Matrix N N (Matrix A B Q)) :
                        1 ⊟> r = r
                        @[irreducible]
                        Equations
                        Instances For
                          @[irreducible]
                          def WeightedNetKAT.RPol.𝒪 {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) :
                          Matrix Pk[F,N] Pk[F,N] (Matrix (S p) Unit 𝒮)
                          Equations
                          Instances For
                            @[irreducible]
                            def WeightedNetKAT.RPol.δ {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) :
                            Matrix Pk[F,N] Pk[F,N] (Matrix (S p) (S p) 𝒮)
                            Equations
                            Instances For
                              @[irreducible]
                              def WeightedNetKAT.RPol.δ.δ' {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p₁ : RPol 𝒮) :
                              Matrix Pk[F,N] Pk[F,N] (Matrix (S p₁) (S p₁) 𝒮)
                              Equations
                              Instances For
                                noncomputable def WeightedNetKAT.RPol.𝒪ₐ_heart {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p₁ : RPol 𝒮) (n : ) :
                                Matrix Pk[F,N] Pk[F,N] 𝒮
                                Equations
                                Instances For
                                  def WeightedNetKAT.RPol.ιₐ {F : Type} [Listed F] {N 𝒮 : Type} [Semiring 𝒮] (p : RPol 𝒮) :
                                  Matrix Unit (S p Unit) 𝒮
                                  Equations
                                  Instances For
                                    noncomputable def WeightedNetKAT.RPol.𝒪ₐ {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) (n : ) :
                                    Equations
                                    Instances For
                                      noncomputable def WeightedNetKAT.RPol.δₐ {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) (n : ) :
                                      Matrix Pk[F,N] Pk[F,N] (Matrix (S p Unit) (S p Unit) 𝒮)
                                      Equations
                                      Instances For
                                        noncomputable def WeightedNetKAT.RPol.δₐ.δ' {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) (n : ) :
                                        Matrix Pk[F,N] Pk[F,N] (Matrix (S p) (S p) 𝒮)
                                        Equations
                                        Instances For
                                          theorem WeightedNetKAT.RPol.xδ_δ_iter {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] {p₁ : RPol 𝒮} {α : Pk[F,N]} {xₙ : List Pk[F,N]} :
                                          WNKA.xδ wnk_rpol {~p₁*}.δ (α :: xₙ) = Matrix.fromBlocks (WNKA.xδ (δ.δ' p₁) (α :: xₙ)) 0 (if xₙ = [] then 0 else (p₁.𝒪_heart ⊟> (p₁.ι p₁.δ)) α (xₙ.head?.getD α) * WNKA.xδ (δ.δ' p₁) xₙ) (if xₙ = [] then 1 else 0)
                                          theorem WeightedNetKAT.RPol.xδ_δₐ_iter {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] {p₁ : RPol 𝒮} {α : Pk[F,N]} {xₙ : List Pk[F,N]} {n : } :
                                          WNKA.xδ (p₁.δₐ n) (α :: xₙ) = Matrix.fromBlocks (WNKA.xδ (δₐ.δ' p₁ n) (α :: xₙ)) 0 (if xₙ = [] then 0 else (p₁.𝒪ₐ_heart n ⊟> (p₁.ι p₁.δ)) α (xₙ.head?.getD α) * WNKA.xδ (δₐ.δ' p₁ n) xₙ) (if xₙ = [] then 1 else 0)
                                          theorem WeightedNetKAT.RPol.xδ_seq_eq {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] {p₁ p₂ : RPol 𝒮} [Inhabited Pk[F,N]] {A : List Pk[F,N]} :
                                          WNKA.xδ wnk_rpol {~p₁; ~p₂}.δ A = Matrix.fromBlocks (WNKA.xδ p₁.δ A) (∑ γ : Pk[F,N], iFinset.range (A - 1), WNKA.xδ p₁.δ (A[..i + 1]) * p₁.𝒪 A[i]! γ * p₂.ι * WNKA.xδ p₂.δ (γ :: A[i + 1..])) 0 (WNKA.xδ p₂.δ A)
                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            class WeightedNetKAT.RPol.Semantics (F N : Type) [Listed F] (𝒮 : Type) {α : Type u_1} (sem : RPol 𝒮α) :

                                            Notation class for X⟦~p⟧

                                              Instances
                                                @[reducible, inline]
                                                abbrev WeightedNetKAT.RPol.Semantics.sem {F N : Type} [Listed F] {𝒮 : Type} {α : Type u_1} (sem : RPol 𝒮α) :
                                                RPol 𝒮α
                                                Equations
                                                Instances For
                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For
                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For
                                                      noncomputable def WeightedNetKAT.RPol.wnka {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] [KStar 𝒮] [LawfulKStar 𝒮] (p : RPol 𝒮) :
                                                      WNKA[F,N,𝒮,S p]

                                                      The WNKA of policy p

                                                      Equations
                                                      Instances For
                                                        @[simp]
                                                        theorem WeightedNetKAT.RPol.wnka_ι {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) [KStar 𝒮] [LawfulKStar 𝒮] :
                                                        p.wnka.ι = p.ι
                                                        @[simp]
                                                        theorem WeightedNetKAT.RPol.wnka_δ {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) [KStar 𝒮] [LawfulKStar 𝒮] :
                                                        p.wnka.δ = p.δ
                                                        @[simp]
                                                        theorem WeightedNetKAT.RPol.wnka_𝒪 {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) [KStar 𝒮] [LawfulKStar 𝒮] :
                                                        noncomputable def WeightedNetKAT.RPol.𝒜 {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] [KStar 𝒮] [LawfulKStar 𝒮] (p : RPol 𝒮) :
                                                        GS F N →c 𝒮

                                                        𝒜⟦·⟧ is the automata semantics of p

                                                        Equations
                                                        Instances For
                                                          noncomputable def WeightedNetKAT.RPol.Q {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] [KStar 𝒮] [LawfulKStar 𝒮] (p : RPol 𝒮) (xᵢ : List Pk[F,N]) :
                                                          Matrix Pk[F,N] Pk[F,N] 𝒮

                                                          Q⟦·⟧ is the automata semantics of p expressed as a matrix

                                                          Equations
                                                          Instances For
                                                            noncomputable def WeightedNetKAT.RPol.𝒜ₐ {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) (n : ) :
                                                            GS F N𝒮

                                                            𝒜ₐ⟦·⟧ is the approximate automata semantics of p

                                                            Equations
                                                            Instances For
                                                              noncomputable def WeightedNetKAT.RPol.M {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) (xᵢ : List Pk[F,N]) :
                                                              Matrix Pk[F,N] Pk[F,N] 𝒮

                                                              M⟦·⟧ is the language semantics of p expressed as a matrix

                                                              Equations
                                                              Instances For
                                                                noncomputable def WeightedNetKAT.RPol.Qₐ {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) (n : ) (xs : List Pk[F,N]) :
                                                                Matrix Pk[F,N] Pk[F,N] 𝒮

                                                                Qₐ⟦·⟧ is the n-bounded automata semantics of p expressed as a matrix

                                                                Equations
                                                                Instances For
                                                                  noncomputable def WeightedNetKAT.RPol.M' {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) (n : ) :
                                                                  Matrix Pk[F,N] Pk[F,N] 𝒮

                                                                  M'⟦·⟧ is the n-repeated language semantics of p expressed as a matrix

                                                                  Equations
                                                                  Instances For
                                                                    @[simp]
                                                                    theorem WeightedNetKAT.RPol.𝒜ₐ_iter_empty {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) {α β : Pk[F,N]} {n : } :
                                                                    theorem WeightedNetKAT.RPol.𝒜_def {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] [KStar 𝒮] [LawfulKStar 𝒮] {p : RPol 𝒮} {gs : GS F N} :
                                                                    𝒜~p gs = (List.foldl (fun (acc : Matrix Unit (S p) 𝒮) (x : Pk[F,N] × Pk[F,N]) => match x with | (γ, κ) => acc * p.δ γ κ) p.ι ((gs.1 :: gs.2.1).zip gs.2.1) * p.𝒪 (gs.2.1.getLast?.getD gs.1) gs.2.2) () ()
                                                                    theorem WeightedNetKAT.RPol.𝒜_def' {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] [KStar 𝒮] [LawfulKStar 𝒮] {p : RPol 𝒮} {gs : GS F N} :
                                                                    𝒜~p gs = if gs.2.1 = [] then (p.ι * p.𝒪 gs.1 gs.2.2) () () else (p.ι * (List.map (fun (x : Pk[F,N] × Pk[F,N]) => match x with | (γ, κ) => p.δ γ κ) ((gs.1 :: gs.2.1).zip gs.2.1)).prod * p.𝒪 (gs.2.1.getLast?.getD gs.1) gs.2.2) () ()
                                                                    theorem WeightedNetKAT.RPol.𝒜_def'' {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] [KStar 𝒮] [LawfulKStar 𝒮] {p : RPol 𝒮} {gs : GS F N} :
                                                                    𝒜~p gs = if gs.2.1 = [] then (p.ι * p.𝒪 gs.1 gs.2.2) () () else (p.ι * WNKA.xδ p.δ (gs.1 :: gs.2.1) * p.𝒪 (gs.2.1.getLast?.getD gs.1) gs.2.2) () ()

                                                                    A proof that 𝒜⟦p⟧ = G⟦p⟧

                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    Instances For
                                                                      theorem WeightedNetKAT.RPol.𝒜_single {α : Type u_1} {motive : αList ααProp} (nil : ∀ (a b : α), motive a [] b) (single : ∀ (a x b : α), motive a [x] b) (ind : ∀ (a b c d : α) (xs : List α), motive c xs dmotive b (c :: xs) dmotive a (b :: c :: xs) d) (a : α) (xs : List α) (b : α) :
                                                                      motive a xs b
                                                                      @[simp]
                                                                      theorem WeightedNetKAT.RPol.𝒜_add_eq {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] [KStar 𝒮] [LawfulKStar 𝒮] {p₁ p₂ : RPol 𝒮} :
                                                                      theorem WeightedNetKAT.RPol.𝒜_add {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] [KStar 𝒮] [LawfulKStar 𝒮] {p₁ p₂ : RPol 𝒮} (ih₁ : 𝒜~p₁ = G⟦~p₁) (ih₂ : 𝒜~p₂ = G⟦~p₂) :
                                                                      𝒜~p₁ ~p₂ = G⟦~p₁ ~p₂
                                                                      @[simp]
                                                                      theorem WeightedNetKAT.RPol.𝒜_weight_eq {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] [KStar 𝒮] [LawfulKStar 𝒮] {w : 𝒮} {p : RPol 𝒮} :
                                                                      theorem WeightedNetKAT.RPol.𝒜_weight {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] [KStar 𝒮] [LawfulKStar 𝒮] {w : 𝒮} {p : RPol 𝒮} (ih : 𝒜~p = G⟦~p) :
                                                                      @[simp]
                                                                      theorem WeightedNetKAT.RPol.𝒜_seq_eq {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] [KStar 𝒮] [LawfulKStar 𝒮] {p₁ p₂ : RPol 𝒮} :
                                                                      theorem WeightedNetKAT.RPol.𝒜_seq {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] [KStar 𝒮] [LawfulKStar 𝒮] {p₁ p₂ : RPol 𝒮} (ih₁ : 𝒜~p₁ = G⟦~p₁) (ih₂ : 𝒜~p₂ = G⟦~p₂) :
                                                                      𝒜~p₁; ~p₂ = G⟦~p₁; ~p₂
                                                                      theorem WeightedNetKAT.RPol.Q_eq_𝒜 {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] [KStar 𝒮] [LawfulKStar 𝒮] (p : RPol 𝒮) {xs : List Pk[F,N]} :
                                                                      Q~p xs = fun (x z : Pk[F,N]) => 𝒜~p (x, xs, z)
                                                                      theorem WeightedNetKAT.RPol.𝒜_eq_M {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) [KStar 𝒮] [LawfulKStar 𝒮] {a : Pk[F,N]} {xs : List Pk[F,N]} {b : Pk[F,N]} (ihp : G⟦~p = 𝒜~p) :
                                                                      𝒜~p (a, xs, b) = M~p xs a b
                                                                      theorem WeightedNetKAT.RPol.𝒪ₐ_heart_eq_M {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) [KStar 𝒮] [LawfulKStar 𝒮] {n : } (ihp : G⟦~p = 𝒜~p) :
                                                                      p.𝒪ₐ_heart n = xFinset.range n, M~p [] ^ x
                                                                      @[simp]
                                                                      theorem WeightedNetKAT.RPol.Q_nil_iter_eq_𝒜 {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) [KStar 𝒮] [LawfulKStar 𝒮] {i : } {α γ : Pk[F,N]} :
                                                                      (Q~p [] ^ i) α γ = (𝒜~p ^ i) (α, [], γ)
                                                                      @[simp]
                                                                      theorem WeightedNetKAT.RPol.𝒜_iter_nil {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) [KStar 𝒮] [LawfulKStar 𝒮] {α β : Pk[F,N]} :
                                                                      theorem WeightedNetKAT.RPol.𝒜_pow_empty {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) [KStar 𝒮] [LawfulKStar 𝒮] {i : } {α β : Pk[F,N]} :
                                                                      (𝒜~p ^ i) (α, [], β) = ((p.ι p.𝒪) ^ i) α β
                                                                      @[simp]
                                                                      theorem WeightedNetKAT.RPol.Qₐ_iter_nil {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) [KStar 𝒮] [LawfulKStar 𝒮] {n : } (ihp : G⟦~p = 𝒜~p) :
                                                                      theorem WeightedNetKAT.RPol.𝒜ₐ_iter_nonempty {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) [KStar 𝒮] [LawfulKStar 𝒮] [Inhabited Pk[F,N]] {α α₀ β : Pk[F,N]} {xₙ : List Pk[F,N]} {n : } :
                                                                      𝒜ₐ~p n (α, α₀ :: xₙ, β) = i..=xₙ, ξ : Pk[F,N], γ : Pk[F,N], p.𝒪ₐ_heart n α γ * 𝒜~p (γ, α₀ :: xₙ[..i], ξ) * 𝒜ₐ~p n (ξ, xₙ[i..], β)
                                                                      theorem WeightedNetKAT.RPol.𝒜ₐ_iter_eq {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) [KStar 𝒮] [LawfulKStar 𝒮] [Inhabited Pk[F,N]] {α β : Pk[F,N]} {xₙ : List Pk[F,N]} {n : } :
                                                                      𝒜ₐ~p n (α, xₙ, β) = if xₙ = [] then p.𝒪ₐ_heart n α β else iFinset.range xₙ, ξ : Pk[F,N], γ : Pk[F,N], p.𝒪ₐ_heart n α γ * 𝒜~p (γ, xₙ[..i + 1], ξ) * 𝒜ₐ~p n (ξ, xₙ[i + 1..], β)
                                                                      @[simp]
                                                                      theorem WeightedNetKAT.RPol.M'_zero {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) :
                                                                      theorem WeightedNetKAT.RPol.M'_succ {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) {n : } :
                                                                      theorem WeightedNetKAT.RPol.M'_succ' {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) {n : } :
                                                                      theorem WeightedNetKAT.RPol.G_eq_M {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) {a : Pk[F,N]} {xs : List Pk[F,N]} {b : Pk[F,N]} :
                                                                      G⟦~p (a, xs, b) = M~p xs a b
                                                                      theorem WeightedNetKAT.RPol.M_seq {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p p' : RPol 𝒮) (xs : List Pk[F,N]) :
                                                                      M~p; ~p' xs = c..=xs, M~p (xs[..c]) * M~p' (xs[c..])
                                                                      @[simp]
                                                                      theorem WeightedNetKAT.RPol.M_iter_nil {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) {n : } :
                                                                      theorem WeightedNetKAT.RPol.M_iter_eq_buckets {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) {xs : List Pk[F,N]} {n : } :
                                                                      iFinset.range n, M~p; ~(p.iter i) xs = ys(Finset.range n).biUnion fun (x : ) => xs.buckets x.succ, (List.map M~p ys).prod
                                                                      theorem WeightedNetKAT.RPol.𝒪ₐ_heart_apply {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) {n : } {α β : Pk[F,N]} :
                                                                      p.𝒪ₐ_heart n α β = iFinset.range n, ((p.ι p.𝒪) ^ i) α β
                                                                      @[simp]
                                                                      theorem WeightedNetKAT.RPol.𝒪ₐ_heart_le_succ {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) {n : } {α β : Pk[F,N]} :
                                                                      p.𝒪ₐ_heart n α β p.𝒪ₐ_heart (n + 1) α β
                                                                      theorem WeightedNetKAT.RPol.𝒪ₐ_heart_le_apply_of_le {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) {n m : } {α β : Pk[F,N]} (h : n m) :
                                                                      p.𝒪ₐ_heart n α β p.𝒪ₐ_heart m α β
                                                                      theorem WeightedNetKAT.RPol.𝒜ₐ_eq_Qₐ {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) {n : } {g : GS F N} :
                                                                      𝒜ₐ~p n g = Qₐ~p n g.2.1 g.1 g.2.2
                                                                      theorem WeightedNetKAT.RPol.Qₐ_iter_eq' {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) [KStar 𝒮] [LawfulKStar 𝒮] [Inhabited Pk[F,N]] {xs : List Pk[F,N]} {n : } (ihp : G⟦~p = 𝒜~p) :
                                                                      Qₐ~p n xs = if xs = [] then M'~p n else M'~p n * iFinset.range xs, M~p (xs[..i + 1]) * Qₐ~p n (xs[i + 1..])
                                                                      theorem WeightedNetKAT.RPol.Qₐ_iter_eq {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) [KStar 𝒮] [LawfulKStar 𝒮] [Inhabited Pk[F,N]] {xs : List Pk[F,N]} {n : } (ihp : G⟦~p = 𝒜~p) :
                                                                      Qₐ~p n xs = M'~p n * ysxs.partitions, (List.map (fun (y : List Pk[F,N]) => M~p y * M'~p n) ys).prod
                                                                      theorem WeightedNetKAT.RPol.Qₐ_iter_eq_partitionsFill' {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) [KStar 𝒮] [LawfulKStar 𝒮] [Inhabited Pk[F,N]] {xs : List Pk[F,N]} {n : } (ihp : G⟦~p = 𝒜~p) :
                                                                      Qₐ~p (n + 1) xs = ysxs.partitionsFill' n, (List.map M~p ys).prod
                                                                      @[simp]
                                                                      theorem WeightedNetKAT.RPol.𝒜ₐ_apply_monotone {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) [KStar 𝒮] [LawfulKStar 𝒮] [Inhabited Pk[F,N]] [MulLeftMono 𝒮] [MulRightMono 𝒮] {x : GS F N} :
                                                                      Monotone fun (x_1 : ) => 𝒜ₐ~p x_1 x
                                                                      theorem WeightedNetKAT.RPol.𝒜_iter_nonempty {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) [KStar 𝒮] [LawfulKStar 𝒮] [Inhabited Pk[F,N]] [MulLeftMono 𝒮] [MulRightMono 𝒮] [OmegaContinuousNonUnitalSemiring 𝒮] {α α₀ β : Pk[F,N]} {xₙ : List Pk[F,N]} :
                                                                      𝒜~p* (α, α₀ :: xₙ, β) = x..=xₙ, x_1 : Pk[F,N], x_2 : Pk[F,N], (ω∑ (x : ), (𝒜~p ^ x) (α, [], x_2)) * 𝒜~p (x_2, α₀ :: xₙ[..x], x_1) * 𝒜~p* (x_1, xₙ[x..], β)
                                                                      theorem WeightedNetKAT.RPol.𝒜_iter_eq_ωSup_approx {F : Type} [Listed F] {N : Type} [Listed N] {𝒮 : Type} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] (p : RPol 𝒮) [KStar 𝒮] [LawfulKStar 𝒮] [Inhabited Pk[F,N]] [MulLeftMono 𝒮] [MulRightMono 𝒮] [OmegaContinuousNonUnitalSemiring 𝒮] {α β : Pk[F,N]} {xₙ : List Pk[F,N]} :
                                                                      𝒜~p* (α, xₙ, β) = OmegaCompletePartialOrder.ωSup { toFun := fun (n : ) => 𝒜ₐ~p n (α, xₙ, β), monotone' := }

                                                                      In the limit the automata semantics are equal to the approximate.