Generate a summand of the defflexsum.
(defflatsum-flex-summand flat-summand lastp wrld) → (mv flex-summand predicate fixer)
If (and only if) the summand is the last one,
do not generate the
Function:
(defun defflatsum-flex-summand (flat-summand lastp wrld) (declare (xargs :guard (and (booleanp lastp) (plist-worldp wrld)))) (let ((__function__ 'defflatsum-flex-summand)) (declare (ignorable __function__)) (b* ((keyword (first flat-summand)) (type (second flat-summand)) (fty-table (get-fixtypes-alist wrld)) (fty-info (find-fixtype type fty-table)) (predicate (fixtype->pred fty-info)) (fixer (fixtype->fix fty-info)) (flex-summand (cons keyword (cons ':fields (cons (cons (cons 'get (cons ':type (cons type '(:acc-body x)))) 'nil) (cons ':ctor-body (cons 'get (and (not lastp) (list :cond (list predicate 'x)))))))))) (mv flex-summand predicate fixer))))