lean4-htt/tests/elab/inj1.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

41 lines
978 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

theorem test1 {α} (a b : α) (as bs : List α) (h : a::as = b::bs) : a = b :=
by {
injection h
}
theorem test2 {α} (a b : α) (f : αα) (as bs : List α) (h : a::as = b::bs) : f a = f b :=
by {
injection h with h1 h2;
rw [h1]
}
theorem test3 {α} (a b : α) (f : List α → List α) (as bs : List α) (h : (x : List α) → (y : List α) → x = y) : f as = f bs :=
have : a::as = b::bs := h (a::as) (b::bs);
by {
injection this with h1 h2;
rw [h2]
}
theorem test4 {α} (a b : α) (f : List α → List α) (as bs : List α) (h : (x : List α) → (y : List α) → x = y) : f as = f bs :=
by {
injection h (a::as) (b::bs) with h1 h2;
rw [h2]
}
theorem test5 {α} (a : α) (as : List α) (h : a::as = []) : 0 > 1 :=
by {
injection h
}
theorem test6 (n : Nat) (h : n+1 = 0) : 0 > 1 :=
by {
injection h
}
theorem test7 (n m k : Nat) (h : n + 1 = m + 1) : m = k → n = k :=
by {
injection h with h₁;
subst h₁;
intro h₂;
exact h₂
}