(aignet-extension-p new old) determines if the aignet
(aignet-extension-p new old) → bool
Another way of looking at this is that the aignet
This is a transitive, reflexive relation. This is a useful concept because
every
In particular, any ID of the original aignet is an ID of the new aignet, and the node of that ID (and its entire suffix) is the same in both aignets. This implies, for example, that the evaluations of nodes existing in the first are the same as their evaluations in the second.
Function:
(defun aignet-extension-p (new old) (declare (xargs :guard (and (node-listp new) (node-listp old)))) (let ((__function__ 'aignet-extension-p)) (declare (ignorable __function__)) (or (node-list-equiv old new) (and (consp new) (aignet-extension-p (cdr new) old)))))
Theorem:
(defthm acl2::aignet-extension-p-of-node-list-fix-new (equal (aignet-extension-p (node-list-fix new) old) (aignet-extension-p new old)))
Theorem:
(defthm acl2::aignet-extension-p-node-list-equiv-congruence-on-new (implies (node-list-equiv new acl2::new-equiv) (equal (aignet-extension-p new old) (aignet-extension-p acl2::new-equiv old))) :rule-classes :congruence)
Theorem:
(defthm acl2::aignet-extension-p-of-node-list-fix-old (equal (aignet-extension-p new (node-list-fix old)) (aignet-extension-p new old)))
Theorem:
(defthm acl2::aignet-extension-p-node-list-equiv-congruence-on-old (implies (node-list-equiv old acl2::old-equiv) (equal (aignet-extension-p new old) (aignet-extension-p new acl2::old-equiv))) :rule-classes :congruence)
Theorem:
(defthm fanin-count-when-aignet-extension (implies (aignet-extension-p y x) (<= (fanin-count x) (fanin-count y))) :rule-classes ((:linear :trigger-terms ((fanin-count x)))))
Theorem:
(defthm stype-count-when-aignet-extension (implies (aignet-extension-p y x) (<= (stype-count k x) (stype-count k y))) :rule-classes ((:linear :trigger-terms ((stype-count k x)))))
Theorem:
(defthm fanin-count-cdr-when-aignet-extension-strong (implies (and (aignet-extension-p y x) (consp x) (fanin-node-p (car x))) (< (fanin-count (cdr x)) (fanin-count y))) :rule-classes ((:linear :trigger-terms ((fanin-count (cdr x))))))
Theorem:
(defthm stype-count-cdr-when-aignet-extension-p (implies (and (aignet-extension-p y x) (equal type (stype (car x))) (or (not (equal (stype-fix type) (const-stype))) (consp x))) (< (stype-count type (cdr x)) (stype-count type y))) :rule-classes ((:linear :trigger-terms ((stype-count type (cdr x))))))
Theorem:
(defthm aignet-extension-p-transitive (implies (and (aignet-extension-p x y) (aignet-extension-p y z)) (aignet-extension-p x z)) :rule-classes ((:rewrite :match-free :all)))
Theorem:
(defthm aignet-extension-p-self (aignet-extension-p x x))
Theorem:
(defthm aignet-extension-p-cons (aignet-extension-p (cons x y) y))
Theorem:
(defthm aignet-extension-p-cons-more (implies (aignet-extension-p y z) (aignet-extension-p (cons x y) z)))
Theorem:
(defthm aignet-extension-p-cdr (implies (and (aignet-extension-p y z) (consp z)) (aignet-extension-p y (cdr z))))