Documentation

WeightedNetKAT.rSafety

def EMatrix.ofFn_eq_ofFnSlow {m : Type u_1} {n : Type u_2} {α : Type u_3} [Listed m] [Listed n] (f : Li[m]Li[n]α) :
ofFn f = ofFnSlow fun (a : m) (b : n) => f (Listed.encodeFin a) (Listed.encodeFin b)
Equations
  • =
Instances For
    def WeightedNetKAT.rSafety {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [DecidableEq N] {𝒮 : Type u_3} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] (p : Pol[F,N,𝒮]) (r : 𝒮) :
    Equations
    Instances For
      Instances For
        @[implicit_reducible]
        Equations
        @[implicit_reducible]
        Equations
        • One or more equations did not get rendered due to their size.
        @[implicit_reducible]
        Equations
        • One or more equations did not get rendered due to their size.
        @[reducible, inline]
        abbrev WeightedNetKAT.rSafety.Q' (F : Type u_6) (N : Type u_7) (Q : Type u_8) [Listed F] :
        Type (max u_7 u_8)
        Equations
        Instances For
          def WeightedNetKAT.rSafety.Δ_star {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {Q : Type u_4} {𝒮 : Type u_5} [Fintype Q] [DecidableEq Q] [Semiring 𝒮] (𝔄 : WNKA[F,N,𝒮,Q]) :
          List Pk[F,N]Matrix (Q' F N Q) (Q' F N Q) 𝒮
          Equations
          Instances For
            def WeightedNetKAT.rSafety.M {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {Q : Type u_4} {𝒮 : Type u_5} [Semiring 𝒮] (𝔄 : WNKA[F,N,𝒮,Q]) :
            Matrix (Q' F N Q) (Q' F N Q) 𝒮
            Equations
            Instances For
              noncomputable def WeightedNetKAT.rSafety.M_star {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {Q : Type u_4} {𝒮 : Type u_5} [Fintype Q] [DecidableEq Q] [Semiring 𝒮] (𝔄 : WNKA[F,N,𝒮,Q]) [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] :
              Matrix (Q' F N Q) (Q' F N Q) 𝒮
              Equations
              Instances For
                noncomputable def WeightedNetKAT.rSafety.sem' {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {Q : Type u_4} {𝒮 : Type u_5} [Fintype Q] [DecidableEq Q] [Semiring 𝒮] (𝔄 : WNKA[F,N,𝒮,Q]) [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [Listed Q] [KStar 𝒮] :
                𝒮
                Equations
                Instances For
                  def WeightedNetKAT.rSafety.EI {F : Type u_1} [Listed F] {N : Type u_2} [Listed N] {Q : Type u_4} {𝒮 : Type u_5} [Listed Q] [Semiring 𝒮] :
                  EMatrix Unit (Q' F N Q) 𝒮
                  Equations
                  Instances For
                    def WeightedNetKAT.rSafety. {F : Type u_1} [Listed F] {N : Type u_2} [Listed N] {Q : Type u_4} {𝒮 : Type u_5} [Listed Q] [Semiring 𝒮] (𝔈 : EWNKA[F,N,𝒮,Q]) (β : Li[Pk[F,N]]) :
                    EMatrix (Q' F N Q) (Q' F N Q) 𝒮
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      def WeightedNetKAT.rSafety. {F : Type u_1} [Listed F] {N : Type u_2} [Listed N] {Q : Type u_4} {𝒮 : Type u_5} [Listed Q] [Semiring 𝒮] :
                      EMatrix (Q' F N Q) Unit 𝒮
                      Equations
                      Instances For
                        def WeightedNetKAT.rSafety.EΔ_star {F : Type u_1} [Listed F] {N : Type u_2} [Listed N] {Q : Type u_4} {𝒮 : Type u_5} [Listed Q] [Semiring 𝒮] (𝔈 : EWNKA[F,N,𝒮,Q]) :
                        List Li[Pk[F,N]]EMatrix (Q' F N Q) (Q' F N Q) 𝒮
                        Equations
                        Instances For
                          def WeightedNetKAT.rSafety.EΔ_star' {F : Type u_1} [Listed F] {N : Type u_2} [Listed N] {Q : Type u_4} {𝒮 : Type u_5} [Listed Q] [Semiring 𝒮] (𝔈 : EWNKA[F,N,𝒮,Q]) (acc : EMatrix Unit (Q' F N Q) 𝒮) :
                          List Li[Pk[F,N]]EMatrix Unit (Q' F N Q) 𝒮
                          Equations
                          Instances For
                            def WeightedNetKAT.rSafety.Esem {F : Type u_1} [Listed F] {N : Type u_2} [Listed N] {Q : Type u_4} {𝒮 : Type u_5} [Listed Q] [Semiring 𝒮] (𝔈 : EWNKA[F,N,𝒮,Q]) :
                            List Li[Pk[F,N]]𝒮
                            Equations
                            Instances For
                              def WeightedNetKAT.rSafety.EM {F : Type u_1} [Listed F] {N : Type u_2} [Listed N] {Q : Type u_4} {𝒮 : Type u_5} [Listed Q] [Semiring 𝒮] (𝔈 : EWNKA[F,N,𝒮,Q]) :
                              EMatrix (Q' F N Q) (Q' F N Q) 𝒮
                              Equations
                              Instances For
                                def WeightedNetKAT.rSafety.EM_star {F : Type u_1} [Listed F] {N : Type u_2} [Listed N] {Q : Type u_4} {𝒮 : Type u_5} [Listed Q] [Semiring 𝒮] (𝔈 : EWNKA[F,N,𝒮,Q]) [KStar 𝒮] :
                                EMatrix (Q' F N Q) (Q' F N Q) 𝒮
                                Equations
                                Instances For
                                  def WeightedNetKAT.rSafety.Esem' {F : Type u_1} [Listed F] {N : Type u_2} [Listed N] {Q : Type u_4} {𝒮 : Type u_5} [Listed Q] [Semiring 𝒮] (𝔈 : EWNKA[F,N,𝒮,Q]) [KStar 𝒮] :
                                  𝒮
                                  Equations
                                  Instances For
                                    @[simp]
                                    @[simp]
                                    theorem WeightedNetKAT.rSafety.EΔ_eq_Δ {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {Q : Type u_4} {𝒮 : Type u_5} [Listed Q] [DecidableEq Q] [Semiring 𝒮] (𝔈 : EWNKA[F,N,𝒮,Q]) [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] {β : Li[Pk[F,N]]} :
                                    @[simp]
                                    @[simp]
                                    theorem WeightedNetKAT.rSafety.Esem'_eq_sem' {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {Q : Type u_4} {𝒮 : Type u_5} [Listed Q] [Fintype Q] [DecidableEq Q] [Semiring 𝒮] (𝔈 : EWNKA[F,N,𝒮,Q]) [KStar 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [KStar 𝒮] [LawfulKStar 𝒮] [KStarIter 𝒮] [MulLeftMono 𝒮] [MulRightMono 𝒮] [OmegaContinuousNonUnitalSemiring 𝒮] :
                                    Esem' 𝔈 = sem' 𝔈.toWNKA
                                    def WeightedNetKAT.rSafety.ErSafety {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_5} [Semiring 𝒮] [KStar 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [LawfulKStar 𝒮] (p : Pol[F,N,𝒮]) (r : 𝒮) :
                                    Equations
                                    Instances For
                                      def WeightedNetKAT.rSafety.sem'_fast {F : Type u_6} [Listed F] [DecidableEq F] {N : Type u_7} [Listed N] [DecidableEq N] {Q : Type u_8} {𝒮 : Type u_9} [Fintype Q] [DecidableEq Q] [Semiring 𝒮] (𝔄 : WNKA[F,N,𝒮,Q]) [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [Listed Q] [KStar 𝒮] :
                                      𝒮
                                      Equations
                                      Instances For
                                        def WeightedNetKAT.RPol.wnkaFast {F : Type u_6} [Listed F] {N : Type u_7} [Listed N] {𝒮 : Type u_8} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [DecidableEq N] [DecidableEq F] [KStar 𝒮] [LawfulKStar 𝒮] (p : RPol 𝒮) :
                                        WNKA[F,N,𝒮,S p]
                                        Equations
                                        Instances For
                                          theorem WeightedNetKAT.rSafety.rSafety_iff {F : Type u_1} [Fintype F] [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_5} [Semiring 𝒮] [KStar 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [KStar 𝒮] [LawfulKStar 𝒮] [KStarIter 𝒮] [MulLeftMono 𝒮] [MulRightMono 𝒮] [OmegaContinuousNonUnitalSemiring 𝒮] [Inhabited Pk[F,N]] {p : Pol[F,N,𝒮]} {r : 𝒮} :
                                          rSafety p r ∀ (x : GS F N), RPol.𝒜~p.toRPol x r
                                          theorem WeightedNetKAT.rSafety.rSafety_iff' {F : Type u_1} [Fintype F] [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_5} [Semiring 𝒮] [KStar 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [KStar 𝒮] [LawfulKStar 𝒮] [KStarIter 𝒮] [MulLeftMono 𝒮] [MulRightMono 𝒮] [OmegaContinuousNonUnitalSemiring 𝒮] [Inhabited Pk[F,N]] {p : Pol[F,N,𝒮]} {r : 𝒮} :
                                          @[implicit_reducible]
                                          Equations
                                          Instances For
                                            theorem WeightedNetKAT.rSafety.ωSum_GS_eq_ωSum_nat {F : Type u_1} [Fintype F] [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_5} [Semiring 𝒮] [KStar 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [KStar 𝒮] [LawfulKStar 𝒮] [KStarIter 𝒮] [MulLeftMono 𝒮] [MulRightMono 𝒮] [OmegaContinuousNonUnitalSemiring 𝒮] {f : GS F N𝒮} :
                                            ω∑ (x : GS F N), f x = ω∑ (n : ), xFinset.univ ×ˢ Finset.univ ×ˢ Finset.univ, match x with | (α, xs, β) => f (α, xs.toList, β)
                                            theorem WeightedNetKAT.rSafety.rSafety_iff'' {F : Type u_1} [Fintype F] [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_5} [Semiring 𝒮] [KStar 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [KStar 𝒮] [LawfulKStar 𝒮] [KStarIter 𝒮] [MulLeftMono 𝒮] [MulRightMono 𝒮] [OmegaContinuousNonUnitalSemiring 𝒮] [Inhabited Pk[F,N]] {p : Pol[F,N,𝒮]} {r : 𝒮} :
                                            theorem WeightedNetKAT.rSafety.rSafety_iff_ErSafety {F : Type u_1} [Fintype F] [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_5} [Semiring 𝒮] [KStar 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [KStar 𝒮] [LawfulKStar 𝒮] [KStarIter 𝒮] [MulLeftMono 𝒮] [MulRightMono 𝒮] [OmegaContinuousNonUnitalSemiring 𝒮] [Inhabited Pk[F,N]] {p : Pol[F,N,𝒮]} {r : 𝒮} :
                                            @[implicit_reducible]
                                            instance WeightedNetKAT.rSafety.instDecidableErSafetyOfDecidableRelLe {F : Type u_1} [Listed F] [DecidableEq F] {N : Type u_2} [Listed N] [DecidableEq N] {𝒮 : Type u_5} [Semiring 𝒮] [OmegaCompletePartialOrder 𝒮] [OrderBot 𝒮] [IsPositiveOrderedAddMonoid 𝒮] [KStar 𝒮] [LawfulKStar 𝒮] [DecidableRel fun (x1 x2 : 𝒮) => x1 x2] {p : Pol[F,N,𝒮]} {r : 𝒮} :
                                            Equations
                                            def WeightedNetKAT.rSafety.extraction_len {F : Type u_1} [Listed F] {N : Type u_2} [Listed N] [DecidableEq N] {Q : Type u_4} {𝒮 : Type u_5} [Listed Q] [Semiring 𝒮] (𝔈 : EWNKA[F,N,𝒮,Q]) [DecidableEq 𝒮] (n : ) (r : 𝒮) :
                                            Option (GS F N)

                                            Enumerate all GS and check their weight

                                            Example execution time: N/A

                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              def WeightedNetKAT.rSafety.extraction_len' {F : Type u_1} [Listed F] {N : Type u_2} [Listed N] {Q : Type u_4} {𝒮 : Type u_5} [Listed Q] [Semiring 𝒮] (𝔈 : EWNKA[F,N,𝒮,Q]) [DecidableEq 𝒮] (n : ) (r : 𝒮) :
                                              Option (GS F N)

                                              Enumerate all GS and check their weight, reusing computation up to the exit weight

                                              Example execution time: 113.988409s

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                def WeightedNetKAT.rSafety.extraction_len'' {F : Type u_1} [Listed F] {N : Type u_2} [Listed N] {Q : Type u_4} {𝒮 : Type u_5} [Listed Q] [Semiring 𝒮] (𝔈 : EWNKA[F,N,𝒮,Q]) [DecidableEq 𝒮] (acc : EMatrix Unit Q 𝒮) (n : ) (γ : Li[Pk[F,N]]) (r : 𝒮) :
                                                Option (GS F N)
                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For
                                                  def WeightedNetKAT.rSafety.extraction_len₀ {F : Type u_1} [Listed F] {N : Type u_2} [Listed N] {Q : Type u_4} {𝒮 : Type u_5} [Listed Q] [Semiring 𝒮] (𝔈 : EWNKA[F,N,𝒮,Q]) [DecidableEq 𝒮] (n : ) (r : 𝒮) :
                                                  Option (GS F N)

                                                  Enumerate all GS and check their weight, reusing computation up for every prefix

                                                  Example execution time: 30.157497s

                                                  Equations
                                                  Instances For
                                                    partial def WeightedNetKAT.rSafety.extraction_go {F : Type u_1} [Listed F] {N : Type u_2} [Listed N] {Q : Type u_4} {𝒮 : Type u_5} [Listed Q] [Semiring 𝒮] (𝔈 : EWNKA[F,N,𝒮,Q]) [DecidableEq 𝒮] [Inhabited F] [Inhabited N] (n : ) (r : 𝒮) :
                                                    GS F N
                                                    def WeightedNetKAT.rSafety.extraction {F : Type u_1} [Listed F] {N : Type u_2} [Listed N] {Q : Type u_4} {𝒮 : Type u_5} [Listed Q] [Semiring 𝒮] (𝔈 : EWNKA[F,N,𝒮,Q]) [DecidableEq 𝒮] [Inhabited F] [Inhabited N] (r : 𝒮) :
                                                    GS F N
                                                    Equations
                                                    Instances For