File: Mathlib/Data/Finite/Card.lean

full_name: Finite.equivFin
code: /-- There is (noncomputably) an equivalence between a finite type `α` and `Fin (Nat.card α)`. -/
def Finite.equivFin (α : Type*) [Finite α] : α ≃ Fin (Nat.card α) 
goal: α ≃ Fin (Nat.card α)

full_name: Finite.equivFinOfCardEq
code: /-- Similar to `Finite.equivFin` but with control over the term used for the cardinality. -/
def Finite.equivFinOfCardEq [Finite α] {n : ℕ} (h : Nat.card α = n) : α ≃ Fin n 
goal: α ≃ Fin n

full_name: Nat.card_eq
code: theorem Nat.card_eq (α : Type*) :
    Nat.card α = if h : Finite α then @Fintype.card α (Fintype.ofFinite α) else 0 
goal: Nat.card α = if h : Finite α then Fintype.card α else 0

full_name: Finite.card_pos_iff
code: theorem Finite.card_pos_iff [Finite α] : 0 < Nat.card α ↔ Nonempty α 
goal: 0 < Nat.card α ↔ Nonempty α

full_name: Finite.card_pos
code: theorem Finite.card_pos [Finite α] [h : Nonempty α] : 0 < Nat.card α 
goal: 0 < Nat.card α

full_name: Finite.cast_card_eq_mk
code: theorem cast_card_eq_mk {α : Type*} [Finite α] : ↑(Nat.card α) = Cardinal.mk α 
goal: ↑(Nat.card α) = Cardinal.mk α

full_name: Finite.card_eq
code: theorem card_eq [Finite α] [Finite β] : Nat.card α = Nat.card β ↔ Nonempty (α ≃ β) 
goal: Nat.card α = Nat.card β ↔ Nonempty (α ≃ β)

full_name: Finite.card_le_one_iff_subsingleton
code: theorem card_le_one_iff_subsingleton [Finite α] : Nat.card α ≤ 1 ↔ Subsingleton α 
goal: Nat.card α ≤ 1 ↔ Subsingleton α

full_name: Finite.one_lt_card_iff_nontrivial
code: theorem one_lt_card_iff_nontrivial [Finite α] : 1 < Nat.card α ↔ Nontrivial α 
goal: 1 < Nat.card α ↔ Nontrivial α

full_name: Finite.one_lt_card
code: theorem one_lt_card [Finite α] [h : Nontrivial α] : 1 < Nat.card α 
goal: 1 < Nat.card α

full_name: Finite.card_option
code: @[simp]
theorem card_option [Finite α] : Nat.card (Option α) = Nat.card α + 1 
goal: Nat.card (Option α) = Nat.card α + 1

full_name: Finite.card_le_of_injective
code: theorem card_le_of_injective [Finite β] (f : α → β) (hf : Function.Injective f) :
    Nat.card α ≤ Nat.card β 
goal: Nat.card α ≤ Nat.card β

full_name: Finite.card_le_of_embedding
code: theorem card_le_of_embedding [Finite β] (f : α ↪ β) : Nat.card α ≤ Nat.card β 
goal: Nat.card α ≤ Nat.card β

full_name: Finite.card_le_of_surjective
code: theorem card_le_of_surjective [Finite α] (f : α → β) (hf : Function.Surjective f) :
    Nat.card β ≤ Nat.card α 
goal: Nat.card β ≤ Nat.card α

full_name: Finite.card_eq_zero_iff
code: theorem card_eq_zero_iff [Finite α] : Nat.card α = 0 ↔ IsEmpty α 
goal: Nat.card α = 0 ↔ IsEmpty α

full_name: Finite.card_le_of_injective'
code: /-- If `f` is injective, then `Nat.card α ≤ Nat.card β`. We must also assume
  `Nat.card β = 0 → Nat.card α = 0` since `Nat.card` is defined to be `0` for infinite types. -/
theorem card_le_of_injective' {f : α → β} (hf : Function.Injective f)
    (h : Nat.card β = 0 → Nat.card α = 0) : Nat.card α ≤ Nat.card β 
goal: Nat.card α ≤ Nat.card β

full_name: Finite.card_le_of_embedding'
code: /-- If `f` is an embedding, then `Nat.card α ≤ Nat.card β`. We must also assume
  `Nat.card β = 0 → Nat.card α = 0` since `Nat.card` is defined to be `0` for infinite types. -/
theorem card_le_of_embedding' (f : α ↪ β) (h : Nat.card β = 0 → Nat.card α = 0) :
    Nat.card α ≤ Nat.card β 
goal: Nat.card α ≤ Nat.card β

full_name: Finite.card_le_of_surjective'
code: /-- If `f` is surjective, then `Nat.card β ≤ Nat.card α`. We must also assume
  `Nat.card α = 0 → Nat.card β = 0` since `Nat.card` is defined to be `0` for infinite types. -/
theorem card_le_of_surjective' {f : α → β} (hf : Function.Surjective f)
    (h : Nat.card α = 0 → Nat.card β = 0) : Nat.card β ≤ Nat.card α 
goal: Nat.card β ≤ Nat.card α

full_name: Finite.card_eq_zero_of_surjective
code: /-- NB: `Nat.card` is defined to be `0` for infinite types. -/
theorem card_eq_zero_of_surjective {f : α → β} (hf : Function.Surjective f) (h : Nat.card β = 0) :
    Nat.card α = 0 
goal: Nat.card α = 0

full_name: Finite.card_eq_zero_of_injective
code: /-- NB: `Nat.card` is defined to be `0` for infinite types. -/
theorem card_eq_zero_of_injective [Nonempty α] {f : α → β} (hf : Function.Injective f)
    (h : Nat.card α = 0) : Nat.card β = 0 
goal: Nat.card β = 0

full_name: Finite.card_eq_zero_of_embedding
code: /-- NB: `Nat.card` is defined to be `0` for infinite types. -/
theorem card_eq_zero_of_embedding [Nonempty α] (f : α ↪ β) (h : Nat.card α = 0) : Nat.card β = 0 
goal: Nat.card β = 0

full_name: Finite.card_sum
code: theorem card_sum [Finite α] [Finite β] : Nat.card (α ⊕ β) = Nat.card α + Nat.card β 
goal: Nat.card (α ⊕ β) = Nat.card α + Nat.card β

full_name: Finite.card_image_le
code: theorem card_image_le {s : Set α} [Finite s] (f : α → β) : Nat.card (f '' s) ≤ Nat.card s 
goal: Nat.card ↑(f '' s) ≤ Nat.card ↑s

full_name: Finite.card_range_le
code: theorem card_range_le [Finite α] (f : α → β) : Nat.card (Set.range f) ≤ Nat.card α 
goal: Nat.card ↑(Set.range f) ≤ Nat.card α

full_name: Finite.card_subtype_le
code: theorem card_subtype_le [Finite α] (p : α → Prop) : Nat.card { x // p x } ≤ Nat.card α 
goal: Nat.card { x // p x } ≤ Nat.card α

full_name: Finite.card_subtype_lt
code: theorem card_subtype_lt [Finite α] {p : α → Prop} {x : α} (hx : ¬p x) :
    Nat.card { x // p x } < Nat.card α 
goal: Nat.card { x // p x } < Nat.card α

full_name: PartENat.card_eq_coe_natCard
code: theorem card_eq_coe_natCard (α : Type*) [Finite α] : card α = Nat.card α 
goal: PartENat.card α = ↑(Nat.card α)

full_name: Set.card_union_le
code: theorem card_union_le (s t : Set α) : Nat.card (↥(s ∪ t)) ≤ Nat.card s + Nat.card t 
goal: Nat.card ↑(s ∪ t) ≤ Nat.card ↑s + Nat.card ↑t

full_name: Set.Finite.card_lt_card
code: theorem card_lt_card (ht : t.Finite) (hsub : s ⊂ t) : Nat.card s < Nat.card t 
goal: Nat.card ↑s < Nat.card ↑t

full_name: Set.Finite.eq_of_subset_of_card_le
code: theorem eq_of_subset_of_card_le (hsub : s ⊆ t) (hcard : Nat.card t ≤ Nat.card s) : s = t 
goal: s = t

full_name: Set.Finite.equiv_image_eq_iff_subset
code: theorem equiv_image_eq_iff_subset (e : α ≃ α) (hs : s.Finite) : e '' s = s ↔ e '' s ⊆ s 
goal: ⇑e '' s = s ↔ ⇑e '' s ⊆ s