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

Commit bd013e8

Browse files
committed
feat(data/dardinal): wellordering of cardinals
1 parent b547de0 commit bd013e8

22 files changed

+379
-359
lines changed

algebra/linear_algebra/basic.lean

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -607,10 +607,15 @@ have t ⊆ span m,
607607
hbm this,
608608
⟨m, hmt, hsm, this, hml⟩
609609

610-
lemma exists_is_basis (hs : linear_independent s) : ∃b, s ⊆ b ∧ is_basis b :=
610+
lemma exists_subset_is_basis (hs : linear_independent s) : ∃b, s ⊆ b ∧ is_basis b :=
611611
let ⟨b, hb₀, hb₁, hb₂, hb₃⟩ := exists_linear_independent hs (@subset_univ _ _) in
612612
⟨b, hb₁, hb₃, assume x, hb₂ trivial⟩
613613

614+
variable (β)
615+
lemma exists_is_basis : ∃b : set β, is_basis b :=
616+
let ⟨b, _, hb⟩ := exists_subset_is_basis linear_independent_empty in ⟨b, hb⟩
617+
variable {β}
618+
614619
lemma eq_of_linear_independent_of_span
615620
(hs : linear_independent s) (h : t ⊆ s) (hst : s ⊆ span t) : s = t :=
616621
suffices s ⊆ t, from subset.antisymm this h,
@@ -679,10 +684,10 @@ have finite s, from finite_subset u.finite_to_set hsu,
679684

680685
lemma exists_left_inverse_linear_map_of_injective {f : β → γ}
681686
(hf : is_linear_map f) (hf_inj : injective f) : ∃g:γ → β, is_linear_map g ∧ g ∘ f = id :=
682-
let ⟨bβ, _, hbβ⟩ := exists_is_basis linear_independent_empty in
687+
let ⟨bβ, hbβ⟩ := exists_is_basis β in
683688
have linear_independent (f '' bβ),
684689
from hbβ.1.image hf $ assume b₁ _ b₂ _ eq, hf_inj eq,
685-
let ⟨bγ, hbγ₁, hbγ₂⟩ := exists_is_basis this in
690+
let ⟨bγ, hbγ₁, hbγ₂⟩ := exists_subset_is_basis this in
686691
have ∀b∈bβ, (hbγ₂.constr (@inv_fun _ _ ⟨0⟩ f) : γ → β) (f b) = b,
687692
begin
688693
assume b hb,
@@ -699,7 +704,7 @@ lemma exists_right_inverse_linear_map_of_surjective {f : β → γ}
699704
let g := @inv_fun _ _ ⟨0⟩ f in
700705
have ri_gf : right_inverse g f, from @right_inverse_inv_fun _ _ _ ⟨0⟩ hf_surj,
701706
have injective g, from injective_of_left_inverse ri_gf,
702-
let ⟨bγ, _, hbγ⟩ := exists_is_basis (linear_independent_empty : linear_independent (∅ : set γ)) in
707+
let ⟨bγ, hbγ⟩ := exists_is_basis γ in
703708
have ∀c∈bγ, f ((hbγ.constr g : γ → β) c) = c,
704709
from assume c hc, by rw [constr_basis hbγ hc, ri_gf],
705710
⟨hbγ.constr g, hbγ.map_constr, hbγ.eq_linear_map (hf.comp hbγ.map_constr) is_linear_map.id this

analysis/measure_theory/measurable_space.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ by rw [eq]; exact d.has_Union this (assume i,
479479

480480
lemma has_sdiff {s₁ s₂ : set δ} (h₁ : d.has s₁) (h₂ : d.has s₂) (h : s₂ ⊆ s₁) : d.has (s₁ - s₂) :=
481481
have d.has (- (s₂ ∪ -s₁)),
482-
from d.has_compl $ d.has_union h₂ (d.has_compl h₁) $ eq_empty_of_forall_not_mem $
482+
from d.has_compl $ d.has_union h₂ (d.has_compl h₁) $ eq_empty_iff_forall_not_mem.2 $
483483
assume x ⟨h₁, h₂⟩, h₂ $ h h₁,
484484
have s₁ - s₂ = - (s₂ ∪ -s₁),
485485
by rw [compl_union, compl_compl, inter_comm]; refl,

analysis/metric_space.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def open_ball (x : α) (ε : ℝ) : set α := {y | dist y x < ε}
164164
def closed_ball (x : α) (ε : ℝ) := {y | dist y x ≤ ε}
165165

166166
theorem open_ball_eq_empty_of_nonpos (hε : ε ≤ 0) : open_ball x ε = ∅ :=
167-
eq_empty_of_forall_not_mem $ assume y hy,
167+
eq_empty_iff_forall_not_mem.2 $ assume y hy,
168168
have dist y x < 0, from lt_of_lt_of_le hy hε,
169169
lt_irrefl 0 (lt_of_le_of_lt dist_nonneg this)
170170

analysis/topology/topological_space.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ instance inhabited_topological_space {α : Type u} : inhabited (topological_spac
771771

772772
lemma t2_space_top : @t2_space α ⊤ :=
773773
{ t2 := assume x y hxy, ⟨{x}, {y}, trivial, trivial, mem_insert _ _, mem_insert _ _,
774-
eq_empty_of_forall_not_mem $ by intros z hz; simp at hz; cc⟩ }
774+
eq_empty_iff_forall_not_mem.2 $ by intros z hz; simp at hz; cc⟩ }
775775

776776
lemma le_of_nhds_le_nhds {t₁ t₂ : topological_space α} (h : ∀x, @nhds α t₂ x ≤ @nhds α t₁ x) :
777777
t₁ ≤ t₂ :=

analysis/topology/topological_structures.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ instance ordered_topology.to_t2_space : t2_space α :=
198198
assume a b h,
199199
let ⟨u, v, hu, hv, ha, hb, h⟩ := is_open_prod_iff.mp this a b h in
200200
⟨u, v, hu, hv, ha, hb,
201-
set.eq_empty_of_forall_not_mem $ assume a ⟨h₁, h₂⟩,
201+
set.eq_empty_iff_forall_not_mem.2 $ assume a ⟨h₁, h₂⟩,
202202
have a ≠ a, from @h (a, a) ⟨h₁, h₂⟩,
203203
this rfl⟩ }
204204

data/bool.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ show _ = to_bool true, by congr
1616
@[simp] theorem to_bool_false {h} : @to_bool false h = ff :=
1717
show _ = to_bool false, by congr
1818

19+
@[simp] theorem to_bool_coe (b:bool) {h} : @to_bool b h = b :=
20+
(show _ = to_bool b, by congr).trans (by cases b; refl)
21+
1922
@[simp] theorem coe_to_bool (p : Prop) [decidable p] : to_bool p ↔ p := to_bool_iff _
2023

2124
theorem dichotomy (b : bool) : b = ff ∨ b = tt :=

0 commit comments

Comments
 (0)