From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 5C66CBB81 for ; Mon, 10 Oct 2005 09:41:01 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j9A7f0Pq001815 for ; Mon, 10 Oct 2005 09:41:00 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA16958 for ; Mon, 10 Oct 2005 09:41:00 +0200 (MET DST) Received: from smtp2-g19.free.fr (smtp2-g19.free.fr [212.27.42.28]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j9A7exOW001812 for ; Mon, 10 Oct 2005 09:41:00 +0200 Received: from [192.168.0.1] (rke75-3-82-229-183-156.fbx.proxad.net [82.229.183.156]) by smtp2-g19.free.fr (Postfix) with ESMTP id 6FC4B33819; Mon, 10 Oct 2005 09:40:59 +0200 (CEST) Message-ID: <434A19FA.4080805@inria.fr> Date: Mon, 10 Oct 2005 09:36:26 +0200 From: Alain Frisch User-Agent: Debian Thunderbird 1.0.2 (X11/20050602) X-Accept-Language: en-us, en MIME-Version: 1.0 To: skaller Cc: Ian Zimmerman , caml-list@inria.fr Subject: Re: [Caml-list] equality of Big_ints References: <87br1yhuxl.fsf@buug.org> <1128925132.7508.21.camel@rosella> In-Reply-To: <1128925132.7508.21.camel@rosella> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 434A1B0C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 434A1B0B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; frisch:01 frisch:01 caml-list:01 integers:01 nat:01 nat:01 wrote:01 equality:01 equality:01 polymorphic:01 structures:01 ints:01 pair:01 int:01 int:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 skaller wrote: > The reason may be because the equality of integers > isn't the same as algebraic equality of the data structures: Indeed, but this is not about maintaining an invariant. Because of the representation of Big_int.big_int as a pair (sign,absolute value), the polymorphic comparison would give (-1) < (-2) if the custom comparison were used for Nat.nat. -- Alain