• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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-counterexamples
        • Fgl-getting-bits-from-objects
        • Fgl-primitive-and-meta-rules
        • Fgl-interpreter-overview
        • Fgl-correctness-of-binding-free-variables
        • Fgl-debugging
        • Fgl-testbenches
        • Def-fgl-boolean-constraint
        • Fgl-stack
        • Def-fgl-param-thm
        • Fgl-rewrite-tracing
        • Def-fgl-thm
        • Fgl-fast-alist-support
        • Fgl-array-support
        • Advanced-equivalence-checking-with-fgl
          • Solve-lane-by-lane-masked
          • Solve-lane-by-lane-masked+
          • Top-level-equal
            • Replace-equal-with-top-level-equal
            • Replace-equal-with-top-level-equal-rec
            • Solve-lane-by-lane
            • Lookup-previous-stack-frame-binding
            • Ipasir-sat-limit100
          • 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
    • Top-level-equal

    Replace-equal-with-top-level-equal

    Clause processor that replaces the final call of equal in a theorem conclusion with top-level-equal.

    Signature
    (replace-equal-with-top-level-equal clause) → *
    Arguments
    clause — Guard (pseudo-term-listp clause).

    Definitions and Theorems

    Function: replace-equal-with-top-level-equal

    (defun replace-equal-with-top-level-equal (clause)
      (declare (xargs :guard (pseudo-term-listp clause)))
      (let ((__function__ 'replace-equal-with-top-level-equal))
        (declare (ignorable __function__))
        (list (append (butlast clause 1)
                      (list (replace-equal-with-top-level-equal-rec
                                 (car (last clause))))))))

    Theorem: replace-equal-with-top-level-equal-correct

    (defthm replace-equal-with-top-level-equal-correct
     (implies
      (and
       (pseudo-term-listp clause)
       (alistp a)
       (repl-equal-ev
           (conjoin-clauses (replace-equal-with-top-level-equal clause))
           a))
      (repl-equal-ev (disjoin clause) a))
     :rule-classes :clause-processor)