Measure for recurring over objdesign structures.
(objdesign-count x) → count
Function:
(defun objdesign-count (x) (declare (xargs :guard (objdesignp x))) (let ((__function__ 'objdesign-count)) (declare (ignorable __function__)) (case (objdesign-kind x) (:static 1) (:auto 1) (:alloc 1) (:element (+ 3 (objdesign-count (objdesign-element->super x)))) (:member (+ 3 (objdesign-count (objdesign-member->super x)))))))
Theorem:
(defthm natp-of-objdesign-count (b* ((count (objdesign-count x))) (natp count)) :rule-classes :type-prescription)
Theorem:
(defthm objdesign-count-of-objdesign-fix-x (equal (objdesign-count (objdesign-fix x)) (objdesign-count x)))
Theorem:
(defthm objdesign-count-objdesign-equiv-congruence-on-x (implies (objdesign-equiv x x-equiv) (equal (objdesign-count x) (objdesign-count x-equiv))) :rule-classes :congruence)
Theorem:
(defthm objdesign-count-of-objdesign-element (implies t (< (+ (objdesign-count super)) (objdesign-count (objdesign-element super index)))) :rule-classes :linear)
Theorem:
(defthm objdesign-count-of-objdesign-element->super (implies (equal (objdesign-kind x) :element) (< (objdesign-count (objdesign-element->super x)) (objdesign-count x))) :rule-classes :linear)
Theorem:
(defthm objdesign-count-of-objdesign-member (implies t (< (+ (objdesign-count super)) (objdesign-count (objdesign-member super name)))) :rule-classes :linear)
Theorem:
(defthm objdesign-count-of-objdesign-member->super (implies (equal (objdesign-kind x) :member) (< (objdesign-count (objdesign-member->super x)) (objdesign-count x))) :rule-classes :linear)