From: Enrico Tassi Date: Wed, 13 Feb 2008 13:01:15 +0000 (+0000) Subject: added Local pragma, moved leftno and inductive into obj, added relevance attribute... X-Git-Tag: make_still_working~5612 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=660029554586f37c4150b138005656b7bd05e1fb;p=helm.git added Local pragma, moved leftno and inductive into obj, added relevance attribute of parameters --- diff --git a/helm/software/components/ng_kernel/nCic.ml b/helm/software/components/ng_kernel/nCic.ml index 6691acd47..43f6c86d9 100644 --- a/helm/software/components/ng_kernel/nCic.ml +++ b/helm/software/components/ng_kernel/nCic.ml @@ -66,24 +66,27 @@ type substitution = (int * (string option * context * term * term)) list (******************************** OBJECTS **********************************) -type inductiveFun = string * int * term * term +type relevance = bool list (* relevance of arguments for conversion *) + +type inductiveFun = relevance * string * int * term * term (* if coinductive, the int has no meaning and must be set to -1 *) -type constructor = string * term (* id, type *) +type constructor = relevance * string * term (* id, type *) type inductiveType = - string * bool * term * int * (* typename, inductive, arity, leftno *) - constructor list (* constructors *) + relevance * string * term * constructor list + (* relevance, typename, arity, constructors *) type def_flavour = (* presentational *) - [ `Definition | `Fact | `Lemma | `Remark | `Theorem | `Corollary ] + [ `Definition | `Fact | `Lemma | `Theorem | `Corollary | `Example ] type def_pragma = (* pragmatic of the object *) [ `Coercion of int | `Elim of sort (* elimination principle; universe is not relevant *) | `Projection (* record projection *) | `InversionPrinciple (* inversion principle *) - | `Variant ] + | `Variant + | `Local ] (* Local = hidden technicality *) type ind_pragma = (* pragmatic of the object *) [ `Record of (string * bool * int) list ] @@ -98,7 +101,8 @@ type i_attr = generated * ind_pragma (* invariant: metasenv and substitution have disjoint domains *) type obj = - | Constant of NUri.uri * metasenv * substitution * string * term option * term * c_attr + | Constant of NUri.uri * metasenv * substitution * relevance * string * term option * term * c_attr | Fixpoint of NUri.uri * metasenv * substitution * bool * inductiveFun list * f_attr - | Inductive of NUri.uri * metasenv * substitution * inductiveType list * i_attr + | Inductive of NUri.uri * metasenv * substitution * bool * int * inductiveType list * i_attr + (* uri, menv, subst, (co)inductive, leftno, types *)