lean4-htt/tests/elab/tactic1.lean
Garmelon 08eb78a5b2
chore: switch to new test/bench suite (#12590)
This PR sets up the new integrated test/bench suite. It then migrates
all benchmarks and some related tests to the new suite. There's also
some documentation and some linting.

For now, a lot of the old tests are left alone so this PR doesn't become
even larger than it already is. Eventually, all tests should be migrated
to the new suite though so there isn't a confusing mix of two systems.
2026-02-25 13:51:53 +00:00

69 lines
1.4 KiB
Text

def ex1 (x : Nat) (y : { v // v > x }) (z : Nat) : Nat :=
by {
clear y x;
exact z
}
def ex2 (x : Nat) (y : { v // v > x }) (z : Nat) : Nat :=
by {
clear x y;
exact z
}
theorem ex3 (x y z : Nat) (h₁ : x = y) (h₂ : z = y) : x = z :=
by {
have : y = z := h₂.symm;
apply Eq.trans;
exact h₁;
assumption
}
theorem ex4 (x y z : Nat) (h₁ : x = y) (h₂ : z = y) : x = z :=
by {
let h₃ : y = z := h₂.symm;
apply Eq.trans;
exact h₁;
exact h₃
}
theorem ex5 (x y z : Nat) (h₁ : x = y) (h₂ : z = y) : x = z :=
by {
have h₃ : y = z := h₂.symm;
apply Eq.trans;
exact h₁;
exact h₃
}
theorem ex6 (x y z : Nat) (h₁ : x = y) (h₂ : z = y) : id (x + 0 = z) :=
by {
show x = z;
have h₃ : y = z := h₂.symm;
apply Eq.trans;
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
example (x y z : Nat) (h₁ : x = y) (h₂ : z = y) : x = z := by
sorry
example (x y z : Nat) (h₁ : x = y) (h₂ : z = y) : x = z := by
apply Eq.trans
· sorry
· sorry
· sorry
example (x y z : Nat) (h₁ : x = y) (h₂ : z = y) : x = z := by
apply Eq.trans <;> sorry