Function:
(defun lhrange-nextbit (x) (declare (xargs :guard (lhrange-p x))) "returns an atom representing the next bit of the range's atom after the range ends." (let ((__function__ 'lhrange-nextbit)) (declare (ignorable __function__)) (b* (((lhrange x) x) (xkind (lhatom-kind x.atom)) ((when (eq xkind :z)) (lhatom-z)) ((lhatom-var x.atom) x.atom)) (lhatom-var x.atom.name (+ x.w x.atom.rsh)))))
Theorem:
(defthm lhatom-p-of-lhrange-nextbit (b* ((next (lhrange-nextbit x))) (lhatom-p next)) :rule-classes :rewrite)
Theorem:
(defthm lhrange-nextbit-of-lhrange-fix-x (equal (lhrange-nextbit (lhrange-fix x)) (lhrange-nextbit x)))
Theorem:
(defthm lhrange-nextbit-lhrange-equiv-congruence-on-x (implies (lhrange-equiv x x-equiv) (equal (lhrange-nextbit x) (lhrange-nextbit x-equiv))) :rule-classes :congruence)
Theorem:
(defthm lhrange-nextbit-when-z (implies (equal (lhatom-kind (lhrange->atom x)) :z) (equal (lhrange-nextbit x) (lhatom-z))))
Theorem:
(defthm lhrange-nextbit-when-var (implies (equal (lhatom-kind (lhrange->atom x)) :var) (equal (lhrange-nextbit x) (lhatom-var (lhatom-var->name (lhrange->atom x)) (+ (lhatom-var->rsh (lhrange->atom x)) (lhrange->w x))))))