• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
      • Gl
      • Witness-cp
      • Ccg
      • Install-not-normalized
      • Rewrite$
      • Fgl
        • Fgl-rewrite-rules
        • Fgl-function-mode
        • Fgl-object
        • Fgl-solving
        • Fgl-handling-if-then-elses
        • Fgl-getting-bits-from-objects
        • Fgl-primitive-and-meta-rules
        • Fgl-counterexamples
        • Fgl-interpreter-overview
        • Fgl-correctness-of-binding-free-variables
        • Fgl-debugging
        • Fgl-testbenches
        • Def-fgl-boolean-constraint
        • Fgl-stack
          • Scratchobj
          • Minor-frame
            • Minor-frame-fix
              • Minor-frame-equiv
              • Make-minor-frame
              • Minor-frame->term-index
              • Minor-frame->scratch
              • Minor-frame->bindings
              • Change-minor-frame
              • Minor-frame->term
              • Minor-frame-p
            • Major-frame
            • Major-stack
            • Scratchlist
            • Minor-stack
          • Fgl-rewrite-tracing
          • Def-fgl-param-thm
          • Def-fgl-thm
          • Fgl-fast-alist-support
          • Fgl-array-support
          • Advanced-equivalence-checking-with-fgl
          • Fgl-fty-support
          • Fgl-internals
        • Removable-runes
        • Efficiency
        • Rewrite-bounds
        • Bash
        • Def-dag-measure
        • Bdd
        • Remove-hyps
        • Contextual-rewriting
        • Simp
        • Rewrite$-hyps
        • Bash-term-to-dnf
        • Use-trivial-ancestors-check
        • Minimal-runes
        • Clause-processor-tools
        • Fn-is-body
        • Without-subsumption
        • Rewrite-equiv-hint
        • Def-bounds
        • Rewrite$-context
        • Try-gl-concls
        • Hint-utils
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Minor-frame

    Minor-frame-fix

    Fixing function for minor-frame structures.

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

    Definitions and Theorems

    Function: minor-frame-fix$inline

    (defun minor-frame-fix$inline (x)
     (declare (xargs :guard (minor-frame-p x)))
     (let ((__function__ 'minor-frame-fix))
      (declare (ignorable __function__))
      (mbe
       :logic
       (b* ((bindings (fgl-object-bindings-fix (cdr (std::da-nth 0 x))))
            (scratch (scratchlist-fix (cdr (std::da-nth 1 x))))
            (term (pseudo-term-fix (cdr (std::da-nth 2 x))))
            (term-index (acl2::maybe-natp-fix (cdr (std::da-nth 3 x)))))
         (list (cons 'bindings bindings)
               (cons 'scratch scratch)
               (cons 'term term)
               (cons 'term-index term-index)))
       :exec x)))

    Theorem: minor-frame-p-of-minor-frame-fix

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

    Theorem: minor-frame-fix-when-minor-frame-p

    (defthm minor-frame-fix-when-minor-frame-p
      (implies (minor-frame-p x)
               (equal (minor-frame-fix x) x)))

    Function: minor-frame-equiv$inline

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

    Theorem: minor-frame-equiv-is-an-equivalence

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

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

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

    Theorem: minor-frame-fix-under-minor-frame-equiv

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

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

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

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

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

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

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

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

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