Skip over any leading digits at the start of a character list.
(skip-leading-digits x) → tail
Function:
(defun skip-leading-digits (x) (declare (xargs :guard t)) (let ((acl2::__function__ 'skip-leading-digits)) (declare (ignorable acl2::__function__)) (cond ((atom x) nil) ((dec-digit-char-p (car x)) (skip-leading-digits (cdr x))) (t x))))
Theorem:
(defthm character-listp-of-skip-leading-digits (implies (character-listp x) (b* ((tail (skip-leading-digits x))) (character-listp tail))) :rule-classes :rewrite)
Theorem:
(defthm charlisteqv-implies-charlisteqv-skip-leading-digits-1 (implies (charlisteqv x x-equiv) (charlisteqv (skip-leading-digits x) (skip-leading-digits x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm icharlisteqv-implies-icharlisteqv-skip-leading-digits-1 (implies (icharlisteqv x x-equiv) (icharlisteqv (skip-leading-digits x) (skip-leading-digits x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm len-of-skip-leading-digits (equal (< (len (skip-leading-digits x)) (len x)) (dec-digit-char-p (car x))) :rule-classes ((:rewrite) (:linear :corollary (implies (dec-digit-char-p (car x)) (< (len (skip-leading-digits x)) (len x))))))