• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Pfcs
      • Wp-gen
      • Dimacs-reader
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Riscv
      • Bitcoin
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
        • Primitive-functions
        • Translated-terms
        • Values
        • Evaluation
        • Program-equivalence
        • Functions
        • Packages
        • Programs
        • Interpreter
        • Evaluation-states
          • Eval-state
          • Frame
            • Frame-fix
              • Frame-equiv
              • Make-frame
              • Frame->binding
              • Change-frame
              • Frame->term
              • Framep
            • Binding
            • Stack
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • ACL2
      • Macro-libraries
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Frame

    Frame-fix

    Fixing function for frame structures.

    Signature
    (frame-fix x) → new-x
    Arguments
    x — Guard (framep x).
    Returns
    new-x — Type (framep new-x).

    Definitions and Theorems

    Function: frame-fix$inline

    (defun frame-fix$inline (x)
      (declare (xargs :guard (framep x)))
      (let ((__function__ 'frame-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((term (tterm-fix (std::da-nth 0 (cdr x))))
                  (binding (binding-fix (std::da-nth 1 (cdr x)))))
               (cons :frame (list term binding)))
             :exec x)))

    Theorem: framep-of-frame-fix

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

    Theorem: frame-fix-when-framep

    (defthm frame-fix-when-framep
      (implies (framep x)
               (equal (frame-fix x) x)))

    Function: frame-equiv$inline

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

    Theorem: frame-equiv-is-an-equivalence

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

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

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

    Theorem: frame-fix-under-frame-equiv

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

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

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

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

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

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

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

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

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