Retrieve, from a set of proposals, the subset of proposals with a given round.
(props-with-round round props) → props-with-round
Function:
(defun props-with-round (round props) (declare (xargs :guard (and (posp round) (proposal-setp props)))) (let ((__function__ 'props-with-round)) (declare (ignorable __function__)) (b* (((when (emptyp (proposal-set-fix props))) nil) ((proposal prop) (head props))) (if (equal (pos-fix round) prop.round) (insert (proposal-fix prop) (props-with-round round (tail props))) (props-with-round round (tail props))))))
Theorem:
(defthm proposal-setp-of-props-with-round (b* ((props-with-round (props-with-round round props))) (proposal-setp props-with-round)) :rule-classes :rewrite)
Theorem:
(defthm props-with-round-of-pos-fix-round (equal (props-with-round (pos-fix round) props) (props-with-round round props)))
Theorem:
(defthm props-with-round-pos-equiv-congruence-on-round (implies (acl2::pos-equiv round round-equiv) (equal (props-with-round round props) (props-with-round round-equiv props))) :rule-classes :congruence)
Theorem:
(defthm props-with-round-of-proposal-set-fix-props (equal (props-with-round round (proposal-set-fix props)) (props-with-round round props)))
Theorem:
(defthm props-with-round-proposal-set-equiv-congruence-on-props (implies (proposal-set-equiv props props-equiv) (equal (props-with-round round props) (props-with-round round props-equiv))) :rule-classes :congruence)