coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Thorsten Altenkirch <Thorsten.Altenkirch AT nottingham.ac.uk>
- To: "coq-club AT inria.fr" <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] STLC versus CCC
- Date: Sat, 5 Oct 2019 14:28:59 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=exmail.nottingham.ac.uk; dmarc=pass action=none header.from=exmail.nottingham.ac.uk; dkim=pass header.d=exmail.nottingham.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=vN63KbpnU/5irZ9FlY8tiqCYShbO1eXiFV+t25LvtwI=; b=LBBRBucyzqF1gD3rsuFtfYuK6yahm0qrcIaxW5BZG0Xc/YjDVR+2GzUzuKTS5QvxWy2ViwTZqJwIRuBFuVVjba3KtX5D9QS6TzzD8fJ2/qeYNgvsCE+O1US7oiNBllzKuqLtAIgQnn5p80ycPKQonXdHiBG7linNSwCkp5NoAaqUj7cRIbkNiR66eRk5SLGyfb3TILRD7XB38JM3hMhhgyciaTxnbwW9wo49GZ9TNmMM2Uuh56ZsuFd1DgHPxfv6IlzJ5k4r/3dQhJhhbfUn7e6VSuUunlbozYE0YBZkhq6KJj/XA/25N5DskVieddGtBgIs/gNkHK9+Y9RGiAmrjA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LlA89MCbTeEStQ9TNvPRuMumejIZwLUiYjjOZ+rtA3hXk9XuAcWKhbVdzie4uTz1ChpYVfPO4seeKAddOdi0uAIbKmn0r1ION8vjvNi40cpyyr8GirTzyd4FgEnUs9ALb7SiQQTMC5TrwxNKpUV7ZsiPGa+YkGh61udGgC891uldgXlRNcgoMpe/jy16t0ycoo7TKEH69YRoM8t9RUF3MxLokTkRIK6MZSUBvUyMigyr4g8I+DkkH5kEd5eL6l7ITHCsbZpAoXJdHrZ+I9bPAirEKS/QIADg16eKmeYiImmT7p6EPWOYWQ9MPYtd2BcDpETn/a0+bHKpe13GuD5cIw==
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=Thorsten.Altenkirch AT nottingham.ac.uk; spf=Pass smtp.mailfrom=Thorsten.Altenkirch AT nottingham.ac.uk; spf=None smtp.helo=postmaster AT uidappmx02.nottingham.ac.uk
- Ironport-phdr: 9a23:SZPLeRS7YehKozmp3vmXPCp3Q9psv+yvbD5Q0YIujvd0So/mwa6zbRKN2/xhgRfzUJnB7Loc0qyK6vumBDdLvsjJmUtBWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYdFRrlKAV6OPn+FJLMgMSrzeCy/IDYbxlViDanbr5+MRu7oR/Ru8QYjodvKKc8wQbVr3VVfOhb2XlmLk+JkRbm4cew8p9j8yBOtP8k6sVNT6b0cbkmQLJBFDgpPHw768PttRnYUAuA/WAcXXkMkhpJGAfK8hf3VYrsvyTgt+p93C6aPdDqTb0xRD+v4btnRAPuhSwaMDE37XzXitdojK1FvB2huxJxw4nRYI6PNfp+eL7WcdcVSGdFW8pcUTFKDIGhYIsVF+cPPfhWoZThp1UArhW+CwujC+3uyjBUiXD7xrc13/gkEQzcwAAtBdADvXLJp9v1LqcSVuW1wbHWwzXDaPNWwyz96JTWfRAnvPqBQbZwcdbPxkkpFAPFj0+QppDlPziI0ekDrWib7+16VeK0l24otQdxriKzy8colonGmIQVylPF9SVj3Ik1Jca1SEh8Yd64DJtQtieaN4R2Qsw4RmFkojw1xaEctZ6mfygH0ZIqzAPRZfyAdoiH+BPjVOCJLDd3hXJlZLK/hwup/kS6y+38Uc+520tJoCpditTAq24B2h/J5sSZRfZw8F2t1DmB2gzJ9+1IP0A5mbLYJpMg2LI8iJkevV7dEiPomUj6lrKae0Y69uSw5eTofLbrqoOZOoJxhQzxLroil8mjDuk3PAgCQ22W9Oug2LL/4UL0RbVHg/konqTZtp3RON4VqbSjAwBP14Yu8xa/ACmi0NQfhXQHMVNFdw+dgIjxI1HOJf/5Aeuhj1i2ljdrwOzGPqHgApXLIXjDkK3ufbNn50FG1AU/181f55FMBrEAJvL8RFPxucTFAhMnMAG42fjrBdpz248EVm+CDLWVPL7MvVKI/u4vJvODZI4RuDbzMfgl4PvugGcnl18deqmpx4AXaGymEfRgOUmUfX7sgssfHmcMvQo+Tfbqh0GCUTNIYXayWL485i06CIKgAofDRpqigLmb0CihApJafH1GClOUHXfya4qEQ+sMaD6VIsJ5jjMEUqGhR5Y92hGqqQ/10KFqLvHU+y0drZLszsJ55+zVlREo9Dx7Fd6R02+XTzI8omRdDTQxxeV0pVF34laFy6lxxfJCX5QH7PRQFww+KJT0zupgCtm0VBiXLfmTT1PzftWhGyotQ9R56tsSbkB+Gs+pjliX4yqtGaQJmrrNLZgo/6Tf3mL6J+57zGra1a8uj1AjBMJEc3Cl0P0svzPPDpLExh3K352hcr4RiXKcrTvR/S+1pEhdFTVIf+DdR3lGNhnQqsjl50XNT7arT70sdBZCm5bbe/l6L+bxhFADf8/NfdHXYma/gWC1XEbawLSQcIvsdGUU2WPUAw4ZkFJKpCvUBU0FHi6k5lnmInluGFboORK+7OhyoWujS19slUeMaFF91ry6+hcQw/WXDe4QjOoJ
I meant wit only -> not unit!
From:
<coq-club-request AT inria.fr> on behalf of Thorsten Altenkirch <Thorsten.Altenkirch AT nottingham.ac.uk>
Hi,
If you have products and unit type, you need to add extra eta rules: x = () for x:1 and x = (fst x,snd x) for x : AxB.
However, you can also use STLC with only unit to construct the initial CCC by using context concatenation for products. In this case the product laws follow from the properties of substitution.
Thorsten
From:
<coq-club-request AT inria.fr> on behalf of 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 ~~> {}
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?
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. |
- [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.