Function:
(defun same-page (lin-addr lin-addr-2) (declare (xargs :guard (and (integerp lin-addr) (integerp lin-addr-2)))) (let ((__function__ 'same-page)) (declare (ignorable __function__)) (or (equal lin-addr lin-addr-2) (and (mbt (and (integerp lin-addr) (integerp lin-addr-2))) (equal (logtail 12 lin-addr) (logtail 12 lin-addr-2))))))
Theorem:
(defthm same-page-is-an-equivalence (and (booleanp (same-page x y)) (same-page x x) (implies (same-page x y) (same-page y x)) (implies (and (same-page x y) (same-page y z)) (same-page x z))) :rule-classes (:equivalence))
Theorem:
(defthm same-page-implies-logtails>=12-equal (implies (and (integerp i) (>= i 12) (same-page y (double-rewrite x)) (syntaxp (not (equal x y)))) (equal (logtail i x) (logtail i y))))
Theorem:
(defthm same-page-address-construction (implies (same-page x y) (same-page (logior (loghead i x) (ash z i)) (logior (loghead i y) (ash z i)))) :rule-classes :congruence)
Theorem:
(defthm same-page-implies-logapp<=12-equal (implies (and (integerp n) (<= n 12) (same-page y (double-rewrite x)) (syntaxp (not (equal x y)))) (same-page (logapp n x z) (logapp n y z))))
Theorem:
(defthm same-page-implies-same-page-logheads (implies (same-page a b) (same-page (loghead n a) (loghead n b))) :rule-classes :congruence)
Theorem:
(defthm logexting-maintains-same-page (implies (and (integerp n) (> n 12) (same-page y (double-rewrite x)) (syntaxp (not (equal x y)))) (same-page (logext n x) (logext n y))))
Theorem:
(defthm logtails<=12-equal-implies-same-page (implies (and (integerp x) (integerp y) (natp n) (<= n 12) (equal (logtail n x) (logtail n y))) (same-page x y)))