Check if a value is a structure with a flexible array member.
Function:
(defun flexible-array-member-p (val) (declare (xargs :guard (valuep val))) (let ((__function__ 'flexible-array-member-p)) (declare (ignorable __function__)) (and (value-case val :struct) (value-struct->flexiblep val))))
Theorem:
(defthm booleanp-of-flexible-array-member-p (b* ((yes/no (flexible-array-member-p val))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm flexible-array-member-p-of-value-fix-val (equal (flexible-array-member-p (value-fix val)) (flexible-array-member-p val)))
Theorem:
(defthm flexible-array-member-p-value-equiv-congruence-on-val (implies (value-equiv val val-equiv) (equal (flexible-array-member-p val) (flexible-array-member-p val-equiv))) :rule-classes :congruence)