PDL-Tableaux (Section 4) #
Projections #
Extract the continuation of an atomic box with the specified program index.
Equations
- PDL.formProjection x✝ (PDL.Formula.box (PDL.Program.atom_prog B) φ) = if (x✝ == B) = true then some φ else none
- PDL.formProjection x✝¹ x✝ = none
Instances For
Collect the continuations of matching atomic boxes in a formula list.
Equations
- PDL.projection x✝¹ x✝ = (List.map (fun (x : PDL.Formula) => PDL.formProjection x✝¹ x) x✝).reduceOption
Instances For
Collect the continuations of matching atomic boxes in a formula finset.
Equations
- Finset.pdlProjection x✝¹ x✝ = (Finset.image (fun (x : PDL.Formula) => (PDL.formProjection x✝¹ x).toFinset) x✝).sup id
Instances For
Histories and Repeats #
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
Equations
- PDL.instDecidableRep = id (List.rec (isFalse ⋯) (fun (head : PDL.Sequent) (tail : List PDL.Sequent) (tail_ih : Decidable (∃ Y ∈ tail, Y = X)) => ⋯.mpr instDecidableOr) H)
Given rep H X, get the index of the companion in H using List.findIdx?.
Equations
- rp.toNat = match h : List.findIdx? (fun (Y : PDL.Sequent) => decide (Y = X)) H with | none => ⋯.elim | some k => k
Instances For
Given rep H X, get the index of the companion in H using List.findIdx?.
Instances For
Loaded Path Repeats #
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
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.
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
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
- PDL.flprep H X = (PDL.rep H X ∧ X.isFree ∨ Nonempty (PDL.LoadedPathRepeat H X))
Instances For
The PDL rules #
A rule to go from X to Y. Note the four variants of the modal rule.
- loadL {L : Finset Formula} {δ : List Program} {α : Program} {φ : Formula} {Y : Finset Formula × Finset Formula × Option (NegLoadFormula ⊕ NegLoadFormula)} {R : Finset Formula} : (Formula.boxes δ (Formula.box α φ)).neg ∈ L → ¬φ.isBox → Y = (L.erase (Formula.boxes δ (Formula.box α φ)).neg, R, some (Sum.inl (NegLoadFormula.neg (LoadFormula.boxes δ (LoadFormula.box α (AnyFormula.normal φ)))))) → PdlRule (L, R, none) Y
- loadR {R : Finset Formula} {δ : List Program} {α : Program} {φ : Formula} {Y : Finset Formula × Finset Formula × Option (NegLoadFormula ⊕ NegLoadFormula)} {L : Finset Formula} : (Formula.boxes δ (Formula.box α φ)).neg ∈ R → ¬φ.isBox → Y = (L, R.erase (Formula.boxes δ (Formula.box α φ)).neg, some (Sum.inr (NegLoadFormula.neg (LoadFormula.boxes δ (LoadFormula.box α (AnyFormula.normal φ)))))) → PdlRule (L, R, none) Y
- freeL {X : Finset Formula × Finset Formula × Option (NegLoadFormula ⊕ NegLoadFormula)} {L R : Finset Formula} {δ : List Program} {α : Program} {φ : Formula} {Y : Finset Formula × Finset Formula × Option (NegLoadFormula ⊕ NegLoadFormula)} : X = (L, R, some (Sum.inl (NegLoadFormula.neg (LoadFormula.boxes δ (LoadFormula.box α (AnyFormula.normal φ)))))) → Y = (L ∪ {(Formula.boxes δ (Formula.box α φ)).neg}, R, none) → PdlRule X Y
- freeR {X : Finset Formula × Finset Formula × Option (NegLoadFormula ⊕ NegLoadFormula)} {L R : Finset Formula} {δ : List Program} {α : Program} {φ : Formula} {Y : Finset Formula × Finset Formula × Option (NegLoadFormula ⊕ NegLoadFormula)} : X = (L, R, some (Sum.inr (NegLoadFormula.neg (LoadFormula.boxes δ (LoadFormula.box α (AnyFormula.normal φ)))))) → Y = (L, R ∪ {(Formula.boxes δ (Formula.box α φ)).neg}, none) → PdlRule X Y
- modL {Y : Sequent} {L R : Finset Formula} {A : ℕ} {X : Sequent} {ξ : AnyFormula} : X = (L, R, some (Sum.inl (NegLoadFormula.neg (LoadFormula.box (Program.atom_prog A) ξ)))) → (Y = match ξ with | AnyFormula.normal φ => ({φ.neg} ∪ Finset.pdlProjection A L, Finset.pdlProjection A R, none) | AnyFormula.loaded χ => (Finset.pdlProjection A L, Finset.pdlProjection A R, some (Sum.inl (NegLoadFormula.neg χ)))) → PdlRule X Y
- modR {Y : Sequent} {L R : Finset Formula} {A : ℕ} {X : Sequent} {ξ : AnyFormula} : X = (L, R, some (Sum.inr (NegLoadFormula.neg (LoadFormula.box (Program.atom_prog A) ξ)))) → (Y = match ξ with | AnyFormula.normal φ => (Finset.pdlProjection A L, {φ.neg} ∪ Finset.pdlProjection A R, none) | AnyFormula.loaded χ => (Finset.pdlProjection A L, Finset.pdlProjection A R, some (Sum.inr (NegLoadFormula.neg χ)))) → PdlRule X Y
Instances For
Whether a PDL rule is one of the two modal rules.
Equations
- (PDL.PdlRule.loadL a a_1 a_2).isModal = False
- (PDL.PdlRule.loadR a a_1 a_2).isModal = False
- (PDL.PdlRule.freeL a a_1).isModal = False
- (PDL.PdlRule.freeR a a_1).isModal = False
- (PDL.PdlRule.modL a a_1).isModal = True
- (PDL.PdlRule.modR a a_1).isModal = True
Instances For
The Tableau [parent, grandparent, ...] child type.
This represents a closed tableau for X, constructed by either of:
- a local tableau for X followed by
Tableaufor all end nodes, - a PDL rule application followed by
Tableaufor all results, or - a loaded-path repeat (also called successful, see [MB1988] condition 6 in Def 14 on page 25).
- loc {Hist : History} {X : Sequent} (nflprep : ¬flprep Hist X) (nbas : ¬X.basic) (lt : LocalTableau X) (next : (Y : Sequent) → Y ∈ endNodesOf lt → Tableau (X :: Hist) Y) : Tableau Hist X
- pdl {Hist : History} {X Y : Sequent} (nflprep : ¬flprep Hist X) (bas : X.basic) (r : PdlRule X Y) (next : Tableau (X :: Hist) Y) : Tableau Hist X
- lrep {Hist : History} {X : Sequent} (lpr : LoadedPathRepeat Hist X) : Tableau Hist X
Instances For
The number of nodes in a tableau, including every local-rule continuation.
Equations
- (PDL.Tableau.loc nflprep nbas lt next).size = 1 + ∑ x ∈ (PDL.endNodesOf lt).attach, match x with | ⟨Y, Y_in⟩ => (next Y Y_in).size
- (PDL.Tableau.pdl nflprep bas r next).size = 1 + next.size
- (PDL.Tableau.lrep lpr).size = 1
Instances For
Decide an existential predicate over the end nodes of a local tableau.
Equations
- PDL.decidableExistsEndNodeOf = decidable_of_iff (∃ x ∈ (PDL.endNodesOf lt).attach, f ↑x ⋯) ⋯
Instances For
Whether a tableau is a loaded-path-repeat leaf.
Equations
- (PDL.Tableau.loc nflprep nbas lt next).isLrep = False
- (PDL.Tableau.pdl nflprep bas r next).isLrep = False
- (PDL.Tableau.lrep lpr).isLrep = True
Instances For
A Sequent is inconsistent if there exists a closed tableau for it.
Equations
- PDL.inconsistent x✝ = Nonempty (PDL.Tableau [] x✝)
Instances For
A Sequent is consistent iff it is not inconsistent.
Equations
- PDL.consistent x✝ = ¬PDL.inconsistent x✝