(prefix-of-eachp p x) returns true exactly when
(prefix-of-eachp p x) → std::bool
This is an ordinary deflist. It is
"loose" in that it does not care whether
Function:
(defun prefix-of-eachp (p x) (declare (xargs :guard t)) (let ((__function__ 'prefix-of-eachp)) (declare (ignorable __function__)) (if (consp x) (and (prefixp p (car x)) (prefix-of-eachp p (cdr x))) t)))
Theorem:
(defthm prefix-of-eachp-when-prefixp (implies (and (prefix-of-eachp a x) (prefixp b a)) (prefix-of-eachp b x)))
Theorem:
(defthm prefix-of-eachp-when-prefixp-alt (implies (and (prefixp b a) (prefix-of-eachp a x)) (prefix-of-eachp b x)))