chore: restore #4006 (#4038)

This commit is contained in:
Kim Morrison 2024-05-01 09:06:50 +10:00 committed by GitHub
parent 5c3f6363cc
commit 660eb9975a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 6 deletions

View file

@ -99,10 +99,7 @@ environment mk_projections(environment const & env, name const & n, buffer<name>
expr proj_val = mk_proj(n, i, c);
proj_val = lctx.mk_lambda(proj_args, proj_val);
declaration new_d;
// TODO: replace `if (false) {` with `if (is_prop) {`.
// Mathlib is crashing when prop fields are theorems.
// The crash is in the ir_interpreter. Kyle suspects this is an use-after-free bug in the interpreter.
if (false) { // if (is_prop) {
if (is_prop) {
bool unsafe = use_unsafe(env, proj_type) || use_unsafe(env, proj_val);
if (unsafe) {
// theorems cannot be unsafe

View file

@ -4,9 +4,8 @@ structure AtLeastThirtySeven where
theorem AtLeastThirtySeven.lt (x : AtLeastThirtySeven) : 36 < x.val := x.le
-- TODO: fix
/--
info: def AtLeastThirtySeven.le : ∀ (self : AtLeastThirtySeven), 37 ≤ self.val :=
info: theorem AtLeastThirtySeven.le : ∀ (self : AtLeastThirtySeven), 37 ≤ self.val :=
fun self => self.2
-/
#guard_msgs in