• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
        • Lint
        • Mlib
          • Scopestack
          • Filtering-by-name
          • Vl-namefactory
          • Substitution
          • Allexprs
          • Hid-tools
            • Following-hids
              • Vl-follow-hidexpr
              • Vl-partselect-type-top-dimension-replacement
              • Vl-hidindex-datatype-resolve-dims
              • Vl-follow-hidexpr-error
              • Vl-follow-hidexpr-dimscheck
              • Vl-index-find-type
              • Vl-follow-hidexpr-dimcheck
              • Vl-partselect-expr-type
              • Vl-ss-find-hidexpr-range!!
              • Vl-hidstep
              • Vl-ss-find-hidexpr-range
              • Vl-genarrayblocklist-find-block
              • Vl-flatten-hidindex
              • Vl-hidexpr-resolved-p
              • Vl-flatten-hidexpr
              • Vl-hidindex-resolved-p
              • Vl-hidtrace
                • Vl-hidtrace-fix
                  • Vl-hidtrace-equiv
                  • Vl-hidtrace-p
              • Vl-hidexpr-traverse-datatype
              • Abstract-hids
              • Vl-hidexpr-find-type
            • Vl-consteval
            • Range-tools
            • Lvalexprs
            • Hierarchy
            • Finding-by-name
            • Expr-tools
            • Expr-slicing
            • Stripping-functions
            • Stmt-tools
            • Modnamespace
            • Vl-parse-expr-from-str
            • Welltyped
            • Reordering-by-name
            • Flat-warnings
            • Genblob
            • Expr-building
            • Datatype-tools
            • Syscalls
            • Relocate
            • Expr-cleaning
            • Namemangle
            • Caremask
            • Port-tools
            • Lvalues
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-hidtrace

    Vl-hidtrace-fix

    (vl-hidtrace-fix x) is a usual ACL2::fty list fixing function.

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

    In the logic, we apply vl-hidstep-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: vl-hidtrace-fix$inline

    (defun vl-hidtrace-fix$inline (x)
      (declare (xargs :guard (vl-hidtrace-p x)))
      (let ((__function__ 'vl-hidtrace-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (if (atom x)
                 x
               (cons (vl-hidstep-fix (car x))
                     (vl-hidtrace-fix (cdr x))))
             :exec x)))

    Theorem: vl-hidtrace-p-of-vl-hidtrace-fix

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

    Theorem: vl-hidtrace-fix-when-vl-hidtrace-p

    (defthm vl-hidtrace-fix-when-vl-hidtrace-p
      (implies (vl-hidtrace-p x)
               (equal (vl-hidtrace-fix x) x)))

    Function: vl-hidtrace-equiv$inline

    (defun vl-hidtrace-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (vl-hidtrace-p acl2::x)
                                  (vl-hidtrace-p acl2::y))))
      (equal (vl-hidtrace-fix acl2::x)
             (vl-hidtrace-fix acl2::y)))

    Theorem: vl-hidtrace-equiv-is-an-equivalence

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

    Theorem: vl-hidtrace-equiv-implies-equal-vl-hidtrace-fix-1

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

    Theorem: vl-hidtrace-fix-under-vl-hidtrace-equiv

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

    Theorem: equal-of-vl-hidtrace-fix-1-forward-to-vl-hidtrace-equiv

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

    Theorem: equal-of-vl-hidtrace-fix-2-forward-to-vl-hidtrace-equiv

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

    Theorem: vl-hidtrace-equiv-of-vl-hidtrace-fix-1-forward

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

    Theorem: vl-hidtrace-equiv-of-vl-hidtrace-fix-2-forward

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

    Theorem: car-of-vl-hidtrace-fix-x-under-vl-hidstep-equiv

    (defthm car-of-vl-hidtrace-fix-x-under-vl-hidstep-equiv
      (vl-hidstep-equiv (car (vl-hidtrace-fix acl2::x))
                        (car acl2::x)))

    Theorem: car-vl-hidtrace-equiv-congruence-on-x-under-vl-hidstep-equiv

    (defthm car-vl-hidtrace-equiv-congruence-on-x-under-vl-hidstep-equiv
      (implies (vl-hidtrace-equiv acl2::x x-equiv)
               (vl-hidstep-equiv (car acl2::x)
                                 (car x-equiv)))
      :rule-classes :congruence)

    Theorem: cdr-of-vl-hidtrace-fix-x-under-vl-hidtrace-equiv

    (defthm cdr-of-vl-hidtrace-fix-x-under-vl-hidtrace-equiv
      (vl-hidtrace-equiv (cdr (vl-hidtrace-fix acl2::x))
                         (cdr acl2::x)))

    Theorem: cdr-vl-hidtrace-equiv-congruence-on-x-under-vl-hidtrace-equiv

    (defthm
          cdr-vl-hidtrace-equiv-congruence-on-x-under-vl-hidtrace-equiv
      (implies (vl-hidtrace-equiv acl2::x x-equiv)
               (vl-hidtrace-equiv (cdr acl2::x)
                                  (cdr x-equiv)))
      :rule-classes :congruence)

    Theorem: cons-of-vl-hidstep-fix-x-under-vl-hidtrace-equiv

    (defthm cons-of-vl-hidstep-fix-x-under-vl-hidtrace-equiv
      (vl-hidtrace-equiv (cons (vl-hidstep-fix acl2::x) acl2::y)
                         (cons acl2::x acl2::y)))

    Theorem: cons-vl-hidstep-equiv-congruence-on-x-under-vl-hidtrace-equiv

    (defthm
          cons-vl-hidstep-equiv-congruence-on-x-under-vl-hidtrace-equiv
      (implies (vl-hidstep-equiv acl2::x x-equiv)
               (vl-hidtrace-equiv (cons acl2::x acl2::y)
                                  (cons x-equiv acl2::y)))
      :rule-classes :congruence)

    Theorem: cons-of-vl-hidtrace-fix-y-under-vl-hidtrace-equiv

    (defthm cons-of-vl-hidtrace-fix-y-under-vl-hidtrace-equiv
      (vl-hidtrace-equiv (cons acl2::x (vl-hidtrace-fix acl2::y))
                         (cons acl2::x acl2::y)))

    Theorem: cons-vl-hidtrace-equiv-congruence-on-y-under-vl-hidtrace-equiv

    (defthm
         cons-vl-hidtrace-equiv-congruence-on-y-under-vl-hidtrace-equiv
      (implies (vl-hidtrace-equiv acl2::y y-equiv)
               (vl-hidtrace-equiv (cons acl2::x acl2::y)
                                  (cons acl2::x y-equiv)))
      :rule-classes :congruence)

    Theorem: consp-of-vl-hidtrace-fix

    (defthm consp-of-vl-hidtrace-fix
      (equal (consp (vl-hidtrace-fix acl2::x))
             (consp acl2::x)))

    Theorem: vl-hidtrace-fix-of-cons

    (defthm vl-hidtrace-fix-of-cons
      (equal (vl-hidtrace-fix (cons a x))
             (cons (vl-hidstep-fix a)
                   (vl-hidtrace-fix x))))

    Theorem: len-of-vl-hidtrace-fix

    (defthm len-of-vl-hidtrace-fix
      (equal (len (vl-hidtrace-fix acl2::x))
             (len acl2::x)))

    Theorem: vl-hidtrace-fix-of-append

    (defthm vl-hidtrace-fix-of-append
      (equal (vl-hidtrace-fix (append std::a std::b))
             (append (vl-hidtrace-fix std::a)
                     (vl-hidtrace-fix std::b))))

    Theorem: vl-hidtrace-fix-of-repeat

    (defthm vl-hidtrace-fix-of-repeat
      (equal (vl-hidtrace-fix (repeat acl2::n acl2::x))
             (repeat acl2::n (vl-hidstep-fix acl2::x))))

    Theorem: nth-of-vl-hidtrace-fix

    (defthm nth-of-vl-hidtrace-fix
      (equal (nth acl2::n (vl-hidtrace-fix acl2::x))
             (if (< (nfix acl2::n) (len acl2::x))
                 (vl-hidstep-fix (nth acl2::n acl2::x))
               nil)))

    Theorem: vl-hidtrace-equiv-implies-vl-hidtrace-equiv-append-1

    (defthm vl-hidtrace-equiv-implies-vl-hidtrace-equiv-append-1
      (implies (vl-hidtrace-equiv acl2::x fty::x-equiv)
               (vl-hidtrace-equiv (append acl2::x acl2::y)
                                  (append fty::x-equiv acl2::y)))
      :rule-classes (:congruence))

    Theorem: vl-hidtrace-equiv-implies-vl-hidtrace-equiv-append-2

    (defthm vl-hidtrace-equiv-implies-vl-hidtrace-equiv-append-2
      (implies (vl-hidtrace-equiv acl2::y fty::y-equiv)
               (vl-hidtrace-equiv (append acl2::x acl2::y)
                                  (append acl2::x fty::y-equiv)))
      :rule-classes (:congruence))

    Theorem: vl-hidtrace-equiv-implies-vl-hidtrace-equiv-nthcdr-2

    (defthm vl-hidtrace-equiv-implies-vl-hidtrace-equiv-nthcdr-2
      (implies (vl-hidtrace-equiv acl2::l l-equiv)
               (vl-hidtrace-equiv (nthcdr acl2::n acl2::l)
                                  (nthcdr acl2::n l-equiv)))
      :rule-classes (:congruence))

    Theorem: vl-hidtrace-equiv-implies-vl-hidtrace-equiv-take-2

    (defthm vl-hidtrace-equiv-implies-vl-hidtrace-equiv-take-2
      (implies (vl-hidtrace-equiv acl2::l l-equiv)
               (vl-hidtrace-equiv (take acl2::n acl2::l)
                                  (take acl2::n l-equiv)))
      :rule-classes (:congruence))