|
Require Import List.
|
|
Import ListNotations.
|
|
|
|
Definition vector A n := {xs : list A | length xs = n}.
|
|
|
|
Example list1 : list nat := [1;2].
|
|
Compute {list1 | length list1 = 2}.
|
|
Compute {list1 | length list1 = 2} : vector nat 2.
|
|
|
|
Compute [1;2] : vector nat 2.
|