Skip to content

Instantly share code, notes, and snippets.

@artagnon

artagnon/ncat.v Secret

Created January 4, 2020 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save artagnon/18c5b8ef22704ef5e92a2111da627692 to your computer and use it in GitHub Desktop.
Save artagnon/18c5b8ef22704ef5e92a2111da627692 to your computer and use it in GitHub Desktop.
Set Universe Polymorphism.
Notation "( a ; b )" := (existT _ a b) (at level 0).
Notation "'dfst' a" := (projT1 a) (at level 10).
Notation "'dsnd' a" := (projT2 a) (at level 10).
Record NCat :=
mkNCat {
Arity : Type;
Sign : Arity -> Type
}.
Fixpoint CatOp n : NCat :=
match n with
| O => {| Arity := unit ; Sign := (fun _ => unit) |}
| S n' => {| Arity := { A: (CatOp n').(Arity) &
(CatOp n').(Sign) A -> Type };
Sign := (fun '(A ; M) =>
{ s: (CatOp n').(Sign) A & (M s * M s)%type }) |}
end.
Reserved Notation "f ∘ g" (at level 55).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment