File: NumberNotationsUnivPoly.v

package info (click to toggle)
coq 8.20.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 44,116 kB
  • sloc: ml: 234,160; sh: 4,301; python: 3,270; ansic: 2,644; makefile: 882; lisp: 172; javascript: 63; xml: 24; sed: 2
file content (21 lines) | stat: -rw-r--r-- 430 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Set Universe Polymorphism.
Axiom A : Type.

Inductive B : A -> Type :=
| x {a} : B a
| y {a} : B a -> B a
.

Number Notation B Nat.of_num_uint Nat.to_num_uint
  (via nat mapping [[x] => O, [y] => S]) : nat_scope.

Check 0.
Check 1.
Check 2.

(* check it generates independent univs *)
Definition foo@{v v' | v <= prod.u0, v' <= prod.u1} :=
  fun (v:A@{v}) (v':A@{v'}) => (x : B v, y x : B v').

Set Printing Universes.
Print foo.