Add all parent dependencies to all children.
(invert-outer-loop nodes graph acc) → acc
Function:
(defun invert-outer-loop (nodes graph acc) (declare (xargs :guard t)) (let ((__function__ 'invert-outer-loop)) (declare (ignorable __function__)) (b* (((when (atom nodes)) acc) (parent1 (car nodes)) (children1 (cdr (hons-get parent1 graph))) (acc (invert-inner-loop parent1 children1 acc))) (invert-outer-loop (cdr nodes) graph acc))))
Theorem:
(defthm invert-outer-loop-when-atom (implies (atom nodes) (equal (invert-outer-loop nodes graph acc) acc)))
Theorem:
(defthm invert-outer-loop-correct (let ((new-acc (invert-outer-loop nodes graph acc))) (iff (member par (cdr (hons-assoc-equal child new-acc))) (or (member par (cdr (hons-assoc-equal child acc))) (and (member par nodes) (member child (cdr (hons-assoc-equal par graph))))))))