Documentation

Pdl.Syntax

Syntax (Section 2.1) #

inductive Formula :
Instances For
    @[instance_reducible]
    Equations
    @[instance_reducible]
    Equations
    def instDecidableEqFormula.decEq_1 (x✝ x✝¹ : Formula) :
    Decidable (x✝ = x✝¹)
    Equations
    Instances For
      def instDecidableEqProgram.decEq_1 (x✝ x✝¹ : Formula) :
      Decidable (x✝ = x✝¹)
      Equations
      Instances For
        def instDecidableEqFormula.decEq_2 (x✝ x✝¹ : Program) :
        Decidable (x✝ = x✝¹)
        Equations
        Instances For
          def instDecidableEqProgram.decEq_2 (x✝ x✝¹ : Program) :
          Decidable (x✝ = x✝¹)
          Equations
          Instances For
            inductive Program :
            Instances For

              Abbreviations and Notation #

              Equations
              Instances For

                □(αs,φ)

                Equations
                Instances For
                  @[instance_reducible]
                  Equations
                  @[instance_reducible]
                  Equations
                  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

                      Union of a list of programs. The empty union is ?'⊥, a program that cannot be executed, so that [(⋃ ∅)*]φ is equivalent to φ.

                      Equations
                      Instances For

                        A basic formula is of the form ¬⊥, p, ¬p, [a]_ or ¬[a]_. Note: in the article also is basic, but not here because we want to apply OneSidedLocalRule.bot to it.

                        Equations
                        Instances For
                          Equations
                          Instances For
                            theorem Program.isAtomic_iff {α : Program} :
                            α.isAtomic ∃ (a : ), α = ·a
                            Equations
                            Instances For
                              @[instance_reducible]
                              Equations
                              • One or more equations did not get rendered due to their size.
                              theorem Program.isStar_iff {α : Program} :
                              α.isStar ∃ (β : Program), α = (β)

                              Tools for Box Formulas #

                              @[simp]
                              theorem Formula.boxes_nil {φ : Formula} :
                              @[simp]
                              theorem Formula.boxes_cons {β : Program} {δ : List Program} {φ : Formula} :
                              @[simp]
                              theorem Formula.boxes_injective {αs : List Program} {φ ψ : Formula} :
                              ((⌈⌈αs⌉⌉φ) = ⌈⌈αs⌉⌉ψ) φ = ψ
                              theorem boxes_last {δ : List Program} {α : Program} {φ : Formula} :
                              Equations
                              Instances For
                                theorem def_of_boxesOf_def {φ : Formula} {γ : List Program} {ψ : Formula} (h : boxesOf φ = (γ, ψ)) :
                                Equations
                                Instances For
                                  theorem boxesOf_def_of_def_of_nonBox {φ : Formula} {γ : List Program} {ψ : Formula} (h : φ = ⌈⌈γ⌉⌉ψ) (nonBox : ¬ψ.isBox) :
                                  boxesOf φ = (γ, ψ)
                                  @[simp]
                                  theorem nonBox_of_boxesOf_def {φ : Formula} {L : List Program} {ψ : Formula} (bdef : boxesOf φ = (L, ψ)) :
                                  theorem boxesOf_nonBox {φ : Formula} (notBox : ¬φ.isBox) :
                                  theorem defs_of_boxesOf_last_of_nonBox {φ : Formula} (notBox : ¬φ.isBox) (δs : List Program) (α : Program) :
                                  boxesOf (⌈⌈δs⌉⌉αφ) = (δs ++ [α], φ)

                                  If φ is not a box then we know the result of boxesOf (⌈⌈δs⌉⌉⌈α⌉φ). A more general version without α should also hold.

                                  Loaded Formulas #

                                  Loaded formulas consist of a non-empty sequence of loading boxes, and a normal formula. For loading boxes we write ⌊α⌋ instead of ⌈α⌉.

                                  inductive AnyFormula :
                                  Instances For
                                    @[instance_reducible]
                                    Equations
                                    @[instance_reducible]
                                    Equations
                                    def instDecidableEqLoadFormula.decEq_2 (x✝ x✝¹ : LoadFormula) :
                                    Decidable (x✝ = x✝¹)
                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      def instDecidableEqAnyFormula.decEq_2 (x✝ x✝¹ : LoadFormula) :
                                      Decidable (x✝ = x✝¹)
                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        inductive LoadFormula :
                                        Instances For
                                          inductive AnyNegFormula :
                                          Instances For
                                            Equations
                                            Instances For
                                              @[simp]
                                              @[simp]
                                              theorem loadMulti_cons {β : Program} {δ : List Program} {α : Program} {φ : Formula} :
                                              loadMulti (β :: δ) α φ = βAnyFormula.loaded (loadMulti δ α φ)
                                              Equations
                                              Instances For
                                                @[simp]
                                                theorem unload_loadMulti {δ : List Program} {α : Program} {φ : Formula} :
                                                inductive NegLoadFormula :
                                                Instances For
                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For
                                                    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
                                                          Instances For
                                                            @[simp]

                                                            Load a possibly already loaded formula χ with a sequence δ of boxes. The result is loaded iff δ≠[] or χ was loaded.

                                                            Equations
                                                            Instances For
                                                              @[simp]
                                                              @[simp]
                                                              theorem AnyFormula.loadBoxes_cons {α : Program} {γ : List Program} {ξ : AnyFormula} :
                                                              loadBoxes (α :: γ) ξ = loaded (αloadBoxes γ ξ)
                                                              theorem AnyFormula.loadBoxes_append {as bs : List Program} {φ : AnyFormula} :
                                                              loadBoxes (as ++ bs) φ = loadBoxes as (loadBoxes bs φ)

                                                              Spliting of loaded formulas #

                                                              Split any formula into the list of loaded boxes and the free formula.

                                                              Equations
                                                              Instances For

                                                                Split a loaded formula into the list of loaded boxes and the free formula.

                                                                Equations
                                                                Instances For
                                                                  @[simp]
                                                                  theorem LoadFormula.split_inj {ξ ξ' : LoadFormula} (h : ξ.split = ξ'.split) :
                                                                  ξ = ξ'
                                                                  theorem AnyFormula.split_inj {ξ ξ' : AnyFormula} (h : ξ.split = ξ'.split) :
                                                                  ξ = ξ'
                                                                  theorem AnyFormula.box_split {α : Program} (af : AnyFormula) :
                                                                  (αaf).split = (α :: af.split.1, af.split.2)
                                                                  Equations
                                                                  Instances For
                                                                    @[simp]
                                                                    theorem loadMulti_nonEmpty_box {δ : List Program} {α : Program} {h' : α :: δ []} {φ : Formula} (h : δ []) :
                                                                    @[simp]
                                                                    theorem loadMulti_split {αs : List Program} {α : Program} {φ : Formula} :
                                                                    (loadMulti αs α φ).split = (αs ++ [α], φ)
                                                                    @[simp]
                                                                    theorem LoadFormula.split_eq_loadMulti_nonEmpty' {δ : List Program} {φ : Formula} (lf : LoadFormula) (h : δ []) (h2 : lf.split = (δ, φ)) :
                                                                    theorem loadMulti_nonEmpty_eq_loadMulti {δ : List Program} {α : Program} {h : δ ++ [α] []} {φ : Formula} :
                                                                    loadMulti_nonEmpty (δ ++ [α]) h φ = loadMulti δ α φ
                                                                    theorem LoadFormula.split_eq_loadMulti (lf : LoadFormula) {δ : List Program} {α : Program} {φ : Formula} (h : lf.split = (δ ++ [α], φ)) :
                                                                    lf = loadMulti δ α φ
                                                                    theorem LoadFormula.exists_splitLast (lf : LoadFormula) :
                                                                    ∃ (δ : List Program) (α : Program), lf.split.1 = δ ++ [α]
                                                                    theorem LoadFormula.exists_loadMulti (lf : LoadFormula) :
                                                                    ∃ (δ : List Program) (α : Program) (φ : Formula), lf = loadMulti δ α φ
                                                                    theorem loadMulti_eq_of_some {d : Program} {δ : List Program} {β : Program} {φ : Formula} (h : δ.head? = some d) :

                                                                    splitLast #

                                                                    def splitLast {α : Type u_1} :
                                                                    List αOption (List α × α)

                                                                    Helper function for YsetLoad' to get last list element.

                                                                    Equations
                                                                    Instances For
                                                                      @[simp]
                                                                      theorem splitLast_nil {α : Type u_1} :
                                                                      theorem nil_of_splitLast_none {α✝ : Type u_1} {δs : List α✝} :
                                                                      splitLast δs = noneδs = []
                                                                      theorem splitLast_cons_eq_some {α : Type u_1} (x : α) (xs : List α) :
                                                                      splitLast (x :: xs) = some ((x :: xs).dropLast, (x :: xs).getLast )
                                                                      @[simp]
                                                                      theorem splitLast_append_singleton {α : Type u_1} {xs : List α} {x : α} :
                                                                      splitLast (xs ++ [x]) = some (xs, x)
                                                                      theorem splitLast_inj {α : Type u_1} {xs ys : List α} (h : splitLast xs = splitLast ys) :
                                                                      xs = ys
                                                                      theorem LoadFormula.split_splitLast_to_loadBoxes {δs : List Program} {φ : Formula} {δs_ : List Program} {δ : Program} {ξ : AnyFormula} (ξsp_def : ξ.split = (δs, φ)) (sp_def : splitLast δs = some (δs_, δ)) :
                                                                      theorem splitLast_undo_of_some {α✝ : Type u_1} {αs : List α✝} {βs_b : List α✝ × α✝} (h : splitLast αs = some βs_b) :
                                                                      βs_b.1 ++ [βs_b.2] = αs
                                                                      theorem loadMulti_of_splitLast_cons {α : Program} {αs βs : List Program} {β : Program} {φ : Formula} (h : splitLast (α :: αs) = some (βs, β)) :

                                                                      Measures #

                                                                      class HasLength (α : Type) :
                                                                      • lengthOf : α
                                                                      Instances
                                                                        @[instance_reducible]
                                                                        Equations
                                                                        @[instance_reducible]
                                                                        Equations
                                                                        @[instance_reducible]
                                                                        Equations
                                                                        @[instance_reducible]
                                                                        Equations
                                                                        @[instance_reducible]
                                                                        Equations
                                                                        theorem Formula.ne_neg_neg_self (φ : Formula) :
                                                                        φ ~~φ

                                                                        No formula is its own double negation.

                                                                        theorem pair_neg_ne_singleton (φ ψ : Formula) :
                                                                        {φ, ~φ} {ψ}

                                                                        A pair {φ, ~φ} is never a singleton.

                                                                        theorem pair_neg_inj {φ ψ : Formula} (h : {φ, ~φ} = {ψ, ~ψ}) :
                                                                        φ = ψ

                                                                        The pairs {φ, ~φ} determine φ.

                                                                        Sorting formulas #

                                                                        Needed to convert a Finset Formula to List Formula.

                                                                        TODO: make this a separate file

                                                                        Order: ⊥ < p < ¬φ < φ1∧φ2 < [α]φ

                                                                        Note that we want this to be antisymmetric later, so we cannot just use < on some measure. An alternative approach here would be to even go for Denumerable.

                                                                        Equations
                                                                        Instances For
                                                                          Equations
                                                                          Instances For
                                                                            @[instance_reducible]
                                                                            Equations
                                                                            @[instance_reducible]
                                                                            Equations
                                                                            @[instance_reducible]
                                                                            Equations
                                                                            @[instance_reducible]
                                                                            Equations

                                                                            Deciding the order #

                                                                            def Program.decLe (α β : Program) :
                                                                            Decidable (α.le β)

                                                                            The order on programs is decidable.

                                                                            Equations
                                                                            Instances For
                                                                              @[instance_reducible]
                                                                              Equations
                                                                              @[instance_reducible]
                                                                              Equations

                                                                              The order is a linear order #

                                                                              theorem Formula.le_rfl (φ : Formula) :
                                                                              φ.le φ

                                                                              The order on formulas is reflexive.

                                                                              theorem Program.le_rfl (α : Program) :
                                                                              α.le α

                                                                              The order on programs is reflexive.

                                                                              theorem Formula.le_antisymm (φ ψ : Formula) :
                                                                              φ.le ψψ.le φφ = ψ

                                                                              The order on formulas is antisymmetric.

                                                                              theorem Program.le_antisymm (α β : Program) :
                                                                              α.le ββ.le αα = β

                                                                              The order on programs is antisymmetric.

                                                                              theorem Formula.le_total (φ ψ : Formula) :
                                                                              φ.le ψ ψ.le φ

                                                                              The order on formulas is total.

                                                                              theorem Program.le_total (α β : Program) :
                                                                              α.le β β.le α

                                                                              The order on programs is total.

                                                                              theorem Formula.le_trans_aux (φ ψ χ : Formula) :
                                                                              φ.le ψψ.le χφ.le χ

                                                                              The order on formulas is transitive.

                                                                              theorem Program.le_trans_aux (α β γ : Program) :
                                                                              α.le ββ.le γα.le γ

                                                                              The order on programs is transitive.

                                                                              theorem Formula.le_trans (f g h : Formula) :
                                                                              f gg hf h
                                                                              instance instTotalFormulaLe :
                                                                              Std.Total fun (a b : Formula) => a b
                                                                              Equations
                                                                              Instances For
                                                                                @[simp]
                                                                                theorem Formula.mem_fsort {φ : Formula} {X : Finset Formula} :
                                                                                φ X.fsort φ X