• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
        • Z3-installation
        • Smt-hint
        • Tutorial
        • Status
        • Developer
          • Verified
            • Uninterpreted-fn-cp
              • Fhg-single-args
              • Fhg-args
                • Fhg-args-fix
                  • Make-fhg-args
                  • Fhg-args-equiv
                  • Fhg-args->fn-more-returns-hint-acc
                  • Fhg-args->fn-returns-hint-acc
                  • Fhg-args->lambda-acc
                  • Change-fhg-args
                  • Fhg-args->term-lst
                  • Fhg-args->fn-lst
                  • Fhg-args-p
                • Lambda-binding
                • Generate-fn-hint-lst
              • Smt-hint-interface
              • Function-expansion
              • Smt-config
              • Fty-support
              • Smt-computed-hints
              • Add-hypo-cp
              • Smt-hint-please
              • Type-extract-cp
              • Smt-extract
              • Smtlink-process-user-hint
              • Smt-basics
              • Smt-type-hyp
              • Smt-magic-fix
            • Trusted
        • 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
        • 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
    • Fhg-args

    Fhg-args-fix

    Fixing function for fhg-args structures.

    Signature
    (fhg-args-fix x) → new-x
    Arguments
    x — Guard (fhg-args-p x).
    Returns
    new-x — Type (fhg-args-p new-x).

    Definitions and Theorems

    Function: fhg-args-fix$inline

    (defun fhg-args-fix$inline (x)
     (declare (xargs :guard (fhg-args-p x)))
     (let ((acl2::__function__ 'fhg-args-fix))
      (declare (ignorable acl2::__function__))
      (mbe
       :logic
       (b*
        ((term-lst (pseudo-term-list-fix (cdr (std::da-nth 0 x))))
         (fn-lst (func-alist-fix (cdr (std::da-nth 1 x))))
         (fn-returns-hint-acc
              (hint-pair-list-fix (cdr (std::da-nth 2 x))))
         (fn-more-returns-hint-acc
              (hint-pair-list-fix (cdr (std::da-nth 3 x))))
         (lambda-acc (lambda-binding-list-fix (cdr (std::da-nth 4 x)))))
        (list (cons 'term-lst term-lst)
              (cons 'fn-lst fn-lst)
              (cons 'fn-returns-hint-acc
                    fn-returns-hint-acc)
              (cons 'fn-more-returns-hint-acc
                    fn-more-returns-hint-acc)
              (cons 'lambda-acc lambda-acc)))
       :exec x)))

    Theorem: fhg-args-p-of-fhg-args-fix

    (defthm fhg-args-p-of-fhg-args-fix
      (b* ((new-x (fhg-args-fix$inline x)))
        (fhg-args-p new-x))
      :rule-classes :rewrite)

    Theorem: fhg-args-fix-when-fhg-args-p

    (defthm fhg-args-fix-when-fhg-args-p
      (implies (fhg-args-p x)
               (equal (fhg-args-fix x) x)))

    Function: fhg-args-equiv$inline

    (defun fhg-args-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (fhg-args-p acl2::x)
                                  (fhg-args-p acl2::y))))
      (equal (fhg-args-fix acl2::x)
             (fhg-args-fix acl2::y)))

    Theorem: fhg-args-equiv-is-an-equivalence

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

    Theorem: fhg-args-equiv-implies-equal-fhg-args-fix-1

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

    Theorem: fhg-args-fix-under-fhg-args-equiv

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

    Theorem: equal-of-fhg-args-fix-1-forward-to-fhg-args-equiv

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

    Theorem: equal-of-fhg-args-fix-2-forward-to-fhg-args-equiv

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

    Theorem: fhg-args-equiv-of-fhg-args-fix-1-forward

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

    Theorem: fhg-args-equiv-of-fhg-args-fix-2-forward

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