Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Don Syme" <Don.Syme@microsoft.com>
To: <david.baelde@ens-lyon.org>,
	"Alessandro Baretta" <a.baretta@barettadeit.com>
Cc: "Ocaml" <caml-list@inria.fr>
Subject: RE: [Caml-list] Coinductive semantics
Date: Thu, 5 Jan 2006 20:38:50 -0000	[thread overview]
Message-ID: <6C6555DF5D075A4EA6D27706F4EC5975044A93F8@EUR-MSG-10.europe.corp.microsoft.com> (raw)


I find it helpful to think of induction as simply a process of
"repeatedly adding new members to a set according to a set of rules",
and co-induction as a process of "repeatedly taking away members from a
set according to what's excluded by a set of rules, and seeing what's
left".  

For example, divergence is defined by repeatedly taking away the
convergent programs from the set of all programs.

To take a very non-serious example, think of the rules that parents lay
down for their children (which are often recursively referential, let
alone contradictory :-)).  Induction corresponds to "you may only do
what follows from the rules", whereas co-induction corresponds to "you
may do anything that is not excluded by the rules".  For an empty set of
rules an inductive child can do nothing, a co-inductive child can do
anything.  

This all shows my unfashionable set-theoretic biases :-)

Don


-----Original Message-----
From: caml-list-bounces@yquem.inria.fr
[mailto:caml-list-bounces@yquem.inria.fr] On Behalf Of David Baelde
Sent: 05 January 2006 20:48
To: Alessandro Baretta
Cc: Ocaml
Subject: Re: [Caml-list] Coinductive semantics

In short,

An inductive type is the least fixpoint of some equations. The
coinductive type is the greatest fixpoint. For "t = nil | cons of
e*t", the elements of the inductive type are the lists, but the
coinductive type also contains the infinite lists.

Now for induction and coinduction, not so easy to tell... The
induction is the process building inductive types, the coinduction
builds coinductive types. In theory, the induction always terminates
and build a finite object. The coinduction should be seen as a lazy
process, since it potentially builds an infinite object: running it
builds the beginning of the object, then the process freezes and waits
for you to inspect the object deep enough.

Hope this helps... at least that's a try.
--
David

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


             reply	other threads:[~2006-01-05 20:40 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-05 20:38 Don Syme [this message]
2006-01-06 15:33 ` Alessandro Baretta
2006-01-08 10:02   ` Andrej Bauer
  -- strict thread matches above, loose matches on Subject: below --
2006-01-05 18:23 Alessandro Baretta
2006-01-05 19:48 ` [Caml-list] " David Baelde
2006-01-06 13:12 ` Andrej Bauer
2006-01-10 11:10   ` Francisco J. Valverde Albacete
2006-01-11  8:34     ` Hendrik Tews
2006-01-11 12:19       ` skaller
2006-01-11 14:54         ` Andrej Bauer
2006-01-12  2:10           ` skaller
2006-01-12 14:03             ` Andrej Bauer
2006-01-12 21:54               ` skaller
2006-01-13 10:23                 ` Hendrik Tews
2006-01-13 14:42                   ` skaller
2006-01-18 12:58                     ` Hendrik Tews
2006-01-18 14:22                       ` skaller
2006-01-20  0:49                         ` William Lovas
2006-01-20  9:57                           ` Andrej Bauer
2006-01-20 18:59                             ` William Lovas
2006-01-20 20:59                               ` skaller
2006-01-21 18:36                                 ` Andrej Bauer
2006-01-22  3:16                                   ` skaller
2006-01-22 12:23                                     ` Andrej Bauer
2006-01-22 15:35                                       ` skaller
2006-01-22 17:26                                       ` Kenn Knowles
2006-01-22 21:52                                         ` Andrej Bauer
2006-01-21 19:06                               ` Andrej Bauer
2006-01-13 10:40                 ` Andrej Bauer
     [not found]                   ` <43C7B17A.1070503@barettadeit.com>
2006-01-14 16:53                     ` Andrej Bauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6C6555DF5D075A4EA6D27706F4EC5975044A93F8@EUR-MSG-10.europe.corp.microsoft.com \
    --to=don.syme@microsoft.com \
    --cc=a.baretta@barettadeit.com \
    --cc=caml-list@inria.fr \
    --cc=david.baelde@ens-lyon.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox