• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Hons-and-memoization
      • Events
      • History
      • Parallelism
      • Programming
      • Start-here
      • Real
      • Debugging
      • Miscellaneous
        • Term
        • Ld
        • Hints
        • Type-set
        • Ordinals
          • O-p
          • O<
          • Proof-of-well-foundedness
          • Two-nats-measure
          • Nat-list-measure
          • Make-ord
            • O-first-coeff
            • E0-ord-<
            • O-first-expt
            • E0-ordinalp
            • O-rst
            • O-finp
            • O>=
            • O<=
            • O-infp
            • O>
          • ACL2-customization
          • With-prover-step-limit
          • With-prover-time-limit
          • Set-prover-step-limit
          • Local-incompatibility
          • Set-case-split-limitations
          • Subversive-recursions
          • Specious-simplification
          • Defsum
          • Oracle-timelimit
          • Thm
          • Defopener
          • Gcl
          • Case-split-limitations
          • Set-gc-strategy
          • Default-defun-mode
          • Top-level
          • Reader
          • Ttags-seen
          • Adviser
          • Ttree
          • Abort-soft
          • Defsums
          • Gc$
          • With-timeout
          • Coi-debug::fail
          • Expander
          • Gc-strategy
          • Coi-debug::assert
          • Sin-cos
          • Def::doc
          • Syntax
          • Subversive-inductions
        • Output-controls
        • Macros
        • Interfacing-tools
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Testing-utilities
      • Math
    • Ordinals
    • ACL2-built-ins

    Make-ord

    A constructor for ordinals.

    Make-ord is the ordinal constructor. Its use is recommended instead of using cons to make ordinals. For a discussion of ordinals, see ordinals.

    For any ordinal, alpha < epsilon-0, there exist natural numbers p and n, positive integers x1, x2, ..., xn and ordinals a1 > a2 > ... > an > 0 such that alpha > a1 and alpha = w^(a1)x1 + w^(a2)x2 + ... + w^(an)xn + p. We call a1 the ``first exponent'', x1 the ``first coefficient'', and the remainder (w^(a2)x2 + ... + w^(an)xn + p) the ``rest'' of alpha.

    (Make-ord fe fco rst) corresponds to the ordinal (w^fe)fco + rst. Thus the first infinite ordinal, w (omega), is constructed by

    (make-ord 1 1 0)

    and, for example, the ordinal (w^2)5 + w2 + 7 is constructed by:

    (make-ord 2 5 (make-ord 1 2 7)) .

    The reason make-ord is used rather than cons is that it allows us to reason more abstractly about the ordinals, without having to worry about the underlying representation.

    Function: make-ord

    (defun make-ord (fe fco rst)
      (declare (xargs :guard (and (posp fco) (o-p fe) (o-p rst))))
      (cons (cons fe fco) rst))