This happened in Johannes' real number formalization. We tried to unfold a noncomputable definition even though it would have been erased afterwards, and failed. The check_computable check was introduced in order to fix the error message in #1401, the error message is still intelligible in that example.
8 lines
No EOL
338 B
Text
8 lines
No EOL
338 B
Text
def ℝ := set ℕ
|
||
constant ℝ.sub' : ℝ → ℝ → ℝ
|
||
noncomputable def ℝ.sub (a b : ℝ) := (λ b, a.sub' b) b
|
||
noncomputable instance : has_sub ℝ := ⟨ℝ.sub⟩
|
||
constant ℝ.nonneg : ℝ → Prop
|
||
|
||
-- This instance is computable, and the VM code generator should accept it.
|
||
instance : has_le ℝ := ⟨λ a b, (b - a).nonneg⟩ |