In Lean4, the check should be based on the compiler. That is, a definition should be marked as noncomputable when we cannot generate code for it.