Frege proofs #
A Frege system Cook and Reckhow is a line-based propositional proof system
given by finitely many sound axiom schemes and inference rules that are implicationally complete:
whenever Γ semantically implies φ, there is a proof of φ from Γ. This file fixes the
Hilbert-style system with the axiom schemes K, S and double-negation elimination for → and ⊥,
the usual introduction and elimination schemes for ∧ and ∨, and modus ponens as the only rule
(Cslib.Logic.PL.Frege.IsAxiom). A proof from hypotheses Γ is a list of formulas, each a
hypothesis, an axiom instance, or obtained by modus ponens from two earlier lines
(Cslib.Logic.PL.Frege.IsProof). Implicational completeness of this system is standard (the
schemes form a classical axiomatization of →, ⊥, ∧ and ∨) but not yet formalized
(#3069). As in
CslibFrontier.Logics.Propositional.Resolution.Proof, proofs are listed from their last line to
their
first, and the size of a proof is its number of lines.
Formulas are cslib's propositions Cslib.Logic.PL.Proposition over the atoms V, with cslib's
⊥ (the constructor Proposition.falsum) as falsity and cslib's Proposition.neg φ = φ → ⊥ as
negation. Their Boolean semantics is Cslib.Logic.PL.Proposition.eval at Bool. No other
formula type of the library fits: the CNF and QBF types have no implication, and circuit formulas
are indexed by a fixed number of inputs.
The file proves soundness (Cslib.Logic.PL.Frege.IsProof.eval) and the tools used to build proofs
with explicit line counts:
Cslib.Logic.PL.Frege.IsProof.cut: a proof fromΓ ++ Δreplays on top of a proof fromΓamong whose lines are the formulas ofΔ, with at most as many new lines. This lets a later step reuse earlier lines, so that simulated proofs keep their line structure.Cslib.Logic.PL.Frege.IsProof.deduction: the deduction theorem with linear overhead. A proof fromΓ ++ Δbecomes a proof fromΓcontainingΔ ⇒ φ(Cslib.Logic.PL.Frege.Formula.imps) for each of its linesφ, with at most10 (|Δ| + 1)lines per original line. Discharging the hypotheses ofΔone at a time would instead multiply the size by a constant per hypothesis.
Main definitions #
Cslib.Logic.PL.Frege.Formula.Cslib.Logic.PL.Frege.IsAxiom,Cslib.Logic.PL.Frege.rules,Cslib.Logic.PL.Frege.IsProof: the Frege system.Cslib.Logic.PL.Frege.DerivableInSize: derivability in a bounded number of lines.
Main results #
Cslib.Logic.PL.Frege.isProof_iff_lineProof: Frege proofs asCslib.Logic.PL.LineProofderivations.Cslib.Logic.PL.Frege.IsProof.eval: soundness.Cslib.Logic.PL.Frege.IsProof.cut,Cslib.Logic.PL.Frege.IsProof.deduction.
References #
Formulas: cslib's propositions over the atoms V, with ⊥ (Proposition.falsum) as
falsity.
A variable.
Implication.
The axiom schemes: K, S, double-negation elimination, and the schemes for ∧ and ∨.
- k {V : Type u_1} (φ ψ : Formula V) : IsAxiom (φ.imp (ψ.imp φ))
φ → (ψ → φ). - s {V : Type u_1} (φ ψ χ : Formula V) : IsAxiom ((φ.imp (ψ.imp χ)).imp ((φ.imp ψ).imp (φ.imp χ)))
(φ → (ψ → χ)) → ((φ → ψ) → (φ → χ)). - dne {V : Type u_1} (φ : Formula V) : IsAxiom (Formula.imp (Proposition.neg φ).neg φ)
¬¬φ → φ. - andElimL {V : Type u_1} (φ ψ : Formula V) : IsAxiom (Formula.imp (Proposition.and φ ψ) φ)
φ ∧ ψ → φ. - andElimR {V : Type u_1} (φ ψ : Formula V) : IsAxiom (Formula.imp (Proposition.and φ ψ) ψ)
φ ∧ ψ → ψ. - andIntro {V : Type u_1} (φ ψ : Formula V) : IsAxiom (φ.imp (ψ.imp (Proposition.and φ ψ)))
φ → (ψ → φ ∧ ψ). - orIntroL {V : Type u_1} (φ ψ : Formula V) : IsAxiom (φ.imp (Proposition.or φ ψ))
φ → φ ∨ ψ. - orIntroR {V : Type u_1} (φ ψ : Formula V) : IsAxiom (ψ.imp (Proposition.or φ ψ))
ψ → φ ∨ ψ. - orElim {V : Type u_1} (φ ψ χ : Formula V) : IsAxiom ((φ.imp χ).imp ((ψ.imp χ).imp (Formula.imp (Proposition.or φ ψ) χ)))
(φ → χ) → ((ψ → χ) → (φ ∨ ψ → χ)).
Frege proofs from hypotheses Γ, listed from the last line to the first.
- nil {V : Type u_1} {Γ : List (Formula V)} : IsProof Γ []
The empty proof.
- hyp {V : Type u_1} {Γ L : List (Formula V)} {φ : Formula V} : IsProof Γ L → φ ∈ Γ → IsProof Γ (φ :: L)
A hypothesis is a new line.
- ax {V : Type u_1} {Γ L : List (Formula V)} {φ : Formula V} : IsProof Γ L → IsAxiom φ → IsProof Γ (φ :: L)
An axiom instance is a new line.
- mp {V : Type u_1} {Γ L : List (Formula V)} {φ ψ : Formula V} : IsProof Γ L → φ ∈ L → φ.imp ψ ∈ L → IsProof Γ (ψ :: L)
Modus ponens from two earlier lines
φandφ → ψ.
Every axiom instance is true under every assignment.
The rules of the Frege system as Cslib.Logic.PL.LineRules: axiom instances (with no premises)
and modus ponens.
Soundness: under an assignment satisfying every hypothesis, every line is true.
Derivability in n lines implies derivability in m ≥ n lines.
An axiom instance in one line.
A hypothesis in one line.
Modus ponens, stacking the two derivations.
φ → φ in five lines.
Weakening under an antecedent a.
Hypothetical syllogism.
Distribution of b₁ → ⋯ → bₖ → over implication.
Deduction theorem with linear overhead: a proof from Γ ++ Δ becomes a proof from Γ of
Δ ⇒ φ for each of its lines φ, with at most 10 (|Δ| + 1) lines per original line.
Detaching the antecedents Δ of an available line Δ ⇒ φ, one line per antecedent, when
every antecedent is available.