Map an optional integer suffix to an integer constant length in the language definition and to an unsigned flag.
(ldm-isuffix-option isuffix?) → (mv ilen unsignedp)
Function:
(defun ldm-isuffix-option (isuffix?) (declare (xargs :guard (isuffix-optionp isuffix?))) (let ((__function__ 'ldm-isuffix-option)) (declare (ignorable __function__)) (isuffix-option-case isuffix? :some (ldm-isuffix isuffix?.val) :none (mv (c::iconst-length-none) nil))))
Theorem:
(defthm iconst-lengthp-of-ldm-isuffix-option.ilen (b* (((mv ?ilen ?unsignedp) (ldm-isuffix-option isuffix?))) (c::iconst-lengthp ilen)) :rule-classes :rewrite)
Theorem:
(defthm booleanp-of-ldm-isuffix-option.unsignedp (b* (((mv ?ilen ?unsignedp) (ldm-isuffix-option isuffix?))) (booleanp unsignedp)) :rule-classes :rewrite)
Theorem:
(defthm ldm-isuffix-option-of-isuffix-option-fix-isuffix? (equal (ldm-isuffix-option (isuffix-option-fix isuffix?)) (ldm-isuffix-option isuffix?)))
Theorem:
(defthm ldm-isuffix-option-isuffix-option-equiv-congruence-on-isuffix? (implies (isuffix-option-equiv isuffix? isuffix?-equiv) (equal (ldm-isuffix-option isuffix?) (ldm-isuffix-option isuffix?-equiv))) :rule-classes :congruence)