test(tests/lean): remove data.nat dependency
This commit is contained in:
parent
6ad091d7bf
commit
2be83fbff7
19 changed files with 20 additions and 26 deletions
|
@ -1,4 +1,3 @@
|
||||||
import data.nat.basic
|
|
||||||
open nat
|
open nat
|
||||||
|
|
||||||
constant list.{l} : Type.{l} → Type.{l}
|
constant list.{l} : Type.{l} → Type.{l}
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
bad_coercions.lean:13:18: error: invalid '[coercion]' modifier, coercions cannot be defined in contexts
|
bad_coercions.lean:12:18: error: invalid '[coercion]' modifier, coercions cannot be defined in contexts
|
||||||
bad_coercions.lean:19:11: error: invalid 'coercion' command, coercions cannot be defined in contexts
|
bad_coercions.lean:18:11: error: invalid 'coercion' command, coercions cannot be defined in contexts
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import logic data.nat.basic
|
import logic
|
||||||
open nat
|
open nat
|
||||||
|
|
||||||
section
|
section
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import data.nat.basic
|
|
||||||
namespace foo
|
namespace foo
|
||||||
open nat
|
open nat
|
||||||
inductive nat : Type := zero, foosucc : nat → nat
|
inductive nat : Type := zero, foosucc : nat → nat
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error_full_names.lean:5:8: error: type mismatch at application
|
error_full_names.lean:4:8: error: type mismatch at application
|
||||||
0 + nat.zero
|
0 + nat.zero
|
||||||
term
|
term
|
||||||
nat.zero
|
nat.zero
|
||||||
|
@ -6,7 +6,7 @@ has type
|
||||||
nat
|
nat
|
||||||
but is expected to have type
|
but is expected to have type
|
||||||
ℕ
|
ℕ
|
||||||
error_full_names.lean:9: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
|
||||||
nat.zero
|
nat.zero
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import data.list
|
inductive list (T : Type) : Type := nil {} : list T, cons : T → list T → list T
|
||||||
|
|
||||||
namespace explicit
|
namespace explicit
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import logic data.nat.basic
|
import logic
|
||||||
open nat
|
open nat
|
||||||
|
|
||||||
inductive vec (A : Type) : nat → Type :=
|
inductive vec (A : Type) : nat → Type :=
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import data.nat.basic
|
|
||||||
|
|
||||||
namespace playground
|
namespace playground
|
||||||
namespace nat
|
namespace nat
|
||||||
check 2+3 -- Should produce error
|
check 2+3 -- Should produce error
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
namespace_bug.lean:5:7: error: invalid expression
|
namespace_bug.lean:3:7: error: invalid expression
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import logic data.nat.basic
|
import logic
|
||||||
open nat
|
open nat
|
||||||
|
|
||||||
inductive vector (A : Type) : nat → Type :=
|
inductive vector (A : Type) : nat → Type :=
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import logic data.num data.nat.basic
|
import logic data.num
|
||||||
open num
|
open num
|
||||||
constant b : num
|
constant b : num
|
||||||
check b + b + b
|
check b + b + b
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import data.list data.num
|
import data.num
|
||||||
open list
|
inductive list (T : Type) : Type := nil {} : list T, cons : T → list T → list T open list notation h :: t := cons h t notation `[` l:(foldr `,` (h t, cons h t) nil) `]` := l
|
||||||
infixr `::` := cons
|
infixr `::` := cons
|
||||||
check 1 :: 2 :: nil
|
check 1 :: 2 :: nil
|
||||||
check 1 :: 2 :: 3 :: 4 :: 5 :: nil
|
check 1 :: 2 :: 3 :: 4 :: 5 :: nil
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import data.prod data.list data.num
|
import data.prod data.num
|
||||||
open list prod num
|
inductive list (T : Type) : Type := nil {} : list T, cons : T → list T → list T open list notation h :: t := cons h t notation `[` l:(foldr `,` (h t, cons h t) nil) `]` := l
|
||||||
|
open prod num
|
||||||
constants a b : num
|
constants a b : num
|
||||||
check [a, b, b]
|
check [a, b, b]
|
||||||
check (a, true, a = b, b)
|
check (a, true, a = b, b)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import logic data.sigma data.list
|
import logic data.sigma
|
||||||
open sigma
|
open sigma
|
||||||
|
inductive list (T : Type) : Type := nil {} : list T, cons : T → list T → list T open list notation h :: t := cons h t notation `[` l:(foldr `,` (h t, cons h t) nil) `]` := l
|
||||||
check ∃ (A : Type₁) (x y : A), x = y
|
check ∃ (A : Type₁) (x y : A), x = y
|
||||||
check ∃ (x : num), x = 0
|
check ∃ (x : num), x = 0
|
||||||
check Σ (x : num), x = 10
|
check Σ (x : num), x = 10
|
||||||
|
|
|
@ -1,3 +1 @@
|
||||||
import data.nat.basic
|
|
||||||
|
|
||||||
print axioms
|
print axioms
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import logic data.nat.basic
|
import logic
|
||||||
|
|
||||||
inductive vector (T : Type) : nat → Type :=
|
inductive vector (T : Type) : nat → Type :=
|
||||||
nil {} : vector T nat.zero,
|
nil {} : vector T nat.zero,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import data.nat.basic data.prod
|
import data.prod
|
||||||
open nat prod
|
open nat prod
|
||||||
|
|
||||||
set_option pp.universes true
|
set_option pp.universes true
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import data.nat.basic data.prod
|
import data.prod
|
||||||
open nat prod
|
open nat prod
|
||||||
|
|
||||||
constant R : nat → nat → Prop
|
constant R : nat → nat → Prop
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import data.nat.basic
|
|
||||||
open nat
|
open nat
|
||||||
|
|
||||||
eval [whnf] (fun x, x + 1) 2
|
eval [whnf] (fun x, x + 1) 2
|
||||||
|
|
Loading…
Reference in a new issue