Skip to content

Commit 2b6a79c

Browse files
author
twwar
committed
docs
1 parent cdde61f commit 2b6a79c

File tree

1 file changed

+41
-3
lines changed
  • Cslib/Logics/Propositional/NaturalDeduction

1 file changed

+41
-3
lines changed

Cslib/Logics/Propositional/NaturalDeduction/Basic.lean

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,45 @@ import Mathlib.Data.Finset.Insert
88
import Mathlib.Data.Finset.SDiff
99
import Mathlib.Data.Finset.Image
1010

11-
/-! # Natural deduction for propositional logic -/
11+
/-! # Natural deduction for propositional logic
12+
13+
We define, for minimal logic, deduction trees (a `Type`) and derivability (a `Prop`) relative to a
14+
`Theory` (set of propositions).
15+
16+
## Main definitions
17+
18+
- `Theory.Derivation` : natural deduction derivation, done in "sequent style", ie with explicit
19+
hypotheses at each step. Contexts are `Finset`'s of propositions, which avoids explicit contraction
20+
and exchange, and the axiom rule derives `{A} ∪ Γ ⊢ A` for any context `Γ`, allowing weakening to
21+
be a derived rule.
22+
- `Theory.PDerivable`, `Theory.SDerivable` : a proposition `A` (resp sequent `S`) is derivable if
23+
it has a derivation.
24+
- `Theory.equiv` : `Type`-valued equivalence of propositions.
25+
- `Theory.Equiv` : `Prop`-valued equivalence of propositions.
26+
- The unconditional versions `Derivable`, `SDerivable` and `Equiv` are abbreviations for the
27+
relevant concept relative to the empty theory `MPL`.
28+
- `Theory.WeakerThan` : a theory `T` is weaker than `T'` if every axiom in `T` is `T'`-derivable.
29+
30+
## Main results
31+
32+
- `Derivation.weak` : weakening as a derived rule.
33+
- `Derivation.cut`, `Derivation.subs` : replace a hypothesis in a derivation — the two versions
34+
differ in the construction of the relevant derivation.
35+
- `Theory.equiv_equivalence` : equivalence of propositions is an equivalence relation.
36+
- `instPreorderTheory` : the relation `Theory.WeakerThan` is a preorder.
37+
38+
## Notation
39+
40+
For `T`-derivability, -sequent-derivability and -equivalence we introduce the notations `⊢[T] A`,
41+
`Γ ⊢[T] A` and `A ≡[T] B`, respectively. `T.WeakerThan T'` is denoted `T ≤ T'`.
42+
43+
## References
44+
45+
- Dag Prawitz, *Natural Deduction: a proof-theoretical study*.
46+
- The sequent-style natural deduction I present here doesn't seem to be common, but it is tersely
47+
presented in §10.4 of Troelstra & van Dalen's *Constructivism in Mathematics: an introduction*.
48+
(Suggestions of better references welcome!)
49+
-/
1250

1351

1452
universe u
@@ -88,10 +126,10 @@ def Theory.Equiv (A B : Proposition Atom) := Nonempty (T.equiv A B)
88126
@[inherit_doc]
89127
scoped notation A " ≡[" T' "] " B:29 => Theory.Equiv (T := T') A B
90128

91-
def Theory.Equiv.mp {A B : Proposition Atom} (h : A ≡[T] B) : {A} ⊢[T] B :=
129+
lemma Theory.Equiv.mp {A B : Proposition Atom} (h : A ≡[T] B) : {A} ⊢[T] B :=
92130
let ⟨D,_⟩ := h; ⟨D⟩
93131

94-
def Theory.Equiv.mpr {A B : Proposition Atom} (h : A ≡[T] B) : {B} ⊢[T] A :=
132+
lemma Theory.Equiv.mpr {A B : Proposition Atom} (h : A ≡[T] B) : {B} ⊢[T] A :=
95133
let ⟨_,D⟩ := h; ⟨D⟩
96134

97135
theorem Theory.equiv_iff {A B : Proposition Atom} : A ≡[T] B ↔ {A} ⊢[T] B ∧ {B} ⊢[T] A := by

0 commit comments

Comments
 (0)