Basic lemmas relating logcons to logcar and logcdr, from the logops-lemmas book.
Theorem:
(defthm logcar-logcons (implies (and (bitp b) (integerp i)) (equal (logcar (logcons b i)) b)))
Theorem:
(defthm logcdr-logcons (implies (and (bitp b) (integerp i)) (equal (logcdr (logcons b i)) i)))
Theorem:
(defthm equal-logcons (implies (and (integerp i) (integerp logcdr) (bitp logcar)) (equal (equal (logcons logcar logcdr) i) (and (equal (logcar i) logcar) (equal (logcdr i) logcdr)))))
Theorem:
(defthm logcar-logcdr-elim (implies (integerp i) (equal (logcons (logcar i) (logcdr i)) i)) :rule-classes (:rewrite :elim))