Skip to content

Commit 4110032

Browse files
thomaskwaringtwwar
authored andcommitted
scope grinds, lemmas
1 parent 2b6a79c commit 4110032

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

Cslib/Logics/Propositional/Defs.lean

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,28 @@ abbrev IPL [Bot Atom] : Theory Atom :=
105105
abbrev CPL [Bot Atom] : Theory Atom :=
106106
IPL ∪ Set.range (fun (A : Proposition Atom) ↦ ~~A ⟶ A)
107107

108-
@[grind]
108+
@[scoped grind]
109109
class IsIntuitionistic [Bot Atom] (T : Theory Atom) where
110110
efq (A : Proposition Atom) : (⊥ ⟶ A) ∈ T
111111

112-
@[grind]
113-
class IsClassical [Bot Atom] (T : Theory Atom) where
114-
efq (A : Proposition Atom) : (⊥ ⟶ A) ∈ T
112+
omit [DecidableEq Atom] in
113+
@[scoped grind]
114+
theorem isIntuitionisticIff [Bot Atom] (T : Theory Atom) : IsIntuitionistic T ↔ IPL ⊆ T := by grind
115+
116+
@[scoped grind]
117+
class IsClassical [Bot Atom] (T : Theory Atom) extends IsIntuitionistic T where
115118
dne (A : Proposition Atom) : (~~A ⟶ A) ∈ T
116119

120+
omit [DecidableEq Atom] in
121+
@[scoped grind]
122+
theorem isClassicalIff [Bot Atom] (T : Theory Atom) : IsClassical T ↔ CPL ⊆ T := by
123+
constructor
124+
· grind
125+
· intro _
126+
have : IsIntuitionistic T := by grind
127+
refine ⟨?_⟩
128+
grind
129+
117130
instance instIsIntuitionisticIPL [Bot Atom] : IsIntuitionistic (Atom := Atom) IPL where
118131
efq A := Set.mem_range.mpr ⟨A, rfl⟩
119132

@@ -122,12 +135,14 @@ instance instIsClassicalCPL [Bot Atom] : IsClassical (Atom := Atom) CPL where
122135
dne A := Set.mem_union_right _ <| Set.mem_range.mpr ⟨A, rfl⟩
123136

124137
omit [DecidableEq Atom] in
138+
@[scoped grind]
125139
theorem instIsIntuitionisticExtention [Bot Atom] {T T' : Theory Atom} [IsIntuitionistic T]
126140
(h : T ⊆ T') : IsIntuitionistic T' := by grind
127141

128142
omit [DecidableEq Atom] in
143+
@[scoped grind]
129144
theorem instIsClassicalExtention [Bot Atom] {T T' : Theory Atom} [IsClassical T] (h : T ⊆ T') :
130-
IsClassical T' := by grind
145+
IsClassical T' := by have :_ := instIsIntuitionisticExtention h; grind
131146

132147
/-- Attach a bottom element to a theory `T`, and the principle of explosion for that bottom. -/
133148
@[reducible]

0 commit comments

Comments
 (0)