lean4-htt/old_tests/tests/lean/vm_sorry.lean
2018-04-10 12:56:55 -07:00

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

def half_baked : bool →
| tt := 42
| ff := sorry
#eval (half_baked tt)
#eval (half_baked ff)
meta def my_partial_fun : bool →
| tt := 42
| ff := undefined
#eval (my_partial_fun ff)
open expr tactic
run_cmd (do v ← to_expr ``(half_baked ff) >>= whnf,
trace $ to_string v^.is_sorry)
example : 0 = 1 := by admit
example : 0 = 1 := by mk_sorry >>= exact
example : 0 = 1 := by exact sorry
example : 0 = 1 := by sorry