playground/coq/unfinished/vectoranother.v

11 lines
254 B
Coq

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.