Documentation

Mathlib.SetTheory.Cardinal.Finite

Finite Cardinality Functions #

Main Definitions #

def Nat.card (α : Type u_3) :

Nat.card α is the cardinality of α as a natural number. If α is infinite, Nat.card α = 0.

Equations
Instances For
    @[simp]
    @[simp]
    theorem Nat.card_eq_zero_of_infinite {α : Type u_1} [Infinite α] :
    Nat.card α = 0
    theorem Nat.finite_of_card_ne_zero {α : Type u_1} (h : Nat.card α 0) :
    theorem Nat.card_congr {α : Type u_1} {β : Type u_2} (f : α β) :
    theorem Nat.card_eq_of_bijective {α : Type u_1} {β : Type u_2} (f : αβ) (hf : Function.Bijective f) :
    theorem Nat.card_eq_of_equiv_fin {α : Type u_3} {n : } (f : α Fin n) :
    Nat.card α = n
    def Nat.equivFinOfCardPos {α : Type u_3} (h : Nat.card α 0) :
    α Fin (Nat.card α)

    If the cardinality is positive, that means it is a finite type, so there is an equivalence between α and Fin (Nat.card α). See also Finite.equivFin.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      theorem Nat.card_of_subsingleton {α : Type u_1} (a : α) [Subsingleton α] :
      Nat.card α = 1
      theorem Nat.card_unique {α : Type u_1} [Unique α] :
      Nat.card α = 1
      theorem Nat.card_eq_two_iff {α : Type u_1} :
      Nat.card α = 2 x y, x y {x, y} = Set.univ
      theorem Nat.card_eq_two_iff' {α : Type u_1} (x : α) :
      Nat.card α = 2 ∃! y, y x
      theorem Nat.card_of_isEmpty {α : Type u_1} [IsEmpty α] :
      Nat.card α = 0
      @[simp]
      theorem Nat.card_sum {α : Type u_1} {β : Type u_2} [Finite α] [Finite β] :
      @[simp]
      theorem Nat.card_prod (α : Type u_3) (β : Type u_4) :
      Nat.card (α × β) = Nat.card α * Nat.card β
      @[simp]
      @[simp]
      theorem Nat.card_plift (α : Type u_3) :
      theorem Nat.card_pi {α : Type u_1} {β : αType u_3} [Fintype α] :
      Nat.card ((a : α) → β a) = Finset.prod Finset.univ fun a => Nat.card (β a)
      theorem Nat.card_fun {α : Type u_1} {β : Type u_2} [Finite α] :
      Nat.card (αβ) = Nat.card β ^ Nat.card α
      @[simp]
      theorem Nat.card_zmod (n : ) :
      def PartENat.card (α : Type u_3) :

      PartENat.card α is the cardinality of α as an extended natural number. If α is infinite, PartENat.card α = ⊤.

      Equations
      Instances For
        @[simp]
        theorem PartENat.card_sum (α : Type u_3) (β : Type u_4) :
        theorem PartENat.card_congr {α : Type u_3} {β : Type u_4} (f : α β) :
        @[simp]
        theorem PartENat.card_image_of_injOn {α : Type u} {β : Type v} {f : αβ} {s : Set α} (h : Set.InjOn f s) :
        theorem PartENat.card_image_of_injective {α : Type u} {β : Type v} (f : αβ) (s : Set α) (h : Function.Injective f) :