(number-of-candidates xs) → num
Function:
(defun number-of-candidates (xs) (declare (xargs :guard (irv-ballot-p xs))) (let ((__function__ 'number-of-candidates)) (declare (ignorable __function__)) (len (candidate-ids xs))))
Theorem:
(defthm natp-of-number-of-candidates (b* ((num (number-of-candidates xs))) (natp num)) :rule-classes :type-prescription)
Theorem:
(defthm number-of-candidates-is-exactly-one-lemma (implies (and (irv-ballot-p xs) (consp xs) (<= (number-of-candidates xs) 1)) (equal (number-of-candidates xs) 1)))