<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:12.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.title
{mso-style-name:title;}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@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="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I am trying to port the definition of Type Theory in Type Theory form our paper
<o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt">Type theory in type theory using quotient inductive types.</span></b><span style="font-size:11.0pt"> <a href="https://dblp.uni-trier.de/db/conf/popl/popl2016.html#AltenkirchK16">POPL 2016</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">to cubical agda (yes I know inductive families don’t yet work but Andrea is working on it).
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">However, when we faked this we were able to first introduce the point constructors and then the equality constructors but when doing this in cubical agda all the constructors have to appear together. This
leads to the old problem that you have to create forward references for contructors which is a bit ugly. E.g.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">data Con : Set<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">data Ty : (Γ : Con) → Set<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">data Tm : (Γ : Con)(A : Ty Γ) → Set<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">data Tms : (Γ Δ : Con) → Set<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">data Ty where<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> _[_] : Ty Δ → Tms Γ Δ → Ty Γ<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">data Tms where<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> id : Tms Γ Γ<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> _,_ : (σ : Tms Γ Δ) → Tm Γ (A [ σ ]) → Tms Γ (Δ , A)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">data Ty where<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> [id]T : </span><span style="font-size:11.0pt;font-family:"Cambria Math",serif">∀</span><span style="font-size:11.0pt">{Γ}{A : Ty Γ} → A [ id ] ≡ A<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The problem is that Tms uses _[_] hence I have to declare the point constructors for Ty first, but then the equality for Ty refers to id!
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">This is an old issue (already with inductive-inductive definitions) but it gets worse once we have QIITs. There is a workaround to define a forward definition<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">id' : Tms Γ Γ<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">and then use id’ in the equation for Ty and define later<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">id' = id<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">but this is a bit ugly. Would it be possible to allow separate definitions of constructors?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Thorsten<o:p></o:p></span></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>