• Top
    • Documentation
    • Books
    • Boolean-reasoning
      • Ipasir
      • Aignet
        • Base-api
        • Aignet-construction
          • Gatesimp
            • Gatesimp-p
            • !gatesimp->xor-mode
            • !gatesimp->level
            • !gatesimp->hashp
            • Gatesimp-fix
            • Gatesimp->xor-mode
            • Gatesimp->level
            • Gatesimp->hashp
            • Aignet-hash-mux
            • Aignet-hash-xor
            • Aignet-hash-and
            • Aignet-hash-or
            • Aignet-hash-iff
            • Aignet-build
            • Patbind-aignet-build
          • Representation
          • Aignet-copy-init
          • Aignet-simplify-with-tracking
          • Aignet-simplify-marked-with-tracking
          • Aignet-cnf
          • Aignet-simplify-marked
          • Aignet-complete-copy
          • Aignet-transforms
          • Aignet-eval
          • Semantics
          • Aignet-read-aiger
          • Aignet-write-aiger
          • Aignet-abc-interface
          • Utilities
        • Aig
        • Satlink
        • Truth
        • Ubdds
        • Bdd
        • Faig
        • Bed
        • 4v
      • Projects
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Gatesimp

    Gatesimp->hashp

    Access the |AIGNET|::|HASHP| field of a gatesimp bit structure.

    Signature
    (gatesimp->hashp x) → hashp
    Arguments
    x — Guard (gatesimp-p x).
    Returns
    hashp — Type (booleanp hashp).

    Definitions and Theorems

    Function: gatesimp->hashp

    (defun gatesimp->hashp (x)
      (declare (xargs :guard (gatesimp-p x)))
      (mbe :logic
           (let ((x (gatesimp-fix x)))
             (bit->bool (part-select x :low 0 :width 1)))
           :exec (bit->bool (the (unsigned-byte 1)
                                 (logand (the (unsigned-byte 1) 1)
                                         (the (unsigned-byte 6) x))))))

    Theorem: booleanp-of-gatesimp->hashp

    (defthm booleanp-of-gatesimp->hashp
      (b* ((hashp (gatesimp->hashp x)))
        (booleanp hashp))
      :rule-classes :rewrite)

    Theorem: gatesimp->hashp-of-gatesimp-fix-x

    (defthm gatesimp->hashp-of-gatesimp-fix-x
      (equal (gatesimp->hashp (gatesimp-fix x))
             (gatesimp->hashp x)))

    Theorem: gatesimp->hashp-gatesimp-equiv-congruence-on-x

    (defthm gatesimp->hashp-gatesimp-equiv-congruence-on-x
      (implies (gatesimp-equiv x x-equiv)
               (equal (gatesimp->hashp x)
                      (gatesimp->hashp x-equiv)))
      :rule-classes :congruence)

    Theorem: gatesimp->hashp-of-gatesimp

    (defthm gatesimp->hashp-of-gatesimp
      (equal (gatesimp->hashp (gatesimp hashp level xor-mode))
             (acl2::bool-fix hashp)))

    Theorem: gatesimp->hashp-of-write-with-mask

    (defthm gatesimp->hashp-of-write-with-mask
     (implies
      (and
       (fty::bitstruct-read-over-write-hyps x gatesimp-equiv-under-mask)
       (gatesimp-equiv-under-mask x acl2::y fty::mask)
       (equal (logand (lognot fty::mask) 1) 0))
      (equal (gatesimp->hashp x)
             (gatesimp->hashp acl2::y))))