(observability-fix-outs n config aignet copy strash aignet2 state) → (mv new-copy new-strash new-aignet2 new-aignet new-state)
Function:
(defun observability-fix-outs (n config aignet copy strash aignet2 state) (declare (xargs :stobjs (aignet copy strash aignet2 state))) (declare (xargs :guard (and (natp n) (observability-config-p config)))) (declare (xargs :guard (and (<= (num-ins aignet) (num-ins aignet2)) (<= (num-regs aignet) (num-regs aignet2)) (aignet-copies-in-bounds copy aignet2) (<= n (num-outs aignet))))) (let ((__function__ 'observability-fix-outs)) (declare (ignorable __function__)) (b* ((aignet (aignet-fix aignet)) (aignet2 (aignet-fix aignet2)) ((when (mbe :logic (zp (- (num-outs aignet) (nfix n))) :exec (eql (num-outs aignet) n))) (mv copy strash aignet2 aignet state)) (fanin-lit (outnum->fanin n aignet)) ((mv copy-lit copy strash aignet2 aignet state) (observability-fix-lit fanin-lit config aignet copy strash aignet2 state)) (aignet2 (aignet-add-out copy-lit aignet2))) (observability-fix-outs (1+ (lnfix n)) config aignet copy strash aignet2 state))))
Theorem:
(defthm observability-fix-outs-of-nfix-n (equal (observability-fix-outs (nfix n) config aignet copy strash aignet2 state) (observability-fix-outs n config aignet copy strash aignet2 state)))
Theorem:
(defthm observability-fix-outs-nat-equiv-congruence-on-n (implies (nat-equiv n n-equiv) (equal (observability-fix-outs n config aignet copy strash aignet2 state) (observability-fix-outs n-equiv config aignet copy strash aignet2 state))) :rule-classes :congruence)
Theorem:
(defthm observability-fix-outs-of-observability-config-fix-config (equal (observability-fix-outs n (observability-config-fix config) aignet copy strash aignet2 state) (observability-fix-outs n config aignet copy strash aignet2 state)))
Theorem:
(defthm observability-fix-outs-observability-config-equiv-congruence-on-config (implies (observability-config-equiv config config-equiv) (equal (observability-fix-outs n config aignet copy strash aignet2 state) (observability-fix-outs n config-equiv aignet copy strash aignet2 state))) :rule-classes :congruence)
Theorem:
(defthm observability-fix-outs-of-node-list-fix-aignet (equal (observability-fix-outs n config (node-list-fix aignet) copy strash aignet2 state) (observability-fix-outs n config aignet copy strash aignet2 state)))
Theorem:
(defthm observability-fix-outs-node-list-equiv-congruence-on-aignet (implies (node-list-equiv aignet aignet-equiv) (equal (observability-fix-outs n config aignet copy strash aignet2 state) (observability-fix-outs n config aignet-equiv copy strash aignet2 state))) :rule-classes :congruence)
Theorem:
(defthm observability-fix-outs-of-node-list-fix-aignet2 (equal (observability-fix-outs n config aignet copy strash (node-list-fix aignet2) state) (observability-fix-outs n config aignet copy strash aignet2 state)))
Theorem:
(defthm observability-fix-outs-node-list-equiv-congruence-on-aignet2 (implies (node-list-equiv aignet2 aignet2-equiv) (equal (observability-fix-outs n config aignet copy strash aignet2 state) (observability-fix-outs n config aignet copy strash aignet2-equiv state))) :rule-classes :congruence)
Theorem:
(defthm aignet-extension-p-of-observability-fix-outs-2 (b* (((mv ?new-copy ?new-strash ?new-aignet2 ?new-aignet ?new-state) (observability-fix-outs n config aignet copy strash aignet2 state))) (aignet-extension-p new-aignet2 aignet2)))
Theorem:
(defthm aignet-extension-p-of-observability-fix-outs-1 (b* (((mv ?new-copy ?new-strash ?new-aignet2 ?new-aignet ?new-state) (observability-fix-outs n config aignet copy strash aignet2 state))) (aignet-extension-p new-aignet aignet)))
Theorem:
(defthm stype-counts-of-observability-fix-outs-2 (b* (((mv ?new-copy ?new-strash ?new-aignet2 ?new-aignet ?new-state) (observability-fix-outs n config aignet copy strash aignet2 state))) (implies (and (and (not (equal (stype-fix stype) (and-stype))) (not (equal (stype-fix stype) (xor-stype)))) (not (equal (stype-fix stype) :po))) (equal (stype-count stype new-aignet2) (stype-count stype aignet2)))))
Theorem:
(defthm stype-counts-of-observability-fix-outs-1 (b* (((mv ?new-copy ?new-strash ?new-aignet2 ?new-aignet ?new-state) (observability-fix-outs n config aignet copy strash aignet2 state))) (implies (and (not (equal (stype-fix stype) (and-stype))) (not (equal (stype-fix stype) (xor-stype)))) (equal (stype-count stype new-aignet) (stype-count stype aignet)))))
Theorem:
(defthm copies-in-bounds-of-observability-fix-outs (b* (((mv ?new-copy ?new-strash ?new-aignet2 ?new-aignet ?new-state) (observability-fix-outs n config aignet copy strash aignet2 state))) (implies (and (aignet-copies-in-bounds copy aignet2) (<= (num-ins aignet) (num-ins aignet2)) (<= (num-regs aignet) (num-regs aignet2))) (aignet-copies-in-bounds new-copy new-aignet2))))
Theorem:
(defthm num-outs-of-observability-fix-outs (b* (((mv ?new-copy ?new-strash ?new-aignet2 ?new-aignet ?new-state) (observability-fix-outs n config aignet copy strash aignet2 state))) (equal (stype-count :po new-aignet2) (+ (max 0 (- (num-outs aignet) (nfix n))) (num-outs aignet2)))))
Theorem:
(defthm output-eval-of-observability-fix-outs (b* (((mv ?new-copy ?new-strash ?new-aignet2 ?new-aignet ?new-state) (observability-fix-outs n config aignet copy strash aignet2 state))) (implies (and (<= (num-ins aignet) (num-ins aignet2)) (<= (num-regs aignet) (num-regs aignet2)) (aignet-copies-in-bounds copy aignet2)) (equal (output-eval m invals regvals new-aignet2) (if (or (< (nfix m) (num-outs aignet2)) (<= (+ (num-outs aignet2) (- (num-outs aignet) (nfix n))) (nfix m))) (output-eval m invals regvals aignet2) (output-eval (+ (- (nfix m) (num-outs aignet2)) (nfix n)) invals regvals aignet))))))
Theorem:
(defthm w-state-of-observability-fix-outs (b* (((mv ?new-copy ?new-strash ?new-aignet2 ?new-aignet ?new-state) (observability-fix-outs n config aignet copy strash aignet2 state))) (equal (w new-state) (w state))))