• 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
                • Ubdd-to-aignet-memo-p
                • Ubdd-to-aignet-memo-fix
                  • Ubdd-to-aignet-memo-equiv
                • 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
      • ACL2
      • Macro-libraries
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Ubdd-to-aignet-memo

    Ubdd-to-aignet-memo-fix

    (ubdd-to-aignet-memo-fix x) is an ACL2::fty alist fixing function that follows the drop-keys strategy.

    Signature
    (ubdd-to-aignet-memo-fix x) → fty::newx
    Arguments
    x — Guard (ubdd-to-aignet-memo-p x).
    Returns
    fty::newx — Type (ubdd-to-aignet-memo-p fty::newx).

    Note that in the execution this is just an inline identity function.

    Definitions and Theorems

    Function: ubdd-to-aignet-memo-fix$inline

    (defun ubdd-to-aignet-memo-fix$inline (x)
      (declare (xargs :guard (ubdd-to-aignet-memo-p x)))
      (let ((__function__ 'ubdd-to-aignet-memo-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (if (atom x)
                 nil
               (let ((rest (ubdd-to-aignet-memo-fix (cdr x))))
                 (if (and (consp (car x))
                          (ubdd/level-p (caar x)))
                     (let ((fty::first-key (caar x))
                           (fty::first-val (lit-fix (cdar x))))
                       (cons (cons fty::first-key fty::first-val)
                             rest))
                   rest)))
             :exec x)))

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

    (defthm ubdd-to-aignet-memo-p-of-ubdd-to-aignet-memo-fix
      (b* ((fty::newx (ubdd-to-aignet-memo-fix$inline x)))
        (ubdd-to-aignet-memo-p fty::newx))
      :rule-classes :rewrite)

    Theorem: ubdd-to-aignet-memo-fix-when-ubdd-to-aignet-memo-p

    (defthm ubdd-to-aignet-memo-fix-when-ubdd-to-aignet-memo-p
      (implies (ubdd-to-aignet-memo-p x)
               (equal (ubdd-to-aignet-memo-fix x) x)))

    Function: ubdd-to-aignet-memo-equiv$inline

    (defun ubdd-to-aignet-memo-equiv$inline (x acl2::y)
      (declare (xargs :guard (and (ubdd-to-aignet-memo-p x)
                                  (ubdd-to-aignet-memo-p acl2::y))))
      (equal (ubdd-to-aignet-memo-fix x)
             (ubdd-to-aignet-memo-fix acl2::y)))

    Theorem: ubdd-to-aignet-memo-equiv-is-an-equivalence

    (defthm ubdd-to-aignet-memo-equiv-is-an-equivalence
      (and (booleanp (ubdd-to-aignet-memo-equiv x y))
           (ubdd-to-aignet-memo-equiv x x)
           (implies (ubdd-to-aignet-memo-equiv x y)
                    (ubdd-to-aignet-memo-equiv y x))
           (implies (and (ubdd-to-aignet-memo-equiv x y)
                         (ubdd-to-aignet-memo-equiv y z))
                    (ubdd-to-aignet-memo-equiv x z)))
      :rule-classes (:equivalence))

    Theorem: ubdd-to-aignet-memo-equiv-implies-equal-ubdd-to-aignet-memo-fix-1

    (defthm
      ubdd-to-aignet-memo-equiv-implies-equal-ubdd-to-aignet-memo-fix-1
      (implies (ubdd-to-aignet-memo-equiv x x-equiv)
               (equal (ubdd-to-aignet-memo-fix x)
                      (ubdd-to-aignet-memo-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: ubdd-to-aignet-memo-fix-under-ubdd-to-aignet-memo-equiv

    (defthm ubdd-to-aignet-memo-fix-under-ubdd-to-aignet-memo-equiv
      (ubdd-to-aignet-memo-equiv (ubdd-to-aignet-memo-fix x)
                                 x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-ubdd-to-aignet-memo-fix-1-forward-to-ubdd-to-aignet-memo-equiv

    (defthm
     equal-of-ubdd-to-aignet-memo-fix-1-forward-to-ubdd-to-aignet-memo-equiv
     (implies (equal (ubdd-to-aignet-memo-fix x)
                     acl2::y)
              (ubdd-to-aignet-memo-equiv x acl2::y))
     :rule-classes :forward-chaining)

    Theorem: equal-of-ubdd-to-aignet-memo-fix-2-forward-to-ubdd-to-aignet-memo-equiv

    (defthm
     equal-of-ubdd-to-aignet-memo-fix-2-forward-to-ubdd-to-aignet-memo-equiv
     (implies (equal x (ubdd-to-aignet-memo-fix acl2::y))
              (ubdd-to-aignet-memo-equiv x acl2::y))
     :rule-classes :forward-chaining)

    Theorem: ubdd-to-aignet-memo-equiv-of-ubdd-to-aignet-memo-fix-1-forward

    (defthm
         ubdd-to-aignet-memo-equiv-of-ubdd-to-aignet-memo-fix-1-forward
      (implies (ubdd-to-aignet-memo-equiv (ubdd-to-aignet-memo-fix x)
                                          acl2::y)
               (ubdd-to-aignet-memo-equiv x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: ubdd-to-aignet-memo-equiv-of-ubdd-to-aignet-memo-fix-2-forward

    (defthm
         ubdd-to-aignet-memo-equiv-of-ubdd-to-aignet-memo-fix-2-forward
     (implies
         (ubdd-to-aignet-memo-equiv x (ubdd-to-aignet-memo-fix acl2::y))
         (ubdd-to-aignet-memo-equiv x acl2::y))
     :rule-classes :forward-chaining)

    Theorem: cons-of-lit-fix-v-under-ubdd-to-aignet-memo-equiv

    (defthm cons-of-lit-fix-v-under-ubdd-to-aignet-memo-equiv
      (ubdd-to-aignet-memo-equiv (cons (cons acl2::k (lit-fix acl2::v))
                                       x)
                                 (cons (cons acl2::k acl2::v) x)))

    Theorem: cons-lit-equiv-congruence-on-v-under-ubdd-to-aignet-memo-equiv

    (defthm
         cons-lit-equiv-congruence-on-v-under-ubdd-to-aignet-memo-equiv
      (implies
           (lit-equiv acl2::v v-equiv)
           (ubdd-to-aignet-memo-equiv (cons (cons acl2::k acl2::v) x)
                                      (cons (cons acl2::k v-equiv) x)))
      :rule-classes :congruence)

    Theorem: cons-of-ubdd-to-aignet-memo-fix-y-under-ubdd-to-aignet-memo-equiv

    (defthm
      cons-of-ubdd-to-aignet-memo-fix-y-under-ubdd-to-aignet-memo-equiv
      (ubdd-to-aignet-memo-equiv
           (cons x (ubdd-to-aignet-memo-fix acl2::y))
           (cons x acl2::y)))

    Theorem: cons-ubdd-to-aignet-memo-equiv-congruence-on-y-under-ubdd-to-aignet-memo-equiv

    (defthm
     cons-ubdd-to-aignet-memo-equiv-congruence-on-y-under-ubdd-to-aignet-memo-equiv
     (implies (ubdd-to-aignet-memo-equiv acl2::y y-equiv)
              (ubdd-to-aignet-memo-equiv (cons x acl2::y)
                                         (cons x y-equiv)))
     :rule-classes :congruence)

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

    (defthm ubdd-to-aignet-memo-fix-of-acons
      (equal (ubdd-to-aignet-memo-fix (cons (cons acl2::a acl2::b) x))
             (let ((rest (ubdd-to-aignet-memo-fix x)))
               (if (and (ubdd/level-p acl2::a))
                   (let ((fty::first-key acl2::a)
                         (fty::first-val (lit-fix acl2::b)))
                     (cons (cons fty::first-key fty::first-val)
                           rest))
                 rest))))

    Theorem: hons-assoc-equal-of-ubdd-to-aignet-memo-fix

    (defthm hons-assoc-equal-of-ubdd-to-aignet-memo-fix
      (equal (hons-assoc-equal acl2::k (ubdd-to-aignet-memo-fix x))
             (let ((fty::pair (hons-assoc-equal acl2::k x)))
               (and (ubdd/level-p acl2::k)
                    fty::pair
                    (cons acl2::k (lit-fix (cdr fty::pair)))))))

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

    (defthm ubdd-to-aignet-memo-fix-of-append
      (equal (ubdd-to-aignet-memo-fix (append std::a std::b))
             (append (ubdd-to-aignet-memo-fix std::a)
                     (ubdd-to-aignet-memo-fix std::b))))

    Theorem: consp-car-of-ubdd-to-aignet-memo-fix

    (defthm consp-car-of-ubdd-to-aignet-memo-fix
      (equal (consp (car (ubdd-to-aignet-memo-fix x)))
             (consp (ubdd-to-aignet-memo-fix x))))