Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 162221f

Browse files
committed
chore(set_theory/*): use is_empty α instead of ¬nonempty α (#8276)
Split from #7826
1 parent 9a801ef commit 162221f

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

src/set_theory/cardinal.lean

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,8 @@ sup_le.2 $ le_sum _
457457
theorem sum_le_sup {ι : Type u} (f : ι → cardinal.{u}) : sum f ≤ mk ι * sup.{u u} f :=
458458
by rw ← sum_const; exact sum_le_sum _ _ (le_sup _)
459459

460-
theorem sup_eq_zero {ι} {f : ι → cardinal} (h : ι → false) : sup f = 0 :=
461-
by { rw [← nonpos_iff_eq_zero, sup_le], intro x, exfalso, exact h x }
460+
theorem sup_eq_zero {ι} {f : ι → cardinal} [is_empty ι] : sup f = 0 :=
461+
by { rw [← nonpos_iff_eq_zero, sup_le], exact is_empty_elim }
462462

463463
/-- The indexed product of cardinals is the cardinality of the Pi type
464464
(dependent product). -/
@@ -1241,7 +1241,10 @@ begin
12411241
end
12421242

12431243
lemma powerlt_zero {a : cardinal} : a ^< 0 = 0 :=
1244-
by { apply sup_eq_zero, rintro ⟨x, hx⟩, rw [←not_le] at hx, apply hx, apply zero_le }
1244+
begin
1245+
convert sup_eq_zero,
1246+
exact subtype.is_empty_of_false (λ x, (zero_le _).not_lt),
1247+
end
12451248

12461249
end cardinal
12471250

src/set_theory/cofinality.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ le_antisymm (by simpa using cof_le_card 0) (cardinal.zero_le _)
195195

196196
@[simp] theorem cof_eq_zero {o} : cof o = 0 ↔ o = 0 :=
197197
⟨induction_on o $ λ α r _ z, by exactI
198-
let ⟨S, hl, e⟩ := cof_eq r in type_eq_zero_iff_empty.2 $
199-
λ ⟨a⟩, let ⟨b, h, _⟩ := hl a in
200-
ne_zero_iff_nonempty.2 (by exact ⟨⟨_, h⟩⟩) (e.trans z),
198+
let ⟨S, hl, e⟩ := cof_eq r in type_eq_zero_iff_is_empty.2 $
199+
⟨λ a, let ⟨b, h, _⟩ := hl a in
200+
(eq_zero_iff_is_empty.1 (e.trans z)).elim' ⟨_, h⟩⟩,
201201
λ e, by simp [e]⟩
202202

203203
@[simp] theorem cof_succ (o) : cof (succ o) = 1 :=

src/set_theory/ordinal_arithmetic.lean

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,15 @@ by simp only [le_antisymm_iff, add_le_add_iff_right]
155155
exact ⟨f punit.star⟩
156156
end, λ e, by simp only [e, card_zero]⟩
157157

158+
@[simp] theorem type_eq_zero_of_empty [is_well_order α r] [is_empty α] : type r = 0 :=
159+
card_eq_zero.symm.mpr eq_zero_of_is_empty
160+
161+
@[simp] theorem type_eq_zero_iff_is_empty [is_well_order α r] : type r = 0 ↔ is_empty α :=
162+
(@card_eq_zero (type r)).symm.trans eq_zero_iff_is_empty
163+
158164
theorem type_ne_zero_iff_nonempty [is_well_order α r] : type r ≠ 0 ↔ nonempty α :=
159165
(not_congr (@card_eq_zero (type r))).symm.trans ne_zero_iff_nonempty
160166

161-
@[simp] theorem type_eq_zero_iff_empty [is_well_order α r] : type r = 0 ↔ ¬ nonempty α :=
162-
(not_iff_comm.1 type_ne_zero_iff_nonempty).symm
163-
164167
protected lemma one_ne_zero : (1 : ordinal) ≠ 0 :=
165168
type_ne_zero_iff_nonempty.2 ⟨punit.star⟩
166169

@@ -547,12 +550,10 @@ quotient.induction_on₂ a b $ λ ⟨α, r, _⟩ ⟨β, s, _⟩,
547550
mul_comm (mk β) (mk α)
548551

549552
@[simp] theorem mul_zero (a : ordinal) : a * 0 = 0 :=
550-
induction_on a $ λ α _ _, by exactI
551-
type_eq_zero_iff_empty.2 (λ ⟨⟨e, _⟩⟩, e.elim)
553+
induction_on a $ λ α _ _, by exactI type_eq_zero_of_empty
552554

553555
@[simp] theorem zero_mul (a : ordinal) : 0 * a = 0 :=
554-
induction_on a $ λ α _ _, by exactI
555-
type_eq_zero_iff_empty.2 (λ ⟨⟨_, e⟩⟩, e.elim)
556+
induction_on a $ λ α _ _, by exactI type_eq_zero_of_empty
556557

557558
theorem mul_add (a b c : ordinal) : a * (b + c) = a * b + a * c :=
558559
quotient.induction_on₃ a b c $ λ ⟨α, r, _⟩ ⟨β, s, _⟩ ⟨γ, t, _⟩,

0 commit comments

Comments
 (0)