Skip to content

Instantly share code, notes, and snippets.

@wilcoxjay
Created August 9, 2016 21:49
Show Gist options
  • Save wilcoxjay/8da3c8efda40be5183567cb337033542 to your computer and use it in GitHub Desktop.
Save wilcoxjay/8da3c8efda40be5183567cb337033542 to your computer and use it in GitHub Desktop.
Require Vector.
Module Type NAT.
Parameter n : nat.
End NAT.
Module A (N : NAT).
Definition t : Type := Vector.t unit N.n.
End A.
Module B (N : NAT).
Module Import AN := A N.
Definition x : AN.t := Vector.const tt N.n.
End B.
Module C (N : NAT).
Module Import AN := A N.
Definition f : AN.t -> AN.t := Vector.map (fun x => x).
End C.
Module D (N : NAT).
Module Import AN := A N.
Module Import BN := B N.
Module Import CN := C N.
Check f x.
End D.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment