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=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 6979CBC0B for ; Tue, 30 Jan 2007 14:22:30 +0100 (CET) Received: from postar.fmf.uni-lj.si (vega.fmf.uni-lj.si [193.2.67.45]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l0UDMTNY017533 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 30 Jan 2007 14:22:30 +0100 Received: from localhost (unknown [192.168.5.1]) by postar.fmf.uni-lj.si (Postfix) with ESMTP id 6243B10495F; Tue, 30 Jan 2007 14:22:29 +0100 (CET) X-Virus-Scanned: amavisd-new at spam.fmf.uni-lj.si Received: from postar.fmf.uni-lj.si ([192.168.5.5]) by localhost (spam.fmf.uni-lj.si [192.168.5.1]) (amavisd-new, port 10024) with ESMTP id 0r08joGobuGR; Tue, 30 Jan 2007 14:34:45 +0100 (CET) Received: from [193.2.67.88] (unknown [193.2.67.88]) by postar.fmf.uni-lj.si (Postfix) with ESMTP id DFF6810492B; Tue, 30 Jan 2007 14:22:28 +0100 (CET) Message-ID: <45BF471A.6060603@fmf.uni-lj.si> Date: Tue, 30 Jan 2007 14:24:42 +0100 From: Andrej Bauer Reply-To: Andrej.Bauer@andrej.com User-Agent: Icedove 1.5.0.9 (X11/20061220) MIME-Version: 1.0 To: Simon Frost , caml-list@yquem.inria.fr Subject: Re: [Caml-list] Equality of functional values References: <1170104645.4564.304.camel@penguin.local> In-Reply-To: <1170104645.4564.304.camel@penguin.local> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 45BF4695.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; andrej:01 andrej:01 ocaml:01 ocaml:01 complained:01 coefficients:01 arrays:01 coefficients:01 decidable:01 equality:01 equality:01 wrote:01 workaround:01 workaround:01 integer:01 Simon Frost wrote: > I'm trying to use a software package written in ocaml (IBAL), however, > it fails a test due to 'Fatal error: exception Invalid_argument("equal: > functional value"). It seems that equality isn't defined for functional > values in OCAML (although I'm not an expert), so I'm wondering what the > workaround is. This may not sound very helpful, but: you are doing something wrong if you need to rely on equality of functions. Equality of functions is not computable. A suitable workaround would be to tell us what it is that you are doing, and we will tell you what to use instead of functions (if possible). To give you an idea of what you I am talking about: Suppose you came to us and complained that you cannot compare polynomials with integer coefficients, and it turned out that you represent polynomials as functions. We would then tell you not to do that, and represent polynomials as arrays (or lists) of coefficients, or objects, or some other data structure that is equipped with decidable equality. Andrej