Skip to content

Commit 4c038b0

Browse files
authored
Fix ambiguity in ℵ₀ ≤ RealInfinity() (#16)
1 parent 622c39e commit 4c038b0

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "Infinities"
22
uuid = "e1ba4f0e-776d-440f-acd9-e1d2e9742647"
33
authors = ["Sheehan Olver <[email protected]>"]
4-
version = "0.1.1"
4+
version = "0.1.2"
55

66
[compat]
77
julia = "1"

src/cardinality.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ isless(x::InfiniteCardinal, y::AbstractFloat) = false
8282
<(::InfiniteCardinal, x::Real) = false
8383
(::InfiniteCardinal{0}, x::Real) = x
8484
(::InfiniteCardinal, x::Real) = false
85+
(::InfiniteCardinal{0}, x::RealInfinity) = x
86+
(::InfiniteCardinal, x::RealInfinity) = false
8587
>(::InfiniteCardinal{0}, y::Real) => y
8688
>(::InfiniteCardinal, ::Real) = true
8789
(::InfiniteCardinal, ::Real) = true

test/test_cardinality.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ using Infinities, Base64, Base.Checked, Test
5656
@test !(-> ℵ₀) && !(- ℵ₀)
5757
@test ℵ₀ > -
5858
@test ℵ₁ > -&& ℵ₁ -
59+
@test ℵ₀  RealInfinity()
60+
@test !(ℵ₀  -∞)
61+
@test !(ℵ₁  RealInfinity())
5962

6063
@test Inf < ℵ₁ && !(ℵ₁ < Inf)
6164
@test !(Inf < ℵ₀) && !(ℵ₀ < Inf)

0 commit comments

Comments
 (0)