test(tests/lean): add another sigma-type test

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-02-04 10:12:39 -08:00
parent 9dc86e3cf5
commit 96c9c7505a
2 changed files with 19 additions and 0 deletions

9
tests/lean/sig5.lean Normal file
View file

@ -0,0 +1,9 @@
variable vec : Nat → Type
definition vec_with_len := sig len, vec len
variable n : Nat
variable v : vec n
check tuple n, v
check (have vec_with_len : tuple n, v)
check (let v2 : vec_with_len := tuple n, v
in v2)
check (tuple vec_with_len : n, v)

View file

@ -0,0 +1,10 @@
Set: pp::colors
Set: pp::unicode
Assumed: vec
Defined: vec_with_len
Assumed: n
Assumed: v
tuple n, v : vec n
let have_expr : vec_with_len := tuple (sig x : , vec x) : n, v in have_expr : vec_with_len
let v2 : vec_with_len := tuple (sig x : , vec x) : n, v in v2 : vec_with_len
tuple vec_with_len : n, v : sig len : , vec len