Measure for recurring over obj-adeclor structures.
(obj-adeclor-count x) → count
Function:
(defun obj-adeclor-count (x) (declare (xargs :guard (obj-adeclorp x))) (let ((__function__ 'obj-adeclor-count)) (declare (ignorable __function__)) (case (obj-adeclor-kind x) (:none 1) (:pointer (+ 2 (obj-adeclor-count (obj-adeclor-pointer->decl x)))) (:array (+ 3 (obj-adeclor-count (obj-adeclor-array->decl x)))))))
Theorem:
(defthm natp-of-obj-adeclor-count (b* ((count (obj-adeclor-count x))) (natp count)) :rule-classes :type-prescription)
Theorem:
(defthm obj-adeclor-count-of-obj-adeclor-fix-x (equal (obj-adeclor-count (obj-adeclor-fix x)) (obj-adeclor-count x)))
Theorem:
(defthm obj-adeclor-count-obj-adeclor-equiv-congruence-on-x (implies (obj-adeclor-equiv x x-equiv) (equal (obj-adeclor-count x) (obj-adeclor-count x-equiv))) :rule-classes :congruence)
Theorem:
(defthm obj-adeclor-count-of-obj-adeclor-pointer (implies t (< (+ (obj-adeclor-count decl)) (obj-adeclor-count (obj-adeclor-pointer decl)))) :rule-classes :linear)
Theorem:
(defthm obj-adeclor-count-of-obj-adeclor-pointer->decl (implies (equal (obj-adeclor-kind x) :pointer) (< (obj-adeclor-count (obj-adeclor-pointer->decl x)) (obj-adeclor-count x))) :rule-classes :linear)
Theorem:
(defthm obj-adeclor-count-of-obj-adeclor-array (implies t (< (+ (obj-adeclor-count decl)) (obj-adeclor-count (obj-adeclor-array decl size)))) :rule-classes :linear)
Theorem:
(defthm obj-adeclor-count-of-obj-adeclor-array->decl (implies (equal (obj-adeclor-kind x) :array) (< (obj-adeclor-count (obj-adeclor-array->decl x)) (obj-adeclor-count x))) :rule-classes :linear)