Countable sets #
In this file we define Set.Countable s as Countable s
and prove basic properties of this definition.
Note that this definition does not provide a computable encoding.
For a noncomputable conversion to Encodable s, use Set.Countable.nonempty_encodable.
Keywords #
sets, countable set
A set s is countable if the corresponding subtype is countable,
i.e., there exists an injective map f : s → ℕ.
Note that this is an abbreviation, so hs : Set.Countable s in the proof context
is the same as an instance Countable s.
For a constructive version, see Encodable.
Equations
- Set.Countable s = Countable ↑s
Instances For
Prove Set.Countable from a Countable instance on the subtype.
Restate Set.Countable as a Countable instance.
Restate Set.Countable as a Countable instance.
A set s : Set α is countable if and only if there exists a function α → ℕ injective
on s.
Alias of the forward direction of Set.countable_iff_nonempty_encodable.
Noncomputably enumerate elements in a set. The default value is used to extend the domain to
all of ℕ.
Equations
- Set.enumerateCountable h default n = match Encodable.decode n with | some y => ↑y | none => default
Instances For
A non-empty set is countable iff there exists a surjection from the natural numbers onto the subtype induced by the set.
Alias of the forward direction of Set.countable_iff_exists_surjective.
A non-empty set is countable iff there exists a surjection from the natural numbers onto the subtype induced by the set.
If s : Set α is a nonempty countable set, then there exists a map
f : ℕ → α such that s = range f.
Alias of the reverse direction of Set.Countable.biUnion_iff.
Alias of the reverse direction of Set.Countable.sUnion_iff.
The set of finite subsets of a countable set is countable.
If a family of disjoint sets is included in a countable set, then only countably many of them are nonempty.