Documentation

Pdl.Local.Tableau

Local Tableaux (Section 3) #

inductive LocalTableau (X : Sequent) :

Local tableau for X, maximal by definition.

Instances For
    @[instance_reducible]
    instance LocalTableau.instDecidableEq {X : Sequent} {lt1 lt2 : LocalTableau X} :
    Decidable (lt1 = lt2)
    Equations
    • One or more equations did not get rendered due to their size.

    Termination of LocalTableau #

    @[irreducible]

    The local measure which together with D-M can be used to show that LocalTableau are finite. Note that different from the paper here we also add lmOfFormula (~φ) in the ~⌈α⌉φ case. This is needed to get lmOfFormula_lt_dia_of_nonAtom.

    Equations
    Instances For
      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 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 Dset_goes_down (α : Program) (φ : Formula) {Fs : List Formula} {δ : List Program} (in_D : (Fs, δ) Dset α) {ψ : 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 finset_sum_trichotomy {A : Type u_1} [DecidableEq A] (f : A) (X : List A) (a : A) (bs : List A) (h : xX, x = a x bs f x = 0) :
      xX.toFinset, f x f a + (List.map f bs).sum

      This is a helper for measureProp parts (d) and (e). If each element of a list X is either a, belongs to a list bs, or has f value 0, then the sum of f over X.toFinset is at most f a + (bs.map f).sum.

      theorem measureProp {α : Program} {φ φ₁ φ₂ : Formula} :
      lmOfFormula φ < lmOfFormula (~~φ) lmOfFormula φ₁ + lmOfFormula φ₂ < lmOfFormula (φ₁ φ₂) lmOfFormula (~φ₁) < lmOfFormula (~(φ₁ φ₂)) lmOfFormula (~φ₂) < lmOfFormula (~(φ₁ φ₂)) (¬α.isAtomicXunfoldBox α φ, ψX.toFinset, lmOfFormula ψ < lmOfFormula (αφ)) (¬α.isAtomicXunfoldDiamond α φ, ψX.toFinset, lmOfFormula ψ < lmOfFormula (~αφ))

      This is a summary lemma and not used as a whole anywhere. Note that parts (d) and (e) are about the measure sum over X and not single formulas, so for example (e) is not the same as unfoldDiamond.decreases_lmOf_nonAtomic. Also note that we use List.toFinset here to ignore duplicates in the list X.

      Equations
      Instances For

        An open local tableau has at least one end node.

        Equations
        Instances For

          The Dershowitz-Manna ordering on sequents #

          All formulas of a sequent as a multiset, with the loaded formula (if any) unloaded.

          Equations
          Instances For

            The multiset of the local measures of all formulas in a sequent.

            Equations
            Instances For
              def lt_Sequent (X Y : Sequent) :

              The Dershowitz-Manna ordering on sequents: X is smaller than Y iff the multiset of the lmOfFormula measures of the formulas of X is smaller than the one of Y.

              Equations
              Instances For
                theorem lt_Sequent.trans {X Y Z : Sequent} (h1 : lt_Sequent X Y) (h2 : lt_Sequent Y Z) :

                Local rules decrease the Dershowitz-Manna measure #

                The reuslts here are used for the construction of the canonical local tableau uniLocalTab.

                The key facts are:

                @[instance_reducible]

                The well-founded relation on sequents used for the termination of the recursive definitions of local tableaux. This would also better belong to Pdl/Local/Tableau.lean, where the commented-out termination_by of endNodesOf refers to it.

                Equations
                theorem Finset.union_val_of_disjoint {α : Type u_1} [DecidableEq α] {A C : Finset α} (h : Disjoint A C) :
                (A C).val = A.val + C.val

                The multiset of a union of two disjoint finite sets is the sum of the two multisets.

                theorem Finset.union_val_sdiff {α : Type u_1} [DecidableEq α] (A B : Finset α) :
                (A B).val = A.val + (B \ A).val

                Splitting off the new elements of a union.

                theorem Finset.val_eq_sdiff_add_of_subset {α : Type u_1} [DecidableEq α] {A B : Finset α} (h : BA) :
                A.val = (A \ B).val + B.val

                Splitting off the condition of a rule from the sequent it is applied to.

                theorem OneSidedLocalRule.lmOfFormula_lt {precond : Finset Formula} {ress : Finset (Finset Formula)} (orule : OneSidedLocalRule precond ress) (res : Finset Formula) :
                res ressψres, φprecond, lmOfFormula ψ < lmOfFormula φ

                Every formula in a result of a one-sided local rule is smaller than one of the formulas the rule is applied to.

                theorem LoadRule.lmOfFormula_lt {χ : LoadFormula} {ress : Finset (Finset Formula × Option NegLoadFormula)} (lrule : LoadRule (~'χ) ress) (res : Finset Formula × Option NegLoadFormula) :
                res ressψpairUnloadSet res, lmOfFormula ψ < lmOfFormula (~χ.unload)

                Every formula in a result of a loaded rule — including the new loaded formula — is smaller than the formula the rule is applied to.

                theorem lt_Sequent_of_split {X Y : Sequent} {Z A B : Multiset Formula} (hY : node_to_multiset Y = Z + A) (hX : node_to_multiset X = Z + B) (hB : B 0) (hlt : aA, bB, lmOfFormula a < lmOfFormula b) :

                A sufficient criterion for the Dershowitz-Manna ordering on sequents: the formulas of Y are those of X, with a non-empty part B replaced by formulas that are smaller.

                theorem localRuleApp.decreases_DM (lra : LocalRuleApp) (Y : Sequent) (hY : Y lra.C) :

                Local rules decrease the Dershowitz-Manna measure.

                Helper functions, relating end nodes and children #

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

                  Membership in the end nodes of a local tableau given by a local rule application.

                  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

                  Local Tableaux make progress #

                  These lemmas are used to show soundness, in particular loadedDiamondPaths.

                  theorem endNodesOf_basic {X Z : Sequent} {ltZ : LocalTableau Z} :
                  X endNodesOf ltZX.basic

                  End nodes of any local tableau are basic.

                  theorem endNodesOf_nonbasic_non_eq {X Y : Sequent} (lt : LocalTableau X) (X_nonbas : ¬X.basic) :
                  Y endNodesOf ltY X

                  If X is not basic, then for all end nodes Y of a local tableau lt for X we have that Y ≠ X.