Get the stake field from a transaction-bond.
(transaction-bond->stake x) → stake
This is an ordinary field accessor created by fty::defprod.
Function:
(defun transaction-bond->stake$inline (x) (declare (xargs :guard (transactionp x))) (declare (xargs :guard (equal (transaction-kind x) :bond))) (let ((__function__ 'transaction-bond->stake)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and (equal (transaction-kind x) :bond) x))) (pos-fix (std::da-nth 1 (cdr x)))) :exec (std::da-nth 1 (cdr x)))))
Theorem:
(defthm posp-of-transaction-bond->stake (b* ((stake (transaction-bond->stake$inline x))) (posp stake)) :rule-classes :rewrite)
Theorem:
(defthm transaction-bond->stake$inline-of-transaction-fix-x (equal (transaction-bond->stake$inline (transaction-fix x)) (transaction-bond->stake$inline x)))
Theorem:
(defthm transaction-bond->stake$inline-transaction-equiv-congruence-on-x (implies (transaction-equiv x x-equiv) (equal (transaction-bond->stake$inline x) (transaction-bond->stake$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm transaction-bond->stake-when-wrong-kind (implies (not (equal (transaction-kind x) :bond)) (equal (transaction-bond->stake x) (pos-fix nil))))