-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInductive.v
58 lines (40 loc) · 1.14 KB
/
Inductive.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Fail Inductive list' (A:Set) : Set :=
| nil' : list' A
| cons' : A -> list' A -> list' (A*A).
(* Check printing of let-ins *)
Inductive foo (A : Type) (x : A) (y := x) := Foo.
Print foo.
(* Check where clause *)
Reserved Notation "x ** y" (at level 40, left associativity).
Inductive myprod A B :=
mypair : A -> B -> A ** B
where "A ** B" := (myprod A B) (only parsing).
Check unit ** bool.
(* "option is template" *)
About option.
Set Printing Universes.
About option.
(* "option is template on xxx" *)
Module DiffParams.
Fail Inductive B: Type :=
| F: A -> B with
Inductive A: Type := mkA.
Fail Inductive B := { x : nat } with
Inductive A := { y : nat }.
End DiffParams.
(* print squash info
(can't test impredicative set squashes in this file) *)
About or.
Inductive sunit : SProp := stt.
About sunit.
Set Universe Polymorphism.
Polymorphic Inductive sempty@{q| |} : Type@{q|Set} := .
About sempty.
Polymorphic Inductive ssig@{q1 q2 q3|a b|}
(A:Type@{q1|a})
(B:A -> Type@{q2|b})
: Type@{q3|max(a,b)}
:= sexist (a:A) (b:B a).
About ssig.
Polymorphic Inductive BoxP@{q|a|} (A:Type@{q|a}) : Prop := boxP (_:A).
About BoxP.