Local Tableaux (Section 3) #
Tableau Nodes #
In nodes we optionally have a negated loaded formula on the left or right.
Equations
Instances For
Equations
Two Sequent
s are set-equal when their components are finset-equal.
That is, we do not care about the order of the lists, but we do care
about the side of the formula and what formual is loaded.
Hint: use List.toFinset.ext_iff
with this.
Equations
Instances For
Equations
- Sequent.toFinset (L, R, O) = L.toFinset ∪ R.toFinset ∪ (Option.map (Sum.elim negUnload negUnload) O).toFinset
Instances For
Equations
- Sequent.isLoaded (fst, fst_1, none) = decide False
- Sequent.isLoaded (fst, fst_1, some val) = decide True
Instances For
Semantics of a Sequent #
Equations
- One or more equations did not get rendered due to their size.
Equations
- instSequentHasSat = { satisfiable := fun (Δ : Sequent) => ∃ (W : Type) (M : KripkeModel W) (w : W), (M, w)⊨Δ }
Different kinds of formulas as elements of Sequent #
Instances For
Equations
- Sequent.without (L, R, O) (~''(AnyFormula.normal f)) = (L \ {~f}, R \ {~f}, O)
- Sequent.without (L, R, O) (~''(AnyFormula.loaded lf)) = if NegLoadFormula.mem_Sequent (L, R, O) (~'lf) then (L, R, none) else (L, R, O)
Instances For
Equations
Equations
- AnyNegFormula.mem_Sequent x✝ (~''(AnyFormula.normal φ)) = ((~φ) ∈ x✝)
- AnyNegFormula.mem_Sequent x✝ (~''(AnyFormula.loaded χ)) = NegLoadFormula.mem_Sequent x✝ (~'χ)
Instances For
Equations
Local Tableaux #
- bot : OneSidedLocalRule [⊥] ∅
- not (φ : Formula) : OneSidedLocalRule [φ, ~φ] ∅
- neg (φ : Formula) : OneSidedLocalRule [~~φ] [[φ]]
- con (φ ψ : Formula) : OneSidedLocalRule [φ⋀ψ] [[φ, ψ]]
- nCo (φ ψ : Formula) : OneSidedLocalRule [~φ⋀ψ] [[~φ], [~ψ]]
- box (α : Program) (φ : Formula) (notAtom : ¬α.isAtomic) : OneSidedLocalRule [⌈α⌉φ] (unfoldBox α φ)
- dia (α : Program) (φ : Formula) (notAtom : ¬α.isAtomic) : OneSidedLocalRule [~⌈α⌉φ] (unfoldDiamond α φ)
Instances For
Equations
- instReprOneSidedLocalRule = { reprPrec := reprOneSidedLocalRule✝ }
- dia {α : Program} {χ : LoadFormula} (notAtom : ¬α.isAtomic) : LoadRule (~'⌊α⌋AnyFormula.loaded χ) (unfoldDiamondLoaded α χ)
- dia' {α : Program} {φ : Formula} (notAtom : ¬α.isAtomic) : LoadRule (~'⌊α⌋AnyFormula.normal φ) (unfoldDiamondLoaded' α φ)
Instances For
Equations
Equations
- instReprLoadRule = { reprPrec := reprLoadRule✝ }
Given a LoadRule application, define the equivalent unloaded rule application.
This allows re-using oneSidedLocalRuleTruth
to prove loadRuleTruth
.
Equations
- (LoadRule.dia notAtom).unload = ⋯ ▸ OneSidedLocalRule.dia α χ_2.unload notAtom
- (LoadRule.dia' notAtom).unload = ⋯ ▸ OneSidedLocalRule.dia α φ notAtom
Instances For
The loaded unfold rule is sound and invertible. In the notes this is part of localRuleTruth.
- oneSidedL {precond : List Formula} {ress : List (List Formula)} (orule : OneSidedLocalRule precond ress) : LocalRule (precond, ∅, none) (List.map (fun (res : List Formula) => (res, ∅, none)) ress)
- oneSidedR {precond : List Formula} {ress : List (List Formula)} (orule : OneSidedLocalRule precond ress) : LocalRule (∅, precond, none) (List.map (fun (res : List Formula) => (∅, res, none)) ress)
- LRnegL (ϕ : Formula) : LocalRule ([ϕ], [~ϕ], none) ∅
- LRnegR (ϕ : Formula) : LocalRule ([~ϕ], [ϕ], none) ∅
- loadedL {ress : List (List Formula × Option NegLoadFormula)} (χ : LoadFormula) (lrule : LoadRule (~'χ) ress) : LocalRule (∅, ∅, some (Sum.inl (~'χ))) (List.map (fun (x : List Formula × Option NegLoadFormula) => match x with | (X, o) => (X, ∅, Option.map Sum.inl o)) ress)
- loadedR {ress : List (List Formula × Option NegLoadFormula)} (χ : LoadFormula) (lrule : LoadRule (~'χ) ress) : LocalRule (∅, ∅, some (Sum.inr (~'χ))) (List.map (fun (x : List Formula × Option NegLoadFormula) => match x with | (X, o) => (∅, X, Option.map Sum.inr o)) ress)
Instances For
Equations
- instReprLocalRule = { reprPrec := reprLocalRule✝ }
Instance that is used to say (O : Olf) \ (O' : Olf)
.
Equations
- One or more equations did not get rendered due to their size.
Equations
- oldO.change Ocond newO = Option.overwrite (oldO \ Ocond) newO
Instances For
Equations
- isBasicForm Formula.bottom = decide True
- isBasicForm (~Formula.bottom) = decide True
- isBasicForm (·a) = decide True
- isBasicForm (~·a) = decide True
- isBasicForm (⌈·a⌉a_1) = decide True
- isBasicForm (~⌈·a⌉a_1) = decide True
- isBasicForm x✝ = decide False
Instances For
Equations
- isBasicSet x✝ = decide (∀ P ∈ x✝, isBasicForm P = true)
Instances For
Local tableau for X
, maximal by definition.
- byLocalRule {X : Sequent} {B : List Sequent} : LocalRuleApp X B → (next : (Y : Sequent) → Y ∈ B → LocalTableau Y) → LocalTableau X
- sim {X : Sequent} : isBasic X = true → LocalTableau X
Instances For
Termination of LocalTableau #
The local measure we use together with D-M to show that LocalTableau are finite.
Equations
- lmOfFormula Formula.bottom = 0
- lmOfFormula (·a) = 0
- lmOfFormula (φ⋀ψ) = 1 + lmOfFormula φ + lmOfFormula ψ
- lmOfFormula (⌈·a⌉a_1) = 0
- lmOfFormula (⌈α⌉φ) = 1 + lmOfFormula φ + (List.map (fun (τ : { x : Formula // x ∈ testsOfProgram α }) => lmOfFormula (~↑τ)) (testsOfProgram α).attach).sum
- lmOfFormula (~Formula.bottom) = 0
- lmOfFormula (~·a) = 0
- lmOfFormula (~~φ) = 1 + lmOfFormula φ
- lmOfFormula (~φ⋀ψ) = 1 + lmOfFormula (~φ) + lmOfFormula (~ψ)
- lmOfFormula (~⌈·a⌉a_1) = 0
- lmOfFormula (~⌈α⌉φ) = 1 + lmOfFormula (~φ) + (List.map (fun (τ : { x : Formula // x ∈ testsOfProgram α }) => lmOfFormula ↑τ) (testsOfProgram α).attach).sum
Instances For
If each three parts are the same then node_to_multiset is the same.
Applying node_to_multiset
before or after applyLocalRule
gives the same.
Equations
- lt_Sequent X Y = (node_to_multiset X).IsDershowitzMannaLT (node_to_multiset Y)
Instances For
Equations
- instWellFoundedRelationSequent = { rel := lt_Sequent, wf := instWellFoundedRelationSequent.proof_1 }
Equations
- endNodesOf (LocalTableau.byLocalRule _lr next) = (List.map (fun (x : { x : Sequent // x ∈ B }) => match x with | ⟨Y, h⟩ => endNodesOf (next Y h)) B.attach).flatten
- endNodesOf (LocalTableau.sim a) = [x✝]
Instances For
Helper functions, relating end nodes and children #
Equations
- One or more equations did not get rendered due to their size.