Get the max field from a regex-repeat.
(regex-repeat->max x) → max
This is an ordinary field accessor created by defprod.
Function:
(defun regex-repeat->max$inline (x) (declare (xargs :guard (regex-p x))) (declare (xargs :guard (equal (regex-kind x) :repeat))) (let ((__function__ 'regex-repeat->max)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and (equal (regex-kind x) :repeat) x))) (maybe-natp-fix (std::da-nth 2 (cdr x)))) :exec (std::da-nth 2 (cdr x)))))
Theorem:
(defthm maybe-natp-of-regex-repeat->max (b* ((max (regex-repeat->max$inline x))) (maybe-natp max)) :rule-classes :rewrite)
Theorem:
(defthm regex-repeat->max$inline-of-regex-fix-x (equal (regex-repeat->max$inline (regex-fix x)) (regex-repeat->max$inline x)))
Theorem:
(defthm regex-repeat->max$inline-regex-equiv-congruence-on-x (implies (regex-equiv x x-equiv) (equal (regex-repeat->max$inline x) (regex-repeat->max$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm regex-repeat->max-when-wrong-kind (implies (not (equal (regex-kind x) :repeat)) (equal (regex-repeat->max x) (maybe-natp-fix nil))))