Lex rule
(lex-whitespace input) → (mv tree rest-input)
Function:
(defun lex-whitespace (input) (declare (xargs :guard (nat-listp input))) (let ((__function__ 'lex-whitespace)) (declare (ignorable __function__)) (b* (((mv tree-1char input-after-1char) (lex-whitespace-char input)) ((when (reserrp tree-1char)) (mv (reserrf "whitespace problem") (acl2::nat-list-fix input))) ((mv trees-restchars input-after-restchars) (lex-repetition-*-whitespace-char input-after-1char)) ((when (reserrp trees-restchars)) (mv (reserrf "whitespace problem") (acl2::nat-list-fix input)))) (mv (abnf::make-tree-nonleaf :rulename? (abnf::rulename "whitespace") :branches (list (cons tree-1char trees-restchars))) input-after-restchars))))
Theorem:
(defthm tree-resultp-of-lex-whitespace.tree (b* (((mv ?tree ?rest-input) (lex-whitespace input))) (abnf::tree-resultp tree)) :rule-classes :rewrite)
Theorem:
(defthm nat-listp-of-lex-whitespace.rest-input (b* (((mv ?tree ?rest-input) (lex-whitespace input))) (nat-listp rest-input)) :rule-classes :rewrite)
Theorem:
(defthm len-of-lex-whitespace-< (b* (((mv ?tree ?rest-input) (lex-whitespace input))) (implies (not (reserrp tree)) (< (len rest-input) (len input)))) :rule-classes :linear)
Theorem:
(defthm lex-whitespace-of-nat-list-fix-input (equal (lex-whitespace (acl2::nat-list-fix input)) (lex-whitespace input)))
Theorem:
(defthm lex-whitespace-nat-list-equiv-congruence-on-input (implies (acl2::nat-list-equiv input input-equiv) (equal (lex-whitespace input) (lex-whitespace input-equiv))) :rule-classes :congruence)