Parse a
(lex-not-star abnf::input) → (mv abnf::tree abnf::rest-input)
Function:
(defun lex-not-star (abnf::input) (declare (xargs :guard (nat-listp abnf::input))) (let ((__function__ 'lex-not-star)) (declare (ignorable __function__)) (b* (((mv abnf::treess abnf::input) (b* (((mv abnf::treess1 abnf::input1) (b* (((mv abnf::tree abnf::input) (abnf::parse-range 0 41 abnf::input)) ((when (reserrp abnf::tree)) (mv (fty::reserrf-push abnf::tree) abnf::input)) (abnf::trees1 (list abnf::tree)) (abnf::treess (list abnf::trees1))) (mv abnf::treess abnf::input))) ((when (not (reserrp abnf::treess1))) (mv abnf::treess1 abnf::input1)) ((mv abnf::treess2 abnf::input1) (b* (((mv abnf::tree abnf::input) (abnf::parse-range 43 127 abnf::input)) ((when (reserrp abnf::tree)) (mv (fty::reserrf-push abnf::tree) abnf::input)) (abnf::trees1 (list abnf::tree)) (abnf::treess (list abnf::trees1))) (mv abnf::treess abnf::input))) ((when (not (reserrp abnf::treess2))) (mv abnf::treess2 abnf::input1))) (mv (reserrf (list :found (list abnf::treess1 abnf::treess2) :required '(((:repetition (:repeat 1 (:finite 1)) (:num-val (:range (:hex) 0 41)))) ((:repetition (:repeat 1 (:finite 1)) (:num-val (:range (:hex) 43 127))))))) abnf::input))) ((when (reserrp abnf::treess)) (mv (fty::reserrf-push abnf::treess) (acl2::nat-list-fix abnf::input)))) (mv (abnf::make-tree-nonleaf :rulename? (abnf::rulename "not-star") :branches abnf::treess) abnf::input))))
Theorem:
(defthm tree-resultp-of-lex-not-star.tree (b* (((mv abnf::?tree abnf::?rest-input) (lex-not-star abnf::input))) (abnf::tree-resultp abnf::tree)) :rule-classes :rewrite)
Theorem:
(defthm nat-listp-of-lex-not-star.rest-input (b* (((mv abnf::?tree abnf::?rest-input) (lex-not-star abnf::input))) (nat-listp abnf::rest-input)) :rule-classes :rewrite)
Theorem:
(defthm len-of-lex-not-star-<= (b* (((mv abnf::?tree abnf::?rest-input) (lex-not-star abnf::input))) (<= (len abnf::rest-input) (len abnf::input))) :rule-classes :linear)
Theorem:
(defthm len-of-lex-not-star-< (b* (((mv abnf::?tree abnf::?rest-input) (lex-not-star abnf::input))) (implies (not (reserrp abnf::tree)) (< (len abnf::rest-input) (len abnf::input)))) :rule-classes :linear)
Theorem:
(defthm lex-not-star-of-nat-list-fix-input (equal (lex-not-star (acl2::nat-list-fix abnf::input)) (lex-not-star abnf::input)))
Theorem:
(defthm lex-not-star-nat-list-equiv-congruence-on-input (implies (acl2::nat-list-equiv abnf::input input-equiv) (equal (lex-not-star abnf::input) (lex-not-star input-equiv))) :rule-classes :congruence)