Local Tableaux (Section 3) #
One-sided local rules #
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
- instDecidableEqOneSidedLocalRule.decEq OneSidedLocalRule.bot OneSidedLocalRule.bot = isTrue instDecidableEqOneSidedLocalRule.decEq._proof_1
- instDecidableEqOneSidedLocalRule.decEq (OneSidedLocalRule.not a_2) (OneSidedLocalRule.not a_2) = isTrue ⋯
- instDecidableEqOneSidedLocalRule.decEq (OneSidedLocalRule.neg a_2) (OneSidedLocalRule.neg a_2) = isTrue ⋯
- instDecidableEqOneSidedLocalRule.decEq (OneSidedLocalRule.con a_2 a_3) (OneSidedLocalRule.con a_2 a_3) = isTrue ⋯
- instDecidableEqOneSidedLocalRule.decEq (OneSidedLocalRule.nCo a_2 a_3) (OneSidedLocalRule.nCo a_2 a_3) = isTrue ⋯
- instDecidableEqOneSidedLocalRule.decEq (OneSidedLocalRule.box a_2 a_3 a_4) (OneSidedLocalRule.box a_2 a_3 b) = ⋯ ▸ isTrue ⋯
- instDecidableEqOneSidedLocalRule.decEq (OneSidedLocalRule.dia a_2 a_3 a_4) (OneSidedLocalRule.dia a_2 a_3 b) = ⋯ ▸ isTrue ⋯
Instances For
Equations
- instReprOneSidedLocalRule = { reprPrec := instReprOneSidedLocalRule.repr }
Equations
- One or more equations did not get rendered due to their size.
- instReprOneSidedLocalRule.repr OneSidedLocalRule.bot prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "OneSidedLocalRule.bot")).group prec✝
Instances For
Loaded Rules #
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
- instDecidableEqLoadRule.decEq (LoadRule.dia a_4) (LoadRule.dia b) = ⋯ ▸ isTrue ⋯
- instDecidableEqLoadRule.decEq (LoadRule.dia' a_4) (LoadRule.dia' b) = ⋯ ▸ isTrue ⋯
Instances For
Equations
- instReprLoadRule = { reprPrec := instReprLoadRule.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
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.
Local Rules #
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.
The YS_def
arguments in non-terminal rules enables deriving DecidableEq
for LocalRule
.
- oneSidedL {precond : List Formula} {ress : List (List Formula)} {YS : List (List Formula × List Formula × Option (NegLoadFormula ⊕ NegLoadFormula))} (orule : OneSidedLocalRule precond ress) (YS_def : YS = List.map (fun (res : List Formula) => (res, ∅, none)) ress) : LocalRule (precond, ∅, none) YS
- oneSidedR {precond : List Formula} {ress : List (List Formula)} {YS : List (List Formula × List Formula × Option (NegLoadFormula ⊕ NegLoadFormula))} (orule : OneSidedLocalRule precond ress) (YS_def : YS = List.map (fun (res : List Formula) => (∅, res, none)) ress) : LocalRule (∅, precond, none) YS
- LRnegL (ϕ : Formula) : LocalRule ([ϕ], [~ϕ], none) ∅
- LRnegR (ϕ : Formula) : LocalRule ([~ϕ], [ϕ], none) ∅
- loadedL {ress : List (List Formula × Option NegLoadFormula)} {YS : List Sequent} (χ : LoadFormula) (lrule : LoadRule (~'χ) ress) (YS_def : YS = List.map (fun (x : List Formula × Option NegLoadFormula) => match x with | (X, o) => (X, ∅, Option.map Sum.inl o)) ress) : LocalRule (∅, ∅, some (Sum.inl (~'χ))) YS
- loadedR {ress : List (List Formula × Option NegLoadFormula)} {YS : List Sequent} (χ : LoadFormula) (lrule : LoadRule (~'χ) ress) (YS_def : YS = List.map (fun (x : List Formula × Option NegLoadFormula) => match x with | (X, o) => (∅, X, Option.map Sum.inr o)) ress) : LocalRule (∅, ∅, some (Sum.inr (~'χ))) YS
Instances For
Equations
- instReprLocalRule = { reprPrec := instReprLocalRule.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
- instDecidableEqLocalRule.decEq (LocalRule.oneSidedL orule YS_def) (LocalRule.oneSidedR orule_1 YS_def_1) = isFalse ⋯
- instDecidableEqLocalRule.decEq (LocalRule.oneSidedR orule YS_def) (LocalRule.oneSidedL orule_1 YS_def_1) = isFalse ⋯
- instDecidableEqLocalRule.decEq (LocalRule.LRnegL a_2) (LocalRule.LRnegL a_2) = isTrue ⋯
- instDecidableEqLocalRule.decEq (LocalRule.LRnegR a_2) (LocalRule.LRnegR a_2) = isTrue ⋯
Instances For
Applying a LoadRule
on the left will leave the right unchanged.
Applying a LoadRule
on the right will leave the left unchanged.
Applying a LoadRule
on the left preserves satisfiability of the left,
even together with any other list of formulas as context.
Applying a LoadRule
on the right preserves satisfiability of the right,
even together with any other list of formulas as context.
A local rule application going from ⟨L,R,O⟩
to C
consists of a
local rule lr
replacing ⟨Lcond, Rcond, Ocond⟩
by ress
and
proofs that ⟨Lcond, Rcond, Ocond⟩
is a subsequent of ⟨L,R,O⟩
and that C
are the results of applying lr
to ⟨L,R,O⟩
.
- mk {L R : List Formula} {C ress : List Sequent} {O : Olf} (Lcond Rcond : List Formula) (Ocond : Olf) (lr : LocalRule (Lcond, Rcond, Ocond) ress) {hC : C = applyLocalRule lr (L, R, O)} (preconditionProof : Lcond.Subperm L ∧ Rcond.Subperm R ∧ Ocond ⊆ O) : LocalRuleApp (L, R, O) C
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
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
Equations
- One or more equations did not get rendered due to their size.
If we can apply a local rule to a sequent then it cannot be basic.
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
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.
Instances For
Overall Soundness and Invertibility of LocalTableau #
Local Tableaux make progress #
These lemmas are used to show soundness, in particular loadedDiamondPaths
.
End nodes of any local tableau are basic.
If X
is not basic, then all end nodes Y
of a local tableau lt
for X
are strictly lower than X
according to the DM-ordering of their multisets.
If a sequent is lower according the DM-ordering, then it is different.
If X
is not basic, then for all end nodes Y
of a
local tableau lt
for X
we have that Y ≠ X
.
If a sequent is lower according to the DM-ordering, then they are multiset-different. (The analogue with finset instead of multiset does not hold.)