lean4-htt/tests/lean/run/inj1.lean
2020-03-08 17:45:58 -07:00

36 lines
805 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.

new_frontend
theorem test1 {α} (a b : α) (as bs : List α) (h : a::as = b::bs) : a = b :=
begin
injection h;
assumption;
end
theorem test2 {α} (a b : α) (as bs : List α) (h : a::as = b::bs) : a = b :=
begin
injection h with h1 h2;
exact h1
end
theorem test3 {α} (a b : α) (as bs : List α) (h : (x : List α) → (y : List α) → x = y) : as = bs :=
have a::as = b::bs from h (a::as) (b::bs);
begin
injection this with h1 h2;
exact h2
end
theorem test4 {α} (a b : α) (as bs : List α) (h : (x : List α) → (y : List α) → x = y) : as = bs :=
begin
injection h (a::as) (b::bs) with h1 h2;
exact h2
end
theorem test5 {α} (a : α) (as : List α) (h : a::as = []) : 0 > 1 :=
begin
injection h
end
theorem test6 (n : Nat) (h : n+1 = 0) : 0 > 1 :=
begin
injection h
end