fix(tests/lean): adjust some tests to changes in the standard library

This commit is contained in:
Leonardo de Moura 2015-10-13 16:28:11 -07:00
parent b777375469
commit 29763190ad
15 changed files with 31 additions and 34 deletions

View file

@ -1,5 +1,5 @@
definition pnat.pnat : Type₁ := definition pnat.pnat : Type₁ :=
{n : | nat.gt n (nat.of_num 0)} {n : | n > 0}
inductive prod : Type → Type → Type inductive prod : Type → Type → Type
constructors: constructors:
prod.mk : Π {A : Type} {B : Type}, A → B → A × B prod.mk : Π {A : Type} {B : Type}, A → B → A × B

View file

@ -1,4 +1,4 @@
open nat nat_esimp open nat
definition foo [unfold 1 3] (a : nat) (b : nat) (c :nat) : nat := definition foo [unfold 1 3] (a : nat) (b : nat) (c :nat) : nat :=
(a + c) * b (a + c) * b

View file

@ -1,7 +1,7 @@
693.lean:10:2: proof state 693.lean:10:2: proof state
c : , c : ,
h : c = 1 h : c = 1
1 * c = 1 foo 1 c 0 = foo 1 1 0
693.lean:18:2: proof state 693.lean:18:2: proof state
b c : , b c : ,
h : c = 1 h : c = 1
@ -13,4 +13,4 @@ h : c = 1
693.lean:34:2: proof state 693.lean:34:2: proof state
b c : , b c : ,
h : c = 1 h : c = 1
2 * c = foo c 1 1 foo 1 c 1 = foo c 1 1

View file

@ -1 +1,3 @@
check 1.2 import data.rat
open rat
check (1.2:rat)

View file

@ -1 +1 @@
793b.lean:1:6: error: invalid decimal number, environment does not contain 'rat.of_num' (solution: use 'import data.rat') 6 / 5 :

View file

@ -11,7 +11,7 @@ theorem pred_succ (n : Nat) : pred (succ n) = n := rfl
theorem succ.inj {n m : Nat} (H : succ n = succ m) : n = m theorem succ.inj {n m : Nat} (H : succ n = succ m) : n = m
:= calc := calc
n = pred (succ n) : pred_succ n⁻¹ n = pred (succ n) : pred_succ n
... = pred (succ m) : {H} ... = pred (succ m) : {H}
... = m : pred_succ m ... = m : pred_succ m

View file

@ -12,8 +12,8 @@ set_option pp.abbreviations true
print definition tst print definition tst
abbreviation id [parsing-only] {A : Type} (a : A) := a abbreviation id [parsing_only] {A : Type} (a : A) := a
definition tst1 := id 10 definition tst1 :nat := id 10
print definition tst1 print definition tst1

View file

@ -2,5 +2,5 @@ definition tst :
(λ (a : Type₁), 2 + 3) (λ (a : Type₁), 2 + 3)
definition tst : definition tst :
foo foo
definition tst1 : num definition tst1 :
(λ (A : Type₁) (a : A), a) num 10 (λ (A : Type₁) (a : A), a) 10

View file

@ -9,4 +9,4 @@ definition Functor.to_fun [coercion] (f : Functor) {A B : Type} : A → B :=
Functor.rec (λ f, f) f A B Functor.rec (λ f, f) f A B
constant f : Functor constant f : Functor
check f 0 = 0 check f (0:num) = (0:num)

View file

@ -1,11 +1,6 @@
error_full_names.lean:4:8: error: type mismatch at application error_full_names.lean:4:8: error: failed to synthesize placeholder
0 + nat.zero
term ⊢ has_add nat
nat.zero
has type
nat
but is expected to have type
error_full_names.lean:8:6: error: type mismatch at application error_full_names.lean:8:6: error: type mismatch at application
nat.succ nat.zero nat.succ nat.zero
term term

View file

@ -1,4 +1,4 @@
eval nat.add (nat.of_num 3) (nat.of_num 6) eval nat.add (nat.of_num 3) (nat.of_num 6)
open nat open nat
eval nat.add (nat.of_num 3) (nat.of_num 6) eval nat.add (nat.of_num 3) (nat.of_num 6)
eval 3 + 6 eval (3:nat) + 6

View file

@ -17,9 +17,9 @@ infixr `&` := h
set_option pp.notation false set_option pp.notation false
check -1 + 2 check -(1:num) + 2
check 1 & 2 & 3 & 4 check 1 & 2 & 3 & 4
check 1 - 2 - 3 - 4 check (1:num) - 2 - 3 - 4
infixr `~~`:60 := h infixr `~~`:60 := h
infixl `!!`:60 := h infixl `!!`:60 := h

View file

@ -1,6 +1,6 @@
g (f 1) 2 : num add (f 1) 2 : num
h 1 (h 2 (h 3 4)) : num
sub (sub (sub 1 2) 3) 4 : num
h 1 (h 2 (h 3 4)) : num h 1 (h 2 (h 3 4)) : num
h (h (h 1 2) 3) 4 : num h (h (h 1 2) 3) 4 : num
h 1 (h 2 (h 3 4)) : num h 1 (h (add 2 3) 4) : num
h (h (h 1 2) 3) 4 : num
h 1 (h (g 2 3) 4) : num

View file

@ -1,18 +1,18 @@
simplification rules for iff simplification rules for iff
#2, ?M_1 - ?M_2 < succ ?M_1 ↦ true
#1, ?M_1 < 0 ↦ false
#1, ?M_1 < succ ?M_1 ↦ true
#1, ?M_1 < ?M_1 ↦ false
#1, 0 < succ ?M_1 ↦ true
#2, ?M_1 - ?M_2 ≤ ?M_1 ↦ true #2, ?M_1 - ?M_2 ≤ ?M_1 ↦ true
#1, 0 ≤ ?M_1 ↦ true #1, 0 ≤ ?M_1 ↦ true
#1, succ ?M_1 ≤ ?M_1 ↦ false #1, succ ?M_1 ≤ ?M_1 ↦ false
#1, pred ?M_1 ≤ ?M_1 ↦ true #1, pred ?M_1 ≤ ?M_1 ↦ true
#1, ?M_1 ≤ succ ?M_1 ↦ true #1, ?M_1 ≤ succ ?M_1 ↦ true
#2, ?M_1 - ?M_2 < succ ?M_1 ↦ true
#1, ?M_1 < 0 ↦ false
#1, ?M_1 < succ ?M_1 ↦ true
#1, ?M_1 < ?M_1 ↦ false
#1, 0 < succ ?M_1 ↦ true
simplification rules for eq simplification rules for eq
#1, g ?M_1 ↦ f ?M_1 + 1 #1, g ?M_1 ↦ f ?M_1 + 1
#2, g ?M_1 ↦ 1 #2, g ?M_1 ↦ 1
#2, f ?M_1 ↦ 0 #2, f ?M_1 ↦ 0
#4, ite ?M_1 ?M_4 ?M_4 ↦ ?M_4
#1, 0 - ?M_1 ↦ 0 #1, 0 - ?M_1 ↦ 0
#2, succ ?M_1 - succ ?M_2 ↦ ?M_1 - ?M_2 #2, succ ?M_1 - succ ?M_2 ↦ ?M_1 - ?M_2
#4, ite ?M_1 ?M_4 ?M_4 ↦ ?M_4

View file

@ -6,4 +6,4 @@ constant f (a b : nat) (H : R a b) : nat
axiom Rtrue (a b : nat) : R a b axiom Rtrue (a b : nat) : R a b
check f 1 0 (Rtrue (pr1 (pair 1 0)) 0) check f 1 0 (Rtrue (pr1 (pair 1 (0:nat))) 0)