• Top
    • Documentation
    • Books
    • Boolean-reasoning
      • Ipasir
      • Aignet
        • Base-api
        • Aignet-construction
        • Representation
          • Aignet-impl
          • Node
          • Network
          • Combinational-type
          • Typecode
            • Node->type
            • Code->ctype
            • Typecode-fix
              • Typecodep
              • *ctype-code-map*
            • Stypep
          • Aignet-copy-init
          • Aignet-simplify-with-tracking
          • Aignet-simplify-marked-with-tracking
          • Aignet-cnf
          • Aignet-simplify-marked
          • Aignet-complete-copy
          • Aignet-transforms
          • Aignet-eval
          • Semantics
          • Aignet-read-aiger
          • Aignet-write-aiger
          • Aignet-abc-interface
          • Utilities
        • Aig
        • Satlink
        • Truth
        • Ubdds
        • Bdd
        • Faig
        • Bed
        • 4v
      • Projects
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Typecode

    Typecode-fix

    Fixing function for typecodes.

    Signature
    (typecode-fix x) → code
    Returns
    code — Type (typecodep code).

    Definitions and Theorems

    Function: typecode-fix

    (defun typecode-fix (x)
      (declare (xargs :guard t))
      (let ((__function__ 'typecode-fix))
        (declare (ignorable __function__))
        (if (typecodep x) x 0)))

    Theorem: typecodep-of-typecode-fix

    (defthm typecodep-of-typecode-fix
      (b* ((code (typecode-fix x)))
        (typecodep code))
      :rule-classes :rewrite)

    Theorem: typecode-fix-when-typecodep

    (defthm typecode-fix-when-typecodep
      (implies (typecodep x)
               (equal (typecode-fix x) x)))