(truth-perm n perm truth numvars) → perm-truth
Function:
(defun truth-perm (n perm truth numvars) (declare (xargs :guard (and (natp n) (integerp truth) (natp numvars) (index-listp perm numvars)))) (declare (xargs :guard (and (<= n numvars) (eql (len perm) numvars)))) (let ((__function__ 'truth-perm)) (declare (ignorable __function__)) (b* (((when (mbe :logic (zp (- (nfix numvars) (nfix n))) :exec (eql n numvars))) (truth-norm truth numvars)) (truth (swap-vars n (nth n perm) truth numvars))) (truth-perm (1+ (lnfix n)) perm truth numvars))))
Theorem:
(defthm integerp-of-truth-perm (b* ((perm-truth (truth-perm n perm truth numvars))) (integerp perm-truth)) :rule-classes :type-prescription)
Theorem:
(defthm eval-of-truth-perm-with-env-perm (implies (index-listp perm numvars) (equal (truth-eval (truth-perm n perm truth numvars) (env-perm n perm env numvars) numvars) (truth-eval truth env numvars))))
Theorem:
(defthm eval-of-truth-perm (implies (index-listp perm numvars) (equal (truth-eval (truth-perm n perm truth numvars) env numvars) (truth-eval truth (env-perm-rev n perm env numvars) numvars))))
Theorem:
(defthm size-of-truth-perm-basic (b* ((?perm-truth (truth-perm n perm truth numvars))) (unsigned-byte-p (ash 1 (nfix numvars)) perm-truth)))
Theorem:
(defthm size-of-truth-perm (b* ((?perm-truth (truth-perm n perm truth numvars))) (implies (and (natp size) (<= (ash 1 (nfix numvars)) size)) (unsigned-byte-p size perm-truth))))
Theorem:
(defthm truth-perm-of-nfix-n (equal (truth-perm (nfix n) perm truth numvars) (truth-perm n perm truth numvars)))
Theorem:
(defthm truth-perm-nat-equiv-congruence-on-n (implies (nat-equiv n n-equiv) (equal (truth-perm n perm truth numvars) (truth-perm n-equiv perm truth numvars))) :rule-classes :congruence)
Theorem:
(defthm truth-perm-of-ifix-truth (equal (truth-perm n perm (ifix truth) numvars) (truth-perm n perm truth numvars)))
Theorem:
(defthm truth-perm-int-equiv-congruence-on-truth (implies (int-equiv truth truth-equiv) (equal (truth-perm n perm truth numvars) (truth-perm n perm truth-equiv numvars))) :rule-classes :congruence)
Theorem:
(defthm truth-perm-of-nfix-numvars (equal (truth-perm n perm truth (nfix numvars)) (truth-perm n perm truth numvars)))
Theorem:
(defthm truth-perm-nat-equiv-congruence-on-numvars (implies (nat-equiv numvars numvars-equiv) (equal (truth-perm n perm truth numvars) (truth-perm n perm truth numvars-equiv))) :rule-classes :congruence)