Function:
(defun fraig-add-equiv-class-outputs-aux-1 (n max classes copy mark aignet2) (declare (xargs :stobjs (classes copy mark aignet2))) (declare (xargs :guard (and (natp n) (natp max)))) (declare (xargs :guard (and (<= n (classes-size classes)) (<= (classes-size classes) (lits-length copy)) (<= (num-fanins aignet2) (bits-length mark)) (aignet-copies-in-bounds copy aignet2) (classes-wellformed classes) (eql max (classes-size classes))))) (let ((__function__ 'fraig-add-equiv-class-outputs-aux-1)) (declare (ignorable __function__)) (b* (((when (mbe :logic (zp (- (classes-size classes) (nfix n))) :exec (eql n max))) aignet2) (head (node-head n classes)) ((unless (< head (lnfix n))) (fraig-add-equiv-class-outputs-aux-1 (1+ (lnfix n)) max classes copy mark aignet2)) (head-copy (get-lit head copy)) (n-copy (get-lit n copy)) ((when (or (eql (lit-id head-copy) (lit-id n-copy)) (eql 0 (get-bit (lit-id head-copy) mark)) (eql 0 (get-bit (lit-id n-copy) mark)))) (fraig-add-equiv-class-outputs-aux-1 (1+ (lnfix n)) max classes copy mark aignet2)) (aignet2 (aignet-add-out head-copy aignet2))) (fraig-add-equiv-class-outputs-aux-1 (1+ (lnfix n)) max classes copy mark aignet2))))
Theorem:
(defthm aignet-extension-p-of-fraig-add-equiv-class-outputs-aux-1 (b* ((?new-aignet2 (fraig-add-equiv-class-outputs-aux-1 n max classes copy mark aignet2))) (aignet-extension-p new-aignet2 aignet2)))
Theorem:
(defthm stype-count-of-fraig-add-equiv-class-outputs-aux-1 (b* ((?new-aignet2 (fraig-add-equiv-class-outputs-aux-1 n max classes copy mark aignet2))) (implies (not (equal (stype-fix stype) :po)) (equal (stype-count stype new-aignet2) (stype-count stype aignet2)))))
Theorem:
(defthm fanin-count-of-fraig-add-equiv-class-outputs-aux-1 (b* ((?new-aignet2 (fraig-add-equiv-class-outputs-aux-1 n max classes copy mark aignet2))) (equal (fanin-count new-aignet2) (fanin-count aignet2))))
Theorem:
(defthm fraig-add-equiv-class-outputs-aux-1-of-nfix-n (equal (fraig-add-equiv-class-outputs-aux-1 (nfix n) max classes copy mark aignet2) (fraig-add-equiv-class-outputs-aux-1 n max classes copy mark aignet2)))
Theorem:
(defthm fraig-add-equiv-class-outputs-aux-1-nat-equiv-congruence-on-n (implies (nat-equiv n n-equiv) (equal (fraig-add-equiv-class-outputs-aux-1 n max classes copy mark aignet2) (fraig-add-equiv-class-outputs-aux-1 n-equiv max classes copy mark aignet2))) :rule-classes :congruence)
Theorem:
(defthm fraig-add-equiv-class-outputs-aux-1-of-nfix-max (equal (fraig-add-equiv-class-outputs-aux-1 n (nfix max) classes copy mark aignet2) (fraig-add-equiv-class-outputs-aux-1 n max classes copy mark aignet2)))
Theorem:
(defthm fraig-add-equiv-class-outputs-aux-1-nat-equiv-congruence-on-max (implies (nat-equiv max max-equiv) (equal (fraig-add-equiv-class-outputs-aux-1 n max classes copy mark aignet2) (fraig-add-equiv-class-outputs-aux-1 n max-equiv classes copy mark aignet2))) :rule-classes :congruence)