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