lean4-htt/tests/lean/run/qexpr1.lean
Leonardo de Moura 8993d0738a feat(frontends/lean): remove #elab command
The check command is now using the new elaborator.
2016-08-02 15:05:24 -07:00

24 lines
590 B
Text

open tactic
check
λ (A : Type) (a b c d : A) (H1 : a = b) (H2 : c = b) (H3 : d = c),
have Hac : a = c, by do {
h ← get_local `H2,
hs ← mk_app `eq.symm [h],
x ← to_expr `(eq.trans H1 %%hs),
exact x },
show a = d, by do {
x ← to_expr `(
have aux : a = c, from Hac,
have c = d, by do { symmetry, assumption },
show a = d, by do {
get_local `Hac >>= clear,
get_local `H1 >>= clear,
trace "NESTED CALL:",
trace_state,
transitivity,
get_local `aux >>= exact,
assumption }),
trace "-----------",
trace_state,
exact x }