• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Vwsim
      • Fgl
      • Vl
        • Syntax
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
        • Mlib
          • Scopestack
          • Hid-tools
          • Filtering-by-name
          • Vl-interface-mocktype
          • Stripping-functions
          • Genblob
          • Expr-tools
          • Hierarchy
          • Extract-vl-types
          • Range-tools
          • Finding-by-name
          • Stmt-tools
          • Modnamespace
          • Flat-warnings
          • Reordering-by-name
          • Datatype-tools
            • Vl-dimensionlist-total-size
            • Vl-maybe-usertype-resolve
            • Vl-dimensionlist-resolved-p
            • Vl-datatype-packedp
            • Vl-datatype-select-ok
            • Vl-dimension-size
            • Vl-datatype-size
            • Vl-maybe-dimension-size
            • Vl-hidexpr-name1
            • Maybe-nat-list
              • Maybe-nat-list-fix
              • Maybe-nat-list-equiv
                • Maybe-nat-list-p
            • Syscalls
            • Allexprs
            • Lvalues
            • Port-tools
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Testing-utilities
      • Math
    • Maybe-nat-list

    Maybe-nat-list-equiv

    Basic equivalence relation for maybe-nat-list structures.

    Definitions and Theorems

    Function: maybe-nat-list-equiv$inline

    (defun maybe-nat-list-equiv$inline
           (acl2::x acl2::y)
           (declare (xargs :guard (and (maybe-nat-list-p acl2::x)
                                       (maybe-nat-list-p acl2::y))))
           (equal (maybe-nat-list-fix acl2::x)
                  (maybe-nat-list-fix acl2::y)))

    Theorem: maybe-nat-list-equiv-is-an-equivalence

    (defthm maybe-nat-list-equiv-is-an-equivalence
            (and (booleanp (maybe-nat-list-equiv x y))
                 (maybe-nat-list-equiv x x)
                 (implies (maybe-nat-list-equiv x y)
                          (maybe-nat-list-equiv y x))
                 (implies (and (maybe-nat-list-equiv x y)
                               (maybe-nat-list-equiv y z))
                          (maybe-nat-list-equiv x z)))
            :rule-classes (:equivalence))

    Theorem: maybe-nat-list-equiv-implies-equal-maybe-nat-list-fix-1

    (defthm maybe-nat-list-equiv-implies-equal-maybe-nat-list-fix-1
            (implies (maybe-nat-list-equiv acl2::x x-equiv)
                     (equal (maybe-nat-list-fix acl2::x)
                            (maybe-nat-list-fix x-equiv)))
            :rule-classes (:congruence))

    Theorem: maybe-nat-list-fix-under-maybe-nat-list-equiv

    (defthm maybe-nat-list-fix-under-maybe-nat-list-equiv
            (maybe-nat-list-equiv (maybe-nat-list-fix acl2::x)
                                  acl2::x)
            :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-maybe-nat-list-fix-1-forward-to-maybe-nat-list-equiv

    (defthm
         equal-of-maybe-nat-list-fix-1-forward-to-maybe-nat-list-equiv
         (implies (equal (maybe-nat-list-fix acl2::x)
                         acl2::y)
                  (maybe-nat-list-equiv acl2::x acl2::y))
         :rule-classes :forward-chaining)

    Theorem: equal-of-maybe-nat-list-fix-2-forward-to-maybe-nat-list-equiv

    (defthm
         equal-of-maybe-nat-list-fix-2-forward-to-maybe-nat-list-equiv
         (implies (equal acl2::x (maybe-nat-list-fix acl2::y))
                  (maybe-nat-list-equiv acl2::x acl2::y))
         :rule-classes :forward-chaining)

    Theorem: maybe-nat-list-equiv-of-maybe-nat-list-fix-1-forward

    (defthm maybe-nat-list-equiv-of-maybe-nat-list-fix-1-forward
            (implies (maybe-nat-list-equiv (maybe-nat-list-fix acl2::x)
                                           acl2::y)
                     (maybe-nat-list-equiv acl2::x acl2::y))
            :rule-classes :forward-chaining)

    Theorem: maybe-nat-list-equiv-of-maybe-nat-list-fix-2-forward

    (defthm
        maybe-nat-list-equiv-of-maybe-nat-list-fix-2-forward
        (implies
             (maybe-nat-list-equiv acl2::x (maybe-nat-list-fix acl2::y))
             (maybe-nat-list-equiv acl2::x acl2::y))
        :rule-classes :forward-chaining)