lean4-htt/tests/lean/run/cases_term.lean
Leonardo de Moura 1b412b6cc0 feat(library/init/meta): new cases that reverts also composite terms
The previous `cases` tactic would only use the revert/intro idiom
for `cases h` when `h` is a hypothesis
2017-02-14 13:30:36 -08:00

10 lines
225 B
Text

example (f : nat → nat) (p : nat → Prop)
(h₁ : ∀ x, f (nat.succ x) = 1)
(h₂ : ¬ p 0)
(a : nat)
(h₃ : p (f a)) : f (f a) = 1 :=
begin
cases f a,
contradiction,
apply h₁
end