lean4-htt/tests/lean/vm_sorry.lean
2017-02-05 14:01:03 +01:00

20 lines
428 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
vm_eval (half_baked tt)
vm_eval (half_baked ff)
meta def my_partial_fun : bool →
| tt := 42
| ff := undefined
vm_eval (my_partial_fun ff)
open expr tactic
run_command (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