coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Guillaume Brunerie <guillaume.brunerie AT gmail.com>
- To: Coq-Club Club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] STLC versus CCC
- Date: Fri, 4 Oct 2019 18:26:09 +0200
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=guillaume.brunerie AT gmail.com; spf=Pass smtp.mailfrom=guillaume.brunerie AT gmail.com; spf=None smtp.helo=postmaster AT mail-lj1-f180.google.com
- Ironport-phdr: 9a23:9pnj7hcg1IiAoQeSX3XqS1qwlGMj4u6mDksu8pMizoh2WeGdxcW6ZB7h7PlgxGXEQZ/co6odzbaP6Oa9ACdRut6oizMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpTEdFQ/iOgVrO+/7BpDdj9it1+C15pbffxhEiCCybL9vIhi6twXcutQZjYZmJKs61wfErGZPd+lK321jOEidnwz75se+/Z5j9zpftvc8/MNeUqv0Yro1Q6VAADspL2466svrtQLeTQSU/XsTTn8WkhtTDAfb6hzxQ4r8vTH7tup53ymaINH2QLUpUjms86tnVBnlgzocOjUn7G/YlNB/jKNDoBKguRN/xZLUYJqIP/Z6Z6/RYM8WSXZEUstXUCNPH568b5AXD+UfIelYs4fzp1wLrRSkBAmsAv7kxjtHi3Ly2KE31fkqHwPb0ww6B98Bv3rUo9f1OqkcUu670bfGwinMYf5NxTf98ZLFfgw9rf2QX799d9fax0k1FwPCi1WdsY3rPy6U1uQJt2iU9fdgVeexhGU6tgxxuCWvxsEyhYnTh4Ia1E3P+CJ2wIYoJN24TEp7bsS5EJtVqS6WLZB5Qtk/Q2Fupik60LwGtoCgcSgFzZQo3R/fa/idf4eU5RLjUf+cLDFlj3xrf7K/ggy98UmmyuDkWcm00UpKripYktbXrHwN1hvT586aQfV+5keswSiD2xzX5+1eIk05lbDXJ4A9zrMzjJYfrEfOEjPwlU7rlqGZbF8k9fKt6+n/YrXpuJucN4hshwH7KKsum8i/Df08MggMQmSX4Oq82KDg8EHlWrlKgfo2kq7WsJDeO8sXvLK2AwhQ0oo76ha/CSmp0MgAkHUZMF5IfAiLgovpNl3UPvz0EfSyj06xnDpo2/zKJrjhDY/MLnjHnrfhZ7F960tExQo80NBf5pZUCrUbL/LuX0/+qsbUAQQjMwypxeboFs991oIAVm+UDa+ZNbndsV6M5u41P+aMY4oVtC7nK/c5//7ukWM5mVgFcKa12psXcWm0EehiI0WEenXhmcwBEGcPvgomVuPmklyCUThJZ3azRa0w/D87CJj1RbvEE6uqmfmq2DqxVrZSe2oOXluLCDLjc5iOc/YKciObZMF7xG8qT7+kHqA81BWqvRL/xvJNNPfS9zcZuNq328V04+naiBQ/szZuEsKQyWCAZ25xl2IMATQx2fYs8gRG1l6f3P0g0LRjHttJ6qYMD15jaczsitdiAtW3YTrvO8+TQQ//ENqjCDA1CNk2xo1WOhsvK5CZlhnGmhGSLfoVmriMXsJm96vd2z31JZ84xS+WjO8uiF4pRsYJPmqj1PYmplrjQrXRmkDcrJ6EMKEV3SrD7mCGlDPcs0RRUQo2WqLADykS
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/
- [Coq-Club] STLC versus CCC, Jason -Zhong Sheng- Hu, 10/04/2019
- Re: [Coq-Club] STLC versus CCC, Guillaume Brunerie, 10/04/2019
- Re: [Coq-Club] STLC versus CCC, Neil Ghani, 10/04/2019
- <Possible follow-up(s)>
- Re: [Coq-Club] STLC versus CCC, Thorsten Altenkirch, 10/05/2019
- Re: [Coq-Club] STLC versus CCC, Thorsten Altenkirch, 10/05/2019
- Re: [Coq-Club] STLC versus CCC, Guillaume Brunerie, 10/04/2019
Archive powered by MHonArc 2.6.18.