Lift valid-key-path-p to sets of paths.
(all-valid-key-paths-p paths addresses) → yes/no
Function:
(defun all-valid-key-paths-p (paths addresses) (declare (xargs :guard (and (bip32-path-setp paths) (natp addresses)))) (or (emptyp paths) (and (valid-key-path-p (head paths) addresses) (all-valid-key-paths-p (tail paths) addresses))))
Theorem:
(defthm booleanp-of-all-valid-key-paths-p (b* ((yes/no (all-valid-key-paths-p paths addresses))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm valid-key-path-p-when-member-and-all-valid-key-paths-p (implies (and (in path paths) (all-valid-key-paths-p paths addresses)) (valid-key-path-p path addresses)))
Theorem:
(defthm all-valid-key-paths-p-of-insert (equal (all-valid-key-paths-p (insert path paths) addresses) (and (valid-key-path-p path addresses) (all-valid-key-paths-p paths addresses))))
Theorem:
(defthm all-valid-key-paths-p-of-1+-addresses (implies (all-valid-key-paths-p paths addresses) (all-valid-key-paths-p paths (1+ addresses))))
Theorem:
(defthm not-all-valid-key-paths-p-of-next-key-path (implies (all-valid-key-paths-p paths addresses) (not (in (rcons addresses *key-path-prefix*) paths))))