]> matita.cs.unibo.it Git - helm.git/blob - helm/ocaml/cic_omdoc/content.mli
The Aux argument of conclude is now of type string (used to be int).
[helm.git] / helm / ocaml / cic_omdoc / content.mli
1 (* Copyright (C) 2000, HELM Team.
2  * 
3  * This file is part of HELM, an Hypertextual, Electronic
4  * Library of Mathematics, developed at the Computer Science
5  * Department, University of Bologna, Italy.
6  * 
7  * HELM is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  * 
12  * HELM is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with HELM; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
20  * MA  02111-1307, USA.
21  * 
22  * For details, see the HELM World-Wide-Web page,
23  * http://cs.unibo.it/helm/.
24  *)
25
26 type id = string;;
27 type joint_recursion_kind =
28  [ `Recursive of int list (* decreasing arguments *)
29  | `CoRecursive
30  | `Inductive of int    (* paramsno *)
31  | `CoInductive of int  (* paramsno *)
32  ]
33 ;;
34
35 type var_or_const = Var | Const;;
36
37 type 'term declaration =
38        { dec_name : string option;
39          dec_id : string ;
40          dec_inductive : bool;
41          dec_aref : string;
42          dec_type : 'term 
43        }
44 ;;
45
46 type 'term definition =
47        { def_name : string option;
48          def_id : string ;
49          def_aref : string ;
50          def_term : 'term 
51        }
52 ;;
53
54 type 'term inductive =
55        { inductive_id : string ;
56          inductive_kind : bool;
57          inductive_type : 'term;
58          inductive_constructors : 'term declaration list
59        }
60 ;;
61
62 type 'term decl_context_element = 
63        [ `Declaration of 'term declaration
64        | `Hypothesis of 'term declaration
65        ]
66 ;;
67
68 type ('term,'proof) def_context_element = 
69        [ `Proof of 'proof
70        | `Definition of 'term definition
71        ]
72 ;;
73
74 type ('term,'proof) in_joint_context_element =
75        [ `Inductive of 'term inductive
76        | 'term decl_context_element
77        | ('term,'proof) def_context_element
78        ]
79 ;;
80
81 type ('term,'proof) joint =
82        { joint_id : string ;
83          joint_kind : joint_recursion_kind ;
84          joint_defs : ('term,'proof) in_joint_context_element list
85        }
86 ;;
87
88 type ('term,'proof) joint_context_element = 
89        [ `Joint of ('term,'proof) joint ]
90 ;;
91
92 type 'term proof = 
93       { proof_name : string option;
94         proof_id   : string ;
95         proof_context : 'term in_proof_context_element list ;
96         proof_apply_context: 'term proof list;
97         proof_conclude : 'term conclude_item
98       }
99
100 and 'term in_proof_context_element =
101        [ 'term decl_context_element
102        | ('term,'term proof) def_context_element
103        | ('term,'term proof) joint_context_element
104        ]
105
106 and 'term conclude_item =
107        { conclude_id :string; 
108          conclude_aref : string;
109          conclude_method : string;
110          conclude_args : ('term arg) list ;
111          conclude_conclusion : 'term option 
112        }
113
114 and 'term arg =
115          Aux of string
116        | Premise of premise
117        | Term of 'term
118        | ArgProof of 'term proof
119        | ArgMethod of string (* ???? *)
120
121 and premise =
122        { premise_id: string;
123          premise_xref : string ;
124          premise_binder : string option;
125          premise_n : int option;
126        }
127 ;;
128  
129 type 'term conjecture = id * int * 'term context * 'term
130
131 and 'term context = 'term hypothesis list
132
133 and 'term hypothesis =
134  id *
135  ['term decl_context_element | ('term,'term proof) def_context_element ] option
136 ;;
137
138 type 'term in_object_context_element =
139        [ `Decl of var_or_const * 'term decl_context_element
140        | `Def of var_or_const * 'term * ('term,'term proof) def_context_element
141        | ('term,'term proof) joint_context_element
142        ]
143 ;;
144
145 type 'term cobj  = 
146         id *                            (* id *)
147         UriManager.uri list *           (* params *)
148         'term conjecture list option *  (* optional metasenv *) 
149         'term in_object_context_element (* actual object *)
150 ;;