Build a dynamic environment from a file.
(build-denv-from-file file curve) → env
This is the initial dynamic environment used for executing a program.
Besides the file, we also need the prime and the curve.
Function:
(defun build-denv-from-file (file curve) (declare (xargs :guard (and (filep file) (curvep curve)))) (let ((__function__ 'build-denv-from-file)) (declare (ignorable __function__)) (extend-denv-with-topdecl-list (programdecl->items (file->program file)) (init-denv curve))))
Theorem:
(defthm denv-resultp-of-build-denv-from-file (b* ((env (build-denv-from-file file curve))) (denv-resultp env)) :rule-classes :rewrite)
Theorem:
(defthm build-denv-from-file-of-file-fix-file (equal (build-denv-from-file (file-fix file) curve) (build-denv-from-file file curve)))
Theorem:
(defthm build-denv-from-file-file-equiv-congruence-on-file (implies (file-equiv file file-equiv) (equal (build-denv-from-file file curve) (build-denv-from-file file-equiv curve))) :rule-classes :congruence)
Theorem:
(defthm build-denv-from-file-of-curve-fix-curve (equal (build-denv-from-file file (curve-fix curve)) (build-denv-from-file file curve)))
Theorem:
(defthm build-denv-from-file-curve-equiv-congruence-on-curve (implies (curve-equiv curve curve-equiv) (equal (build-denv-from-file file curve) (build-denv-from-file file curve-equiv))) :rule-classes :congruence)