lean2/tests/lean/noncomp_theory.lean
Leonardo de Moura be61fb0566 feat(frontends/lean/elaborator): add "noncomputable theory" command, display "noncomputable" when printing definitions
When the command "noncomputable theory" is used, Lean will not sign an
error when a noncomputable definition is not marked as noncomputable
2015-07-29 17:54:35 -07:00

20 lines
417 B
Text

import data.real
open real
definition f (a b : real) := (a + a) / b -- ERROR f is noncomputable
noncomputable definition f (a b : real) := (a + a) / b -- ERROR f is noncomputable
noncomputable theory
definition g (a b : real) := (a + a) / b
definition h (a b : real) := (a - a) / b
definition f₂ (a b : real) := (a * a) / b
definition r (a : nat) := a
print g -- g is still marked as noncomputable
print r