1 (* Copyright (C) 2000, HELM Team.
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.
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.
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.
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,
22 * For details, see the HELM World-Wide-Web page,
23 * http://cs.unibo.it/helm/.
26 (**************************************************************************)
30 (* Andrea Asperti <asperti@cs.unibo.it> *)
33 (**************************************************************************)
38 type joint_recursion_kind =
39 [ `Recursive of int list
41 | `Inductive of int (* paramsno *)
42 | `CoInductive of int (* paramsno *)
46 type var_or_const = Var | Const;;
48 type 'term declaration =
49 { dec_name : string option;
57 type 'term definition =
58 { def_name : string option;
66 type 'term inductive =
68 inductive_name : string;
69 inductive_kind : bool;
70 inductive_type : 'term;
71 inductive_constructors : 'term declaration list
75 type 'term decl_context_element =
76 [ `Declaration of 'term declaration
77 | `Hypothesis of 'term declaration
81 type ('term,'proof) def_context_element =
83 | `Definition of 'term definition
87 type ('term,'proof) in_joint_context_element =
88 [ `Inductive of 'term inductive
89 | 'term decl_context_element
90 | ('term,'proof) def_context_element
94 type ('term,'proof) joint =
96 joint_kind : joint_recursion_kind ;
97 joint_defs : ('term,'proof) in_joint_context_element list
101 type ('term,'proof) joint_context_element =
102 [ `Joint of ('term,'proof) joint ]
106 { proof_name : string option;
108 proof_context : 'term in_proof_context_element list ;
109 proof_apply_context: 'term proof list;
110 proof_conclude : 'term conclude_item
113 and 'term in_proof_context_element =
114 [ 'term decl_context_element
115 | ('term,'term proof) def_context_element
116 | ('term,'term proof) joint_context_element
119 and 'term conclude_item =
121 conclude_aref : string;
122 conclude_method : string;
123 conclude_args : ('term arg) list ;
124 conclude_conclusion : 'term option
131 | Term of bool * 'term
132 | ArgProof of 'term proof
133 | ArgMethod of string (* ???? *)
137 premise_xref : string ;
138 premise_binder : string option;
139 premise_n : int option;
150 type 'term conjecture = id * int * 'term context * 'term
152 and 'term context = 'term hypothesis list
154 and 'term hypothesis =
155 ['term decl_context_element | ('term,'term proof) def_context_element ] option
158 type 'term in_object_context_element =
159 [ `Decl of var_or_const * 'term decl_context_element
160 | `Def of var_or_const * 'term * ('term,'term proof) def_context_element
161 | ('term,'term proof) joint_context_element
167 UriManager.uri list * (* params *)
168 'term conjecture list option * (* optional metasenv *)
169 'term in_object_context_element (* actual object *)