Skip to content

Instantly share code, notes, and snippets.

View arthurp's full-sized avatar
🙀
Working stiff.

Arthur Peters arthurp

🙀
Working stiff.
View GitHub Profile
@arthurp
arthurp / Semantic_version_as_infinite_ordinals.txt
Last active January 3, 2023 19:57
Semantics versions defined using infinite ordinals
You can define an ordering that would usually be lexical (order (x, y, z) by ordering x first,
then y within that, then z within that) or even nested lexical by instead adding together various
expressions which use ordinal numbers (represented as the naturals) and the constant Ω which is
the first uncountable ordinal meaning that Ω is greater than all countable ordinals (i.e., all
ordinals 0, 1, 2, .....). So Ωz (for all z) is strictly larger than any finite x, meaning that
the lexical ordering of (x, y) is the same as the ordering of the infinite ordinal Ω*x + y.
This expands to any number of elements in tuple and allows for nested tuples.
Versions x.y.z are represented as (x, y, z) and ordered as above. The definition of semantic
versioning is then: Symantic versions which differ only by a countable amount are bug