Collect indices of all identifiers used throughout a clause.
(clause-indices clause) → *
Function:
(defun clause-indices (clause) (declare (xargs :guard (lit-listp clause))) (let ((__function__ 'clause-indices)) (declare (ignorable __function__)) (if (atom clause) nil (cons (lit->var (car clause)) (clause-indices (cdr clause))))))
Theorem:
(defthm clause-indices-when-atom (implies (atom clause) (equal (clause-indices clause) nil)))
Theorem:
(defthm clause-indices-of-cons (equal (clause-indices (cons lit clause)) (cons (lit->var lit) (clause-indices clause))))
Theorem:
(defthm clause-indices-of-lit-list-fix-clause (equal (clause-indices (lit-list-fix clause)) (clause-indices clause)))
Theorem:
(defthm clause-indices-lit-list-equiv-congruence-on-clause (implies (lit-list-equiv clause clause-equiv) (equal (clause-indices clause) (clause-indices clause-equiv))) :rule-classes :congruence)