From ccba6c718af6a5a15f278fc9365b6ad27108e98f Mon Sep 17 00:00:00 2001 From: letouzey Date: Thu, 29 Apr 2010 16:06:42 +0000 Subject: Various minor improvements of comments in mli for ocamldoc git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12976 85f007b7-540e-0410-9357-904b9bb8a0f7 --- kernel/esubst.mli | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) (limited to 'kernel/esubst.mli') diff --git a/kernel/esubst.mli b/kernel/esubst.mli index fd7753093..dd7096c4b 100644 --- a/kernel/esubst.mli +++ b/kernel/esubst.mli @@ -6,13 +6,15 @@ * GNU Lesser General Public License Version 2.1 ***********************************************************************) -(** {6 Sect } *) +(** Explicit substitutions *) + +(** {6 Explicit substitutions } *) (** Explicit substitutions of type ['a]. - ESID(n) = %n END bounded identity - * - CONS([|t1..tn|],S) = (S.t1...tn) parallel substitution - * (beware of the order: indice 1 is substituted by tn) - * - SHIFT(n,S) = (^n o S) terms in S are relocated with n vars - * - LIFT(n,S) = (%n S) stands for ((^n o S).n...1) + - CONS([|t1..tn|],S) = (S.t1...tn) parallel substitution + (beware of the order: indice 1 is substituted by tn) + - SHIFT(n,S) = (^n o S) terms in S are relocated with n vars + - LIFT(n,S) = (%n S) stands for ((^n o S).n...1) (corresponds to S crossing n binders) *) type 'a subs = | ESID of int @@ -30,28 +32,28 @@ val subs_liftn: int -> 'a subs -> 'a subs val subs_shift_cons: int * 'a subs * 'a array -> 'a subs (** [expand_rel k subs] expands de Bruijn [k] in the explicit substitution - * [subs]. The result is either (Inl(lams,v)) when the variable is - * substituted by value [v] under lams binders (i.e. v *has* to be - * shifted by lams), or (Inr (k',p)) when the variable k is just relocated - * as k'; p is None if the variable points inside subs and Some(k) if the - * variable points k bindings beyond subs (cf argument of ESID). - *) + [subs]. The result is either (Inl(lams,v)) when the variable is + substituted by value [v] under lams binders (i.e. v *has* to be + shifted by lams), or (Inr (k',p)) when the variable k is just relocated + as k'; p is None if the variable points inside subs and Some(k) if the + variable points k bindings beyond subs (cf argument of ESID). +*) val expand_rel: int -> 'a subs -> (int * 'a, int * int option) Util.union (** Tests whether a substitution behaves like the identity *) val is_subs_id: 'a subs -> bool (** Composition of substitutions: [comp mk_clos s1 s2] computes a - * substitution equivalent to applying s2 then s1. Argument - * mk_clos is used when a closure has to be created, i.e. when - * s1 is applied on an element of s2. - *) + substitution equivalent to applying s2 then s1. Argument + mk_clos is used when a closure has to be created, i.e. when + s1 is applied on an element of s2. +*) val comp : ('a subs * 'a -> 'a) -> 'a subs -> 'a subs -> 'a subs -(** {6 Sect } *) -(** Compact representation of explicit relocations. \\ - [ELSHFT(l,n)] == lift of [n], then apply [lift l]. - [ELLFT(n,l)] == apply [l] to de Bruijn > [n] i.e under n binders. *) +(** {6 Compact representation } *) +(** Compact representation of explicit relocations + - [ELSHFT(l,n)] == lift of [n], then apply [lift l]. + - [ELLFT(n,l)] == apply [l] to de Bruijn > [n] i.e under n binders. *) type lift = | ELID | ELSHFT of lift * int -- cgit v1.2.3