Lex an
(lex-address-char input) → (mv tree rest-input)
Function:
(defun lex-address-char (input) (declare (xargs :guard (nat-listp input))) (let ((__function__ 'lex-address-char)) (declare (ignorable __function__)) (b* (((mv tree-char input-after-char) (lex-group-address-char input)) ((when (reserrp tree-char)) (mv (reserrf-push tree-char) (nat-list-fix input)))) (mv (abnf-tree-wrap tree-char "address-char") input-after-char))))
Theorem:
(defthm tree-resultp-of-lex-address-char.tree (b* (((mv ?tree ?rest-input) (lex-address-char input))) (abnf::tree-resultp tree)) :rule-classes :rewrite)
Theorem:
(defthm nat-listp-of-lex-address-char.rest-input (b* (((mv ?tree ?rest-input) (lex-address-char input))) (nat-listp rest-input)) :rule-classes :rewrite)
Theorem:
(defthm len-of-lex-address-char-<= (b* (((mv ?tree ?rest-input) (lex-address-char input))) (<= (len rest-input) (len input))) :rule-classes :linear)
Theorem:
(defthm len-of-lex-address-char-< (b* (((mv ?tree ?rest-input) (lex-address-char input))) (implies (not (reserrp tree)) (< (len rest-input) (len input)))) :rule-classes :linear)
Theorem:
(defthm lex-address-char-of-nat-list-fix-input (equal (lex-address-char (nat-list-fix input)) (lex-address-char input)))
Theorem:
(defthm lex-address-char-nat-list-equiv-congruence-on-input (implies (acl2::nat-list-equiv input input-equiv) (equal (lex-address-char input) (lex-address-char input-equiv))) :rule-classes :congruence)