Check if a type is a complex type [C17:6.2.5/11].
Function:
(defun type-complexp (type) (declare (xargs :guard (typep type))) (and (member-eq (type-kind type) '(:floatc :doublec :ldoublec)) t))
Theorem:
(defthm booleanp-of-type-complexp (b* ((yes/no (type-complexp type))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm type-complexp-when-type-kind-syntaxp (implies (and (equal (type-kind type) kind) (syntaxp (quotep kind))) (equal (type-complexp type) (and (member-equal kind '(:floatc :doublec :ldoublec)) t))))
Theorem:
(defthm type-complexp-of-type-fix-type (equal (type-complexp (type-fix type)) (type-complexp type)))
Theorem:
(defthm type-complexp-type-equiv-congruence-on-type (implies (type-equiv type type-equiv) (equal (type-complexp type) (type-complexp type-equiv))) :rule-classes :congruence)