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
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 #
Equations
Instances For
Equations
Equations
- AnyNegFormula.mem_Sequent x✝ (~''(AnyFormula.normal φ)) = ((~φ) ∈ x✝)
- AnyNegFormula.mem_Sequent x✝ (~''(AnyFormula.loaded χ)) = NegLoadFormula.mem_Sequent x✝ (~'χ)
Instances For
Equations
Equations
- (~''(AnyFormula.normal φ)).in_side Side.LL (L, fst, snd) = ((~φ) ∈ L)
- (~''(AnyFormula.normal φ)).in_side Side.RR (fst, R, snd) = ((~φ) ∈ R)
- (~''(AnyFormula.loaded χ)).in_side Side.LL (fst, fst_1, O) = (O = some (Sum.inl (~'χ)))
- (~''(AnyFormula.loaded χ)).in_side Side.RR (fst, fst_1, O) = (O = some (Sum.inr (~'χ)))
Instances For
Local Tableaux #
Local rules replace a given set of formulas by other sets, one for each branch. The list of resulting branches can be empty, representing that the given set is closed. In the Haskell prover this is done in "ruleFor" in the Logic.PDL.Prove.Tree module.
- 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✝ }
The loaded diamond rule, given by unfoldDiamondLoaded
.
In MB page 19 these were multiple rules ¬u, ¬; ¬* and ¬?.
It replaces the loaded formula by up to one loaded formula and a list of normal formulas.
It's a bit annoying to need the rule twice here due to the definition of LoadFormula
and the extra definition of unfoldDiamondLoaded'
.
- 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.
A local rule is a OneSidedLocalRule
, a left-right contradiction, or a LoadRule
.
Note that formulas can be in four places: left, right, loaded left, loaded right.
We do not have neg/contradiction rules between loaded and unloaded formulas (i.e.
between ({unload χ}, ∅, some (Sum.inl ~χ))
and (∅, {unload χ}, some (Sum.inr ~χ))
)
because in any such case we could also close the tableau before or without loading.
- 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
A basic formula is of the form ¬⊥
, p
, ¬p
, [a]_
or ¬[a]_
.
Note: in the article also ⊥
is basic, but not here because then
OneSidedLocalRule.bot
can be applied to it.
Equations
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} : X.basic → 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
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.