Get the quantity field from a vl-time.
(vl-time->quantity x) → quantity
This is an ordinary field accessor created by defprod.
Function:
(defun vl-time->quantity$inline (x) (declare (xargs :guard (vl-value-p x))) (declare (xargs :guard (equal (vl-value-kind x) :vl-time))) (let ((__function__ 'vl-time->quantity)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and (equal (vl-value-kind x) :vl-time) x))) (str-fix (std::prod-car (cdr x)))) :exec (std::prod-car (cdr x)))))
Theorem:
(defthm stringp-of-vl-time->quantity (b* ((quantity (vl-time->quantity$inline x))) (stringp quantity)) :rule-classes :type-prescription)
Theorem:
(defthm vl-time->quantity$inline-of-vl-value-fix-x (equal (vl-time->quantity$inline (vl-value-fix x)) (vl-time->quantity$inline x)))
Theorem:
(defthm vl-time->quantity$inline-vl-value-equiv-congruence-on-x (implies (vl-value-equiv x x-equiv) (equal (vl-time->quantity$inline x) (vl-time->quantity$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm vl-time->quantity-when-wrong-kind (implies (not (equal (vl-value-kind x) :vl-time)) (equal (vl-time->quantity x) (str-fix nil))))