Infinities.jl icon indicating copy to clipboard operation
Infinities.jl copied to clipboard

Readme assumes Continuum Hypothesis

Open SyxP opened this issue 4 years ago • 4 comments

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

SyxP avatar Mar 15 '21 16:03 SyxP

I'll merge a PR that makes this clear

dlfivefifty avatar Mar 15 '21 20:03 dlfivefifty

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?

dlfivefifty avatar Mar 15 '21 20:03 dlfivefifty

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.

SyxP avatar Mar 17 '21 16:03 SyxP

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

dlfivefifty avatar Mar 17 '21 16:03 dlfivefifty