fix(tests/lean): adjusts tests

This commit is contained in:
Leonardo de Moura 2015-05-02 13:01:37 -07:00
parent 415ca2b93f
commit efc33a2f1d
3 changed files with 13 additions and 5 deletions

View file

@ -10,7 +10,7 @@ begin
cases h₁, apply rfl
end
theorem congr {A B : Type} (f : A → B) {a₁ a₂ : A} (h : a₁ = a₂) : f a₁ = f a₂ :=
theorem congr2 {A B : Type} (f : A → B) {a₁ a₂ : A} (h : a₁ = a₂) : f a₁ = f a₂ :=
begin
cases h, apply rfl
end

View file

@ -1,5 +1,13 @@
import data.vector
open nat vector
open nat
inductive vector (A : Type) : nat → Type :=
| nil {} : vector A zero
| cons : Π {n}, A → vector A n → vector A (succ n)
open vector
notation a :: b := cons a b
notation `[` l:(foldr `,` (h t, cons h t) nil `]`) := l
example (a b : nat) : succ a = succ b → a + 2 = b + 2 :=
begin
@ -11,7 +19,7 @@ end
example (A : Type) (n : nat) (v w : vector A n) (a : A) (b : A) :
a :: v = b :: w → b = a :=
begin
intro H, injection H with aeqb neqn beqw,
intro H, injection H with neqn aeqb beqw,
rewrite aeqb
end

View file

@ -6,7 +6,7 @@ constant f : A → A → A
theorem tst {a b c : A} (H1 : a = b) (H2 : b = c) : f a b = f b c :=
begin
apply (@congr A A _ _ (f a) (f b)),
apply (@congr A A (f a) (f b)),
assumption,
apply (congr_arg f),
assumption