Skip to content

Commit

Permalink
feat(set_theory/cardinal/finite): Add nat.card_fun (#16799)
Browse files Browse the repository at this point in the history
This PR adds `nat.card_fun`, a quick consequence of `nat.card_pi`.
  • Loading branch information
tb65536 committed Oct 5, 2022
1 parent 83bf40c commit daa660c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/set_theory/cardinal/finite.lean
Expand Up @@ -84,6 +84,12 @@ card_congr equiv.plift
lemma card_pi {β : α → Type*} [fintype α] : nat.card (Π a, β a) = ∏ a, nat.card (β a) :=
by simp_rw [nat.card, mk_pi, prod_eq_of_fintype, to_nat_lift, to_nat_finset_prod]

lemma card_fun [finite α] : nat.card (α → β) = nat.card β ^ nat.card α :=
begin
haveI := fintype.of_finite α,
rw [nat.card_pi, finset.prod_const, finset.card_univ, ←nat.card_eq_fintype_card],
end

@[simp] lemma card_zmod (n : ℕ) : nat.card (zmod n) = n :=
begin
cases n,
Expand Down

0 comments on commit daa660c

Please sign in to comment.