Documentation

Pdl.Soundness

Soundness (Section 6) #

Soundness of the PDL rules #

theorem pdlRuleSat {X Y : Sequent} (r : PdlRule X Y) (satX : HasSat.satisfiable X) :

The PDL rules are sound.

inductive PathIn {H : History} {X : Sequent} :
Tableau H XType

A path in a tableau. Three constructors for the empty path, a local step or a pdl step. The loc ad pdl steps correspond to two out of three constructors of Tableau.

Instances For
    instance instDecidableEqPathIn {H✝ : History} {X✝ : Sequent} {a✝ : Tableau H✝ X✝} :
    Equations
    def tabAt {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} :
    PathIn tab(H : History) × (X : Sequent) × Tableau H X
    Equations
    Instances For
      def PathIn.append {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} (p : PathIn tab) (q : PathIn (tabAt p).snd.snd) :
      PathIn tab
      Equations
      Instances For
        @[simp]
        theorem append_eq_iff_eq {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} (s : PathIn tab) (p q : PathIn (tabAt s).snd.snd) :
        s.append p = s.append q p = q
        @[simp]
        theorem PathIn.eq_append_iff_other_eq_nil {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} (p : PathIn tab) (q : PathIn (tabAt p).snd.snd) :
        p = p.append q q = PathIn.nil
        theorem PathIn.nil_eq_append_iff_both_eq_nil {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} (p : PathIn tab) (q : PathIn (tabAt p).snd.snd) :
        @[simp]
        theorem tabAt_append {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} (p : PathIn tab) (q : PathIn (tabAt p).snd.snd) :
        tabAt (p.append q) = tabAt q
        @[simp]
        theorem tabAt_nil {Hist : History} {X : Sequent} {tab : Tableau Hist X} :
        tabAt PathIn.nil = Hist, X, tab
        @[simp]
        theorem tabAt_loc {X✝ : Sequent} {a✝ : LocalTableau X✝} {a✝¹ : Sequent} {Y_in : a✝¹ endNodesOf a✝} {tail✝ : History} {a✝² : (Y : Sequent) → Y endNodesOf a✝Tableau (X✝ :: tail✝) Y} {tail : PathIn (a✝² a✝¹ Y_in)} :
        tabAt (PathIn.loc Y_in tail) = tabAt tail
        @[simp]
        theorem tabAt_pdl {Γ✝ Δ✝ : Sequent} {r : PdlRule Γ✝ Δ✝} {tail✝ : History} {a✝ : Tableau (Γ✝ :: tail✝) Δ✝} {tail : PathIn a✝} :
        tabAt (PathIn.pdl r tail) = tabAt tail
        def nodeAt {H : History} {X : Sequent} {tab : Tableau H X} (p : PathIn tab) :

        Given a path to node t, this is its label Λ(t).

        Equations
        Instances For
          @[simp]
          theorem nodeAt_nil {Hist : History} {X : Sequent} {tab : Tableau Hist X} :
          @[simp]
          theorem nodeAt_loc {X✝ : Sequent} {a✝ : LocalTableau X✝} {a✝¹ : Sequent} {Y_in : a✝¹ endNodesOf a✝} {tail✝ : History} {a✝² : (Y : Sequent) → Y endNodesOf a✝Tableau (X✝ :: tail✝) Y} {tail : PathIn (a✝² a✝¹ Y_in)} :
          nodeAt (PathIn.loc Y_in tail) = nodeAt tail
          @[simp]
          theorem nodeAt_pdl {Γ✝ Δ✝ : Sequent} {r : PdlRule Γ✝ Δ✝} {tail✝ : History} {a✝ : Tableau (Γ✝ :: tail✝) Δ✝} {tail : PathIn a✝} :
          nodeAt (PathIn.pdl r tail) = nodeAt tail
          @[simp]
          theorem nodeAt_append {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} (p : PathIn tab) (q : PathIn (tabAt p).snd.snd) :
          nodeAt (p.append q) = nodeAt q
          def PathIn.head {Hist : History} {X : Sequent} {tab : Tableau Hist X} :
          PathIn tabSequent
          Equations
          • x✝.head = X
          Instances For
            def PathIn.last {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} (t : PathIn tab) :
            Equations
            Instances For
              def PathIn.length {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} (t : PathIn tab) :

              The length of a path is the number of actual steps.

              Equations
              Instances For
                theorem append_length {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} {p : PathIn tab} (q : PathIn (tabAt p).snd.snd) :
                (p.append q).length = p.length + q.length
                theorem PathIn.loc_Yin_irrel {X : Sequent} {rest : List Sequent} {lt : LocalTableau X} {next : (Y : Sequent) → Y endNodesOf ltTableau (X :: rest) Y} {Y : Sequent} (Y_in1 Y_in2 : Y endNodesOf lt) {tail : PathIn (next Y Y_in1)} :
                PathIn.loc Y_in1 tail = PathIn.loc Y_in2 tail

                The Y_in proof does not matter for a local path step.

                Edge Relation #

                def edge {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} (s t : PathIn tab) :

                Relation s ⋖_ t says t is one more step than s. Two cases, both defined via append.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  Notation ⋖_ for edge (because ⋖ is taken in Mathlib).

                  Equations
                  Instances For
                    theorem edge_append_loc_nil {sX : Sequent} {sHist : List Sequent} {X : History} {Hist : Sequent} {tab : Tableau X Hist} (s : PathIn tab) {lt : LocalTableau sX} (next : (Y : Sequent) → Y endNodesOf ltTableau (sX :: sHist) Y) {Y : Sequent} (Y_in : Y endNodesOf lt) (tabAt_s_def : tabAt s = sHist, sX, Tableau.loc lt next) :
                    s ⋖_ (s.append (PathIn.loc Y_in PathIn.nil))

                    Appending a one-step loc path is also a ⋖_ child. When using this, this may be helpful: convert this; rw [← heq_iff_eq, heq_eqRec_iff_heq, eqRec_heq_iff_heq].

                    @[simp]
                    theorem edge_append_pdl_nil {a✝ : History} {a✝¹ : Sequent} {a✝² : Tableau a✝ a✝¹} {s : PathIn a✝²} {Δ✝ : Sequent} {r : PdlRule (tabAt s).snd.fst Δ✝} {next : Tableau ((tabAt s).snd.fst :: (tabAt s).fst) Δ✝} (h : (tabAt s).snd.snd = Tableau.pdl r next) :
                    s ⋖_ (s.append (PathIn.pdl r PathIn.nil))

                    Appending a one-step pdl path is also a ⋖_ child.

                    @[simp]
                    theorem nil_edge_loc_nil {Y X : Sequent} {lt : LocalTableau X} {Y_in : Y endNodesOf lt} {tail : List Sequent} {next : (Y : Sequent) → Y endNodesOf ltTableau (X :: tail) Y} :
                    @[simp]
                    theorem nil_edge_pdl_nil {X Y : Sequent} {r : PdlRule X Y} {tail : List Sequent} {next : Tableau (X :: tail) Y} :
                    @[simp]
                    theorem loc_edge_loc_iff_edge {Y X : Sequent} {lt : LocalTableau X} {Y_in : Y endNodesOf lt} {tail : List Sequent} {next : (Y : Sequent) → Y endNodesOf ltTableau (X :: tail) Y} {t s : PathIn (next Y Y_in)} :
                    (PathIn.loc Y_in t) ⋖_ (PathIn.loc Y_in s) t ⋖_ s
                    @[simp]
                    theorem pdl_edge_pdl_iff_edge {X Y : Sequent} {r : PdlRule X Y} {tail : List Sequent} {a : Tableau (X :: tail) Y} {t s : PathIn a} :
                    theorem not_edge_nil {Hist : History} {X : Sequent} (tab : Tableau Hist X) (t : PathIn tab) :

                    The root has no parent. Note this holds even when Hist ≠ [].

                    theorem nodeAt_loc_nil {X Y : Sequent} {H : List Sequent} {lt : LocalTableau X} (next : (Y : Sequent) → Y endNodesOf ltTableau (X :: H) Y) (Y_in : Y endNodesOf lt) :
                    theorem nodeAt_pdl_nil {X : Sequent} {Hist : List Sequent} {Y : Sequent} (child : Tableau (X :: Hist) Y) (r : PdlRule X Y) :
                    theorem length_succ_eq_length_of_edge {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} {s t : PathIn tab} :
                    s ⋖_ ts.length + 1 = t.length

                    The length of edge-related paths differs by one.

                    theorem edge_then_length_lt {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} {s t : PathIn tab} (s_t : s ⋖_ t) :
                    s.length < t.length
                    def edge_natLT_relHom {Hist : History} {X : Sequent} {tab : Tableau Hist X} :
                    Equations
                    Instances For
                      theorem edge.wellFounded {Hist : History} {X : Sequent} {tab : Tableau Hist X} :

                      The ⋖_ relation in a tableau is well-founded.

                      instance edge.isAsymm {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} :
                      instance instLTPathIn {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} :
                      LT (PathIn tab)

                      Enable "<" notation for transitive closure of ⋖_.

                      Equations
                      instance instLEPathIn {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} :
                      LE (PathIn tab)

                      Enable "≤" notation for reflexive transitive closure of ⋖_

                      Equations
                      instance edge.TransGen_isAsymm {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} :

                      The "<" in a tableau is antisymmetric.

                      theorem PathIn.init_inductionOn {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} (t : PathIn tab) {motive : PathIn tabProp} (root : motive PathIn.nil) (step : ∀ (t : PathIn tab), motive t∀ {s : PathIn tab}, t ⋖_ smotive s) :
                      motive t

                      An induction principle for PathIn that works by ... TODO EXPLAIN -- QUESTIONS: -- - Do I need any of these? @[induction_eliminator, elab_as_elim] -- - Should it be a def or a theorem? (motive to Prop or to Sort u?)

                      theorem PathIn.nil_le_anything {a✝ : History} {a✝¹ : Sequent} {a✝² : Tableau a✝ a✝¹} {t : PathIn a✝²} :
                      theorem PathIn.loc_le_loc_of_le {Hist : List Sequent} {X Y : Sequent} {lt : LocalTableau X} {next : (Y : Sequent) → Y endNodesOf ltTableau (X :: Hist) Y} {Z_in : Y endNodesOf lt} {t1 t2 : PathIn (next Y Z_in)} (h : t1 t2) :
                      PathIn.loc Z_in t1 PathIn.loc Z_in t2
                      theorem PathIn.pdl_le_pdl_of_le {Hist X : Sequent} {Y : List Sequent} {r : Tableau (Hist :: Y) X} {Z_in : PdlRule Hist X} {t1 t2 : PathIn r} (h : t1 t2) :
                      PathIn.pdl Z_in t1 PathIn.pdl Z_in t2

                      Alternative definitions of edge #

                      def edgeRec {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} :
                      PathIn tabPathIn tabProp

                      UNUSED definition of edge recursively by "going to the end" of the paths. Note there are no mixed .loc and .pdl cases.

                      Instances For

                        Path Properties (UNUSED?) #

                        def PathIn.isLoaded {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} (t : PathIn tab) :
                        Equations
                        Instances For
                          def PathIn.isCritical {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} (t : PathIn tab) :

                          A path is critical iff the (M) rule is used on it.

                          Instances For

                            From Path to History #

                            def PathIn.toHistory {Hist : History} {X : Sequent} {tab : Tableau Hist X} (t : PathIn tab) :

                            Convert a path to a History. Does not include the last node. The history of .nil is [] because this will not go into Hist.

                            Equations
                            Instances For
                              def PathIn.toList {Hist : History} {X : Sequent} {tab : Tableau Hist X} (t : PathIn tab) :

                              Convert a path to a list of nodes. Reverse of the history and does include the last node. The list of .nil is [X].

                              Equations
                              Instances For
                                theorem PathIn.toHistory_eq_Hist {Hist : History} {X : Sequent} {tab : Tableau Hist X} (t : PathIn tab) :
                                t.toHistory ++ Hist = (tabAt t).fst

                                A path gives the same list of nodes as the history of its last node.

                                theorem tabAt_fst_length_eq_toHistory_length {X : Sequent} {tab : Tableau [] X} (s : PathIn tab) :
                                List.length (tabAt s).fst = List.length s.toHistory
                                @[simp]
                                theorem PathIn.loc_length_eq {X Y : Sequent} {Hist : List Sequent} {lt : LocalTableau X} (Y_in : Y endNodesOf lt) {next : (Y : Sequent) → Y endNodesOf ltTableau (X :: Hist) Y} (tail : PathIn (next Y Y_in)) :
                                List.length (PathIn.loc Y_in tail).toHistory = List.length tail.toHistory + 1
                                @[simp]
                                theorem PathIn.pdl_length_eq {X Y : Sequent} {Hist : List Sequent} (r : PdlRule X Y) {next : Tableau (X :: Hist) Y} (tail : PathIn next) :
                                List.length (PathIn.pdl r tail).toHistory = List.length tail.toHistory + 1
                                def PathIn.prefix {Hist : History} {X : Sequent} {tab : Tableau Hist X} (t : PathIn tab) (k : Fin (t.length + 1)) :
                                PathIn tab

                                Prefix of a path, taking only the first k steps.

                                Equations
                                Instances For
                                  theorem PathIn.prefix_toList_eq_toList_take {Hist : History} {X : Sequent} {tab : Tableau Hist X} (t : PathIn tab) (k : Fin (t.length + 1)) :
                                  (t.prefix k).toList = List.take (k + 1) t.toList

                                  The list of a prefix of a path is the same as the prefix of the list of the path.

                                  Path Rewinding #

                                  def PathIn.rewind {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} (t : PathIn tab) (k : Fin (List.length t.toHistory + 1)) :
                                  PathIn tab

                                  Rewinding a path, removing the last k steps. Cannot go into Hist. Used to go to the companion of a repeat. Returns .nil when k is the length of the whole path. We use +1 in the type because rewind 0 is always possible, even with history []. Defined using Fin.lastCases.

                                  Equations
                                  Instances For
                                    theorem PathIn.rewind_zero {Hist : History} {X : Sequent} {tab : Tableau Hist X} {p : PathIn tab} :
                                    p.rewind 0 = p

                                    Rewinding 0 steps does nothing.

                                    theorem PathIn.rewind_le {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} (t : PathIn tab) (k : Fin (List.length t.toHistory + 1)) :
                                    t.rewind k t
                                    theorem PathIn.rewind_lt_of_gt_zero {Hist : History} {X : Sequent} {tab : Tableau Hist X} (t : PathIn tab) (k : Fin (List.length t.toHistory + 1)) (k_gt_zero : k > 0) :
                                    (t.rewind k).length < t.length

                                    If we rewind by k > 0 steps then the length goes down.

                                    theorem PathIn.nodeAt_rewind_eq_toHistory_get {Hist : History} {X : Sequent} {tab : Tableau Hist X} (t : PathIn tab) (k : Fin (List.length t.toHistory + 1)) :
                                    nodeAt (t.rewind k) = (nodeAt t :: t.toHistory).get k

                                    The node we get from rewinding k steps is element k+1 in the history.

                                    Companion, cEdge, etc. #

                                    def companionOf {X : Sequent} {tab : Tableau [] X} (s : PathIn tab) (lpr : LoadedPathRepeat (tabAt s).fst (tabAt s).snd.fst) :
                                    (tabAt s).snd.snd = Tableau.rep lprPathIn tab

                                    To get the companion of an LPR node we go as many steps back as the LPR says.

                                    Equations
                                    Instances For
                                      def companion {X : Sequent} {tab : Tableau [] X} (s t : PathIn tab) :

                                      s ♥ t means s is a LPR and its companion is t

                                      Equations
                                      Instances For
                                        theorem nodeAt_companionOf_eq_toHistory_get_lpr_val {a✝ : Sequent} {tab : Tableau [] a✝} (s : PathIn tab) (lpr : LoadedPathRepeat (tabAt s).fst (tabAt s).snd.fst) (h : (tabAt s).snd.snd = Tableau.rep lpr) :
                                        nodeAt (companionOf s lpr h) = List.get s.toHistory (lpr)

                                        The node at a companion is the same as the one in the history.

                                        theorem nodeAt_companionOf_setEq {X : Sequent} {tab : Tableau [] X} (s : PathIn tab) (lpr : LoadedPathRepeat (tabAt s).fst (tabAt s).snd.fst) (h : (tabAt s).snd.snd = Tableau.rep lpr) :
                                        (nodeAt (companionOf s lpr h)).setEqTo (nodeAt s)
                                        theorem companion_loaded {a✝ : Sequent} {a✝¹ : Tableau [] a✝} {s t : PathIn a✝¹} :
                                        s t(nodeAt s).isLoaded = true (nodeAt t).isLoaded = true

                                        Any repeat and companion are both loaded.

                                        theorem companionOf_length_lt_length {a✝ : Sequent} {tab : Tableau [] a✝} {t : PathIn tab} (lpr : LoadedPathRepeat (tabAt t).fst (tabAt t).snd.fst) (h : (tabAt t).snd.snd = Tableau.rep lpr) :
                                        (companionOf t lpr h).length < t.length

                                        The companion is strictly before the the repeat.

                                        def cEdge {X : Sequent} {ctX : Tableau [] X} (s t : PathIn ctX) :
                                        Equations
                                        Instances For

                                          ≡ᶜ and Clusters #

                                          def cEquiv {X : Sequent} {tab : Tableau [] X} (s t : PathIn tab) :

                                          Nodes are c-equivalent iff there are paths both ways. Note that this is not a closure, so we do not want Relation.EqvGen here.

                                          Equations
                                          Instances For
                                            theorem cEquiv.symm {a✝ : Sequent} {tab : Tableau [] a✝} (s t : PathIn tab) :
                                            s ≡ᶜ t t ≡ᶜ s

                                            ≡ᶜ is symmetric.

                                            def clusterOf {X : Sequent} {tab : Tableau [] X} (p : PathIn tab) :
                                            Equations
                                            Instances For
                                              def before {X : Sequent} {tab : Tableau [] X} (s t : PathIn tab) :

                                              We have before s t iff there is a path from s to t but not from t to s. This means the cluster of s comes before the cluster of t in tab. NB: The notes use ◃* here but we use ◃⁺. The definitions are equivalent.

                                              Equations
                                              Instances For

                                                s <ᶜ t means there is a ◃-path from s to t but not from t to s. This means t is simpler to deal with first.

                                                Equations
                                                Instances For
                                                  theorem PathIn.before_leaf_inductionOn {X : Sequent} {tab : Tableau [] X} (t : PathIn tab) {motive : PathIn tabProp} (leaf : ∀ {u : PathIn tab}, (nodeAt u).isFree = true(¬∃ (s : PathIn tab), u ⋖_ s)motive u) (up : ∀ {u : PathIn tab}, (∀ {s : PathIn tab}, u <ᶜ smotive s)motive u) :
                                                  motive t

                                                  ≣ᶜ is an equivalence relation and <ᶜ is well-founded and converse well-founded. The converse well-founded is what we really need for induction proofs.

                                                  theorem eProp2.a {X : Sequent} {tab : Tableau [] X} (s t : PathIn tab) :
                                                  s ⋖_ ts <ᶜ t t ≡ᶜ s
                                                  theorem eProp2.b {X : Sequent} {tab : Tableau [] X} (s t : PathIn tab) :
                                                  s tt ≡ᶜ s
                                                  theorem eProp2.c_help {X : Sequent} {tab : Tableau [] X} (s : PathIn tab) :
                                                  (nodeAt s).isFree = true∀ (t : PathIn tab), s < ts <ᶜ t
                                                  theorem eProp2.c {X : Sequent} {tab : Tableau [] X} (s t : PathIn tab) :
                                                  (nodeAt s).isFree = trues ⋖_ ts <ᶜ t
                                                  theorem not_cEquiv_of_free_loaded {a✝ : Sequent} {tab : Tableau [] a✝} (s t : PathIn tab) (s_free : (nodeAt s).isFree = true) (t_loaded : (nodeAt t).isLoaded = true) :

                                                  A free node and a loaded node cannot be ≡ᶜ equivalent.

                                                  theorem eProp2.d {X : Sequent} {tab : Tableau [] X} (s t : PathIn tab) :
                                                  (nodeAt s).isLoaded = true(nodeAt t).isFree = trues ⋖_ ts <ᶜ t
                                                  theorem eProp2.d_help {X : Sequent} {tab : Tableau [] X} (s t : PathIn tab) :
                                                  (nodeAt t).isLoaded = true(nodeAt s).isFree = truet ◃⁺ s¬s ◃⁺ t
                                                  theorem eProp2.e {X : Sequent} {tab : Tableau [] X} (s u t : PathIn tab) :
                                                  s <ᶜ uu <ᶜ ts <ᶜ t

                                                  <ᶜ is transitive

                                                  theorem eProp2.f {X : Sequent} {tab : Tableau [] X} (s t : PathIn tab) :
                                                  t ◃⁺ s¬t ≡ᶜ st <ᶜ s
                                                  theorem eProp2.f_tweak {X : Sequent} {tab : Tableau [] X} (s u t : PathIn tab) :
                                                  s ◃⁺ uu ◃⁺ t¬t ≡ᶜ u¬t ≡ᶜ s
                                                  theorem eProp2.g {X : Sequent} {tab : Tableau [] X} (s t : PathIn tab) :
                                                  s <ᶜ t¬s ≡ᶜ t
                                                  theorem eProp2.h {X : Sequent} {tab : Tableau [] X} (s u t : PathIn tab) :
                                                  s <ᶜ us ≡ᶜ tt <ᶜ u
                                                  theorem eProp2 {X : Sequent} {tab : Tableau [] X} (s u t : PathIn tab) :
                                                  (s ⋖_ ts <ᶜ t t ≡ᶜ s) (s tt ≡ᶜ s) ((nodeAt s).isFree = trues ⋖_ ts <ᶜ t) ((nodeAt s).isLoaded = true(nodeAt t).isFree = trues ⋖_ ts <ᶜ t) (t <ᶜ uu <ᶜ st <ᶜ s) (t ◃⁺ s¬t ≡ᶜ st <ᶜ s) (s <ᶜ t¬s ≡ᶜ t) (s <ᶜ us ≡ᶜ tt <ᶜ u)

                                                  Soundness #

                                                  @[simp]
                                                  theorem Sequent.without_normal_isFree_iff_isFree {φ : Formula} (LRO : Sequent) :
                                                  (LRO.without (~''(AnyFormula.normal φ))).isFree = true LRO.isFree = true
                                                  @[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
                                                        @[simp]
                                                        theorem Sequent.without_loaded_in_side_isFree (LRO : Sequent) (ξ : LoadFormula) (side : Side) :
                                                        (~''(AnyFormula.loaded ξ)).in_side side LRO(LRO.without (~''(AnyFormula.loaded ξ))).isFree = true
                                                        theorem localLoadedDiamond (α : Program) {X : Sequent} (ltab : LocalTableau X) {W : Type} {M : KripkeModel W} {v w : W} (v_α_w : relate M α v w) (v_t : (M, v)X) (ξ : AnyFormula) {side : Side} (negLoad_in : (~''(AnyFormula.loaded (αξ))).in_side side X) (w_nξ : (M, w)~''ξ) :
                                                        YendNodesOf ltab, (M, v)Y (Y.isFree = true ∃ (F : List Formula) (γ : List Program), (~''(AnyFormula.loadBoxes γ ξ)).in_side side Y relateSeq M γ v w (M, v)F (F, γ) H α (Y.without (~''(AnyFormula.loadBoxes γ ξ))).isFree = true)

                                                        Helper to deal with local tableau in loadedDiamondPaths.

                                                        theorem Sequent.isLoaded_of_negAnyFormula_loaded {α : Program} {ξ : AnyFormula} {side : Side} {X : Sequent} (negLoad_in : (~''(AnyFormula.loaded (αξ))).in_side side X) :
                                                        X.isLoaded = true
                                                        theorem List.nonempty_drop_sub_succ {α✝ : Type u_1} {δ : List α✝} (δ_not_empty : δ []) (k : Fin δ.length) :
                                                        (List.drop (k + 1) δ).length + 1 = δ.length.succ - (k + 1)
                                                        theorem Vector.my_cast_head {α : Type u_1} (n m : ) (v : List.Vector α n.succ) (h : n = m) :
                                                        (hv).head = v.head
                                                        theorem Vector.my_cast_eq_val_head {α : Type u_1} (n m : ) (v : List.Vector α n.succ) (h : n = m) (h2 : v []) :
                                                        (hv).head = (↑v).head h2
                                                        theorem Vector.my_cast_toList {α : Type u_1} (n m : ) (t : List α) (ht : t.length = n) (h : n = m) :
                                                        t = List.Vector.toList (ht, ht)
                                                        theorem aux_simplify_vector_type {α : Type u_1} {q p : } (t : List α) (h : t.length = q + 1 + 1 - (p + 1 + 1)) :
                                                        let help := ; t, h = t,
                                                        theorem Vector.my_drop_succ_cons {α : Type u_1} {m n : } (x : α) (t : List α) (h : (x :: t).length = n.succ) (hyp : m < n) :
                                                        let help := ; List.Vector.drop (m + 1) x :: t, h = List.Vector.drop m t,
                                                        theorem Vector.get_succ_eq_head_drop {α : Type u_1} {n : } {v : List.Vector α n.succ} (k : Fin n) (j : ) (h : n + 1 - (k + 1) = j + 1) :
                                                        v.get k.succ = (hList.Vector.drop (k + 1) v).head
                                                        theorem Vector.drop_get_eq_get_add' {α : Type u_1} {n i : } (v : List.Vector α n) (l r : ) {h : i = l + r} {hi : i < n} {hr : r < n - l} :
                                                        v.get i, hi = (List.Vector.drop l v).get r, hr

                                                        Generalized vesrion of Vector.drop_get_eq_get_add.

                                                        theorem Vector.drop_get_eq_get_add {α : Type u_1} {n : } (v : List.Vector α n) (k : ) (i : Fin (n - k)) (still_lt : k + i < n) :
                                                        (List.Vector.drop k v).get i = v.get k + i, still_lt

                                                        A Vector analogue of List.getElem_drop.

                                                        theorem Fin.my_cast_val {j : } (n m : ) (h : n = m) (j_lt : j < n) :
                                                        (hj, j_lt) = j
                                                        theorem Vector.drop_last_eq_last {α : Type u_1} {n : } {v : List.Vector α n.succ} (k : Fin n) (j : ) (h : n.succ - (k + 1) = j.succ) :
                                                        (hList.Vector.drop (k + 1) v).last = v.last
                                                        theorem Vector.my_cast_heq {α : Type u_1} (n m : ) (h : n = m) (v : List.Vector α n) :
                                                        HEq (hv) v
                                                        theorem boxes_true_at_k_of_Vector_rel {W : Type} {M : KripkeModel W} (ξ : AnyFormula) (δ : List Program) (h : ¬δ = []) (ws : List.Vector W δ.length.succ) (ws_rel : ∀ (i : Fin δ.length), relate M (δ.get i) (ws.get i) (ws.get i.succ)) (k : Fin δ.length) (w_nξ : (M, ws.last)~''ξ) :
                                                        (M, ws.get k.succ)~''(AnyFormula.loadBoxes (List.drop (↑k.succ) δ) ξ)
                                                        @[irreducible]
                                                        theorem loadedDiamondPaths (α : Program) {X : Sequent} (tab : Tableau [] X) (root_free : X.isFree = true) (t : PathIn tab) {W : Type} {M : KripkeModel W} {v w : W} (v_t : (M, v)nodeAt t) (ξ : AnyFormula) {side : Side} (negLoad_in : (~''(AnyFormula.loaded (αξ))).in_side side (nodeAt t)) (v_α_w : relate M α v w) (w_nξ : (M, w)~''ξ) :
                                                        ∃ (s : PathIn tab), t ◃⁺ s (HasSat.satisfiable (nodeAt s) ¬s ≡ᶜ t (~''ξ).in_side side (nodeAt s) (M, w)nodeAt s ((nodeAt s).without (~''ξ)).isFree = true)

                                                        Soundness of loading and repeats: a tableau can immitate all moves in a model.

                                                        theorem simpler_equiv_simpler {a✝ : Sequent} {tab : Tableau [] a✝} {u s t : PathIn tab} :
                                                        s <ᶜ us ≡ᶜ tt <ᶜ u
                                                        theorem tableauThenNotSat {Root : Sequent} (tab : Tableau [] Root) (Root_isFree : Root.isFree = true) (t : PathIn tab) :

                                                        Any node in a closed tableau with a free root is not satisfiable. This is the main argument for soundness.

                                                        theorem correctness (LR : Sequent) :
                                                        LR.isFree = trueHasSat.satisfiable LRconsistent LR
                                                        theorem soundness (φ : Formula) :

                                                        All provable formulas are semantic tautologies. See tableauThenNotSat for what the notes call soundness.