Fix an ID so that it is valid for the aignet.
(aignet-id-fix id aignet) → new-id
Function:
(defun aignet-id-fix (id aignet) (declare (xargs :guard (and (natp id) (node-listp aignet)))) (let ((__function__ 'aignet-id-fix)) (declare (ignorable __function__)) (if (aignet-idp id aignet) (nfix id) 0)))
Theorem:
(defthm return-type-of-aignet-id-fix (b* ((new-id (aignet-id-fix id aignet))) (aignet-idp new-id aignet)) :rule-classes :rewrite)
Theorem:
(defthm aignet-id-fix-when-aignet-idp (implies (aignet-idp id aignet) (equal (aignet-id-fix id aignet) (nfix id))))
Theorem:
(defthm aignet-id-fix-id-val-linear (<= (aignet-id-fix id aignet) (fanin-count aignet)) :rule-classes :linear)
Theorem:
(defthm aignet-id-fix-of-node-list-fix (equal (aignet-id-fix x (node-list-fix aignet)) (aignet-id-fix x aignet)))
Theorem:
(defthm aignet-id-fix-of-nfix-id (equal (aignet-id-fix (nfix id) aignet) (aignet-id-fix id aignet)))
Theorem:
(defthm aignet-id-fix-nat-equiv-congruence-on-id (implies (nat-equiv id id-equiv) (equal (aignet-id-fix id aignet) (aignet-id-fix id-equiv aignet))) :rule-classes :congruence)
Theorem:
(defthm aignet-id-fix-of-node-list-fix-aignet (equal (aignet-id-fix id (node-list-fix aignet)) (aignet-id-fix id aignet)))
Theorem:
(defthm aignet-id-fix-node-list-equiv-congruence-on-aignet (implies (node-list-equiv aignet aignet-equiv) (equal (aignet-id-fix id aignet) (aignet-id-fix id aignet-equiv))) :rule-classes :congruence)