• 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
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • 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
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
              • Dynamic-semantics
                • Execution
                • Values
                • Dynamic-environments
                • Arithmetic-operations
                • Curve-parameterization
                • Shift-operations
                • Errors
                • Value-expressions
                • Locations
                • Input-execution
                  • Eval-input-item-list
                  • Eval-input-item
                  • Funarg
                    • Funarg-fix
                      • Funarg-equiv
                      • Make-funarg
                      • Change-funarg
                      • Funarg->value
                      • Funarg->sort
                      • Funarg->name
                      • Funargp
                    • Funarg-option
                    • Eval-input-section-list
                    • Eval-input-section
                    • Eval-input-file
                    • Funarg-result
                    • Funarg-list-result
                    • Funarg-list
                  • Edwards-bls12-generator
                  • Equality-operations
                  • Logical-operations
                  • Program-execution
                  • Ordering-operations
                  • Bitwise-operations
                  • Literal-evaluation
                  • Type-maps-for-struct-components
                  • Output-execution
                  • Tuple-operations
                  • Struct-operations
                • Compilation
                • Static-semantics
                • Concrete-syntax
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Funarg

    Funarg-fix

    Fixing function for funarg structures.

    Signature
    (funarg-fix x) → new-x
    Arguments
    x — Guard (funargp x).
    Returns
    new-x — Type (funargp new-x).

    Definitions and Theorems

    Function: funarg-fix$inline

    (defun funarg-fix$inline (x)
     (declare (xargs :guard (funargp x)))
     (let ((__function__ 'funarg-fix))
      (declare (ignorable __function__))
      (mbe
          :logic
          (b* ((name (identifier-fix (cdr (std::da-nth 0 (cdr x)))))
               (sort (var/const-sort-fix (cdr (std::da-nth 1 (cdr x)))))
               (value (value-fix (cdr (std::da-nth 2 (cdr x))))))
            (cons :funarg (list (cons 'name name)
                                (cons 'sort sort)
                                (cons 'value value))))
          :exec x)))

    Theorem: funargp-of-funarg-fix

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

    Theorem: funarg-fix-when-funargp

    (defthm funarg-fix-when-funargp
      (implies (funargp x)
               (equal (funarg-fix x) x)))

    Function: funarg-equiv$inline

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

    Theorem: funarg-equiv-is-an-equivalence

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

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

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

    Theorem: funarg-fix-under-funarg-equiv

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

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

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

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

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

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

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

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

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