Documentation

Pdl.Tableau

PDL-Tableaux (Section 4) #

Projections #

Equations
Instances For
    Equations
    Instances For
      @[simp]
      theorem proj {A : } {X : List Formula} {g : Formula} :

      Histories and Repeats #

      @[reducible, inline]
      abbrev History :

      A history is a list of Sequents. In the Tableau type this only tracks "big" steps, not steps happening within a LocalTableau. The list is in reverse order, i.e. the head is the newest Sequent.

      Equations
      Instances For
        def rep (Hist : History) (X : Sequent) :

        We have a repeat iff the history contains a node that is setEqTo the current node. Note that this is a Prop, it does not carry a specific number of steps to go back.

        Equations
        Instances For
          instance instDecidableRep {H : History} {X : Sequent} :
          Equations
          @[simp]
          theorem not_rep_empty {X : Sequent} :
          def rep.toNat {H : History} {X : Sequent} (rp : rep H X) :

          Given rep H X, get the index of the companion in H using List.findIdx?.

          Equations
          Instances For
            def rep.toFin {H : History} {X : Sequent} (rp : rep H X) :

            Given rep H X, get the index of the companion in H using List.findIdx?.

            Equations
            Instances For
              theorem rep.toFin_agrees {H : History} {X : Sequent} (rp : rep H X) :

              Loaded Path Repeats #

              def LoadedPathRepeat (Hist : History) (X : Sequent) :

              A lpr means we can go k steps back in the history to reach an equal node, and all nodes on the way are loaded. Note: k=0 means the first element of Hist is the companion.

              Equations
              Instances For

                If there is any loaded path repeat, then we can compute one. FIXME There is probably a more elegant way, avoiding Nonempty and Fin.find?. Something like: def getLPR (H : History) (X : Sequent) : Option ... := ... that might also give us uniqueness of LPRs?

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  theorem LoadedPathRepeat_comp_isLoaded {Hist : History} {X : Sequent} (lpr : LoadedPathRepeat Hist X) :
                  (List.get Hist lpr).isLoaded = true

                  Free, forbidden and allowed repeats #

                  In Tableau we only want to allow the application of a rule when there is no loaded-path repeat and there is no free repeat. For this we introduce FreeRepeat and the flprep abbreviation.

                  def FreeRepeat (Hist : History) (X : Sequent) :

                  A free repeat is a non-loaded sequent that occured before. Values of this type are pairs: the number of steps to go back in the history and a proof that we then find the same set.

                  Equations
                  Instances For
                    def flprep (H : History) (X : Sequent) :

                    Either a free repeat or a loaded-path repeat. Note that the negation of this is not the same as ¬ rep because it will still allow loaded repeats that are not loaded-path repeats, at which Tableau may continue. See also posOf that is used to define tableauGame later.

                    Equations
                    Instances For
                      @[simp]

                      The PDL rules #

                      inductive PdlRule (X Y : Sequent) :

                      A rule to go from X to Y. Note the four variants of the modal rule.

                      Instances For
                        def instDecidableEqPdlRule.decEq {X✝ Y✝ : Sequent} (x✝ x✝¹ : PdlRule X✝ Y✝) :
                        Decidable (x✝ = x✝¹)
                        Instances For
                          Equations
                          • One or more equations did not get rendered due to their size.
                          inductive Tableau :

                          The Tableau [parent, grandparent, ...] child type.

                          This represents a closed tableau for X, constructed by either of:

                          • a local tableau for X followed by Tableau for all end nodes,
                          • a PDL rule application followed by Tableau for all results, or
                          • a loaded-path repeat (also called successful, see [Bor88] condition 6 in Def 14 on page 25).
                          Instances For
                            def Tableau.size {Hist : History} {X : Sequent} :
                            Tableau Hist X
                            Equations
                            Instances For
                              theorem Tableau.size_next_lt_of_loc {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} {nrep : ¬flprep a✝ a✝¹} {nbas : ¬a✝¹.basic} {lt : LocalTableau a✝¹} {next : (Y : Sequent) → Y endNodesOf ltTableau (a✝¹ :: a✝) Y} (tab_def : tab = loc nrep nbas lt next) (Y : Sequent) (Y_in : Y endNodesOf lt) :
                              (next Y Y_in).size < tab.size
                              theorem Tableau.size_next_lt_of_pdl {a✝ : History} {a✝¹ : Sequent} {tab : Tableau a✝ a✝¹} {nrep : ¬flprep a✝ a✝¹} {bas : a✝¹.basic} {Y✝ : Sequent} {r : PdlRule a✝¹ Y✝} {next : Tableau (a✝¹ :: a✝) Y✝} (tab_def : tab = pdl nrep bas r next) :
                              next.size < tab.size
                              instance instDecidableExistsEndNodeOf {X : Sequent} {lt : LocalTableau X} {f : (Y : Sequent) → Y endNodesOf ltProp} {dec : (Y : Sequent) → (Y_in : Y endNodesOf lt) → Decidable (f Y Y_in)} :
                              Decidable (∃ (Y : Sequent) (Y_in : Y endNodesOf lt), f Y Y_in)
                              Equations
                              • One or more equations did not get rendered due to their size.
                              @[irreducible]
                              instance Tableau.instDecidableEq {Hist : History} {X : Sequent} {tab1 tab2 : Tableau Hist X} :
                              Decidable (tab1 = tab2)
                              Equations
                              • One or more equations did not get rendered due to their size.
                              def Tableau.isLrep {Hist : History} {X : Sequent} :
                              Tableau Hist XProp
                              Equations
                              Instances For
                                inductive provable :
                                Instances For

                                  A Sequent is inconsistent if there exists a closed tableau for it.

                                  Equations
                                  Instances For

                                    A Sequent is consistent iff it is not inconsistent.

                                    Equations
                                    Instances For