• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
        • Svex-stvs
        • Svex-decomposition-methodology
        • Sv-versus-esim
        • Svex-decomp
        • Svex-compose-dfs
        • Svex-compilation
        • Moddb
        • Svmods
        • Svstmt
          • Svstmt-case
          • Svstmt-while
          • Svstmt-p
          • Svstmt-if
          • Svstmt-equiv
          • Svstmt-xcond
          • Svstmt-scope
          • Svstmt-assign
          • Svstmt-compile
          • Svstmt-constraints
          • Svstmt-jump
          • Svstmtlist
          • Svstmt-kind
          • Svstmt.lisp
            • Svstmt-write
              • Svstmt-write-fix
                • Svstmt-write-equiv
                • Make-svstmt-write
                • Svstmt-write->lhs
                • Change-svstmt-write
                • Svstmt-write->rhs
                • Svstmt-write-p
              • Svstmt-writelist-vars
              • Svstmt-write-vars
              • Svstmt-writelist
              • Svjump-p
            • Svstmt-fix
            • Svstmt-count
          • Sv-tutorial
          • Expressions
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Svstmt-write

    Svstmt-write-fix

    Fixing function for svstmt-write structures.

    Signature
    (svstmt-write-fix x) → new-x
    Arguments
    x — Guard (svstmt-write-p x).
    Returns
    new-x — Type (svstmt-write-p new-x).

    Definitions and Theorems

    Function: svstmt-write-fix$inline

    (defun svstmt-write-fix$inline (x)
      (declare (xargs :guard (svstmt-write-p x)))
      (let ((__function__ 'svstmt-write-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((lhs (svex-select-fix (std::prod-car x)))
                  (rhs (svex-fix (std::prod-cdr x))))
               (std::prod-cons lhs rhs))
             :exec x)))

    Theorem: svstmt-write-p-of-svstmt-write-fix

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

    Theorem: svstmt-write-fix-when-svstmt-write-p

    (defthm svstmt-write-fix-when-svstmt-write-p
      (implies (svstmt-write-p x)
               (equal (svstmt-write-fix x) x)))

    Function: svstmt-write-equiv$inline

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

    Theorem: svstmt-write-equiv-is-an-equivalence

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

    Theorem: svstmt-write-equiv-implies-equal-svstmt-write-fix-1

    (defthm svstmt-write-equiv-implies-equal-svstmt-write-fix-1
      (implies (svstmt-write-equiv x x-equiv)
               (equal (svstmt-write-fix x)
                      (svstmt-write-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: svstmt-write-fix-under-svstmt-write-equiv

    (defthm svstmt-write-fix-under-svstmt-write-equiv
      (svstmt-write-equiv (svstmt-write-fix x)
                          x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-svstmt-write-fix-1-forward-to-svstmt-write-equiv

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

    Theorem: equal-of-svstmt-write-fix-2-forward-to-svstmt-write-equiv

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

    Theorem: svstmt-write-equiv-of-svstmt-write-fix-1-forward

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

    Theorem: svstmt-write-equiv-of-svstmt-write-fix-2-forward

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