lean4-htt/tests/lean/vm_noncomputable_real.lean
Gabriel Ebner 89e1b196db fix(library/compiler/preprocess): do not unfold noncomputable definitions
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.
2017-08-01 08:37:18 +01:00

8 lines
No EOL
338 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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⟩