Skip to content

Commit

Permalink
feat(set_theory/cardinal): add lemmas (#9697)
Browse files Browse the repository at this point in the history
We add three easy lemmas about cardinals living in different universes.
  • Loading branch information
riccardobrasca committed Oct 13, 2021
1 parent 3faf0f5 commit 5db83f9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
20 changes: 17 additions & 3 deletions src/set_theory/cardinal.lean
Expand Up @@ -113,7 +113,7 @@ quotient.sound ⟨equiv.ulift.trans $ e.trans equiv.ulift.symm⟩

theorem lift_mk (α) : lift.{v} (#α) = #(ulift.{v u} α) := rfl

theorem lift_umax : lift.{(max u v) u} = lift.{v u} :=
@[simp] theorem lift_umax : lift.{(max u v) u} = lift.{v u} :=
funext $ λ a, quot.induction_on a $ λ α,
quotient.sound ⟨equiv.ulift.trans equiv.ulift.symm⟩

Expand Down Expand Up @@ -237,12 +237,26 @@ instance : has_add cardinal.{u} :=

@[simp] theorem add_def (α β : Type u) : #α + #β = #(α ⊕ β) := rfl

lemma add (α : Type u) (β : Type v) :
#(α ⊕ β) = lift.{v u} (#α) + lift.{u v} (#β) :=
begin
rw [cardinal.lift_mk, cardinal.lift_mk, add_def],
exact cardinal.eq.2 ⟨equiv.sum_congr (equiv.ulift).symm (equiv.ulift).symm⟩,
end

instance : has_mul cardinal.{u} :=
⟨λq₁ q₂, quotient.lift_on₂ q₁ q₂ (λα β, #(α × β)) $ assume α β γ δ ⟨e₁⟩ ⟨e₂⟩,
quotient.sound ⟨equiv.prod_congr e₁ e₂⟩⟩

@[simp] theorem mul_def (α β : Type u) : #α * #β = #(α × β) := rfl

lemma mul (α : Type u) (β : Type v) :
#(α × β) = lift.{v u} (#α) * lift.{u v} (#β) :=
begin
rw [cardinal.lift_mk, cardinal.lift_mk, mul_def],
exact cardinal.eq.2 ⟨equiv.prod_congr (equiv.ulift).symm (equiv.ulift).symm⟩,
end

private theorem add_comm (a b : cardinal.{u}) : a + b = b + a :=
quotient.induction_on₂ a b $ assume α β, quotient.sound ⟨equiv.sum_comm α β⟩

Expand Down Expand Up @@ -520,8 +534,8 @@ quot.sound ⟨equiv.sigma_congr_right $ λ i,
classical.choice $ quotient.exact $ quot.out_eq $ #(f i)⟩

theorem sum_const (ι : Type u) (a : cardinal.{u}) : sum (λ _:ι, a) = #ι * a :=
quotient.induction_on a $ λ α, by simp; exact
quotient.sound ⟨equiv.sigma_equiv_prod _ _⟩
quotient.induction_on a $ λ α, by { simp only [mul_def, sum_mk, mk_def], exact
quotient.sound ⟨equiv.sigma_equiv_prod _ _⟩ }

theorem sum_le_sum {ι} (f g : ι → cardinal) (H : ∀ i, f i ≤ g i) : sum f ≤ sum g :=
⟨(embedding.refl _).sigma_map $ λ i, classical.choice $
Expand Down
2 changes: 1 addition & 1 deletion src/set_theory/cofinality.lean
Expand Up @@ -74,7 +74,7 @@ theorem rel_iso.cof.aux {α : Type u} {β : Type v} {r s}
cardinal.lift.{(max u v)} (order.cof s) :=
begin
rw [order.cof, order.cof, lift_min, lift_min, cardinal.le_min],
intro S, cases S with S H, simp [(∘)],
intro S, cases S with S H, simp only [comp, coe_sort_coe_base, subtype.coe_mk],
refine le_trans (min_le _ _) _,
{ exact ⟨f ⁻¹' S, λ a,
let ⟨b, bS, h⟩ := H (f a) in ⟨f.symm b, by simp [bS, ← f.map_rel_iff, h,
Expand Down

0 comments on commit 5db83f9

Please sign in to comment.