Documentation

WeightedNetKAT.Language

def WeightedNetKAT.Pk? (F : Type u) (N : Type v) [Listed F] :

Pk? is the set of complete tests.

Equations
Instances For
    def WeightedNetKAT.Pk! (F : Type u) (N : Type v) [Listed F] :

    Pk! is the set of all complete assignments.

    Equations
    Instances For
      def WeightedNetKAT.GS (F : Type u) (N : Type v) [Listed F] :

      The language of guarded strings.

      Isomorphically defined as Pk? ⬝ (Pk! ⬝ dup)* ⬝ Pk!.

      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
            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
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  class WeightedNetKAT.Concat (α : Type u_3) (β : outParam (Type u_4)) :
                  Type (max u_3 u_4)
                  • concat : ααβ

                    Concatenation

                  Instances
                    class WeightedNetKAT.ConcatAssoc (α : Type u_3) [Concat α α] :
                    Instances
                      @[implicit_reducible]
                      instance WeightedNetKAT.instConcatGSOption {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [DecidableEq N] :
                      Concat (GS F N) (Option (GS F N))
                      Equations
                      def WeightedNetKAT.GS.splitAtJoined {F : Type u_1} [Listed F] {N : Type u_2} (g : GS F N) (n : ) (γ : Pk[F,N]) :
                      GS F N × GS F N
                      Equations
                      Instances For
                        @[implicit_reducible]
                        instance WeightedNetKAT.instConcatCountsuppGS {F : Type u_1} [Listed F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] :
                        Concat (GS F N →c 𝒮) (GS F N →c 𝒮)
                        Equations
                        • One or more equations did not get rendered due to their size.
                        theorem WeightedNetKAT.G.concat_apply {F : Type u_1} [Listed F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] {L R : GS F N →c 𝒮} {xₙ : GS F N} :
                        (L R) xₙ = i..=xₙ.2.1, γ : Pk[F,N], L (xₙ.splitAtJoined i γ).1 * R (xₙ.splitAtJoined i γ).2
                        theorem WeightedNetKAT.G.concat_eq_ωSum {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] {L R : GS F N →c 𝒮} {xₙ : GS F N} :
                        (L R) xₙ = ω∑ (x : L.support) (y : R.support), if x y = some xₙ then L x * R y else 0
                        @[simp]
                        theorem WeightedNetKAT.GS.mk_eq {F : Type u_1} [Listed F] {N : Type u_2} {α β γ δ : Pk[F,N]} {xs : List Pk[F,N]} :
                        (α, [], β) = (γ, xs, δ) α = γ xs = [] β = δ
                        @[simp]
                        theorem WeightedNetKAT.GS.mk_one_eq {F : Type u_1} [Listed F] {N : Type u_2} {α κ β γ δ : Pk[F,N]} {xs : List Pk[F,N]} :
                        (α, [κ], β) = (γ, xs, δ) α = γ xs = [κ] β = δ
                        def WeightedNetKAT.G.ofPk {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] (f : Pk[F,N]GS F N) :
                        GS F N →c 𝒮
                        Equations
                        Instances For
                          def WeightedNetKAT.G.ofConst {F : Type u_1} [Listed F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [DecidableEq (GS F N)] (f : GS F N) :
                          GS F N →c 𝒮
                          Equations
                          Instances For
                            @[simp]
                            theorem WeightedNetKAT.G.ofPk_apply {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] (f : Pk[F,N]GS F N) (x : GS F N) :
                            (ofPk f) x = if ∃ (α : Pk[F,N]), f α = x then 1 else 0
                            @[simp]
                            theorem WeightedNetKAT.G.ofConst_apply {F : Type u_1} [Listed F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [DecidableEq (GS F N)] (f x : GS F N) :
                            (ofConst f) x = if f = x then 1 else 0
                            @[irreducible]
                            noncomputable def WeightedNetKAT.G {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] (p : RPol 𝒮) :
                            GS F N →c 𝒮
                            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
                                  @[simp]
                                  theorem WeightedNetKAT.G.skip_eq {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] {gs : GS F N} :
                                  G⟦skip gs = if gs.1 = gs.2.2 gs.2.1 = [] then 1 else 0
                                  @[simp]
                                  theorem WeightedNetKAT.G.test_eq {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] {gs : GS F N} {π : Pk[F,N]} :
                                  G⟦@test ~π gs = if gs.1 = gs.2.2 gs.1 = π gs.2.1 = [] then 1 else 0
                                  @[simp]
                                  theorem WeightedNetKAT.G.mod_eq {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] {gs : GS F N} {π : Pk[F,N]} :
                                  G⟦@mod ~π gs = if gs.2.2 = π gs.2.1 = [] then 1 else 0
                                  @[simp]
                                  theorem WeightedNetKAT.G.dup_eq {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] {gs : GS F N} :
                                  G⟦dup gs = if gs.2.2 = gs.1 gs.2.1 = [gs.1] then 1 else 0
                                  @[simp]
                                  theorem WeightedNetKAT.G.skip_concat {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] {x : GS F N →c 𝒮} :
                                  @[simp]
                                  theorem WeightedNetKAT.G.concat_skip {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] {x : GS F N →c 𝒮} :
                                  @[simp]
                                  theorem WeightedNetKAT.G.seq_skip {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] {p : RPol 𝒮} :
                                  theorem WeightedNetKAT.G.iter_succ {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] (p₁ : RPol 𝒮) (n : ) :
                                  G⟦~(p₁.iter (n + 1)) = (fun (x : GS F N →c 𝒮) => G⟦~p₁ x)^[n] G⟦~p₁
                                  theorem WeightedNetKAT.G.iter {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] (p₁ : RPol 𝒮) (n : ) :
                                  G⟦~(p₁.iter n) = (fun (x : GS F N →c 𝒮) => G⟦~p₁ x)^[n] G⟦skip
                                  @[implicit_reducible]
                                  noncomputable instance WeightedNetKAT.GS.instHPowCountsuppNat {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] :
                                  HPow (GS F N →c 𝒮) (GS F N →c 𝒮)
                                  Equations
                                  instance WeightedNetKAT.GS.instConcatAssocCountsupp {F : Type u_1} [Listed F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] :
                                  ConcatAssoc (GS F N →c 𝒮)
                                  @[simp]
                                  theorem WeightedNetKAT.GS.pow_zero {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] (M : GS F N →c 𝒮) :
                                  @[simp]
                                  theorem WeightedNetKAT.GS.pow_one {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] (M : GS F N →c 𝒮) :
                                  M ^ 1 = M
                                  theorem WeightedNetKAT.GS.pow_succ {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] (M : GS F N →c 𝒮) {n : } :
                                  M ^ (n + 1) = M M ^ n
                                  theorem WeightedNetKAT.GS.pow_succ' {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] (M : GS F N →c 𝒮) {n : } :
                                  M ^ (n + 1) = M ^ n M
                                  theorem WeightedNetKAT.GS.pow_add {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] (M : GS F N →c 𝒮) {n m : } :
                                  M ^ (n + m) = M ^ n M ^ m
                                  def WeightedNetKAT.GS.pks {F : Type u_1} [Listed F] {N : Type u_2} (s : GS F N) :
                                  Equations
                                  Instances For
                                    def WeightedNetKAT.GS.H {F : Type u_1} [Listed F] {N : Type u_2} (s : GS F N) :
                                    Equations
                                    Instances For
                                      def WeightedNetKAT.GS.toRPol {F : Type u_1} [Listed F] {N : Type u_2} {𝒮 : Type u_3} (g : GS F N) :
                                      RPol 𝒮
                                      Equations
                                      Instances For
                                        noncomputable def WeightedNetKAT.GS.sem {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] (g : GS F N) :
                                        Pk[F,N] × List Pk[F,N]Pk[F,N] × List Pk[F,N] →c 𝒮
                                        Equations
                                        Instances For
                                          theorem WeightedNetKAT.GS.sem_eq {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] (g : GS F N) (h : Pk[F,N] × List Pk[F,N]) :
                                          g.sem h = if g.1 = h.1 then η (g.H.1, g.H.2 ++ h.2) else 0
                                          noncomputable def WeightedNetKAT.RPol.sem_G_theorem {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] (p : RPol 𝒮) :
                                          Equations
                                          Instances For
                                            theorem WeightedNetKAT.RPol.sem_G.Seq {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [MulLeftMono 𝒮] [MulRightMono 𝒮] [OmegaContinuousNonUnitalSemiring 𝒮] {p₁ p₂ : RPol 𝒮} (ih₁ : p₁.sem_G_theorem) (ih₂ : p₂.sem_G_theorem) :
                                            theorem WeightedNetKAT.RPol.sem_G.Add {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [MulLeftMono 𝒮] [MulRightMono 𝒮] [OmegaContinuousNonUnitalSemiring 𝒮] {p₁ p₂ : RPol 𝒮} (ih₁ : p₁.sem_G_theorem) (ih₂ : p₂.sem_G_theorem) :
                                            theorem WeightedNetKAT.RPol.sem_G.Weight {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [MulLeftMono 𝒮] [MulRightMono 𝒮] [OmegaContinuousNonUnitalSemiring 𝒮] {w : 𝒮} {p₁ : RPol 𝒮} (ih : p₁.sem_G_theorem) :
                                            theorem WeightedNetKAT.RPol.sem_G {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [MulLeftMono 𝒮] [MulRightMono 𝒮] [OmegaContinuousNonUnitalSemiring 𝒮] (p : RPol 𝒮) :
                                            p.sem = fun (h : Pk[F,N] × List Pk[F,N]) => ω∑ (x : G⟦~p.support), G⟦~p x * (↑x).sem h