(vl-lex-token echars st warnings) → (mv token/nil remainder warnings)
Function:
(defun vl-lex-token$inline (echars st warnings) (declare (xargs :guard (and (vl-echarlist-p echars) (vl-lexstate-p st) (vl-warninglist-p warnings)))) (let ((__function__ 'vl-lex-token)) (declare (ignorable __function__)) (b* (((when (atom echars)) (mv nil echars (ok))) (echar1 (car echars)) (char1 (vl-echar->char echar1))) (vl-lex-token1 char1 echars st warnings))))
Theorem:
(defthm vl-warninglist-p-of-vl-lex-token.warnings (b* (((mv ?token/nil ?remainder ?warnings) (vl-lex-token$inline echars st warnings))) (vl-warninglist-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-token-p-of-vl-lex-token (implies (and (force (vl-echarlist-p echars)) (vl-lexstate-p st)) (equal (vl-token-p (mv-nth 0 (vl-lex-token echars st warnings))) (if (mv-nth 0 (vl-lex-token echars st warnings)) t nil))))
Theorem:
(defthm true-listp-of-vl-lex-token (equal (true-listp (mv-nth 1 (vl-lex-token echars st warnings))) (true-listp echars)) :rule-classes ((:rewrite) (:type-prescription :corollary (implies (true-listp echars) (true-listp (mv-nth 1 (vl-lex-token echars st warnings)))))))
Theorem:
(defthm vl-echarlist-p-of-vl-lex-token (implies (force (vl-echarlist-p echars)) (equal (vl-echarlist-p (mv-nth 1 (vl-lex-token echars st warnings))) t)))
Theorem:
(defthm append-of-vl-lex-token (implies (and (mv-nth 0 (vl-lex-token echars st warnings)) (force (vl-echarlist-p echars)) (vl-lexstate-p st)) (equal (append (vl-token->etext (mv-nth 0 (vl-lex-token echars st warnings))) (mv-nth 1 (vl-lex-token echars st warnings))) echars)))
Theorem:
(defthm no-change-loser-of-vl-lex-token (implies (not (mv-nth 0 (vl-lex-token echars st warnings))) (equal (mv-nth 1 (vl-lex-token echars st warnings)) echars)))
Theorem:
(defthm acl2-count-of-vl-lex-token-weak (<= (acl2-count (mv-nth 1 (vl-lex-token echars st warnings))) (acl2-count echars)) :rule-classes ((:rewrite) (:linear)))
Theorem:
(defthm acl2-count-of-vl-lex-token-strong (implies (and (mv-nth 0 (vl-lex-token echars st warnings)) t) (< (acl2-count (mv-nth 1 (vl-lex-token echars st warnings))) (acl2-count echars))) :rule-classes ((:rewrite) (:linear)))