fix(tests/lean): adjust tests

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2013-10-24 15:42:17 -07:00
parent a7f94b55db
commit d2f9c24d3c
6 changed files with 16 additions and 29 deletions

View file

@ -262,7 +262,7 @@ class elaborator::imp {
unsigned i = types.size();
while (i > 0) {
--i;
r = mk_lambda(name(g_x_name, i), types[i], r);
r = mk_lambda(i == 0 ? g_x_name : name(g_x_name, i), types[i], r);
}
return r;
}

View file

@ -9,4 +9,4 @@ Theorem R2 (A A' B B' : Type) (H : A → B = A' → B') (a : A) : B = B' := R A
Proved: R4
Proved: R5
Theorem R5 (A1 A2 B1 B2 : Type) (H : A1 → B1 = A2 → B2) (a : A1) : B1 = B2 :=
R A1 A2 (λ a : A1, B1) (λ _ : A2, B2) H a
R A1 A2 (λ x : A1, B1) (λ x : A2, B2) H a

View file

@ -5,4 +5,4 @@
Assumed: R
Proved: R2
Theorem R2 (A1 A2 B1 B2 : Type) (H : A1 → B1 = A2 → B2) (a : A1) : B1 = B2 :=
R A1 A2 (λ a : A1, B1) (λ _ : A2, B2) H a
R A1 A2 (λ x : A1, B1) (λ x : A2, B2) H a

View file

@ -9,22 +9,8 @@
Set: lean::pp::coercion
∀ a b : , (g a (int_to_real (f a b))) > (nat_to_int 0)
λ a : , a + 1
Error (line: 10, pos: 18) ambiguous overloads
Candidates:
Real::add :
Int::add :
Nat::add :
Arguments:
a : ?M0[lift:0:2]
b : ?M2[lift:0:1]
λ a b : , a + b
λ a b c : , a + c + b
Error (line: 17, pos: 19) ambiguous overloads
Candidates:
Real::add :
Int::add :
Nat::add :
Arguments:
a : ?M0[lift:0:2]
b : ?M2[lift:0:1]
(λ a b : , a + b) 10 20
Assumed: x
λ a b : , a + x + b

View file

@ -21,11 +21,12 @@ f::explicit N n1 n2
Proved: Pr
Axiom H1 : a = b ∧ b = c
Theorem Pr : (g a) = (g c) :=
let κ::1 := Trans::explicit
N
a
b
c
(Conjunct1::explicit (a = b) (b = c) H1)
(Conjunct2::explicit (a = b) (b = c) H1)
in Congr::explicit N (λ x : N, N) g g a c (Refl::explicit (N → N) g) κ::1
Congr::explicit
N
(λ x : N, N)
g
g
a
c
(Refl::explicit (N → N) g)
(Trans::explicit N a b c (Conjunct1::explicit (a = b) (b = c) H1) (Conjunct2::explicit (a = b) (b = c) H1))

View file

@ -5,9 +5,9 @@
Assumed: g
Assumed: a
Error (line: 5, pos: 6) type mismatch at application
g (f _ a a)
g (f ?M3::0 a a)
Function type:
N → N → Bool
Arguments types:
: Bool
f _ a a : ?M0
f ?M3::0 a a : ?M3::0