lean4-htt/tests/lean/run/10213.lean

21 lines
793 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.

/-!
Tests that `@[csimp]` rejects constant replacements with concrete universe parameters
-/
noncomputable def funnyChoice (x : α) : α := Classical.choice ⟨x⟩
/--
error: invalid 'csimp' theorem, only constant replacement theorems (e.g., `@f = @g`) are currently supported.
-/
#guard_msgs in
@[csimp]
theorem bad_csimp : @funnyChoice.{0} = @id.{0} := rfl
/--
error: Tactic `native_decide` failed. Error: failed to compile definition, compiler IR check failed at `_example._nativeDecide_1._closed_0`. Error: depends on declaration 'funnyChoice', which has no executable code; consider marking definition as 'noncomputable'
-/
#guard_msgs in
example : False := by
have : funnyChoice 2 = funnyChoice 3 := rfl
have : funnyChoice 2 ≠ funnyChoice 3 := by native_decide
contradiction