<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">I would paraphrase tis differently: the eta rule for record times makes the projections strictly injective and this is obviously false in this example. Or do I miss something here?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thorsten<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">Agda <agda-bounces@lists.chalmers.se> on behalf of Andrew Pitts <andrew.pitts@cl.cam.ac.uk><br>
<b>Date: </b>Wednesday, 5 June 2019 at 14:45<br>
<b>To: </b>Jesper Cockx <Jesper@sikanda.be>, agda list <agda@lists.chalmers.se><br>
<b>Subject: </b>Re: [Agda] Prop in Agda 2.6 - again<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">Dear Jesper,<o:p></o:p></p>
<div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On 5 Jun 2019, at 13:34, Jesper Cockx <<a href="mailto:Jesper@sikanda.be">Jesper@sikanda.be</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal">Hi Andy,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">When you define a datatype in Prop, the resulting type is automatically 'squashed', i.e. any two elements are equal. In contrast, for record types this is not possible because then it is impossible to define the projections. For your definition
of <span style="font-family:"Cambria Math",serif">∃</span> in Prop, (true , _) is equal to (false , _) of type `<span style="font-family:"Cambria Math",serif">∃</span> Bool (λ _ →
<span style="font-family:"Cambria Math",serif">⊤</span>)`, but their first projections are not equal. It would theoretically be possible to have such a record type but not give access to the projections and disabling eta-equality, but then you could've equally
defined it as a single-constructor datatype.<o:p></o:p></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">I see. So to paraphrase your explanation, Agda imposes a simple syntactic restriction on what record types can be declared to have type Prop in order to maintain the soundness of forcing all elements of an element of a Prop to be definitionally
equal.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I can think of a simple syntactic restriction that is less liberal than the current one: don’t allow record types in Prop! Is there an example of why my restriction is too restrictive? —- in other words a case where using a record of Prop
type is really better than using a corresponding single-constructor datatype of type Prop?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">(I am thinking that one often uses a record type in Set instead of a single-constructor-datatype in Set, in order to get definitional eta expansion; but that’s automatic for elements of Prop, due to the definitional proof irrelevance.)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Andy<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">-- Jesper<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Wed, Jun 5, 2019 at 1:09 PM Andrew Pitts <<a href="mailto:andrew.pitts@cl.cam.ac.uk">andrew.pitts@cl.cam.ac.uk</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Here is another question about Prop in Agda 2.6. Can anyone enlighten me?<br>
<br>
The documentation says<br>
<br>
"Just as for Set, we can define new types in Prop’s as data or record types”<br>
<br>
However, although Agda 2.6 allows the declaration of the following one-constructor datatype<br>
<br>
data <span style="font-family:"Cambria Math",serif">∃</span> {l m}(A : Set l)(P : A → Prop m) : Prop (l
<span style="font-family:"Cambria Math",serif">⊔</span> m) where<br>
_,_ : (x : A)(p : P x) → <span style="font-family:"Cambria Math",serif">∃</span> A P<br>
<br>
if instead I try to define a record type<br>
<br>
record <span style="font-family:"Cambria Math",serif">∃</span> {l m : Level}(A : Set l)(B : A → Prop m) : Prop (l
<span style="font-family:"Cambria Math",serif">⊔</span> m) where<br>
constructor _,_<br>
field<br>
fst : A<br>
snd : B fst<br>
<br>
Agda complains (somewhat ungrammatically) that <br>
<br>
"Set l is not less or equal than Prop (l <span style="font-family:"Cambria Math",serif">
⊔</span> m) when checking the definition of <span style="font-family:"Cambria Math",serif">
∃</span>”<br>
<br>
So it doesn’t mind the parameter (A : Set l) when defining a datatype in Prop (l <span style="font-family:"Cambria Math",serif">
⊔</span> m), but does mind it when defining a record type.<br>
<br>
Why is that?<br>
<br>
Andy<br>
<br>
<br>
_______________________________________________<br>
Agda mailing list<br>
<a href="mailto:Agda@lists.chalmers.se" target="_blank">Agda@lists.chalmers.se</a><br>
<a href="https://lists.chalmers.se/mailman/listinfo/agda" target="_blank">https://lists.chalmers.se/mailman/listinfo/agda</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
</div>
<PRE>
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.
</PRE></body>
</html>