• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
        • Z3-installation
        • Smt-hint
        • Tutorial
        • Status
        • Developer
          • Verified
            • Uninterpreted-fn-cp
            • Smt-hint-interface
              • Smtlink-hint
                • Smtlink-hint-p
                • Make-smtlink-hint
                • Func
                • Smtlink-hint-fix
                • Maybe-smtlink-hint
                • Hint-pair
                  • Hint-pair-fix
                    • Hint-pair-equiv
                    • Make-hint-pair
                    • Hint-pair->hints
                    • Change-hint-pair
                    • Hint-pair->thm
                    • Hint-pair-p
                    • Hint-pair-list
                  • Decl
                  • Binding
                  • Smtlink-hint-equiv
                  • Let-binding
                  • Change-smtlink-hint
                  • Smtlink-hint->expanded-clause-w/-hint
                  • Smtlink-hint->type-decl-list
                  • Smtlink-hint->fast-functions
                  • Smtlink-hint->expanded-g/type
                  • Smtlink-hint->smt-params
                  • Smtlink-hint->let-binding
                  • Smtlink-hint->hypotheses
                  • Smtlink-hint->fty-info
                  • Smtlink-hint->wrld-fn-len
                  • Smtlink-hint->symbols
                  • Smtlink-hint->smt-fname
                  • Smtlink-hint->smt-dir
                  • Smtlink-hint->smt-cnf
                  • Smtlink-hint->rm-file
                  • Smtlink-hint->main-hint
                  • Smtlink-hint->int-to-rat
                  • Smtlink-hint->functions
                  • Smtlink-hint->fty-types
                  • Smtlink-hint->custom-p
                  • Smtlink-hint->fty
                  • Smtlink-hint->abs
                • Smt-hint
                • Make-alist-fn-lst
                • True-list-fix
              • 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
    • Hint-pair

    Hint-pair-fix

    Fixing function for hint-pair structures.

    Signature
    (hint-pair-fix x) → new-x
    Arguments
    x — Guard (hint-pair-p x).
    Returns
    new-x — Type (hint-pair-p new-x).

    Definitions and Theorems

    Function: hint-pair-fix$inline

    (defun hint-pair-fix$inline (x)
      (declare (xargs :guard (hint-pair-p x)))
      (let ((acl2::__function__ 'hint-pair-fix))
        (declare (ignorable acl2::__function__))
        (mbe :logic
             (b* ((thm (pseudo-term-fix (cdr (std::da-nth 0 x))))
                  (hints (true-list-fix (cdr (std::da-nth 1 x)))))
               (list (cons 'thm thm)
                     (cons 'hints hints)))
             :exec x)))

    Theorem: hint-pair-p-of-hint-pair-fix

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

    Theorem: hint-pair-fix-when-hint-pair-p

    (defthm hint-pair-fix-when-hint-pair-p
      (implies (hint-pair-p x)
               (equal (hint-pair-fix x) x)))

    Function: hint-pair-equiv$inline

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

    Theorem: hint-pair-equiv-is-an-equivalence

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

    Theorem: hint-pair-equiv-implies-equal-hint-pair-fix-1

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

    Theorem: hint-pair-fix-under-hint-pair-equiv

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

    Theorem: equal-of-hint-pair-fix-1-forward-to-hint-pair-equiv

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

    Theorem: equal-of-hint-pair-fix-2-forward-to-hint-pair-equiv

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

    Theorem: hint-pair-equiv-of-hint-pair-fix-1-forward

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

    Theorem: hint-pair-equiv-of-hint-pair-fix-2-forward

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