Ordinals extend the natural numbers into transfinite numbers, which gives a system for reasoning infinity. This project’s objective is to implement ordinal arithmetic using Mathematica in order to express their unique properties of ordinal addition and multiplication. Ordinal operations are non-commutative and require meticulous symbolic handling unlike conventional arithmetic. A framework was made for respecting ordinals and performing computations that respect their well-ordered nature. This was used to express ordinals in Cantor Normal Form.
Introduction
Introduction
In the late 1800s, Georg Cantor introduced transfinite numbers to formalize the mathematics of infinity, which can be distinguished between ordinals (describing order) and cardinals (describing size). These concepts transformed set theory and mathematical logic. Unfortunately, despite their role in math, there is no compact and fully autotomized system for transfinite arithmetic. Ordinal operations like addition and multiplication are defined recursively within set theory, not as independent algebraic systems. Cardinal arithmetic is different since it is even less well-defined. Many of its core questions are undecidable within Zermelo-Fraenkel set theory and rely on additional assumptions like the Continuum Hypothesis.
This project focuses on ordinal arithmetic, where the rules are suitable for symbolic implementation. The goal of the project was to build a computational structure in Mathematica that can represent and manipulate ordinals using symbolic rewriting. Basic ordinal structures like zero, successors, and limits were defined. Then, recursive rules for addition and multiplication were added. To be able to compare and simplify, Cantor Normal Form (CNF) was constructed to express ordinals as sums of decreasing powers of the first infinite ordinal. This project explores what symbolic arithmetic system for ordinals might look like and how far it can be extended.
This project focuses on ordinal arithmetic, where the rules are suitable for symbolic implementation. The goal of the project was to build a computational structure in Mathematica that can represent and manipulate ordinals using symbolic rewriting. Basic ordinal structures like zero, successors, and limits were defined. Then, recursive rules for addition and multiplication were added. To be able to compare and simplify, Cantor Normal Form (CNF) was constructed to express ordinals as sums of decreasing powers of the first infinite ordinal
ω
Representation of Ordinals
Representation of Ordinals
Defining Ordinals
Defining Ordinals
The three fundamental types of ordinals are zero, successors, and limits. They form the basis of all ordinal construction. Now, we can define them.
Represents the ordinal zero:
In[]:=
zeroOrd:=OverTilde[0];
Represents the successor of 1:
In[]:=
succOrd[n_]:=s[n];
Represents the constructor definition for limit ordinals:
In[]:=
limitOrd[f_]:=lim[f];
Represents the limit ordinal omega:
In[]:=
omega:=limitOrd[Function[x,succOrd[x]]];
We can think of ω as being the least ordinal number that is larger than all natural numbers. We are able to take an expression, use structural predicates to classify it as a valid ordinal, and distinguish between the zero, successor, and limit ordinals.
Returns True since zeroOrd is a valid ordinal:
In[]:=
ordinalQ[zeroOrd]:=True
Checks recursively if the argument of a successor ordinal is valid:
In[]:=
ordinalQ[s[n_]]:=ordinalQ[n]
The limit is a valid ordinal:
In[]:=
ordinalQ[lim[f_]]:=True/;Head[f]===Function
If not a valid ordinal:
In[]:=
ordinalQ[_]:=False
Verifies expression represents ordinal zero:
In[]:=
zeroQ[zeroOrd]:=True
If not an ordinal zero:
In[]:=
zeroQ[_]:=False
Any head is recognized as a successor ordinal:
s
In[]:=
successorQ[s[_]]:=True
If no head , it is not a successor ordinal:
s
In[]:=
successorQ[_]:=False
Any head lim is recognized as a limit ordinal:
In[]:=
limitQ[lim[_]]:=True
If no head lim, it is not a limit ordinal:
In[]:=
limitQ[_]:=False
Now with these definitions, we are able to formally and recursively represent transfinite ordinals and their structure. Particularly, these foundational definitions allow us to formally and recursively represent the structure of transfinite ordinals. In particular, omega captures the smallest limit ordinal and ordinalQ allows for inductive validity across all well-formed constructions.
Ordinal Addition Rules:
Ordinal Addition Rules:
Ordinal addition is defined recursively on the second argument, reflecting the non-commutative nature of ordinal arithmetic. For instance, , but . If we add 1 to the right of omega, we end up with omega + 1, which is greater than omega because its the next ordinal after all natural numbers. On the other hand, if we had 1 to the left of omega, the infinity will “swallow” the 1, and we just get omega.
Giuseppe Peano was a mathematician who is famous for his contributions to mathematical logic and set theory. In 1889, he introduced something called the Peano axioms, which we will be using to help us make our operation functions.
Ordinary addition and the successor case gives us:
, where , where denotes the successor function.
ω+1>ω
1+ωω
Giuseppe Peano was a mathematician who is famous for his contributions to mathematical logic and set theory. In 1889, he introduced something called the Peano axioms, which we will be using to help us make our operation functions.
Ordinary addition and the successor case gives us:
α+0α
α+S(β)S(α+β)
S(α+β)
S
Peano Axiom 1:
In[]:=
addOrd[a_,zeroOrd]:=a
Peano Axiom 2:
In[]:=
addOrd[a_,s[b_]]:=s[addOrd[a,b]]
Finite numbers added to right side of omega:
In[]:=
addOrd[omega,n_Integer]:=Nest[succOrd,omega,n]
Associative Rule for ordinal addition:
In[]:=
addOrdAssocRule:=addOrd[addOrd[a_,b_],c_]==addOrd[a,addOrd[b,c]]
Example:
In[]:=
addOrdExample=addOrd[omega,3]
Out[]=
s[s[s[lim[Function[x,succOrd[x]]]]]]
This is ω + 3.
Ordinal Multiplication Rules:
Ordinal Multiplication Rules:
Ordinal multiplication is defined recursively on the right argument, consistent with standard set-theoretic ordinal arithmetic. This asymmetry again reinforces that multiplication is not commutative:
, for a successor .
α·00
α·S(β)(α·β)+α
S(β)
Peano Axiom 3:
In[]:=
mulOrd[a_,zeroOrd]:=zeroOrd;
Peano Axiom 4:
In[]:=
mulOrd[a_,s[beta_]]:=addOrd[mulOrd[a,beta],a];
Multiplication of ordinals is associative:
In[]:=
multOrdAssocRule:=multOrd[multOrd[a_,b_],c_]==multOrd[a,multOrd[b,c]]
Multiplication distributes over addition:
In[]:=
multLeftDistributivityRule:=multOrd[a_,addOrd[b_,c_]]==addOrd[multOrd[a,b],multOrd[a,c]]
Note that right distributivity does not hold in ordinal arithmetic .
Example:
In[]:=
mulOrdExample=mulOrd[omega,2,zeroOrd]
Out[]=
0
This correctly outputs 0.
Non-commutative Multiplication :
Non-commutative Multiplication :
To emphasize that ordinal multiplication is not commutative, we define a non-commutative multiplication operator and test it .
This operator represents non-commutative multiplication . This helps with direction-sensitive operations :
In[]:=
nonCommMult[a_,b_]:=a**b
This function tests whether two operations are equal under non-commutative multiplication by checking for cases where the direction of multiplication affects the outcome:
In[]:=
compareNonComm[a_,b_]:=a===b/.{lim[succOrd]**s[zeroOrd]->False,s[zeroOrd]**lim[succOrd]->False}
The operator and comparison function allow us to detect operations like , where the order of multiplication changes the result.
ω·2/22·ω
HereisanexampleoutputofthefunctionnonCommMult.
These are our 3 ordinal expressions:
In[]:=
ordinalExpr1=lim[succOrd];ordinalExpr2=s[zeroOrd];ordinalExpr3=s[succOrd];
In[]:=
example1=nonCommMult[ordinalExpr1,ordinalExpr2,ordinalExpr3];example2=nonCommMult[ordinalExpr3,ordinalExpr2,ordinalExpr1];
Testing if products are equivalent:
In[]:=
comparison=compareNonComm[example1,example2]
Out[]=
False
The example correctly returns false because the operands are different which changes the output when using non-commutative multiplication.
Ordinal Arithmetic Operations
Ordinal Arithmetic Operations
Asymmetry
Asymmetry
The ordinal 𝜔, the first infinite ordinal, behaves differently depending on whether it appears on the left or right of an operation. This section defines basic addition and multiplication with ω against finite natural numbers which emphasize the asymmetry of ordinal arithmetic.
This function demonstrates what adding any finite integer to the left of omega results in omega itself:
In[]:=
omegaLeftAdd[n_Integer]:=omega
Demonstrates that adding a finite integer to the right of ω extends ω by that integer's successor ordinals:
In[]:=
omegaRightAdd[n_Integer]:=Nest[succOrd,omega,n]
Generates a sequence by extending ω with successor ordinals, demonstrating how ordinal sequences evolve when omega is part of the sequence.
In[]:=
generateSequenceOmegaPlus[n_Integer]:=Table[s[omega,i],{i,0,n}]
Creates a sequence by appending ω to a list of finite values, highlighting the unique behavior of ω when placed at the end of a sequence .
In[]:=
generateSequencePlusOmega[n_Integer]:=Join[Table[OverBar[i],{i,0,n}],{omega}]
These functions illustrate how ordinal sequences behave when finite values and ω are combined, either by extending ω with successors or appending it to a finite list.
Left and Right Operations:
Left and Right Operations:
Applies successor operations to ω, but note that adding a finite number to the left of ω does not change ω :
n
In[]:=
omegaLeftAdd[n_Integer]:=omega
Applies successor operations to ω, modeling how ω extends when finite numbers are added to the right:
n
In[]:=
omegaRightAdd[n_Integer]:=Nest[succOrd,omega,n]
Any multiplication involving zero ordinal is zero:
In[]:=
multiplication[zeroOrd]:=zeroOrd
Multiplies any finite integer by ω on the left, resulting in ω:
Multiplication of ω by zero ordinal results in zero:
Multiplication involving zero ordinal results in zero:
Example:
This is ω:
This is ω + 5:
Properties
Properties
Some useful properties follow naturally from the ordinal axioms, particularly monotonicity:
Just like our axiom, any multiplication involving zero ordinal results in zero:
Ensures that addition preserves the order relation between ordinals :
Ensures that multiplication preserves the order relation:
These properties illustrate the ordered structure of ordinals and help validate that operations preserve order relations under appropriate conditions .
Visualizations
Visualizations
Successors
Successors
To visualize the iterative structure of successor ordinals, we generate a Token Event Graph starting from the zero ordinal. The rules successively apply the succOrd constructor.
Starts the graph with the zero ordinal :
Creates a graph showing the evolution of tokens according to rule and rule2 over 5 iterations which shows how the successor ordinals develop from zeroOrd:
Near-semiring Axioms:
Near-semiring Axioms:
A semiring is an algebraic structure that is similar to a ring, except that it doesn’t require the existence of additive inverses for each element. A near-ring is another structure similar to a ring, except is has a weaker distributive property. A near-semiring generalizes both near-rings and semirings. Its addition and multiplication operations are linked by the distributive property and additive identity.
Ordinal arithmetic doesn't form a full semiring, instead it forms a near-semiring due to the lack of right distributivity and additive commutativity. We are able to extract the valid subset of semiring axioms, but excluding those that fail for ordinals:
Ordinal arithmetic doesn't form a full semiring, instead it forms a near-semiring due to the lack of right distributivity and additive commutativity. We are able to extract the valid subset of semiring axioms, but excluding those that fail for ordinals:
Removes semiring axioms that do not hold for ordinal arithmetic, only picking out the near-semiring ones:
Expresses the axioms in logical form for the graph to be able to implement the axioms correctly:
This graph demonstrates how different logical identities interconnect under two-way rewriting. Axioms closer to the center are more foundational; those further out are properties derivable from core rule Axioms.
Cantor Normal Form
Cantor Normal Form
Uses a Which statement to determine the structure of ordinal ord and then applies the appropriate flattening function. sortDesc and merge functions sort the flattened list into descending order and combine like terms:
Takes an ordinal ord, flattens it, sorts the terms in descending order, merges the terms, and outputs CantorNormalForm:
*This code was written with the assistance of Wolfram Notebook Assistant
Examples
Examples
How the outputs work:
Conclusion
Conclusion
Future Directions
Future Directions
Looking forward, I want to define transfinite axioms and extend this system to handle cardinal arithmetic, which, unlike ordinal arithmetic, deals with set size over order type and obeys different algebraic properties. Additionally, I would like to to incorporate more Peano Axioms in the future. I also hope to extend my arithmetic system to include ordinal exponentiation.
References
References
◼
“Ordinal arithmetic - Wikipedia.” Wikipedia, the free encyclopedia, https://en.wikipedia.org/wiki/Ordinal_arithmetic.
◼
“Peano’s Axioms -- from Wolfram MathWorld.” Wolfram MathWorld, https://mathworld.wolfram.com/PeanosAxioms.html.
◼
◼
“Near-semiring - Wikipedia.” Wikipedia, the free encyclopedia, https://en.wikipedia.org/wiki/Near-semiring
Acknowledgements
Acknowledgements
I’d like to thank my mentor, Tate Allen, for all of his help throughout the project, particularly on math, coding, and the idea of using a TwoWayRuleTokenEventGraph. I’d also like to thank Henry Gustafson for his help in developing a successor visualization and assisting with the implementation of ordinal functions. me get a successor visualization and functions for my arithmetic. Many thanks to TA Annie Zhu who also helped with my arithmetic. I’m especially thankful to the entire Wolfram staff for making this possible. I especially would like to thank all of the Wolfram Staff for making this possible. Lastly, my thanks goes out to Stephen Wolfram who suggested me this project.
CITE THIS NOTEBOOK
CITE THIS NOTEBOOK
Implementing ordinal arithmetic for transfinite numbers
by Lucia Moxey
Wolfram Community, STAFF PICKS, July 10, 2025
https://community.wolfram.com/groups/-/m/t/3499598
by Lucia Moxey
Wolfram Community, STAFF PICKS, July 10, 2025
https://community.wolfram.com/groups/-/m/t/3499598