• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
        • Svex-stvs
          • Svtv-data
          • Defsvtv$
          • Svtv-run
          • Defsvtv-phasewise
          • Svtv
          • Svtv-spec
          • Defsvtv
          • Process.lisp
          • Svtv-doc
          • Svtv-chase$
          • Svtv-versus-stv
          • Svtv-debug-fsm
          • Structure.lisp
            • Svtv-baseentry-p
            • Svtv-entry-p
            • Svtv-outentry-p
            • Svtv-outentry-fix
            • Svtv-baseentry-fix
            • Svtv-entry-fix
            • Svtv-overrideline
            • Svtv-outputline
            • Svtv-condoverride
            • Svtv-line
            • Svtv-inputmap
            • Svtv-outentrylist
            • Svtv-lines
            • Svtv-entrylist
            • Svtv-overridelines
            • Svtv-outputs
              • Svtv-outputs-fix
                • Svtv-outputs-equiv
                • Svtv-outputs-p
              • Svtv-inputtype-p
              • Svtv-dontcare-p
            • Svtv-debug
            • Def-pipeline-thm
            • Expand.lisp
            • Def-cycle-thm
            • Svtv-utilities
            • Svtv-debug$
            • Defsvtv$-phasewise
          • Svex-decomposition-methodology
          • Sv-versus-esim
          • Svex-decomp
          • Svex-compose-dfs
          • Svex-compilation
          • Moddb
          • Svmods
          • Svstmt
          • Sv-tutorial
          • Expressions
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Svtv-outputs

    Svtv-outputs-fix

    (svtv-outputs-fix x) is a usual fty list fixing function.

    Signature
    (svtv-outputs-fix x) → fty::newx
    Arguments
    x — Guard (svtv-outputs-p x).
    Returns
    fty::newx — Type (svtv-outputs-p fty::newx).

    In the logic, we apply svtv-outputline-fix to each member of the x. In the execution, none of that is actually necessary and this is just an inlined identity function.

    Definitions and Theorems

    Function: svtv-outputs-fix$inline

    (defun svtv-outputs-fix$inline (x)
      (declare (xargs :guard (svtv-outputs-p x)))
      (let ((__function__ 'svtv-outputs-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (if (atom x)
                 nil
               (cons (svtv-outputline-fix (car x))
                     (svtv-outputs-fix (cdr x))))
             :exec x)))

    Theorem: svtv-outputs-p-of-svtv-outputs-fix

    (defthm svtv-outputs-p-of-svtv-outputs-fix
      (b* ((fty::newx (svtv-outputs-fix$inline x)))
        (svtv-outputs-p fty::newx))
      :rule-classes :rewrite)

    Theorem: svtv-outputs-fix-when-svtv-outputs-p

    (defthm svtv-outputs-fix-when-svtv-outputs-p
      (implies (svtv-outputs-p x)
               (equal (svtv-outputs-fix x) x)))

    Function: svtv-outputs-equiv$inline

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

    Theorem: svtv-outputs-equiv-is-an-equivalence

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

    Theorem: svtv-outputs-equiv-implies-equal-svtv-outputs-fix-1

    (defthm svtv-outputs-equiv-implies-equal-svtv-outputs-fix-1
      (implies (svtv-outputs-equiv x x-equiv)
               (equal (svtv-outputs-fix x)
                      (svtv-outputs-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: svtv-outputs-fix-under-svtv-outputs-equiv

    (defthm svtv-outputs-fix-under-svtv-outputs-equiv
      (svtv-outputs-equiv (svtv-outputs-fix x)
                          x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-svtv-outputs-fix-1-forward-to-svtv-outputs-equiv

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

    Theorem: equal-of-svtv-outputs-fix-2-forward-to-svtv-outputs-equiv

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

    Theorem: svtv-outputs-equiv-of-svtv-outputs-fix-1-forward

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

    Theorem: svtv-outputs-equiv-of-svtv-outputs-fix-2-forward

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

    Theorem: car-of-svtv-outputs-fix-x-under-svtv-outputline-equiv

    (defthm car-of-svtv-outputs-fix-x-under-svtv-outputline-equiv
      (svtv-outputline-equiv (car (svtv-outputs-fix x))
                             (car x)))

    Theorem: car-svtv-outputs-equiv-congruence-on-x-under-svtv-outputline-equiv

    (defthm
     car-svtv-outputs-equiv-congruence-on-x-under-svtv-outputline-equiv
     (implies (svtv-outputs-equiv x x-equiv)
              (svtv-outputline-equiv (car x)
                                     (car x-equiv)))
     :rule-classes :congruence)

    Theorem: cdr-of-svtv-outputs-fix-x-under-svtv-outputs-equiv

    (defthm cdr-of-svtv-outputs-fix-x-under-svtv-outputs-equiv
      (svtv-outputs-equiv (cdr (svtv-outputs-fix x))
                          (cdr x)))

    Theorem: cdr-svtv-outputs-equiv-congruence-on-x-under-svtv-outputs-equiv

    (defthm
        cdr-svtv-outputs-equiv-congruence-on-x-under-svtv-outputs-equiv
      (implies (svtv-outputs-equiv x x-equiv)
               (svtv-outputs-equiv (cdr x)
                                   (cdr x-equiv)))
      :rule-classes :congruence)

    Theorem: cons-of-svtv-outputline-fix-x-under-svtv-outputs-equiv

    (defthm cons-of-svtv-outputline-fix-x-under-svtv-outputs-equiv
      (svtv-outputs-equiv (cons (svtv-outputline-fix x) y)
                          (cons x y)))

    Theorem: cons-svtv-outputline-equiv-congruence-on-x-under-svtv-outputs-equiv

    (defthm
     cons-svtv-outputline-equiv-congruence-on-x-under-svtv-outputs-equiv
     (implies (svtv-outputline-equiv x x-equiv)
              (svtv-outputs-equiv (cons x y)
                                  (cons x-equiv y)))
     :rule-classes :congruence)

    Theorem: cons-of-svtv-outputs-fix-y-under-svtv-outputs-equiv

    (defthm cons-of-svtv-outputs-fix-y-under-svtv-outputs-equiv
      (svtv-outputs-equiv (cons x (svtv-outputs-fix y))
                          (cons x y)))

    Theorem: cons-svtv-outputs-equiv-congruence-on-y-under-svtv-outputs-equiv

    (defthm
       cons-svtv-outputs-equiv-congruence-on-y-under-svtv-outputs-equiv
      (implies (svtv-outputs-equiv y y-equiv)
               (svtv-outputs-equiv (cons x y)
                                   (cons x y-equiv)))
      :rule-classes :congruence)

    Theorem: consp-of-svtv-outputs-fix

    (defthm consp-of-svtv-outputs-fix
      (equal (consp (svtv-outputs-fix x))
             (consp x)))

    Theorem: svtv-outputs-fix-under-iff

    (defthm svtv-outputs-fix-under-iff
      (iff (svtv-outputs-fix x) (consp x)))

    Theorem: svtv-outputs-fix-of-cons

    (defthm svtv-outputs-fix-of-cons
      (equal (svtv-outputs-fix (cons a x))
             (cons (svtv-outputline-fix a)
                   (svtv-outputs-fix x))))

    Theorem: len-of-svtv-outputs-fix

    (defthm len-of-svtv-outputs-fix
      (equal (len (svtv-outputs-fix x))
             (len x)))

    Theorem: svtv-outputs-fix-of-append

    (defthm svtv-outputs-fix-of-append
      (equal (svtv-outputs-fix (append std::a std::b))
             (append (svtv-outputs-fix std::a)
                     (svtv-outputs-fix std::b))))

    Theorem: svtv-outputs-fix-of-repeat

    (defthm svtv-outputs-fix-of-repeat
      (equal (svtv-outputs-fix (repeat acl2::n x))
             (repeat acl2::n (svtv-outputline-fix x))))

    Theorem: list-equiv-refines-svtv-outputs-equiv

    (defthm list-equiv-refines-svtv-outputs-equiv
      (implies (list-equiv x y)
               (svtv-outputs-equiv x y))
      :rule-classes :refinement)

    Theorem: nth-of-svtv-outputs-fix

    (defthm nth-of-svtv-outputs-fix
      (equal (nth acl2::n (svtv-outputs-fix x))
             (if (< (nfix acl2::n) (len x))
                 (svtv-outputline-fix (nth acl2::n x))
               nil)))

    Theorem: svtv-outputs-equiv-implies-svtv-outputs-equiv-append-1

    (defthm svtv-outputs-equiv-implies-svtv-outputs-equiv-append-1
      (implies (svtv-outputs-equiv x fty::x-equiv)
               (svtv-outputs-equiv (append x y)
                                   (append fty::x-equiv y)))
      :rule-classes (:congruence))

    Theorem: svtv-outputs-equiv-implies-svtv-outputs-equiv-append-2

    (defthm svtv-outputs-equiv-implies-svtv-outputs-equiv-append-2
      (implies (svtv-outputs-equiv y fty::y-equiv)
               (svtv-outputs-equiv (append x y)
                                   (append x fty::y-equiv)))
      :rule-classes (:congruence))

    Theorem: svtv-outputs-equiv-implies-svtv-outputs-equiv-nthcdr-2

    (defthm svtv-outputs-equiv-implies-svtv-outputs-equiv-nthcdr-2
      (implies (svtv-outputs-equiv acl2::l l-equiv)
               (svtv-outputs-equiv (nthcdr acl2::n acl2::l)
                                   (nthcdr acl2::n l-equiv)))
      :rule-classes (:congruence))

    Theorem: svtv-outputs-equiv-implies-svtv-outputs-equiv-take-2

    (defthm svtv-outputs-equiv-implies-svtv-outputs-equiv-take-2
      (implies (svtv-outputs-equiv acl2::l l-equiv)
               (svtv-outputs-equiv (take acl2::n acl2::l)
                                   (take acl2::n l-equiv)))
      :rule-classes (:congruence))