aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/modules/Nametab.v
blob: 9773bc6f4e21019afd9867b2173fc53b283ade42 (plain)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
Module Q.
Module N.
Module K.
Definition id:=Set.
End K.
End N.
End Q.

Locate id.
Locate K.id.
Locate N.K.id.
Locate Q.N.K.id.
Locate Top.Q.N.K.id.
Locate K.
Locate N.K.
Locate Q.N.K.
Locate Top.Q.N.K.
Locate N.
Locate Q.N.
Locate Top.Q.N.
Locate Q.
Locate Top.Q.


Module Type SIG.
End SIG.

Module Type FSIG[X:SIG].
End FSIG.

Module F[X:SIG].
End F.

(*
#trace Nametab.push;;
#trace Nametab.push_short_name;;
#trace Nametab.freeze;;
#trace Nametab.unfreeze;;
#trace Nametab.exists_cci;;
*)

Module M.
Reset M.
Module M[X:SIG].
Reset M.
Module M[X,Y:SIG].
Reset M.
Module M[X:SIG;Y:SIG].
Reset M.
Module M[X,Y:SIG;Z1,Z:SIG].
Reset M.
Module M[X:SIG][Y:SIG].
Reset M.
Module M[X,Y:SIG][Z1,Z:SIG].
Reset M.
Module M:SIG.
Reset M.
Module M[X:SIG]:SIG.
Reset M.
Module M[X,Y:SIG]:SIG.
Reset M.
Module M[X:SIG;Y:SIG]:SIG.
Reset M.
Module M[X,Y:SIG;Z1,Z:SIG]:SIG.
Reset M.
Module M[X:SIG][Y:SIG]:SIG.
Reset M.
Module M[X,Y:SIG][Z1,Z:SIG]:SIG.
Reset M.
Module M:=(F Q).
Reset M.
Module M[X:FSIG]:=(X Q).
Reset M.
Module M[X,Y:FSIG]:=(X Q).
Reset M.
Module M[X:FSIG;Y:SIG]:=(X Y).
Reset M.
Module M[X,Y:FSIG;Z1,Z:SIG]:=(X Z).
Reset M.
Module M[X:FSIG][Y:SIG]:=(X Y).
Reset M.
Module M[X,Y:FSIG][Z1,Z:SIG]:=(X Z).
Reset M.
Module M:SIG:=(F Q).
Reset M.
Module M[X:FSIG]:SIG:=(X Q).
Reset M.
Module M[X,Y:FSIG]:SIG:=(X Q).
Reset M.
Module M[X:FSIG;Y:SIG]:SIG:=(X Y).
Reset M.
Module M[X,Y:FSIG;Z1,Z:SIG]:SIG:=(X Z).
Reset M.
Module M[X:FSIG][Y:SIG]:SIG:=(X Y).
Reset M.
Module M[X,Y:FSIG][Z1,Z:SIG]:SIG:=(X Z).
Reset M.


Module Type ELEM.
  Parameter A:Set.
  Parameter x:A.
End ELEM.

Module Nat.
    Definition A:=nat.
    Definition x:=O.
End Nat. 

Module List[X:ELEM].
  Inductive list : Set := nil : list 
		       | cons : X.A -> list -> list.
 
  Definition head := 
     [l:list]Cases l of 
	  nil => X.x 
	| (cons x _) => x
     end.

  Definition singl := [x:X.A] (cons x nil).
  
  Lemma head_singl : (x:X.A)(head (singl x))=x.
  Auto.
  Qed.

End List.

Module N:=(List Nat).