Skip to content

Commit 1e97b59

Browse files
committed
task 172: remove ImpBotDerived entirely
The class was intentionally uninstantiated dead code. Its neg/top rationale (minimal-logic validity) now lives in the module docstring; formula types define neg/top as abbrevs directly. Future generic abstractions should use PR leanprover#607-style HasNeg/HasTop atomic classes. Session: sess_1781312776_63c955
1 parent faea93e commit 1e97b59

1 file changed

Lines changed: 4 additions & 31 deletions

File tree

Cslib/Foundations/Logic/Connectives.lean

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ following the operator-typeclass direction of fmontesi's PR #607 (one class per
2222
- **Atomic classes**: `HasBot`, `HasImp`, `HasAnd`, `HasOr`, `HasBox`, `HasUntil`, `HasSince`
2323
- **Bundled classes**: `PropositionalConnectives`, `ModalConnectives`,
2424
`TemporalConnectives`, `BimodalConnectives`
25-
- **Derived connectives**: `ImpBotDerived` for `neg` and `top` from `bot`/`imp`
2625
2726
Each concrete formula type duplicates its constructors (Lean 4 cannot extend inductives)
2827
and registers as an instance of the appropriate bundled class.
@@ -34,9 +33,10 @@ McKinsey 1939); they fail in intuitionistic and minimal logic. Making `and` and
3433
primitives via `HasAnd`/`HasOr` supports all three logic strengths with a single typeclass
3534
hierarchy.
3635
37-
Negation and verum remain `ImpBotDerived` defaults because `neg φ := φ → ⊥` and
38-
`top := ⊥ → ⊥` are valid in minimal, intuitionistic, and classical logic alike. Biconditional
39-
(`iff`) is deferred to task 173 after `HasAnd` is instantiated on the formula types.
36+
Negation and verum stay derived: each concrete formula type defines `neg φ := φ → ⊥` and
37+
`top := ⊥ → ⊥` as `abbrev`s, which are valid in minimal, intuitionistic, and classical logic
38+
alike, so no typeclass machinery is needed for them. Biconditional (`iff`) is deferred to
39+
task 173 after `HasAnd` is instantiated on the formula types.
4040
4141
## References
4242
@@ -104,31 +104,4 @@ class TemporalConnectives (F : Type*) extends PropositionalConnectives F, HasUnt
104104
rather than extending `TemporalConnectives`, to avoid a typeclass diamond. -/
105105
class BimodalConnectives (F : Type*) extends ModalConnectives F, HasUntil F, HasSince F
106106

107-
/-- Derived connectives definable from `bot` and `imp` alone that are valid in minimal,
108-
intuitionistic, and classical logic.
109-
110-
Provides `neg` and `top` as abbreviations: negation is implication to falsum
111-
(`neg φ := imp φ bot`), and verum is `imp bot bot`. These are valid in minimal logic and
112-
preserve meaning across logic strengths, so they are safe logic-neutral defaults.
113-
114-
Conjunction and disjunction have been removed from this class. The Lukasiewicz encodings
115-
`and φ ψ := ¬(φ → ¬ψ)` and `or φ ψ := ¬φ → ψ` are classical-only: they are propositionally
116-
equivalent to `∧` and `∨` only in classical logic (Wajsberg 1938, McKinsey 1939), not in
117-
intuitionistic or minimal logic. Conjunction and disjunction are now first-class primitives
118-
via `HasAnd` and `HasOr`.
119-
120-
**Status**: This class is intentionally uninstantiated. Each concrete formula type
121-
(PL.Proposition, Modal.Proposition, Temporal.Formula, Bimodal.Formula) defines its
122-
own `abbrev` connectives directly on the inductive constructors, which are
123-
definitionally equal to these defaults. Registering typeclass instances would add
124-
resolution overhead at every use site with no benefit, since the `abbrev` definitions
125-
already compute. The class is retained as a specification artifact and for potential
126-
future use in polymorphic proof-system abstractions that need to quantify over derived
127-
connectives generically. -/
128-
class ImpBotDerived (F : Type*) [HasBot F] [HasImp F] where
129-
/-- Negation: `neg φ := imp φ bot` -/
130-
neg : F → F := fun φ => HasImp.imp φ HasBot.bot
131-
/-- Top/verum: `top := imp bot bot` -/
132-
top : F := HasImp.imp HasBot.bot HasBot.bot
133-
134107
end Cslib.Logic

0 commit comments

Comments
 (0)