lean4-htt/tests/lean/run/meta_tac3.lean
Leonardo de Moura 6a0f11f705 feat(library/tactic/tactic_state,library/init/meta/tactic): add mk_meta_univ, mk_meta_var, mk_const
This commit also changes the semantics of the unify tactic.
It fails if the arguments are not unifiable.
2016-06-18 11:12:51 -07:00

20 lines
501 B
Text

open tactic name list
set_option pp.goal.compact true
set_option pp.binder_types true
example : ∀ (A B : Prop), A → A ∧ B → A → A :=
by do
intro_lst ["_", "_", "H1", "H2", "H3"],
trace_state,
h2 ← get_local "H2",
infer_type h2 >>= trace_expr,
h1 ← get_local "H1",
h3 ← get_local "H3",
unify h1 h3,
(unify h2 h3 <|> trace "fail to unify H2 =?= H3"),
assumption,
trace_state,
result >>= trace_expr,
trace "--------------",
return ()