Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] STLC versus CCC

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] STLC versus CCC


Chronological Thread 
  • From: Neil Ghani <neil.ghani AT strath.ac.uk>
  • To: "coq-club AT inria.fr" <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] STLC versus CCC
  • Date: Fri, 4 Oct 2019 16:36:06 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=strath.ac.uk; dmarc=pass action=none header.from=strath.ac.uk; dkim=pass header.d=strath.ac.uk; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Qb69ySFImVpZqejD2xYKsMrVksIcomUtOtyojrdfHnA=; b=CQhhrCr8y0LGd3LRrgaltYntrCbquiZgJkoaLTievbiHGbXOU8pLIMtBlzkx62+6MvgsVW0WlzvjO6xwa1iZcdw90uNqLKTqc4K4mtnjVDFYnCXcgoGFRPm1fk/1SCAFrxLiLsCbgqYKCb/HpNDGbh47HI1/5bs2XRLC9gZjKoQd45+L8tV0sD+bqAlrkQWU+vFUo0sDXWk4FERpPEnwFce7QHxlrVucYhb8+X2as0sM3PTwk14H7HCfgAxtVdqUuSxGbUDQ4MfwlzRxUVVeOiduqhvDumF65hsuSp6EzpPqZFp+vabc1CK720HvKt8HuWB4s919TjnvoUYK8d9Q+Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BR+aBDfXqTi6P/fC9DXZCvai6ZZl3b2fnEzXKMgUr1kXd5dZo2KRMaKpopgxG+6pFuj8k6W39vWi+DGe86a+3zkdbQ0povAlNstl2o2WFZ8faEfOIlVM/4n/stMCWxk4rrNUdSV+XFk2U1E/Bg2F+VbI/9cWjidiPKM+w8TugC8rierWKO55+cG5WZZJsvA5WHeT/Kob7R1+C93BwoNXfLh5E77JBYvpOVYlpqLOjhcspX+NuMJV/SeAh8wDlKGeSAT/ZKzXfSYvJ1GQUiRxG+aQxg7LJIZylYYtZDTLutHxOm9QkYxW0hjH/hVRVMztLmdP4MhuJagBO4Siq/P10w==
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=neil.ghani AT strath.ac.uk; spf=Pass smtp.mailfrom=neil.ghani AT strath.ac.uk; spf=Pass smtp.helo=postmaster AT EUR03-AM5-obe.outbound.protection.outlook.com
  • Ironport-phdr: 9a23:gtAz0hM4X06obIBeO8Al6mtUPXoX/o7sNwtQ0KIMzox0I/T7rarrMEGX3/hxlliBBdydt6sfzbeP+PG9EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCezbL9oLBi6sArdu80WjIB/Nqs/1xzFr2dSde9L321oP1WTnxj95se04pFu9jlbtuwi+cBdT6j0Zrw0QrNEAjsoNWA1/9DrugLYTQST/HscU34ZnQRODgPY8Rz1RJbxsi/9tupgxCmXOND9QL4oVTi+6apgVRjnhjoaNz4i6GHYlNB/jL5VrhKmohxw2Y/UYIeIP/Z6ca7QedYWSGxcVchTSiNBGJuxYYsRAeQcIeZWoYrzp1UMohu/GQaiC+zgxyRUhnDt2K02z/gtHR3E0QEmAtkAsG7UrNLwNKoKSe660qjIzTHeZP1X2Tfy8o7IchE8qvyLW7J/b8vRyU01GwPKjlWfs4rlPzKO2+QWr2ib9fBvVf6vi2I9sQ5+viKjxtovioTQgI8e117K9SJ8wIkvJN24TlZ2YdGlEJtMtyGaKpB5TtkjQ2Fvvisx174IuYajcSUF1Jgr3QPTZ+CFfoSS7B/vTuecLDdgiH57Yr2zmwu+/E2vx+LgVcS51UtGoyVZntbSs30A0xze58iIR/Z45Eis1iyA2gDW5+FKP0w5m7TUJps8zrMylJcesEHOETP4lUnrkqCabksk9far5uj7Z7jro4KQO5JqhQ7iN6kih9ewDOYmPQULQWSW+v6z26fm8ED2T7hFkPw7n6/Eu57AP8sbvLS2AwpN34Yj9Rm/CzCm3cwXk3YJMFxJZByKg5H1Nl/JIP30FPC/jE+ynztxwPDGI6HhDY7KLnjelrfuYKxx61ZGyAo00dBQ+Y5bCq0AIPL0XE/9rtvYDgIlMwywxObnD9Z92pkCVmKIB6+VKKLSsVmW6eIzO+SBa5MZtCzgJ/Q55fPil3E0lUUccKSpxZcXbWq3HvViI0WXe3rshdIBHH8MvgUgTezqjEeOUTFTZ3moWaI85yo2CJm6DYfZXI+tnLyB0D2hEZJKfGxGF1OMHW/yd4qYQ/cMdD6SIsh5nzMYUrihUpYt2g2qtA/n0LVqNfHU+y0dtZL7ztd5/ezTlRco9Tx1FcuRyW+NT3sn1l8PEnU927k6qkhgwH+C17J5irpWD5Ybs/hOS0IxMYPW5+18EdH7HAzbKISnUlGjF/OrADV5YdI4xd5GN0BwGtHkgRDK2SuCGKMPnqCLQpU/tL/fiSuib/1hwmrLgfFyx2ItRdFCYDH33/Itx03oH4fM1n6hueOyb61FgHzW6H2K0WrItUoeTQ0iCfyYD0BaXVPfqJHC3m2HT7KqDuh4YCZ885bZb4JvN5juh1gAQ+r/MtPDZW73g323GRuD2rKLasztZnkZ2yLeTkMDllJKpCfUBU0FHi6k5lnmInlrHFPrbVnr9LAi+minVEYoz0eDZAt81Ojs9w==

I agree with much of this but not the generality. Look at sum types where the
claimed generality doesn’t apply.

A better idea is introduction and elimination are adjoint with the count
being beta and the unit being eta ... this shows why eta is an expansion. And
as an explanation, it delivers for sum types. Also works for empty types

There’s some of this in my thesis

Cheers
Neil

Sent from my iPhone

> On 4 Oct 2019, at 17:27, Guillaume Brunerie
> <guillaume.brunerie AT gmail.com>
> wrote:
>
> Den fre 4 okt. 2019 kl 18:02 skrev Jason -Zhong Sheng- Hu
> <fdhzs2010 AT hotmail.com>:
>>
>> Hi all,
>>
>> I am stuck in thinking about the correspondence between simply typed
>> lambda calculus (STLC) and cartesian closed category (CCC) but I am
>> confused at some point. Since it is well-known, I appreciate any reference
>> that makes every detail explicit.
>>
>> By STLC, let's agree that it is defined by a unit type *, products _x_,
>> and simple function spaces _->_. Its terms are defined in the typical way.
>> Consider terms in STLC equivalent up to beta-eta reduction. Thus STLC
>> forms a category with types as objects and functions between types as
>> morphisms, and axioms are checked.
>>
>> Now it remains to show that such STLC with beta-eta equivalence is a CCC.
>> Consider a proof showing the unit type * is a/the terminal object of the
>> category. It is required to show that there is a unique morphism/function
>> from any type to * up to beta-eta equivalence. Consider the following two
>> functions from * to *:
>>
>> \x : *. x
>>
>> and
>>
>> \x : *. {}
>>
>> It is clear that both definitions have type * -> *, but how on earth these
>> two types are beta-eta equivalent? From all of the literature I checked,
>> there is no reduction rule associated with terms of type *, while to
>> actually make this two functions equivalent by beta-eta reduction, it
>> seems to suggest the following rule:
>>
>> G |- t : * => t ~~> {}
>
> This is indeed the rule that you want, but it is not a beta-reduction
> rule, it is the eta-expansion rule for the unit type: every element u
> of the unit type eta-expands to {}. In general, eta-expansion says
> that an arbitrary element of the given type eta-expands to the
> (unique) introduction rule applied to all the elimination rules, so in
> the case of * it gives that u eta-expands to {}.
>
> Best,
> Guillaume
>
>> That is to add a beta rule which imposes the reduction of any term of type
>> * to the unit element {} in one step. However, this doesn't make sense to
>> me.
>>
>> An alternative way to think about it is to assume functional
>> extensionality and say that these two functions are extensionally equal.
>> This feels much better, but that simply means the equivalence of
>> morphisms/functions in STLC is no longer beta-eta equivalence but beta-eta
>> equivalence + functional extensionality. It is more confusing if we think
>> about type checkers, as it is clear that in that context we only consider
>> reductions. Does that mean we tend to be more permissive when we try to
>> think in a more mathematical setting?
>>
>> How does this work? Is there any reference about the full details of this
>> correspondence or I am just thinking about something weird?
>>
>> Thanks,
>> Jason Hu
>> https://hustmphrrr.github.io/



Archive powered by MHonArc 2.6.18.

Top of Page