test: have-by in tactic mode

@Kha By adding `have-by` macro (in term mode), we got `have-by` in
tactic mode without writing a single line of code :)
This commit is contained in:
Leonardo de Moura 2020-09-14 15:13:07 -07:00
parent a6b19cd4af
commit ca90ff8b59

View file

@ -44,3 +44,18 @@ by {
exact h₁;
exact h₃
}
theorem ex7 (x y z : Nat) (h₁ : x = y) (h₂ : z = y) : x = z :=
by {
have y = z by apply Eq.symm; assumption;
apply Eq.trans;
exact h₁;
assumption
}
theorem ex8 (x y z : Nat) (h₁ : x = y) (h₂ : z = y) : x = z :=
by apply Eq.trans h₁;
have y = z by
apply Eq.symm;
assumption;
exact this