Function:
(defun depends-on (n truth numvars) (declare (xargs :guard (and (natp n) (integerp truth) (natp numvars)))) (declare (xargs :guard (< n numvars))) (let ((__function__ 'depends-on)) (declare (ignorable __function__)) (b* ((var (var n numvars)) (truth (truth-norm truth numvars))) (not (equal (logand (lognot var) truth) (ash (logand var truth) (- (ash 1 (lnfix n)))))))))
Theorem:
(defthm depends-on-of-truth-norm (equal (depends-on n (truth-norm truth numvars) numvars) (depends-on n truth numvars)))
Theorem:
(defthm depends-on-correct (implies (and (not (depends-on n truth numvars)) (< (nfix n) (nfix numvars))) (equal (truth-eval truth (env-update n val env) numvars) (truth-eval truth env numvars))))
Theorem:
(defthm depends-on-of-nfix-n (equal (depends-on (nfix n) truth numvars) (depends-on n truth numvars)))
Theorem:
(defthm depends-on-nat-equiv-congruence-on-n (implies (nat-equiv n n-equiv) (equal (depends-on n truth numvars) (depends-on n-equiv truth numvars))) :rule-classes :congruence)
Theorem:
(defthm depends-on-of-ifix-truth (equal (depends-on n (ifix truth) numvars) (depends-on n truth numvars)))
Theorem:
(defthm depends-on-int-equiv-congruence-on-truth (implies (int-equiv truth truth-equiv) (equal (depends-on n truth numvars) (depends-on n truth-equiv numvars))) :rule-classes :congruence)
Theorem:
(defthm depends-on-of-nfix-numvars (equal (depends-on n truth (nfix numvars)) (depends-on n truth numvars)))
Theorem:
(defthm depends-on-nat-equiv-congruence-on-numvars (implies (nat-equiv numvars numvars-equiv) (equal (depends-on n truth numvars) (depends-on n truth numvars-equiv))) :rule-classes :congruence)