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:
parent
a6b19cd4af
commit
ca90ff8b59
1 changed files with 15 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue