Line-based DAG derivations #
Propositional proof systems such as resolution, cutting planes and Frege present derivations as sequences of lines in which each line is a hypothesis, an axiom, or inferred from earlier lines by a sound rule. Recording a derivation in reverse chronological order (from its last line to its first) lets a derivation grow by consing a new line in front while referencing any earlier line in the tail, so shared intermediate lines are reused as a directed acyclic graph rather than re-derived as a tree.
This module factors the common DAG proof-list combinators once over an arbitrary line type L:
Cslib.Logic.PL.LineRuleandCslib.Logic.PL.LineProof: rulespremises ⊢ concl(axioms havepremises = []) and reverse-chronological derivations from a rule setRand hypothesis setΓ.Cslib.Logic.PL.LineProof.comp: DAG cut / replay of a derivation fromΔon top of a derivationlsfromΓwhenΔ ⊆ Γ ∪ {x | x ∈ ls}, keeping only a duplicate-free sublist of new lines not already present inls.Cslib.Logic.PL.LineProof.GrowsandCslib.Logic.PL.LineProof.simulate: bounded-overhead extension of an existing prefix and line-by-line simulation between rule systems.
The bridge from sound derivations of arity at most two to semantic derivations
(Cslib.Logic.PL.IsSemanticDerivation) lives in
CslibFrontier.Logics.Propositional.LineProof.SemanticDerivation.
Main definitions #
Cslib.Logic.PL.LineRule: an inference rulepremises ⊢ conclover lines of typeL.Cslib.Logic.PL.LineProof: reverse-chronological DAG derivations from rulesRand hypothesesΓ.Cslib.Logic.PL.LineProof.Grows: extending an existing derivation by at mostnprepended lines.
Main results #
Cslib.Logic.PL.LineProof.holds: inductive soundness with respect to any semantic predicate preserved byR.Cslib.Logic.PL.LineProof.comp,Cslib.Logic.PL.LineProof.Grows.comp: DAG replay of a derivation onto an existing prefix without re-deriving lines already present.Cslib.Logic.PL.LineProof.Grows.simulate,Cslib.Logic.PL.LineProof.simulate: stepwise rule simulation with linear line-count overhead.
References #
A line-based DAG derivation using rules R from hypotheses Γ, listed from its last line
to its first: every line is either in Γ or the conclusion of a rule in R whose premises already
appear below it in the derivation.
- nil {L : Type u_1} {R : Set (LineRule L)} {Γ : Set L} : LineProof R Γ []
The empty derivation.
- hyp {L : Type u_1} {R : Set (LineRule L)} {Γ : Set L} {ls : List L} {x : L} (h : LineProof R Γ ls) (hx : x ∈ Γ) : LineProof R Γ (x :: ls)
A hypothesis from
Γadded as a new line. - step {L : Type u_1} {R : Set (LineRule L)} {Γ : Set L} {ls : List L} {r : LineRule L} (h : LineProof R Γ ls) (hr : r ∈ R) (hp : ∀ p ∈ r.premises, p ∈ ls) : LineProof R Γ (r.concl :: ls)
The conclusion of a rule in
Rwhose premises already appear inls.
Soundness: if every hypothesis in Γ satisfies Sem and every rule in R preserves Sem
from its premises to its conclusion, then every line of ls satisfies Sem.
DAG replay and cut #
DAG replay / cut: a derivation ls' from Δ replays on top of a derivation ls from Γ
when every line of Δ is in Γ or already in ls. Lines already present in ls (or derived
earlier during the replay) are reused rather than emitted again, so the prepended suffix ls'' is a
duplicate-free sublist of ls' disjoint from ls.
Bounded-overhead prefix growth and simulation #
Making every element of xs that lies in Γ or ls₁ available on the derivation list costs at
most xs.length new lines.
Stepwise simulation over an existing prefix: if each hypothesis and rule step of ls can
extend any target derivation already containing the translated premises by at most k lines to
include the translated conclusion, then ls extends ls₀ by at most k * ls.length lines.
Stepwise rule simulation: suppose every hypothesis of Γ₁ appearing in ls has a
derivation in (R₂, Γ₂) of at most k lines, and every rule r ∈ R₁ applied in ls derives
tr r.concl in (R₂, Γ₂ ∪ {y | y ∈ r.premises.map tr}) in at most k lines. Replaying each
step via LineProof.comp translates ls into a derivation ls' in (R₂, Γ₂) containing tr x
for every x ∈ ls, with at most k * ls.length lines.