Soundness (Section 6) #
Soundness of the PDL rules #
The PDL rules are sound.
Navigating through tableaux with PathIn #
A path in a tableau. Three constructors for the empty path, a local step or a pdl step.
The loc
ad pdl
steps correspond to two out of three constructors of Tableau
.
- nil {H : History} {X : Sequent} {a✝ : Tableau H X} : PathIn a✝
- loc {H : List Sequent} {X Y : Sequent} {lt : LocalTableau X} {next : (Y : Sequent) → Y ∈ endNodesOf lt → Tableau (X :: H) Y} (Y_in : Y ∈ endNodesOf lt) (tail : PathIn (next Y Y_in)) : PathIn (Tableau.loc lt next)
- pdl {Γ Δ : Sequent} {Hist : List Sequent} {child : Tableau (Γ :: Hist) Δ} (r : PdlRule Γ Δ) : PathIn child → PathIn (Tableau.pdl r child)
Instances For
Equations
Equations
- PathIn.nil.append q_2 = q_2
- (PathIn.loc Y_in tail).append q_2 = PathIn.loc Y_in (tail.append q_2)
- (PathIn.pdl r p_child).append q_2 = PathIn.pdl r (p_child.append q_2)
Instances For
The length of a path is the number of actual steps.
Equations
- PathIn.nil.length = 0
- (PathIn.pdl r tail).length = tail.length + 1
- (PathIn.loc Y_in tail).length = tail.length + 1
Instances For
The Y_in
proof does not matter for a local path step.
Edge Relation #
Notation ⋖_ for edge
(because ⋖ is taken in Mathlib).
Equations
- «term_⋖__» = Lean.ParserDescr.trailingNode `«term_⋖__» 1022 1023 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⋖_ ") (Lean.ParserDescr.cat `term 1023))
Instances For
Appending a one-step loc
path is also a ⋖_ child.
When using this, this may be helpful:
convert this; rw [← heq_iff_eq, heq_eqRec_iff_heq, eqRec_heq_iff_heq]
.
Appending a one-step pdl
path is also a ⋖_ child.
The root has no parent. Note this holds even when Hist ≠ [].
Equations
- edge_natLT_relHom = { toFun := PathIn.length, map_rel' := ⋯ }
Instances For
The ⋖_ relation in a tableau is well-founded.
Enable "<" notation for transitive closure of ⋖_.
Equations
- instLTPathIn = { lt := Relation.TransGen edge }
Enable "≤" notation for reflexive transitive closure of ⋖_
Equations
- instLEPathIn = { le := Relation.ReflTransGen edge }
The "<" in a tableau is antisymmetric.
An induction principle for PathIn
that works by ... TODO EXPLAIN
-- QUESTIONS:
-- - Do I need any of these? @[induction_eliminator, elab_as_elim]
-- - Should it be a def or a theorem? (motive
to Prop
or to Sort u
?)
Path Properties (UNUSED?) #
Equations
- PathIn.nil.isLoaded = (PathIn.nil.head.isLoaded = true)
- (PathIn.pdl r tail).isLoaded = ((PathIn.pdl r tail).head.isLoaded = true ∧ tail.isLoaded)
- (PathIn.loc Y_in tail).isLoaded = ((PathIn.loc Y_in tail).head.isLoaded = true ∧ tail.isLoaded)
Instances For
From Path to History #
Convert a path to a History.
Does not include the last node.
The history of .nil
is []
because this will not go into Hist
.
Equations
- PathIn.nil.toHistory = []
- (PathIn.pdl r tail).toHistory = tail.toHistory ++ [X]
- (PathIn.loc Y_in tail).toHistory = tail.toHistory ++ [X]
Instances For
Convert a path to a list of nodes. Reverse of the history and does include the last node.
The list of .nil
is [X]
.
Equations
- PathIn.nil.toList = [X]
- (PathIn.pdl r tail).toList = X :: tail.toList
- (PathIn.loc Y_in tail).toList = X :: tail.toList
Instances For
Prefix of a path, taking only the first k
steps.
Equations
- PathIn.nil.prefix x_2 = PathIn.nil
- (PathIn.pdl r tail).prefix k = Fin.cases PathIn.nil (fun (j : Fin (PathIn.pdl r tail).length) => PathIn.pdl r (tail.prefix j)) k
- (PathIn.loc Y_in tail).prefix k = Fin.cases PathIn.nil (fun (j : Fin (PathIn.loc Y_in tail).length) => PathIn.loc Y_in (tail.prefix j)) k
Instances For
Path Rewinding #
Rewinding a path, removing the last k
steps. Cannot go into Hist.
Used to go to the companion of a repeat. Returns .nil
when k
is the length of the whole path.
We use +1 in the type because rewind 0
is always possible, even with history []
.
Defined using Fin.lastCases.
Equations
- PathIn.nil.rewind x_2 = PathIn.nil
- (PathIn.loc Y_in tail).rewind k = Fin.lastCases PathIn.nil (PathIn.loc Y_in ∘ tail.rewind ∘ Fin.cast ⋯) k
- (PathIn.pdl r tail).rewind k = Fin.lastCases PathIn.nil (PathIn.pdl r ∘ tail.rewind ∘ Fin.cast ⋯) k
Instances For
Companion, cEdge, etc. #
To get the companion of an LPR node we go as many steps back as the LPR says.
Equations
- companionOf s lpr x✝ = s.rewind (⋯ ▸ ↑lpr).succ
Instances For
Equations
- «term_♥_» = Lean.ParserDescr.trailingNode `«term_♥_» 1022 1023 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ♥ ") (Lean.ParserDescr.cat `term 1023))
Instances For
The node at a companion is the same as the one in the history.
The companion is strictly before the the repeat.
Equations
- «term_◃_» = Lean.ParserDescr.trailingNode `«term_◃_» 1022 1023 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ◃ ") (Lean.ParserDescr.cat `term 1023))
Instances For
Equations
- «term_◃⁺_» = Lean.ParserDescr.trailingNode `«term_◃⁺_» 1022 1023 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ◃⁺ ") (Lean.ParserDescr.cat `term 1023))
Instances For
Equations
- «term_◃*_» = Lean.ParserDescr.trailingNode `«term_◃*_» 1022 1023 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ◃* ") (Lean.ParserDescr.cat `term 1023))
Instances For
≡ᶜ and Clusters #
Equations
- «term_≡ᶜ_» = Lean.ParserDescr.trailingNode `«term_≡ᶜ_» 1022 1023 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ≡ᶜ ") (Lean.ParserDescr.cat `term 1023))
Instances For
We have before s t
iff there is a path from s to t but not from t to s.
This means the cluster of s
comes before the cluster of t
in tab
.
NB: The notes use ◃* here but we use ◃⁺. The definitions are equivalent.
Instances For
s <ᶜ t
means there is a ◃-path from s
to t
but not from t
to s
.
This means t
is simpler to deal with first.
Equations
- «term_<ᶜ_» = Lean.ParserDescr.trailingNode `«term_<ᶜ_» 1022 1023 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " <ᶜ ") (Lean.ParserDescr.cat `term 1023))
Instances For
Soundness #
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
Helper to deal with local tableau in loadedDiamondPaths
.
Generalized vesrion of Vector.drop_get_eq_get_add
.
A Vector analogue of List.getElem_drop
.
Soundness of loading and repeats: a tableau can immitate all moves in a model.