Supposeand
are well ordered sets. The lexicographic ordering of
is defined as
or
and
where
and
The set
is well ordered if both
and
are well ordered.
We can extend this to a Cartesian product ofwell ordered sets
by writing
and
and
and
and
and
and
where