• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
      • B*
      • Defunc
      • Fty
        • Deftagsum
        • Defprod
        • Defflexsum
        • Defbitstruct
        • Deflist
        • Defalist
        • Defbyte
        • Defresult
        • Deffixequiv
        • Deffixtype
        • Defoption
        • Fty-discipline
        • Fold
        • Specific-types
        • Fty-extensions
        • Defsubtype
        • Deftypes
        • Defset
        • Defflatsum
        • Deflist-of-len
        • Defomap
        • Defbytelist
        • Fty::basetypes
          • Any-p
          • Symbol-fix
          • Maybe-integerp-fix
          • Maybe-integer-equiv
          • Maybe-posp-fix
          • Maybe-natp-fix
          • Maybe-bit-fix
          • Bool-fix
          • Maybe-pos-equiv
          • Maybe-nat-equiv
          • Maybe-bit-equiv
          • Maybe-lit-fix
          • Symbol-equiv
          • True-equiv
          • Pos-equiv
          • Lposfix
          • True-p
          • True-fix
        • Defvisitors
        • Deffixtype-alias
        • Deffixequiv-sk
        • Defunit
        • Multicase
        • Deffixequiv-mutual
        • Fty::baselists
        • Def-enumcase
        • Defmap
      • Apt
      • Std/util
      • Defdata
      • Defrstobj
      • Seq
      • Match-tree
      • Defrstobj
      • With-supporters
      • Def-partial-measure
      • Template-subst
      • Soft
      • Defthm-domain
      • Event-macros
      • Def-universal-equiv
      • Def-saved-obligs
      • With-supporters-after
      • Definec
      • Sig
      • Outer-local
      • Data-structures
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
      • Operational-semantics
      • Real
      • Start-here
      • Miscellaneous
      • Output-controls
      • Bdd
      • Macros
        • Make-event
        • Defmacro
        • Untranslate-patterns
        • Tc
        • Trans*
        • Macro-aliases-table
        • Macro-args
        • Defabbrev
        • Trans
        • User-defined-functions-table
        • Untranslate-for-execution
        • Macro-libraries
          • B*
          • Defunc
          • Fty
            • Deftagsum
            • Defprod
            • Defflexsum
            • Defbitstruct
            • Deflist
            • Defalist
            • Defbyte
            • Defresult
            • Deffixequiv
            • Deffixtype
            • Defoption
            • Fty-discipline
            • Fold
            • Specific-types
            • Fty-extensions
            • Defsubtype
            • Deftypes
            • Defset
            • Defflatsum
            • Deflist-of-len
            • Defomap
            • Defbytelist
            • Fty::basetypes
              • Any-p
              • Symbol-fix
              • Maybe-integerp-fix
              • Maybe-integer-equiv
              • Maybe-posp-fix
              • Maybe-natp-fix
              • Maybe-bit-fix
              • Bool-fix
              • Maybe-pos-equiv
              • Maybe-nat-equiv
              • Maybe-bit-equiv
              • Maybe-lit-fix
              • Symbol-equiv
              • True-equiv
              • Pos-equiv
              • Lposfix
              • True-p
              • True-fix
            • Defvisitors
            • Deffixtype-alias
            • Deffixequiv-sk
            • Defunit
            • Multicase
            • Deffixequiv-mutual
            • Fty::baselists
            • Def-enumcase
            • Defmap
          • Apt
          • Std/util
          • Defdata
          • Defrstobj
          • Seq
          • Match-tree
          • Defrstobj
          • With-supporters
          • Def-partial-measure
          • Template-subst
          • Soft
          • Defthm-domain
          • Event-macros
          • Def-universal-equiv
          • Def-saved-obligs
          • With-supporters-after
          • Definec
          • Sig
          • Outer-local
          • Data-structures
        • Add-macro-fn
        • Check-vars-not-free
        • Safe-mode
        • Trans1
        • Defmacro-untouchable
        • Set-duplicate-keys-action
        • Add-macro-alias
        • Magic-macroexpand
        • Defmacroq
        • Trans!
        • Remove-macro-fn
        • Remove-macro-alias
        • Add-binop
        • Untrans-table
        • Trans*-
        • Remove-binop
        • Tcp
        • Tca
      • Installation
      • Mailing-lists
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Fty

Fty::basetypes

A book that associates many built-in ACL2 predicates with suitable fixing functions and equivalence relations, for use in the fty-discipline.

The centaur/fty/basetypes book provides basic support for using many built-in ACL2 types with the FTY discipline. It introduces any necessary fixing functions and equivalences, and then sets up fty::deffixtype associations between the recognizers, fixing functions, and equivalence relations for the following types.

See also fty::baselists, which sets up similar support for various built-in list recognizers like character-listp, etc.

Type Name Recognizer Fix Equiv
bitbitpbfixbit-equiv
natnatpnfixnat-equiv
intintegerpifixint-equiv
rationalrationalprfixrational-equiv
acl2-numberACL2-numberpfixnumber-equiv
true-listtrue-listplist-fixlist-equiv
stringstringpstr-fixstreqv
truetrue-ptrue-fixtrue-equiv
symbolsymbolpsymbol-fixsymbol-equiv
posposppos-fixpos-equiv
charactercharacterpchar-fixchareqv
anyany-pidentityequal
boolbooleanpbool-fixiff
maybe-natmaybe-natpmaybe-natp-fixmaybe-nat-equiv
maybe-posmaybe-pospmaybe-posp-fixmaybe-pos-equiv
maybe-bitmaybe-bitpmaybe-bit-fixmaybe-bit-equiv
maybe-integermaybe-integerpmaybe-integerp-fixmaybe-integer-equiv

Note: all of these associations are made in the ACL2 package.

Subtopics

Any-p
(any-p x) is always true; i.e., it recognizes any ACL2 object.
Symbol-fix
(symbol-fix x) is a fixing function for symbolp; it is the identity for symbols and coerces non-symbols to acl2::||, i.e., the empty symbol in the ACL2 package.
Maybe-integerp-fix
(maybe-integerp-fix x) is the identity for maybe-integerps, or coerces any invalid object to nil.
Maybe-integer-equiv
(maybe-integerp-equiv x y) is an equivalence relation for maybe-integerps, i.e., equality up to maybe-integerp-fix.
Maybe-posp-fix
(maybe-posp-fix x) is the identity for maybe-posps, or coerces any non-posp to nil.
Maybe-natp-fix
(maybe-natp-fix x) is the identity for maybe-natps, or coerces any invalid object to nil.
Maybe-bit-fix
(maybe-bit-fix x) is the identity for maybe-bitps, or coerces any non-bitp to nil.
Bool-fix
(bool-fix x) is a fixing function for Booleans; it coerces any non-nil symbol to t.
Maybe-pos-equiv
(maybe-posp-equiv x y) is an equivalence relation for maybe-posps, i.e., equality up to maybe-posp-fix.
Maybe-nat-equiv
(maybe-natp-equiv x y) is an equivalence relation for maybe-natps, i.e., equality up to maybe-natp-fix.
Maybe-bit-equiv
(maybe-bitp-equiv x y) is an equivalence relation for maybe-bitps, i.e., equality up to maybe-bit-fix.
Maybe-lit-fix
(maybe-lit-fix x) is the identity for maybe-litps, or coerces any non-litp to nil.
Symbol-equiv
(symbol-equiv x y) recognizes symbols that are identical under symbol-fix.
True-equiv
(true-equiv x y) is a ``degenerate'' equivalence for true-p objects.
Pos-equiv
(pos-equiv x y) is equality for positive numbers, i.e., equality up to pos-fix.
Lposfix
(lposfix x) is logically identical to (pos-fix x), but its guard requires that x is a posp and, in the execution, it's just a no-op that returns x.
True-p
(true-p x) recognizes only the symbol t.
True-fix
(true-fix x) ignores its argument and unconditionally returns t.