categories - Category Theory list
 help / color / mirror / Atom feed
From: Peter Selinger <selinger@Theory.Stanford.EDU>
To: categories@mta.ca
Subject: Re: co-iteration?
Date: Wed, 6 Jun 2001 23:48:08 -0700 (PDT)	[thread overview]
Message-ID: <200106070648.XAA22162@dead.stanford.edu> (raw)
In-Reply-To: <014201c0ee9f$053516f0$060a000a@AVILCIUS> from "Al Vilcius" at Jun 06, 2001 11:40:31 AM

To put it in a nutshell, the dual of iteration is recursion. You start
with a function f:AxB-->A, and you obtain a function f":B-->A
satisfying B -f"x1-> AxB -f-> A = B -f"-> A. This is precisely dual to
the situation you describe. 

In a programming language context, much more can be said. Andrzej
Filinski observed in his 1989 Master's thesis that call-by-*name*
recursion is dual to call-by-*value* iteration. In the presence of
certain control operators, call-by-value iteration is in turns
inter-definable with call-by-value recursion. The typing of these
statements is as follows:

1) Call-by-name recursion:   AxB -> A
                            ----------
                              B -> A

2) Call-by-value iteration:  A -> A+B
                            ----------
                              A -> B

3) Call-by-value recursion:  (A->C)xB -> (A->C)
                            --------------------
                                 B -> (A->C)

Here, in 1), AxB stands for a categorical product. In 2), A+B is a
categorical co-product. However, in 3), the "product" type AxB is not
a categorical product (not even a tensor product - in fact it is a
premonoidal structure). And the "function space" A->C is not that of a
cartesian (or monoidal) closed structure. Thus, there is a bit more to
call-by-value recursion than meets the eye.

All this is explained very nicely (both categorically and from a
lambda calculus point of view) in a recent paper by Masahito Hasegawa
and Yoshihiko Kakutani. The paper appeared in FoSSaCS 2001, and it is
available from Hasegawa's website
(http://www.kurims.kyoto-u.ac.jp/~hassei/papers/). In particular, this
paper discusses precisely which axioms to require of the operations
1), 2), and 3), and it details the duality between 1) and 2) and the
equivalence of 2) and 3). 

I may add, although it is not directly in response to the original
question, that the duality between call-by-name and call-by-value can
already be observed even in languages that don't have recursion or
iteration. The duality requires the presence of a certain kind of
control operator. This duality also appears in Filinski's master's
thesis, and its category theoretic meaning is explained in my
paper "Control Categories and Duality"
(http://theory.stanford.edu/~selinger/papers.html).

-- Peter





  reply	other threads:[~2001-06-07  6:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-06 15:40 co-iteration? Al Vilcius
2001-06-07  6:48 ` Peter Selinger [this message]
2001-06-07  7:10 ` co-iteration? Dusko Pavlovic
2001-06-07  1:37 co-iteration? Lengyel, Florian

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=200106070648.XAA22162@dead.stanford.edu \
    --to=selinger@theory.stanford.edu \
    --cc=categories@mta.ca \
    /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;
as well as URLs for NNTP newsgroup(s).