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

23 lines
535 B
Text

inductive is_some {A : Type} (mx : option A) : Prop
| mk : ∀ x : A, mx = some x → is_some
lemma foo {A : Type} (x : A) (mx : option A)
(H : mx = some x)
: is_some mx
:= begin
existsi x, assumption
end
set_option pp.all true
set_option pp.beta false
set_option pp.instantiate_mvars false
-- same lemma as above
lemma foo' {A : Type} (x : A) (mx : option A)
(H : mx = some x)
: is_some mx
:= begin
apply (if true then _ else _), -- in this case, we branch first
{ existsi x, assumption },
{ existsi x, assumption }
end