Skip to content

Commit

Permalink
chore(set_theory/cardinal): Golf mk_le_mk_mul_of_mk_preimage_le (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
vihdzp committed Apr 12, 2022
1 parent 670735f commit 56d6399
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/set_theory/cardinal.lean
Expand Up @@ -611,10 +611,8 @@ theorem sum_le_sum {ι} (f g : ι → cardinal) (H : ∀ i, f i ≤ g i) : sum f

lemma mk_le_mk_mul_of_mk_preimage_le {c : cardinal} (f : α → β) (hf : ∀ b : β, #(f ⁻¹' {b}) ≤ c) :
#α ≤ #β * c :=
calc #α = #Σ b, f⁻¹' {b} : mk_congr (equiv.sigma_preimage_equiv f).symm
... = sum (λ b, #(f ⁻¹' {b})) : mk_sigma (λ b, f ⁻¹' {b})
... ≤ sum (λ b : β, c) : sum_le_sum (λ b, #(f ⁻¹' {b})) (λ b, c) hf
... = #β * c : sum_const' β c
by simpa only [←mk_congr (@equiv.sigma_preimage_equiv α β f), mk_sigma, ←sum_const']
using sum_le_sum _ _ hf

/-- The indexed supremum of cardinals is the smallest cardinal above
everything in the family. -/
Expand Down

0 comments on commit 56d6399

Please sign in to comment.