This PR unifies various ways of naming auxiliary declarations in a conflict-free way and ensures the method is compatible with diverging branches of elaboration such as parallelism or Aesop-like backtracking+replaying search.
18 lines
661 B
Text
18 lines
661 B
Text
open scoped Classical
|
|
|
|
/--
|
|
error: tactic 'native_decide' failed, could not evaluate decidable instance. Error: (interpreter) unknown declaration 'ohno._nativeDecide_1_1'
|
|
---
|
|
error: failed to compile definition, consider marking it as 'noncomputable' because it depends on 'Classical.propDecidable', which is 'noncomputable'
|
|
-/
|
|
#guard_msgs in
|
|
theorem ohno : False := by
|
|
let f : Nat → Nat := fun n => if n=0 then 0 else
|
|
if (∃ k, n = 2 * k) then n / 2 else 3 * n + 1;
|
|
have h2 : f (f 2) ≠ 4 := by
|
|
native_decide;
|
|
have h2 : f (f 2) = 4 := by
|
|
have : ∃ k, 2 = 2 * k := ⟨1, rfl⟩
|
|
simp +decide +arith [f, this];
|
|
omega
|
|
contradiction
|