be61fb0566
When the command "noncomputable theory" is used, Lean will not sign an error when a noncomputable definition is not marked as noncomputable
20 lines
417 B
Text
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
|