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