From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p8R9gH4p008239 for ; Tue, 27 Sep 2011 11:42:17 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmkBAOCZgU7RVaE2kGdsb2JhbABBhGSjCAgUAQEBAQkJDQcUBCKBSgkBAQEDARICDx0BEiYBAwELAQUFAwEHNwICIhIBBQEcBjWHVpwwCosIgyCFPokpAgQGhXSBEQSTUo0KPYFIgic X-IronPort-AV: E=Sophos;i="4.68,448,1312149600"; d="scan'208";a="110709301" Received: from mail-fx0-f54.google.com ([209.85.161.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 27 Sep 2011 11:42:11 +0200 Received: by fxg9 with SMTP id 9so12528998fxg.27 for ; Tue, 27 Sep 2011 02:42:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=z236hVR11WrGfpSj0OMtemvPhCdrE1Y7WbHr+OjgCpM=; b=FSMvPXuDSmQGosZDPj207BJmdcory3a5MatcyBnpnIFMJw0JB5ds4hqV8zGP7ieoxK VYzpvy8fPEg07Uh+om+8GzZ4kPB3rJh2gHVLnAO8vTcXeZPPqu6JRMa1BqbpWgNoaW2k adulfoTy7/+wEvISv0H41XhKggzXE9FjC8cN8= Received: by 10.216.181.194 with SMTP id l44mr9030107wem.87.1317116516255; Tue, 27 Sep 2011 02:41:56 -0700 (PDT) MIME-Version: 1.0 Sender: arnaud.spiwack@gmail.com Received: by 10.216.17.149 with HTTP; Tue, 27 Sep 2011 02:41:16 -0700 (PDT) In-Reply-To: References: <10F5DBD5-5387-408C-967B-50B37367A6E1@lasmea.univ-bpclermont.fr> <4E806C6F.5050407@gmail.com> <4FAB50A9-43BE-402D-8420-524573F10668@lasmea.univ-bpclermont.fr> <62D492AB-ABD5-4A66-BE41-6191D5813AA5@lasmea.univ-bpclermont.fr> From: Arnaud Spiwack Date: Tue, 27 Sep 2011 11:41:16 +0200 X-Google-Sender-Auth: HqOpEGtCtvvgzb9QWA4DCw12ATI Message-ID: To: Gabriel Scherer Cc: =?UTF-8?Q?Jocelyn_S=C3=A9rot?= , OCaML Mailing List Content-Type: multipart/alternative; boundary=0016367b5e501447f404ade91602 Subject: Re: [Caml-list] Dependent types ? --0016367b5e501447f404ade91602 Content-Type: text/plain; charset=UTF-8 > Yes, this is right. You can already experiment in ocaml, as Denis > Berthod suggested, by adding abstract types by hand instead of having > constants in the initial environment. > You can also embed the natural numbers in Ocaml's type system by declaring the following two types: type 'a s type z Granted 32 would be written z s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s which may or may not be considered legible. But at least there is no absolute need for infinitely many constants. --0016367b5e501447f404ade91602 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Yes, this is rig= ht. You can already experiment in ocaml, as Denis
Berthod suggested, by adding abstract types by hand instead of having
constants in the initial environment.

You can also= embed the natural numbers in Ocaml's type system by declaring the foll= owing two types:

type 'a s
type z

Granted 32 would be = written z s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s w= hich may or may not be considered legible. But at least there is no absolut= e need for infinitely many constants.
--0016367b5e501447f404ade91602--