lean2/tests/lean/run/constr_tac.lean
Leonardo de Moura e379034b95 feat(library/tactic): improve 'assumption' tactic
- It uses the unifier in "conservative" mode
- It only affects the current goal

closes #570
2015-05-02 17:33:54 -07:00

65 lines
848 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.

import data.list
example (a b c : Prop) : a → b → c → a ∧ b ∧ c :=
begin
intro Ha Hb Hc,
split,
assumption,
split,
repeat assumption
end
example (a b c : Type) : a → b → c → a × b × c :=
begin
intro Ha Hb Hc,
repeat (split | assumption)
end
example (a b : Type) : a → sum a b :=
begin
intro Ha,
left,
assumption
end
example (a b : Type) : b → sum a b :=
begin
intro Ha,
right,
assumption
end
example (a b : Prop) : a → a b :=
begin
intro Ha,
left,
assumption
end
example (a b : Prop) : b → a b :=
begin
intro Ha,
right,
assumption
end
open nat
example (a : nat) : a > 0 → ∃ x, x > 0 :=
begin
intro Ha,
existsi a,
apply Ha
end
example : list nat :=
begin
constructor 1
end
example : list nat :=
begin
constructor 2,
constructor 1,
constructor 1
end