Countable sets #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
A set is countable if there exists an encoding of the set into the natural numbers.
An encoding is an injection with a partial inverse, which can be viewed as a
constructive analogue of countability. (For the most part, theorems about
countable will be classical and encodable will be constructive.)
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.
Noncomputably enumerate elements in a set. The default value is used to extend the domain to
all of ℕ.
Equations
- set.enumerate_countable h default = λ (n : ℕ), set.enumerate_countable._match_1 default (encodable.decode ↥s n)
- set.enumerate_countable._match_1 default (option.some y) = ↑y
- set.enumerate_countable._match_1 default option.none = default
Alias of the forward direction of set.countable_iff_exists_surjective.