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

                  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 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
                    @[simp]
                    theorem Sequent.isFree_then_without_isFree (LRO : Sequent) :
                    LRO.isFree = true∀ (anf : AnyNegFormula), (LRO.without anf).isFree = true
                    inductive Side :
                    Instances For
                      def sideOf {α : Type u_1} :
                      α αSide
                      Equations
                      Instances For
                        Equations
                        Instances For
                          theorem AnyNegFormula.in_side_of_setEqTo {side : Side} {X Y : Sequent} (h : X.setEqTo Y) {anf : AnyNegFormula} :
                          anf.in_side side X anf.in_side side Y

                          Local Tableaux #

                          Local rules replace a given set of formulas by other sets, one for each branch. The list of resulting branches can be empty, representing that the given set is closed. In the Haskell prover this is done in "ruleFor" in the Logic.PDL.Prove.Tree module.

                          Instances For

                            The loaded diamond rule, given by unfoldDiamondLoaded. In MB page 19 these were multiple rules ¬u, ¬; ¬* and ¬?. It replaces the loaded formula by up to one loaded formula and a list of normal formulas. It's a bit annoying to need the rule twice here due to the definition of LoadFormula and the extra definition of unfoldDiamondLoaded'.

                            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

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

                                inductive LocalRule :

                                A local rule is a OneSidedLocalRule, a left-right contradiction, or a LoadRule. Note that formulas can be in four places: left, right, loaded left, loaded right.

                                We do not have neg/contradiction rules between loaded and unloaded formulas (i.e. between ({unload χ}, ∅, some (Sum.inl ~χ)) and (∅, {unload χ}, some (Sum.inr ~χ))) because in any such case we could also close the tableau before or without loading.

                                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
                                      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

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

                                          Equations
                                          Instances For

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

                                            Equations
                                            Instances For

                                              A sequent is basic iff it only contains basic formulas and is not closed.

                                              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
                                                    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') :

                                                      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) :
                                                      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) (φ : α) :
                                                      count φ L = count φ (L.diff M) + 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.

                                                      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 localRuleApp.decreases_DM {X : Sequent} {B : List Sequent} (lrA : LocalRuleApp X B) (Y : Sequent) :
                                                        Y Blt_Sequent Y X
                                                        @[irreducible]
                                                        Equations
                                                        Instances For

                                                          Helper functions, relating end nodes and children #

                                                          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) }
                                                          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