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.
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.
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.biUnion_iff.
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.