Get the combinational typecode from a logical node.
Function:
(defun node->type (node) (declare (xargs :guard (node-p node))) (let ((__function__ 'node->type)) (declare (ignorable __function__)) (typecode (ctype (stype node)))))
Theorem:
(defthm natp-of-node->type (b* ((typecode (node->type node))) (natp typecode)) :rule-classes :type-prescription)
Theorem:
(defthm node->type-of-node-fix-node (equal (node->type (node-fix node)) (node->type node)))
Theorem:
(defthm node->type-node-equiv-congruence-on-node (implies (node-equiv node node-equiv) (equal (node->type node) (node->type node-equiv))) :rule-classes :congruence)