• Top
    • Documentation
    • Books
    • Boolean-reasoning
      • Ipasir
      • Aignet
        • Base-api
        • Aignet-construction
        • Representation
        • Aignet-copy-init
        • Aignet-simplify-with-tracking
        • Aignet-simplify-marked-with-tracking
        • Aignet-cnf
        • Aignet-simplify-marked
        • Aignet-complete-copy
        • Aignet-transforms
          • Aignet-output-ranges
          • Aignet-comb-transforms
            • Fraig
            • Parametrize
              • Aignet-parametrize-output-ranges
              • Aignet-parametrize-copy-set-regs
              • Aignet-parametrize-copy-set-ins
              • Aignet-parametrize-collect-bdd-order-aux
              • Aignet-parametrize-collect-bdd-order
              • Aignet-output-range-conjoin-ubdds
              • Aignet-output-range-collect-in/reg-ubdd-order
              • Aignet-finish-reg-ubdd-order
              • Aignet-finish-in-ubdd-order
              • Aignet-copy-dfs-output-range
              • Aignet-parametrize-m-n
              • Aignet-node-to-ubdd
              • Aignet-output-range-to-ubdds
              • Ubdd-to-aignet
              • Aignet-parametrize-copy-init
              • Parametrize-config
              • Parametrize-output-type
              • Ubdd-arr-to-param-space
              • Copy-lits-compose
              • Bitarr-range-1bit-indices
              • Bitarr-range-count
              • Aignet-count-ubdd-branches-wrap
              • Ubdd-to-aignet-memo-ok
                • Aignet-node-to-ubdd-build-cond
                • Copy-lits-compose-in-place
                • Bitarr-range-set
                • Ubdd/level
                • Ubdd-arr
                • Ubdd-arr-max-depth
                • Aignet-count-ubdd-branches
                • Ubdd-negate-cond
                • Ubdd-apply-gate
                • Aignet-node-to-ubdd-short-circuit-cond
                • Bits->bools
                • Eval-ubddarr
                • Ubdd-to-aignet-memo
                • Parametrize-output-type-map
                • Lubdd-fix
              • Observability-fix
              • Constprop
              • Apply-m-assumption-n-output-output-transform-default
              • Balance
              • Apply-n-output-comb-transform-default
              • Apply-comb-transform-default
              • Obs-constprop
              • Rewrite
              • Comb-transform
              • Abc-comb-simplify
              • Prune
              • Rewrite!
              • M-assumption-n-output-comb-transform->name
              • N-output-comb-transform->name
              • Comb-transform->name
              • N-output-comb-transformlist
              • M-assumption-n-output-comb-transformlist
              • Comb-transformlist
              • Apply-comb-transform
            • Aignet-m-assumption-n-output-transforms
            • Aignet-n-output-comb-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
      • Community
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Parametrize

    Ubdd-to-aignet-memo-ok

    Signature
    (ubdd-to-aignet-memo-ok memo litarr aignet invals regvals) 
      → 
    ok
    Arguments
    memo — Guard (ubdd-to-aignet-memo-p memo).

    Definitions and Theorems

    Function: ubdd-to-aignet-memo-ok

    (defun ubdd-to-aignet-memo-ok (memo litarr aignet invals regvals)
     (declare (xargs :stobjs (litarr aignet invals regvals)))
     (declare (xargs :guard (ubdd-to-aignet-memo-p memo)))
     (let ((__function__ 'ubdd-to-aignet-memo-ok))
      (declare (ignorable __function__))
      (b*
       (((when (atom memo)) t)
        ((unless (mbt (and (consp (car memo))
                           (ubdd/level-p (caar memo)))))
         (ubdd-to-aignet-memo-ok (cdr memo)
                                 litarr aignet invals regvals))
        ((cons (ubdd/level key) lit) (car memo))
        (values
         (bits->bools
              (non-exec (lit-eval-list litarr invals regvals aignet)))))
       (and
         (equal
              (lit-eval lit invals regvals aignet)
              (bool->bit
                   (acl2::eval-bdd key.ubdd (nthcdr key.level values))))
         (ubdd-to-aignet-memo-ok (cdr memo)
                                 litarr aignet invals regvals)))))

    Theorem: ubdd-to-aignet-memo-ok-implies-rewrite

    (defthm ubdd-to-aignet-memo-ok-implies-rewrite
     (b*
      ((?ok (ubdd-to-aignet-memo-ok memo litarr aignet invals regvals)))
      (implies
       (and ok (ubdd/level-p key)
            (hons-assoc-equal key memo))
       (equal
        (lit-eval (cdr (hons-assoc-equal key memo))
                  invals regvals aignet)
        (b*
         (((ubdd/level key))
          (values
            (bits->bools (lit-eval-list litarr invals regvals aignet))))
         (bool->bit (acl2::eval-bdd key.ubdd
                                    (nthcdr key.level values))))))))

    Theorem: ubdd-to-aignet-memo-ok-of-aignet-extension

    (defthm ubdd-to-aignet-memo-ok-of-aignet-extension
     (implies
      (and (aignet-extension-binding)
           (aignet-lit-listp (alist-vals (ubdd-to-aignet-memo-fix memo))
                             orig)
           (aignet-lit-listp litarr orig))
      (iff (ubdd-to-aignet-memo-ok memo litarr new invals regvals)
           (ubdd-to-aignet-memo-ok memo litarr orig invals regvals))))

    Theorem: ubdd-to-aignet-memo-ok-of-nil

    (defthm ubdd-to-aignet-memo-ok-of-nil
      (ubdd-to-aignet-memo-ok nil litarr aignet invals regvals))

    Theorem: ubdd-to-aignet-memo-ok-of-ubdd-to-aignet-memo-fix-memo

    (defthm ubdd-to-aignet-memo-ok-of-ubdd-to-aignet-memo-fix-memo
     (equal (ubdd-to-aignet-memo-ok (ubdd-to-aignet-memo-fix memo)
                                    litarr aignet invals regvals)
            (ubdd-to-aignet-memo-ok memo litarr aignet invals regvals)))

    Theorem: ubdd-to-aignet-memo-ok-ubdd-to-aignet-memo-equiv-congruence-on-memo

    (defthm
     ubdd-to-aignet-memo-ok-ubdd-to-aignet-memo-equiv-congruence-on-memo
     (implies
       (ubdd-to-aignet-memo-equiv memo memo-equiv)
       (equal (ubdd-to-aignet-memo-ok memo litarr aignet invals regvals)
              (ubdd-to-aignet-memo-ok memo-equiv
                                      litarr aignet invals regvals)))
     :rule-classes :congruence)

    Theorem: ubdd-to-aignet-memo-ok-of-node-list-fix-aignet

    (defthm ubdd-to-aignet-memo-ok-of-node-list-fix-aignet
     (equal (ubdd-to-aignet-memo-ok memo litarr (node-list-fix aignet)
                                    invals regvals)
            (ubdd-to-aignet-memo-ok memo litarr aignet invals regvals)))

    Theorem: ubdd-to-aignet-memo-ok-node-list-equiv-congruence-on-aignet

    (defthm ubdd-to-aignet-memo-ok-node-list-equiv-congruence-on-aignet
     (implies
      (node-list-equiv aignet aignet-equiv)
      (equal
           (ubdd-to-aignet-memo-ok memo litarr aignet invals regvals)
           (ubdd-to-aignet-memo-ok memo
                                   litarr aignet-equiv invals regvals)))
     :rule-classes :congruence)