• 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
          • Vl-consteval
          • Range-tools
          • Lvalexprs
          • Hierarchy
            • Vl-remove-unnecessary-elements
            • Vl-necessary-elements-transitive
            • Vl-dependent-elements-transitive
            • Vl-necessary-elements-direct
            • Vl-modulelist-everinstanced
            • Vl-dependent-elements-direct
            • Vl-modulelist-toplevel
            • Vl-design-deporder-modules
            • Vl-design-check-complete
            • Vl-design-upgraph
            • Immdeps
              • Immdeps-main
              • Vl-immdeps
              • Immdeps-top
              • Vl-immdepgraph
                • Vl-immdepgraph-p
                • Vl-immdepgraph-fix
                  • Vl-immdepgraph-equiv
                  • Make-vl-immdepgraph
                  • Vl-immdepgraph->reportcard
                  • Vl-immdepgraph->deps
                  • Vl-immdepgraph->all-okp
                  • Change-vl-immdepgraph
                • Vl-depgraph
              • Vl-design-downgraph
              • Vl-collect-dependencies
              • Vl-hierarchy-free
            • 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-immdepgraph

    Vl-immdepgraph-fix

    Fixing function for vl-immdepgraph structures.

    Signature
    (vl-immdepgraph-fix x) → new-x
    Arguments
    x — Guard (vl-immdepgraph-p x).
    Returns
    new-x — Type (vl-immdepgraph-p new-x).

    Definitions and Theorems

    Function: vl-immdepgraph-fix$inline

    (defun vl-immdepgraph-fix$inline (x)
     (declare (xargs :guard (vl-immdepgraph-p x)))
     (let ((__function__ 'vl-immdepgraph-fix))
      (declare (ignorable __function__))
      (mbe
       :logic
       (b*
        ((all-okp (acl2::bool-fix (std::prod-car (cdr x))))
         (deps
              (vl-depgraph-fix (std::prod-car (std::prod-cdr (cdr x)))))
         (reportcard
           (vl-reportcard-fix (std::prod-cdr (std::prod-cdr (cdr x))))))
        (cons :vl-immdepgraph
              (std::prod-cons all-okp
                              (std::prod-cons deps reportcard))))
       :exec x)))

    Theorem: vl-immdepgraph-p-of-vl-immdepgraph-fix

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

    Theorem: vl-immdepgraph-fix-when-vl-immdepgraph-p

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

    Function: vl-immdepgraph-equiv$inline

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

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

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

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

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

    Theorem: vl-immdepgraph-fix-under-vl-immdepgraph-equiv

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

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

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

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

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

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

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

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

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