Get the tops field from a program.
(program->tops x) → tops
This is an ordinary field accessor created by fty::defprod.
Function:
(defun program->tops$inline (x) (declare (xargs :guard (programp x))) (declare (xargs :guard t)) (let ((__function__ 'program->tops)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and t x))) (toplevel-list-fix (cdr (std::da-nth 0 x)))) :exec (cdr (std::da-nth 0 x)))))
Theorem:
(defthm toplevel-listp-of-program->tops (b* ((tops (program->tops$inline x))) (toplevel-listp tops)) :rule-classes :rewrite)
Theorem:
(defthm program->tops$inline-of-program-fix-x (equal (program->tops$inline (program-fix x)) (program->tops$inline x)))
Theorem:
(defthm program->tops$inline-program-equiv-congruence-on-x (implies (program-equiv x x-equiv) (equal (program->tops$inline x) (program->tops$inline x-equiv))) :rule-classes :congruence)