Infinities.jl
Infinities.jl copied to clipboard
Readme assumes Continuum Hypothesis
InfiniteCardinal{k}, for the cardinality of an infinite set, e.g., ℵ₀ for the cardinality of the integers and ℵ₁ for the cardinality of the reals.
Not sure if this is intended, but a priori, (with standard notation) ℵ₁ being the cardinality of the reals is equivalent to accepting the Continuum Hypothesis
I'll merge a PR that makes this clear
Or a design that better captures this subtlety... is there a notation for the cardinality of the reals that is independent of the continuum hypothesis?
Generally, 2^{ℵ_0} can be used to represent the cardinality of the reals, but I'm not sure if that would be good in this context.
We could support 2^ℵ₀ via:
struct ExponentialCardinal{k} <: Integer end
==(::ExponentialCardinal{0}, ::InfiniteCardinal{0}) = true
function ^(x::Integer, p::InfiniteCardinal{0})
@assert x == 2
ExponentialCardinal{1}()
end
function ^(x::Integer, p:: ExponentialCardinal{k}) where k
@assert x == 2
ExponentialCardinal{k+1}()
end