Lemmas about logcar from the logops-lemmas book.
Theorem:
(defthm logcar-2*i (implies (integerp i) (equal (logcar (* 2 i)) 0)))
Theorem:
(defthm logcar-i+2*j (implies (and (integerp i) (integerp j)) (and (equal (logcar (+ i (* 2 j))) (logcar i)) (equal (logcar (+ (* 2 j) i)) (logcar i)))))
Theorem:
(defthm logcdr-2*i (implies (integerp i) (equal (logcdr (* 2 i)) i)))
Theorem:
(defthm logcdr-i+2*j (implies (and (integerp i) (integerp j)) (and (equal (logcdr (+ i (* 2 j))) (+ (logcdr i) j)) (equal (logcdr (+ (* 2 j) i)) (+ (logcdr i) j)))))
Theorem:
(defthm logcar-loghead (implies (loghead-guard size i) (equal (logcar (loghead size i)) (if (equal size 0) 0 (logcar i)))))
Theorem:
(defthm logcar-logapp (implies (logapp-guard size i j) (equal (logcar (logapp size i j)) (if (equal size 0) (logcar j) (logcar i)))))
Theorem:
(defthm logcar-logrpl (implies (logrpl-guard size i j) (equal (logcar (logrpl size i j)) (if (equal size 0) (logcar j) (logcar i)))))