(expr-grade-index grade) → index
Function:
(defun expr-grade-index (grade) (declare (xargs :guard (expr-gradep grade))) (let ((__function__ 'expr-grade-index)) (declare (ignorable __function__)) (expr-grade-case grade :top 16 :assignment 15 :conditional 14 :logical-or 13 :logical-and 12 :ior 11 :xor 10 :and 9 :equality 8 :relational 7 :shift 6 :additive 5 :multiplicative 4 :cast 3 :unary 2 :postfix 1 :primary 0)))
Theorem:
(defthm natp-of-expr-grade-index (b* ((index (expr-grade-index grade))) (natp index)) :rule-classes :rewrite)
Theorem:
(defthm expr-grade-index-of-expr-grade-fix-grade (equal (expr-grade-index (expr-grade-fix grade)) (expr-grade-index grade)))
Theorem:
(defthm expr-grade-index-expr-grade-equiv-congruence-on-grade (implies (expr-grade-equiv grade grade-equiv) (equal (expr-grade-index grade) (expr-grade-index grade-equiv))) :rule-classes :congruence)