• 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
                  • 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
    • Smtlink-hint

    Smtlink-hint-fix

    Fixing function for smtlink-hint structures.

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

    Definitions and Theorems

    Function: smtlink-hint-fix$inline

    (defun smtlink-hint-fix$inline (x)
     (declare (xargs :guard (smtlink-hint-p x)))
     (let ((acl2::__function__ 'smtlink-hint-fix))
      (declare (ignorable acl2::__function__))
      (mbe
       :logic
       (b* ((functions (func-list-fix (cdr (std::da-nth 0 x))))
            (hypotheses (hint-pair-list-fix (cdr (std::da-nth 1 x))))
            (main-hint (true-list-fix (cdr (std::da-nth 2 x))))
            (let-binding (let-binding-fix (cdr (std::da-nth 3 x))))
            (symbols (symbol-list-fix (cdr (std::da-nth 4 x))))
            (abs (symbol-list-fix (cdr (std::da-nth 5 x))))
            (fty (symbol-list-fix (cdr (std::da-nth 6 x))))
            (fty-info (fty-info-alist-fix (cdr (std::da-nth 7 x))))
            (fty-types (fty-types-fix (cdr (std::da-nth 8 x))))
            (int-to-rat (acl2::bool-fix (cdr (std::da-nth 9 x))))
            (smt-dir (str-fix (cdr (std::da-nth 10 x))))
            (rm-file (acl2::bool-fix (cdr (std::da-nth 11 x))))
            (smt-fname (str-fix (cdr (std::da-nth 12 x))))
            (smt-params (true-list-fix (cdr (std::da-nth 13 x))))
            (fast-functions (func-alist-fix (cdr (std::da-nth 14 x))))
            (type-decl-list (pseudo-term-fix (cdr (std::da-nth 15 x))))
            (expanded-clause-w/-hint
                 (hint-pair-fix (cdr (std::da-nth 16 x))))
            (expanded-g/type (pseudo-term-fix (cdr (std::da-nth 17 x))))
            (smt-cnf (smtlink-config-fix (cdr (std::da-nth 18 x))))
            (wrld-fn-len (nfix (cdr (std::da-nth 19 x))))
            (custom-p (acl2::bool-fix (cdr (std::da-nth 20 x)))))
         (list (cons 'functions functions)
               (cons 'hypotheses hypotheses)
               (cons 'main-hint main-hint)
               (cons 'let-binding let-binding)
               (cons 'symbols symbols)
               (cons 'abs abs)
               (cons 'fty fty)
               (cons 'fty-info fty-info)
               (cons 'fty-types fty-types)
               (cons 'int-to-rat int-to-rat)
               (cons 'smt-dir smt-dir)
               (cons 'rm-file rm-file)
               (cons 'smt-fname smt-fname)
               (cons 'smt-params smt-params)
               (cons 'fast-functions fast-functions)
               (cons 'type-decl-list type-decl-list)
               (cons 'expanded-clause-w/-hint
                     expanded-clause-w/-hint)
               (cons 'expanded-g/type expanded-g/type)
               (cons 'smt-cnf smt-cnf)
               (cons 'wrld-fn-len wrld-fn-len)
               (cons 'custom-p custom-p)))
       :exec x)))

    Theorem: smtlink-hint-p-of-smtlink-hint-fix

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

    Theorem: smtlink-hint-fix-when-smtlink-hint-p

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

    Function: smtlink-hint-equiv$inline

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

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

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

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

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

    Theorem: smtlink-hint-fix-under-smtlink-hint-equiv

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

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

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

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

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

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

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

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

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