]> matita.cs.unibo.it Git - helm.git/blob - helm/software/helena/src/text/txt.ml
0633d39a9116268e9828a26a3a8e18a614feebaf
[helm.git] / helm / software / helena / src / text / txt.ml
1 (*
2     ||M||  This file is part of HELM, an Hypertextual, Electronic        
3     ||A||  Library of Mathematics, developed at the Computer Science     
4     ||T||  Department, University of Bologna, Italy.                     
5     ||I||                                                                
6     ||T||  HELM is free software; you can redistribute it and/or         
7     ||A||  modify it under the terms of the GNU General Public License   
8     \   /  version 2 or (at your option) any later version.              
9      \ /   This software is distributed as is, NO WARRANTY.              
10       V_______________________________________________________________ *)
11
12 module N = Layer
13
14 type ix = int (* index *)
15
16 type id = string (* identifier *)
17
18 type info = string * string (* language, text *)
19
20 type kind = Decl (* generic declaration *) 
21           | Ax   (* axiom               *)
22           | Cong (* conjecture          *)
23           | Def  (* generic definition  *)
24           | Th   (* theorem             *)
25
26 type bind = 
27 (* name, real?, domain *)
28           | Abst of (id * bool * term) list 
29 (* name, bodies *)
30           | Abbr of (id * term) list                  
31 (* names *)
32           | Void of id list
33
34 and term =
35 (* level *)
36          | Sort of ix
37 (* named level *)
38          | NSrt of id
39 (* index, offset *)
40          | LRef of ix * ix
41 (* name *)
42          | NRef of id
43 (* domain, element *)
44          | Cast of term * term
45 (* arguments, function *)
46          | Appl of term list * term
47 (* level, binder, scope *)
48          | Bind of N.layer * bind * term
49 (* function, arguments *)
50          | Inst of term * term list
51 (* level, strong?, label, source, target *)
52          | Impl of N.layer * bool * id * term * term
53
54 type command =
55 (* required files: names *)
56              | Require of id list
57 (* hierarchy graph: name *)
58              | Graph of id
59 (* sorts: index, name *)
60              | Sorts of (int option * id) list
61 (* section: Some id = open, None = close last *)
62              | Section of id option
63 (* entity: main?, class, name, info, contents *)
64              | Entity of bool * kind * N.layer * id * info * term
65 (* predefined generated entity: arguments *)
66              | Generate of term list