From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id E559FBC69 for ; Fri, 16 Nov 2007 10:48:59 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAB72PEfAXQImh2dsb2JhbACPCwEBAQgKKQ X-IronPort-AV: E=Sophos;i="4.21,425,1188770400"; d="scan'208";a="4320455" Received: from discorde.inria.fr ([192.93.2.38]) by mail2-smtp-roc.national.inria.fr with ESMTP; 16 Nov 2007 10:48:59 +0100 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id lAG9mobx031351 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 16 Nov 2007 10:48:59 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAANL2PEfBvsFJn2dsb2JhbACPCwEBAQEHBAYJIA X-IronPort-AV: E=Sophos;i="4.21,425,1188770400"; d="scan'208";a="4561726" Received: from hedwig2.umh.ac.be (HELO hedwig1.umh.ac.be) ([193.190.193.73]) by mail1-smtp-roc.national.inria.fr with ESMTP; 16 Nov 2007 10:48:59 +0100 Received: from poincare.swapping.umh.ac.be ([10.102.100.12]) by hedwig1.umh.ac.be (8.13.6/8.13.6) with ESMTP id lAG9mxK61130654; Fri, 16 Nov 2007 10:48:59 +0100 Received: from localhost ([127.0.0.1] ident=trch) by poincare.swapping.umh.ac.be with esmtp (Exim 4.67) (envelope-from ) id 1Isxof-0002L3-FZ; Fri, 16 Nov 2007 10:48:49 +0100 Date: Fri, 16 Nov 2007 10:48:49 +0100 (CET) Message-Id: <20071116.104849.1219275242.Christophe.Troestler+ocaml@umh.ac.be> To: OCaml Mailing List Cc: Andrej.Bauer@andrej.com, Andrej.Bauer@fmf.uni-lj.si Subject: Re: [Caml-list] Compiler feature - useful or not? From: Christophe TROESTLER In-Reply-To: <473D5380.2010508@fmf.uni-lj.si> <473D5F33.1000904@fmf.uni-lj.si> References: <20071115132649.GB15754@yquem.inria.fr> <20071116.014620.919650100.Christophe.Troestler+ocaml@umh.ac.be> <473D5380.2010508@fmf.uni-lj.si> X-Face: #2fb%mPx>rRL@4ff~TVgZ"<[:,oL"`TUEGK/[8/qb58~C>jR(x4A+v/n)7BgpEtIph_neoLKJBq0JBY9:}8v|j Organization: University of Mons-Hainaut X-Mailer: Mew version 5.2.51 on Emacs 22.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.1 (www dot roaringpenguin dot com slash mimedefang) X-Miltered: at discorde with ID 473D6782.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; compiler:01 christophe:01 troestler:01 christophe:01 troestler:01 ocaml:01 0100,:01 andrej:01 functor:01 functor:01 sig:01 val:01 sig:01 val:01 rig:98 On Fri, 16 Nov 2007 09:23:28 +0100, Andrej Bauer wrote: > > This construction is natural in the technical sense that it is left > adjoint to the forgetful functor(*) from rings to rigs. OK. > In what way is natural, or canonical, the construction of Z defined > by sticking together two copies of N? I do not think there is something natural about this construction in the way you outlined it above. It's just ad hoc for this case. > The universal property of the resulting ring R is this: for any ring > T, if f : M -> T is a function preserving 0, + and * then there is a > unique function g : R -> T preserving 0, +, * and - such that g > (include x) = f x, where include is as above. This needs to be > accounted for, and it's not just a logical specification. Would this fit your bill? module type To_Ring = functor (M: RIG) -> sig include RING val embed : M.t -> t module F : functor (T:RING) -> sig val lift : (M.t -> T.t) -> (t -> T.t) end end Regards, ChriS