The areas / V03. Sets, finite structures and big operators
Mathlib.Basic.Countable.Defs
42 declarations. Mathlib docs · Source
Countable and uncountable types
In this file we define a typeclass Countable saying that a given Sort* is countable
and a typeclass Uncountable saying that a given Type* is uncountable.
See also Encodable for a version that singles out
a specific encoding of elements of α by natural numbers.
This file also provides a few instances of these typeclasses. More instances can be found in other files.
Definition and basic properties
Operations on Sort*s
Uncountable types
class Countable E1 #
Sort u → Prop
A type α is countable if there exists an injective map α → ℕ.
theorem countable_iff_exists_injective E1 #
∀ (α : Sort u), Countable α ↔ ∃ f, Function.Injective f
ctor Countable.mk E0 #
∀ {α : Sort u}, (∃ f, Function.Injective f) → Countable α
theorem Countable.exists_injective_nat' E1 #
∀ {α : Sort u} [self : Countable α], ∃ f, Function.Injective f
A type α is countable if there exists an injective map α → ℕ.
theorem Countable.exists_injective_nat E1 #
∀ (α : Sort u) [Countable α], ∃ f, Function.Injective f
instance instCountableNat E0 #
Countable ℕ
theorem Function.Injective.countable E1 #
∀ {α : Sort u} {β : Sort v} [Countable β] {f : α → β}, Function.Injective f → Countable α
theorem Function.Surjective.countable E1 #
∀ {α : Sort u} {β : Sort v} [Countable α] {f : α → β}, Function.Surjective f → Countable β
theorem exists_surjective_nat E1 #
∀ (α : Sort u) [Nonempty α] [Countable α], ∃ f, Function.Surjective f
theorem countable_iff_exists_surjective E1 #
∀ {α : Sort u} [Nonempty α], Countable α ↔ ∃ f, Function.Surjective f
theorem Countable.of_equiv E1 #
∀ {β : Sort v} (α : Sort u_1) [Countable α] (e : α ≃ β), Countable β
theorem Equiv.countable_iff E0 #
∀ {α : Sort u} {β : Sort v} (e : α ≃ β), Countable α ↔ Countable β
instance instCountableULift E0 #
∀ {β : Type v} [Countable β], Countable (ULift.{u, v} β)
instance instCountablePLift E0 #
∀ {α : Sort u} [Countable α], Countable (PLift α)
instance Subsingleton.to_countable E0 #
∀ {α : Sort u} [Subsingleton α], Countable α
instance Subtype.countable E0 #
∀ {α : Sort u} [Countable α] {p : α → Prop}, Countable { x // p x }
instance instCountableFin E0 #
∀ {n : ℕ}, Countable (Fin n)
instance Finite.to_countable E0 #
∀ {α : Sort u} [Finite α], Countable α
instance instCountablePUnit E0 #
Countable PUnit.{u}
instance Prop.countable E0 #
∀ (p : Prop), Countable p
instance Bool.countable E0 #
Countable Bool
instance Prop.countable' E0 #
Countable Prop
instance Quotient.countable E0 #
∀ {α : Sort u} [Countable α] {r : α → α → Prop}, Countable (Quot r)
instance instCountableQuotient E0 #
∀ {α : Sort u} [Countable α] {s : Setoid α}, Countable (Quotient s)
class Uncountable E1 #
Sort u_1 → Prop
A type α is uncountable if it is not countable.
theorem uncountable_iff_not_countable E1 #
∀ (α : Sort u_1), Uncountable α ↔ ¬Countable α
ctor Uncountable.mk E0 #
∀ {α : Sort u_1}, ¬Countable α → Uncountable α
theorem Uncountable.not_countable E1 #
∀ {α : Sort u_1} [self : Uncountable α], ¬Countable α
A type α is uncountable if it is not countable.
theorem not_uncountable_iff E0 #
∀ {α : Sort u}, ¬Uncountable α ↔ Countable α
theorem not_countable_iff E0 #
∀ {α : Sort u}, ¬Countable α ↔ Uncountable α
theorem not_uncountable E0 #
∀ {α : Sort u} [Countable α], ¬Uncountable α
theorem not_countable E0 #
∀ {α : Sort u} [Uncountable α], ¬Countable α
theorem Function.Injective.uncountable E1 #
∀ {α : Sort u} {β : Sort v} [Uncountable α] {f : α → β}, Function.Injective f → Uncountable β
theorem Function.Surjective.uncountable E1 #
∀ {α : Sort u} {β : Sort v} [Uncountable β] {f : α → β}, Function.Surjective f → Uncountable α
theorem not_injective_uncountable_countable E1 #
∀ {α : Sort u} {β : Sort v} [Uncountable α] [Countable β] (f : α → β), ¬Function.Injective f
theorem not_surjective_countable_uncountable E1 #
∀ {α : Sort u} {β : Sort v} [Countable α] [Uncountable β] (f : α → β), ¬Function.Surjective f
theorem uncountable_iff_forall_not_surjective E1 #
∀ {α : Sort u} [Nonempty α], Uncountable α ↔ ∀ (f : ℕ → α), ¬Function.Surjective f
theorem Uncountable.of_equiv E1 #
∀ {β : Sort v} (α : Sort u_1) [Uncountable α] (e : α ≃ β), Uncountable β
theorem Equiv.uncountable_iff E0 #
∀ {α : Sort u} {β : Sort v} (e : α ≃ β), Uncountable α ↔ Uncountable β
instance instUncountableULift E0 #
∀ {β : Type v} [Uncountable β], Uncountable (ULift.{u, v} β)
instance instUncountablePLift E0 #
∀ {α : Sort u} [Uncountable α], Uncountable (PLift α)
instance instInfiniteOfUncountable E0 #
∀ {α : Sort u} [Uncountable α], Infinite α