• 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
                  • Let-binding-fix
                    • Let-binding-equiv
                    • Make-let-binding
                    • Let-binding->hypotheses
                    • Let-binding->bindings
                    • Change-let-binding
                    • Let-binding-p
                  • 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
    • Let-binding

    Let-binding-fix

    Fixing function for let-binding structures.

    Signature
    (let-binding-fix x) → new-x
    Arguments
    x — Guard (let-binding-p x).
    Returns
    new-x — Type (let-binding-p new-x).

    Definitions and Theorems

    Function: let-binding-fix$inline

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

    Theorem: let-binding-p-of-let-binding-fix

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

    Theorem: let-binding-fix-when-let-binding-p

    (defthm let-binding-fix-when-let-binding-p
      (implies (let-binding-p x)
               (equal (let-binding-fix x) x)))

    Function: let-binding-equiv$inline

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

    Theorem: let-binding-equiv-is-an-equivalence

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

    Theorem: let-binding-equiv-implies-equal-let-binding-fix-1

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

    Theorem: let-binding-fix-under-let-binding-equiv

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

    Theorem: equal-of-let-binding-fix-1-forward-to-let-binding-equiv

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

    Theorem: equal-of-let-binding-fix-2-forward-to-let-binding-equiv

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

    Theorem: let-binding-equiv-of-let-binding-fix-1-forward

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

    Theorem: let-binding-equiv-of-let-binding-fix-2-forward

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