The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V03. Sets, finite structures and big operators

Mathlib.Basic.Countable.Basic

33 declarations. Mathlib docs · Source

Countable types

In this file we provide basic instances of the Countable typeclass defined elsewhere.

Definition in terms of Function.Embedding

Operations on Type*s

Operations on Sort*s

instance instCountableInt E0 #

Countable ℤ

theorem countable_iff_nonempty_embedding E1 #

∀ {α : Sort u}, Countable α ↔ Nonempty (α ↪ ℕ)

theorem uncountable_iff_isEmpty_embedding E1 #

∀ {α : Sort u}, Uncountable α ↔ IsEmpty (α ↪ ℕ)

theorem nonempty_embedding_nat E1 #

∀ (α : Sort u_1) [Countable α], Nonempty (α ↪ ℕ)

theorem Function.Embedding.countable E1 #

∀ {α : Sort u} {β : Sort v} [Countable β] (f : α ↪ β), Countable α

theorem Function.Embedding.uncountable E1 #

∀ {α : Sort u} {β : Sort v} [Uncountable α] (f : α ↪ β), Uncountable β

instance instCountableSum E0 #

∀ {α : Type u} {β : Type v} [Countable α] [Countable β], Countable (α ⊕ β)

instance Sum.uncountable_inl E0 #

∀ {α : Type u} {β : Type v} [Uncountable α], Uncountable (α ⊕ β)

instance Sum.uncountable_inr E0 #

∀ {α : Type u} {β : Type v} [Uncountable β], Uncountable (α ⊕ β)

instance Option.instCountable E0 #

∀ {α : Type u} [Countable α], Countable (Option α)

theorem Option.countable_iff E0 #

∀ {α : Type u}, Countable (Option α) ↔ Countable α

Option α is countable if and only if the underlying type α is countable.

instance WithTop.instCountable E0 #

∀ {α : Type u} [Countable α], Countable (WithTop α)

instance WithBot.instCountable E0 #

∀ {α : Type u} [Countable α], Countable (WithBot α)

instance ENat.instCountable E0 #

Countable ℕ∞

instance Option.instUncountable E0 #

∀ {α : Type u} [Uncountable α], Uncountable (Option α)

theorem Option.uncountable_iff E0 #

∀ {α : Type u}, Uncountable (Option α) ↔ Uncountable α

Option α is uncountable if and only if the underlying type α is uncountable.

instance WithTop.instUncountable E0 #

∀ {α : Type u} [Uncountable α], Uncountable (WithTop α)

instance WithBot.instUncountable E0 #

∀ {α : Type u} [Uncountable α], Uncountable (WithBot α)

theorem untopD_coe_enat E0 #

∀ (d n : ℕ), WithTop.untopD d ↑n = n

instance instCountableProd E0 #

∀ {α : Type u} {β : Type v} [Countable α] [Countable β], Countable (α × β)

instance instUncountableProdOfNonempty E0 #

∀ {α : Type u} {β : Type v} [Uncountable α] [Nonempty β], Uncountable (α × β)

instance instUncountableProdOfNonempty_1 E0 #

∀ {α : Type u} {β : Type v} [Nonempty α] [Uncountable β], Uncountable (α × β)

theorem countable_left_of_prod_of_nonempty E1 #

∀ {α : Type u} {β : Type v} [Nonempty β], Countable (α × β) → Countable α

theorem countable_right_of_prod_of_nonempty E1 #

∀ {α : Type u} {β : Type v} [Nonempty α], Countable (α × β) → Countable β

theorem countable_prod_swap E1 #

∀ {α : Type u} {β : Type v} [Countable (α × β)], Countable (β × α)

instance instCountableSigma E0 #

∀ {α : Type u} {π : α → Type w} [Countable α] [∀ (a : α), Countable (π a)], Countable (Sigma π)

theorem Sigma.uncountable E1 #

∀ {α : Type u} {π : α → Type w} (a : α) [Uncountable (π a)], Uncountable (Sigma π)

instance instUncountableSigmaOfNonempty E0 #

∀ {α : Type u} {π : α → Type w} [Nonempty α] [∀ (a : α), Uncountable (π a)], Uncountable (Sigma π)

instance SetCoe.countable E0 #

∀ {α : Type u} [Countable α] (s : Set α), Countable ↑s

instance instCountablePSum E0 #

∀ {α : Sort u} {β : Sort v} [Countable α] [Countable β], Countable (α ⊕' β)

instance instCountablePProd E0 #

∀ {α : Sort u} {β : Sort v} [Countable α] [Countable β], Countable (α ×' β)

instance instCountablePSigma E0 #

∀ {α : Sort u} {π : α → Sort w} [Countable α] [∀ (a : α), Countable (π a)], Countable (PSigma π)

instance instCountableForallOfFinite E0 #

∀ {α : Sort u} {π : α → Sort w} [Finite α] [∀ (a : α), Countable (π a)], Countable ((a : α) → π a)