[Math] Intervals: Apache Maven version numbers

How intervals denoted formally:

[a .. b]
closed interval: {x | a ≤ x ≤ b}

(a .. b)
open interval: {x | a < x < b}

[a .. b)
half-open interval: {x | a ≤ x < b}

(a .. b]
half-closed interval: {x | a < x ≤ b}

( Donald E. Knuth - TAOCP, vol.2, 3rd ed. )


Apache Maven versions numbering inherited from mathematical notation:

Range Meaning
(,1.0]        x <= 1.0

...

[1.0]         Exactly 1.0
[1.2,1.3]     1.2 <= x <= 1.3
[1.0,2.0)     1.0 <= x < 2.0
[1.5,)        x >= 1.5
(,1.0],[1.2,) x <= 1.0 or x >= 1.2. Multiple sets are separated by a comma.
(,1.1),(1.1,) This excludes 1.1 if it is known not to work in combination with the library.

https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm#MAVEN8855

Range   Meaning
...
(,1.0]          x <= 1.0
(,1.0)          x < 1.0
[1.0]           x == 1.0
[1.0,)          x >= 1.0
(1.0,)          x > 1.0
(1.0,2.0)       1.0 < x < 2.0
[1.0,2.0]       1.0 <= x <= 2.0
(,1.0],[1.2,)   x <= 1.0 or x >= 1.2. Multiple sets are comma-separated
(,1.1),(1.1,)   x != 1.1

https://maven.apache.org/enforcer/enforcer-rules/versionRanges.html

So, a single number in brackets is that fixed version number: [1.0] is a synonym of [1.0,1.0]

Also, infinite sign is omitted in half-open and half-closed intervals: (,1.0], (,1.0],[1.2,), etc.

(the post first published at 20251119.)


List of my other blog posts.

Subscribe to my news feed,

Some time ago (before 24-Mar-2025) there was Disqus JS script for comments. I dropped it --- it was so motley, distracting, animated, with too much ads. I never liked it. Also, comments din't appeared correctly (Disqus was buggy). Also, my blog is too chamberlike --- not many people write comments here. So I decided to switch to the model I once had at least in 2020 --- send me your comments by email (don't forget to include URL to this blog post) and I will copy&paste it here manually.

Let's party like it's ~1993-1996, in this ultimate, radical and uncompromisingly primitive pre-web1.0-style blog and website. This website is best viewed under lynx/links/elinks/w3m.