Documentation

Pdl.BuildTree

From winning strategies to model graphs (Section 6.3) #

BuildTree #

theorem LoadFormula.split_splitLast_to_loadBoxes {δs : List Program} {φ : Formula} {δs_ : List Program} {δ : Program} {ξ : AnyFormula} (ξsp_def : ξ.split = (δs, φ)) (sp_def : splitLast δs = some (δs_, δ)) :
def PdlRule.all (X : Sequent) :
List ((Y : Sequent) × PdlRule X Y)

List of all PdlRules applicable to X. Code is based on part of theMoves This is also similar to the definitions in LocalAll.lean.

Equations
  • One or more equations did not get rendered due to their size.
  • PdlRule.all X = []
Instances For
    theorem PdlRule.all_spec {X Y : Sequent} (bas : X.basic) (r : PdlRule X Y) :
    Y, r all X

    Specification that PdlRule.all is complete, almost: we demand X.basic here which is not part of the PdlRule type, but demanded by Tableau.pdl.

    inductive BuildTree :

    Tree data type to keep track of choices made by Builder. Might still need to be tweaked.

    • Choices should be labelled with the choices made by prover? TODO: i.e. we need to keep track of which rule is used.
    • Maybe we also need to carry proofs in here?
    Instances For
      def theRep {H : History} {X : Sequent} (rp : rep H X) :
      Equations
      Instances For
        @[irreducible]

        The tree generated from a winning Builder strategy

        Equations
        Instances For

          Match #

          Here we define paths inside a BuildTree, similar to PathIn for Tableau.

          inductive Match {pos : GamePos} :
          BuildTree posType

          Inspired by PathIn

          Instances For
            def Match.btAt {pos : GamePos} {bt : BuildTree pos} :
            Match bt(newPos : GamePos) × BuildTree newPos
            Equations
            Instances For
              def Match.append {a✝ : GamePos} {bt : BuildTree a✝} (m1 : Match bt) (m2 : Match m1.btAt.snd) :
              Equations
              Instances For
                def Match.edge {a✝ : GamePos} {bt : BuildTree a✝} (m n : Match bt) :

                The parent-child relation ⋖_𝕋 in a Builder strategy tree. Similar to edge.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  def Match.rewind {a✝ : GamePos} {bt : BuildTree a✝} :
                  Match btMatch bt
                  Equations
                  Instances For
                    def Match.companionOf {pos mPos : GamePos} {bt : BuildTree pos} (m : Match bt) (rp : rep mPos.fst mPos.snd.fst) :
                    m.btAt = mPos, BuildTree.Leaf rpMatch bt
                    Equations
                    Instances For
                      def Match.companion {a✝ : GamePos} {bt : BuildTree a✝} (m n : Match bt) :
                      Equations
                      Instances For
                        def Match.cEdge {a✝ : GamePos} {bt : BuildTree a✝} (m n : Match bt) :
                        Equations
                        Instances For

                          Pre-states (Def 6.13) #

                          As possible worlds for the model graph we want to define maximal paths inside the build tree that do not contain (M) steps.

                          In the paper pre-states are allowed to be of the form π;π' when π ends at a repeat and π' is a maximal prefix of the path from the companion to that repeat. Here we will probably only store the π part of such pre-states, because the π' is uniquely determined by π then.

                          def Match.edge.not_mod {a✝ : GamePos} {a✝¹ : BuildTree a✝} {m n : Match a✝¹} :
                          m.edge nProp

                          How to say that this is not a modal step?

                          Equations
                          Instances For
                            inductive PreStateP {Pos : GamePos} (bt : BuildTree Pos) (m : Match bt) :

                            A pre-state-part is a path in a BuildTree starting at a Match, going along any non-(M) edge or companion steps and ending at a leaf or just before an (M) application.

                            Instances For
                              inductive PreState {Pos : GamePos} (bt : BuildTree Pos) (m : Match bt) :

                              A pre-state is a maximal pre-state-part, i.e. starting at the root or just after (M+).

                                Instances For
                                  def PreState.all {Pos : GamePos} (bt : BuildTree Pos) :
                                  List ((m : Match bt) × PreState bt m)
                                  Equations
                                  Instances For
                                    def PreState.forms {a✝ : GamePos} {bt : BuildTree a✝} {m : Match bt} :

                                    Collect formulas in a pre-state.

                                    TODO: If the pre-state ends in a repeat, also include formulas in the path from companion to (M).

                                    Equations
                                    Instances For
                                      def PreState.last {a✝ : GamePos} {bt : BuildTree a✝} {n : Match bt} :
                                      PreState bt nSequent
                                      Equations
                                      Instances For

                                        Definition 6.17 to get model graph from strategy tree.

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

                                          Model graph of pre-states #

                                          theorem strmg (X : Sequent) (s : Strategy tableauGame Builder) (h : winning s (startPos X)) :
                                          ∃ (WS : Finset (Finset Formula)) (mg : ModelGraph WS), X.toFinset WS

                                          Theorem 6.21: If Builder has a winning strategy then there is a model graph.