test(tests/lean): add another sigma-type test
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
9dc86e3cf5
commit
96c9c7505a
2 changed files with 19 additions and 0 deletions
9
tests/lean/sig5.lean
Normal file
9
tests/lean/sig5.lean
Normal 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)
|
10
tests/lean/sig5.lean.expected.out
Normal file
10
tests/lean/sig5.lean.expected.out
Normal 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
|
Loading…
Reference in a new issue