Documentation

Pdl.LocalTableau

Local Tableaux (Section 3) #

Tableau Nodes #

@[reducible, inline]
abbrev Olf :

In nodes we optionally have a negated loaded formula on the left or right.

Equations
Instances For
    def Olf.voc :
    Equations
    Instances For

      A tableau node is labelled with two lists of formulas and an Olf.

      Equations
      Instances For

        Two Sequents are set-equal when their components are finset-equal. That is, we do not care about the order of the lists, but we do care about the side of the formula and what formual is loaded. Hint: use List.toFinset.ext_iff with this.

        Equations
        Instances For
          Equations
          Instances For
            Equations
            Instances For
              Equations
              Instances For
                Equations
                Instances For
                  Equations
                  Instances For
                    Equations
                    Instances For
                      theorem setEqTo_isLoaded_iff {X Y : Sequent} (h : X.setEqTo Y) :
                      X.isLoaded = Y.isLoaded

                      Semantics of a Sequent #

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Equations
                      • One or more equations did not get rendered due to their size.
                      Equations
                      theorem tautImp_iff_SequentUnsat {φ ψ : Formula} {X : Sequent} :
                      X = ([φ], [~ψ], none)(φψ ¬HasSat.satisfiable X)
                      theorem vDash_setEqTo_iff {W : Type} {X Y : Sequent} (h : X.setEqTo Y) (M : KripkeModel W) (w : W) :
                      (M, w)X (M, w)Y

                      Different kinds of formulas as elements of Sequent #

                      Equations
                      Instances For
                        Equations
                        Equations
                        Instances For

                          Local Tableaux #

                          A set is closed iff it contains or contains a formula and its negation.

                          Equations
                          Instances For
                            Instances For
                              Instances For
                                instance instReprLoadRule {a✝ : NegLoadFormula} {a✝¹ : List (List Formula × Option NegLoadFormula)} :
                                Repr (LoadRule a✝ a✝¹)
                                Equations

                                Given a LoadRule application, define the equivalent unloaded rule application. This allows re-using oneSidedLocalRuleTruth to prove loadRuleTruth.

                                Equations
                                Instances For
                                  theorem loadRuleTruth {χ : LoadFormula} {B : List (List Formula × Option NegLoadFormula)} (lr : LoadRule (~'χ) B) :
                                  (~χ.unload)dis (List.map (Con pairUnload) B)

                                  The loaded unfold rule is sound and invertible. In the notes this is part of localRuleTruth.

                                  inductive LocalRule :
                                  Instances For
                                    instance instReprLocalRule {a✝ : Sequent} {a✝¹ : List Sequent} :
                                    Repr (LocalRule a✝ a✝¹)
                                    Equations
                                    Equations
                                    @[simp]
                                    theorem Option.some_subseteq {α : Type u_1} {x : α} {O : Option α} :
                                    some x O some x = O
                                    instance Option.insHasSdiff {α : Type u_1} [DecidableEq α] :

                                    Instance that is used to say (O : Olf) \ (O' : Olf).

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    def Option.overwrite {α : Type u_1} :
                                    Option αOption αOption α
                                    Equations
                                    Instances For
                                      def Olf.change (oldO Ocond newO : Olf) :
                                      Equations
                                      Instances For
                                        @[simp]
                                        theorem Olf.change_none_none {oldO : Olf} :
                                        oldO.change none none = oldO
                                        @[simp]
                                        theorem Olf.change_some {oldO whatever : Olf} {wnlf : NegLoadFormula NegLoadFormula} :
                                        oldO.change whatever (some wnlf) = some wnlf
                                        def applyLocalRule {Lcond Rcond : List Formula} {Ocond : Olf} {ress : List Sequent} :
                                        LocalRule (Lcond, Rcond, Ocond) ressSequentList Sequent
                                        Equations
                                        • applyLocalRule x✝ (L, R, O) = List.map (fun (x : Sequent) => match x with | (Lnew, Rnew, Onew) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O.change Ocond Onew)) ress
                                        Instances For
                                          inductive LocalRuleApp :
                                          Instances For
                                            theorem localRuleTruth {X : Sequent} {C : List Sequent} (lrA : LocalRuleApp X C) {W : Type} (M : KripkeModel W) (w : W) :
                                            (M, w)X CiC, (M, w)Ci
                                            Equations
                                            Instances For

                                              A sequent is basic iff it only contains ⊥, ¬⊥, p, ¬p, [A]_ or ¬[A]_ formulas.

                                              Equations
                                              Instances For
                                                inductive LocalTableau (X : Sequent) :

                                                Local tableau for X, maximal by definition.

                                                Instances For

                                                  Termination of LocalTableau #

                                                  @[irreducible]

                                                  The local measure we use together with D-M to show that LocalTableau are finite.

                                                  Equations
                                                  Instances For
                                                    theorem lmOfFormula_lt_box_of_nonAtom {φ : Formula} {α : Program} (h : ¬α.isAtomic) :
                                                    Equations
                                                    Instances For
                                                      Equations
                                                      Instances For
                                                        theorem node_to_multiset_eq {L R : List Formula} {O : Olf} :
                                                        node_to_multiset (L, R, O) = L + R + O.toForm
                                                        theorem node_to_multiset_eq_of_three_eq {L L' R R' : List Formula} {O O' : Olf} (hL : L = L') (hR : R = R') (hO : O = O') :
                                                        node_to_multiset (L, R, O) = node_to_multiset (L', R', O')

                                                        If each three parts are the same then node_to_multiset is the same.

                                                        theorem List.Subperm.append {α : Type u_1} {l₁ l₂ r₁ r₂ : List α} :
                                                        l₁.Subperm l₂r₁.Subperm r₂(l₁ ++ r₁).Subperm (l₂ ++ r₂)
                                                        theorem preconP_to_submultiset {Lcond L Rcond R : List Formula} {Ocond O : Olf} (preconditionProof : Lcond.Subperm L Rcond.Subperm R Ocond O) :
                                                        node_to_multiset (Lcond, Rcond, Ocond) node_to_multiset (L, R, O)
                                                        theorem Multiset.sub_of_le {α : Type u_1} [DecidableEq α] {M N X Y : Multiset α} (h : N M) :
                                                        M - N + Y = X M + Y = X + N
                                                        theorem Multiset_diff_append_of_le {α : Type u_1} [DecidableEq α] {R Rcond Rnew : List α} :
                                                        (R.diff Rcond ++ Rnew) = R - Rcond + Rnew
                                                        theorem List.Perm_diff_append_of_Subperm {α : Type u_1} [DecidableEq α] {L M : List α} (h : M.Subperm L) :
                                                        L.Perm (L.diff M ++ M)
                                                        theorem List.count_eq_diff_of_subperm {α : Type u_1} [DecidableEq α] {L M : List α} (h : M.Subperm L) (φ : α) :
                                                        List.count φ L = List.count φ (L.diff M) + List.count φ M
                                                        theorem node_to_multiset_of_precon {L R Lcond Rcond Lnew Rnew : List Formula} {O Ocond Onew : Olf} (precon : Lcond.Subperm L Rcond.Subperm R Ocond O) (O_extracon : O noneOcond = noneOnew = none) :
                                                        node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond) + node_to_multiset (Lnew, Rnew, Onew) = node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O.change Ocond Onew)

                                                        Applying node_to_multiset before or after applyLocalRule gives the same.

                                                        def lt_Sequent (X Y : Sequent) :
                                                        Equations
                                                        Instances For
                                                          theorem LocalRule.cond_non_empty {Lcond Rcond : List Formula} {Ocond : Olf} {X : List Sequent} (rule : LocalRule (Lcond, Rcond, Ocond) X) :
                                                          node_to_multiset (Lcond, Rcond, Ocond)
                                                          theorem Multiset.sub_add_of_subset_eq {α : Type u_1} {X : Multiset α} [DecidableEq α] {M : Multiset α} (h : X M) :
                                                          M = M - X + X
                                                          theorem unfoldBox.decreases_lmOf_nonAtomic {ψ : Formula} {α : Program} {φ : Formula} {X : List Formula} (α_non_atomic : ¬α.isAtomic) (X_in : X unfoldBox α φ) (ψ_in_X : ψ X) :
                                                          theorem H_goes_down (α : Program) (φ : Formula) {Fs : List Formula} {δ : List Program} (in_H : (Fs, δ) H α) {ψ : Formula} (in_Fs : ψ Fs) :
                                                          theorem unfoldDiamond.decreases_lmOf_nonAtomic {ψ : Formula} {α : Program} {φ : Formula} {X : List Formula} (α_non_atomic : ¬α.isAtomic) (X_in : X unfoldDiamond α φ) (ψ_in_X : ψ X) :
                                                          theorem LocalRule.Decreases {X : Sequent} {ress : List Sequent} (rule : LocalRule X ress) (Y : Sequent) :
                                                          Y ressynode_to_multiset Y, xnode_to_multiset X, y < x
                                                          def MultisetLT' {α : Type u_1} [Preorder α] (M N : Multiset α) :
                                                          Equations
                                                          Instances For
                                                            theorem MultisetDMLT.iff_MultisetLT' {α : Type u_1} [Preorder α] {M N : Multiset α} :
                                                            M.IsDershowitzMannaLT N MultisetLT' M N
                                                            theorem localRuleApp.decreases_DM {X : Sequent} {B : List Sequent} (lrA : LocalRuleApp X B) (Y : Sequent) :
                                                            Y Blt_Sequent Y X
                                                            @[irreducible]
                                                            Equations
                                                            Instances For
                                                              noncomputable def endNode_to_endNodeOfChildNonComp {X : Sequent} {a✝ : List Sequent} {subTabs : (Y : Sequent) → Y a✝LocalTableau Y} {E : Sequent} (lrA : LocalRuleApp X a✝) (E_in : E endNodesOf (LocalTableau.byLocalRule lrA subTabs)) :
                                                              { x : Sequent // ∃ (h : x a✝), E endNodesOf (subTabs x h) }

                                                              Helper functions, relating end nodes and children #

                                                              Equations
                                                              • One or more equations did not get rendered due to their size.
                                                              Instances For
                                                                theorem endNodeIsEndNodeOfChild {X : Sequent} {a✝ : List Sequent} {subTabs : (Y : Sequent) → Y a✝LocalTableau Y} {E : Sequent} (lrA : LocalRuleApp X a✝) (E_in : E endNodesOf (LocalTableau.byLocalRule lrA subTabs)) :
                                                                ∃ (Y : Sequent) (h : Y a✝), E endNodesOf (subTabs Y h)
                                                                theorem endNodeOfChild_to_endNode {X Y : Sequent} {ltX : LocalTableau X} {C : List Sequent} (lrA : LocalRuleApp X C) (subTabs : (Y : Sequent) → Y CLocalTableau Y) (h : ltX = LocalTableau.byLocalRule lrA subTabs) (Y_in : Y C) {Z : Sequent} (Z_in : Z endNodesOf (subTabs Y Y_in)) :

                                                                Overall Soundness and Invertibility of LocalTableau #

                                                                theorem localTableauTruth {X : Sequent} (lt : LocalTableau X) {W : Type} (M : KripkeModel W) (w : W) :
                                                                (M, w)X YendNodesOf lt, (M, w)Y