Records the input values for a satisfying assignment from an ipasir SAT check.
(aignet-get-ipasir-ctrex-invals n invals sat-lits aignet ipasir) → new-invals
Function:
(defun aignet-get-ipasir-ctrex-invals (n invals sat-lits aignet ipasir) (declare (xargs :stobjs (invals sat-lits aignet ipasir))) (declare (xargs :guard (natp n))) (declare (xargs :guard (and (sat-lits-wfp sat-lits aignet) (<= n (num-ins aignet)) (<= (num-ins aignet) (bits-length invals)) (non-exec (equal (ipasir$a->status ipasir) :sat))))) (let ((__function__ 'aignet-get-ipasir-ctrex-invals)) (declare (ignorable __function__)) (b* (((when (mbe :logic (zp (- (num-ins aignet) (nfix n))) :exec (eql (num-ins aignet) n))) invals) (id (innum->id n aignet)) (sat-lit (aignet-id->sat-lit id sat-lits)) ((when (eql 0 sat-lit)) (aignet-get-ipasir-ctrex-invals (1+ (lnfix n)) invals sat-lits aignet ipasir)) (val (ipasir-val ipasir sat-lit)) ((unless val) (aignet-get-ipasir-ctrex-invals (1+ (lnfix n)) invals sat-lits aignet ipasir)) (invals (set-bit n val invals))) (aignet-get-ipasir-ctrex-invals (1+ (lnfix n)) invals sat-lits aignet ipasir))))
Theorem:
(defthm invals-length-of-aignet-get-ipasir-ctrex-invals (b* ((?new-invals (aignet-get-ipasir-ctrex-invals n invals sat-lits aignet ipasir))) (implies (<= (num-ins aignet) (len invals)) (equal (len new-invals) (len invals)))))
Theorem:
(defthm aignet-get-ipasir-ctrex-invals-of-nfix-n (equal (aignet-get-ipasir-ctrex-invals (nfix n) invals sat-lits aignet ipasir) (aignet-get-ipasir-ctrex-invals n invals sat-lits aignet ipasir)))
Theorem:
(defthm aignet-get-ipasir-ctrex-invals-nat-equiv-congruence-on-n (implies (nat-equiv n n-equiv) (equal (aignet-get-ipasir-ctrex-invals n invals sat-lits aignet ipasir) (aignet-get-ipasir-ctrex-invals n-equiv invals sat-lits aignet ipasir))) :rule-classes :congruence)
Theorem:
(defthm aignet-get-ipasir-ctrex-invals-of-node-list-fix-aignet (equal (aignet-get-ipasir-ctrex-invals n invals sat-lits (node-list-fix aignet) ipasir) (aignet-get-ipasir-ctrex-invals n invals sat-lits aignet ipasir)))
Theorem:
(defthm aignet-get-ipasir-ctrex-invals-node-list-equiv-congruence-on-aignet (implies (node-list-equiv aignet aignet-equiv) (equal (aignet-get-ipasir-ctrex-invals n invals sat-lits aignet ipasir) (aignet-get-ipasir-ctrex-invals n invals sat-lits aignet-equiv ipasir))) :rule-classes :congruence)