• Top
  • Sint-array

Sint-array->elemtype

Get the elemtype field from a sint-array.

Signature
(sint-array->elemtype x) → elemtype
Arguments
x — Guard (sint-arrayp x).
Returns
elemtype — Type (typep elemtype).

This is an ordinary field accessor created by fty::defprod.

Definitions and Theorems

Function: sint-array->elemtype$inline

(defun sint-array->elemtype$inline (x)
  (declare (xargs :guard (sint-arrayp x)))
  (declare (xargs :guard t))
  (let ((__function__ 'sint-array->elemtype))
    (declare (ignorable __function__))
    (mbe :logic
         (b* ((x (and t x))
              (elemtype (type-fix (std::da-nth 0 (cdr x))))
              (elements (sint-list-fix (std::da-nth 1 (cdr x)))))
           (if (type-case elemtype :sint)
               elemtype
             (type-sint)))
         :exec (std::da-nth 0 (cdr x)))))

Theorem: typep-of-sint-array->elemtype

(defthm typep-of-sint-array->elemtype
  (b* ((elemtype (sint-array->elemtype$inline x)))
    (typep elemtype))
  :rule-classes :rewrite)

Theorem: sint-array->elemtype$inline-of-sint-array-fix-x

(defthm sint-array->elemtype$inline-of-sint-array-fix-x
  (equal (sint-array->elemtype$inline (sint-array-fix x))
         (sint-array->elemtype$inline x)))

Theorem: sint-array->elemtype$inline-sint-array-equiv-congruence-on-x

(defthm sint-array->elemtype$inline-sint-array-equiv-congruence-on-x
  (implies (sint-array-equiv x x-equiv)
           (equal (sint-array->elemtype$inline x)
                  (sint-array->elemtype$inline x-equiv)))
  :rule-classes :congruence)