• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
        • Syntax-for-tools
        • Atc
        • Language
          • Abstract-syntax
            • Tyspecseq
            • Expr
            • Binop
            • Fileset
            • Obj-declor
            • Ident
            • Iconst
            • Obj-adeclor
            • Const
            • Fundef
            • Unop
              • Unop-case
              • Unop-fix
                • Unopp
                • Unop-equiv
                • Unop-plus
                • Unop-minus
                • Unop-lognot
                • Unop-kind
                • Unop-indir
                • Unop-bitnot
                • Unop-address
              • File
              • Tag-declon
              • Fun-declor
              • Obj-declon
              • Iconst-length
              • Abstract-syntax-operations
              • Label
              • Struct-declon
              • Initer
              • Ext-declon
              • Fun-adeclor
              • Expr-option
              • Iconst-base
              • Initer-option
              • Iconst-option
              • Tyspecseq-option
              • Stmt-option
              • Scspecseq
              • Param-declon
              • Obj-declon-option
              • File-option
              • Tyname
              • Transunit
              • Fun-declon
              • Transunit-result
              • Param-declon-list
              • Struct-declon-list
              • Expr-list
              • Tyspecseq-list
              • Ident-set
              • Ident-list
              • Ext-declon-list
              • Unop-list
              • Tyname-list
              • Fundef-list
              • Fun-declon-list
              • Binop-list
              • Stmt-fixtypes
              • Expr-fixtypes
            • Integer-ranges
            • Implementation-environments
            • Dynamic-semantics
            • Static-semantics
            • Grammar
            • Integer-formats
            • Types
            • Portable-ascii-identifiers
            • Values
            • Integer-operations
            • Computation-states
            • Object-designators
            • Operations
            • Errors
            • Tag-environments
            • Function-environments
            • Character-sets
            • Flexible-array-member-removal
            • Arithmetic-operations
            • Pointer-operations
            • Bytes
            • Keywords
            • Real-operations
            • Array-operations
            • Scalar-operations
            • Structure-operations
          • Representation
          • Transformation-tools
          • Insertion-sort
          • Pack
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • Riscv
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Unop

    Unop-fix

    Fixing function for unop structures.

    Signature
    (unop-fix x) → new-x
    Arguments
    x — Guard (unopp x).
    Returns
    new-x — Type (unopp new-x).

    Definitions and Theorems

    Function: unop-fix$inline

    (defun unop-fix$inline (x)
      (declare (xargs :guard (unopp x)))
      (let ((__function__ 'unop-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (case (unop-kind x)
               (:address (cons :address (list)))
               (:indir (cons :indir (list)))
               (:plus (cons :plus (list)))
               (:minus (cons :minus (list)))
               (:bitnot (cons :bitnot (list)))
               (:lognot (cons :lognot (list))))
             :exec x)))

    Theorem: unopp-of-unop-fix

    (defthm unopp-of-unop-fix
      (b* ((new-x (unop-fix$inline x)))
        (unopp new-x))
      :rule-classes :rewrite)

    Theorem: unop-fix-when-unopp

    (defthm unop-fix-when-unopp
      (implies (unopp x)
               (equal (unop-fix x) x)))

    Function: unop-equiv$inline

    (defun unop-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (unopp acl2::x) (unopp acl2::y))))
      (equal (unop-fix acl2::x)
             (unop-fix acl2::y)))

    Theorem: unop-equiv-is-an-equivalence

    (defthm unop-equiv-is-an-equivalence
      (and (booleanp (unop-equiv x y))
           (unop-equiv x x)
           (implies (unop-equiv x y)
                    (unop-equiv y x))
           (implies (and (unop-equiv x y) (unop-equiv y z))
                    (unop-equiv x z)))
      :rule-classes (:equivalence))

    Theorem: unop-equiv-implies-equal-unop-fix-1

    (defthm unop-equiv-implies-equal-unop-fix-1
      (implies (unop-equiv acl2::x x-equiv)
               (equal (unop-fix acl2::x)
                      (unop-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: unop-fix-under-unop-equiv

    (defthm unop-fix-under-unop-equiv
      (unop-equiv (unop-fix acl2::x) acl2::x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-unop-fix-1-forward-to-unop-equiv

    (defthm equal-of-unop-fix-1-forward-to-unop-equiv
      (implies (equal (unop-fix acl2::x) acl2::y)
               (unop-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: equal-of-unop-fix-2-forward-to-unop-equiv

    (defthm equal-of-unop-fix-2-forward-to-unop-equiv
      (implies (equal acl2::x (unop-fix acl2::y))
               (unop-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: unop-equiv-of-unop-fix-1-forward

    (defthm unop-equiv-of-unop-fix-1-forward
      (implies (unop-equiv (unop-fix acl2::x) acl2::y)
               (unop-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: unop-equiv-of-unop-fix-2-forward

    (defthm unop-equiv-of-unop-fix-2-forward
      (implies (unop-equiv acl2::x (unop-fix acl2::y))
               (unop-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: unop-kind$inline-of-unop-fix-x

    (defthm unop-kind$inline-of-unop-fix-x
      (equal (unop-kind$inline (unop-fix x))
             (unop-kind$inline x)))

    Theorem: unop-kind$inline-unop-equiv-congruence-on-x

    (defthm unop-kind$inline-unop-equiv-congruence-on-x
      (implies (unop-equiv x x-equiv)
               (equal (unop-kind$inline x)
                      (unop-kind$inline x-equiv)))
      :rule-classes :congruence)

    Theorem: consp-of-unop-fix

    (defthm consp-of-unop-fix
      (consp (unop-fix x))
      :rule-classes :type-prescription)