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
Prove Set.Countable from a Countable instance on the subtype.
Restate Set.Countable as a Countable instance.
Restate Set.Countable as a Countable instance.
Alias of the forward direction of Set.countable_iff_nonempty_encodable.
Convert Set.Countable s to Encodable s (noncomputable).
Equations
- hs.toEncodable = Classical.choice ⋯
Instances For
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.
Alias of the reverse direction of Set.Countable.sUnion_iff.
If a family of disjoint sets is included in a countable set, then only countably many of them are nonempty.