<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><span>There's also a perspective on this that one can take from the Elims. For P the elim should be something like</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal; "><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal; "><span>Elim-P : (A : Set) (M : P A -&gt; Set)</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal; "><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; (base : (a : A) -&gt; P (pack a))</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif;
 background-color: transparent; font-style: normal; "><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; (p : P A) -&gt; M p</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal; "><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal; "><span>whereas for N</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal; "><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal; "><span>Elim-N : (A : Set) (M : (B : Set) -&gt; N B -&gt; Set)</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif;
 background-color: transparent; font-style: normal; "><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; (base : (B : Set) -&gt; (b : B) -&gt; M B (packn b))</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal; "><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; (n : N A) -&gt; M A n</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal; "><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal; "><span>The second one is obviously different. The motive and base cases are parametric on the value stored in the packing type, which will highly restrict their values. This just falls out of the parameter/index distinction formally: motives and inductive
 subproofs musthave as arguments everything the functors/constructors have as arguments, plus some additional stuff (additional recursive proofs).</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal; "><span><br></span></div><div>- darryl<br></div>  <div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Andreas Abel &lt;andreas.abel@ifi.lmu.de&gt;<br> <b><span style="font-weight: bold;">To:</span></b> Jan Malakhovski &lt;oxij@oxij.org&gt; <br><b><span style="font-weight: bold;">Cc:</span></b> agda@lists.chalmers.se <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, January 25, 2013 12:03 PM<br> <b><span
 style="font-weight: bold;">Subject:</span></b> Re: [Agda] Datatype parameters and indices<br> </font> </div> <br>
[This is a candidate for a FAQ.]<br><br>That P passes but N not is an artefact of data type declarations.<br><br>Parameters are actually *absent* from constructors, so pack is really<br><br>&nbsp;  pack : ?A -&gt; P ?A<br><br>for ?A to be instantiated according to the context where pack occurs. <br>The syntax<br><br>&nbsp;  pack {A = Nat} zero<br><br>is valid, but the instantiation of parameter of A to Nat should only <br>regarded as a hint to the type checker, and not an actual setting of an <br>argument of pack.<br><br>In contrast, packn actually expects a first argument of type Set, which <br>is too big for type N : ... -&gt; Set, so Agda complains.<br><br>Hope that helps,<br><br>Andreas<br><br>On 25.01.13 12:05 AM, Jan Malakhovski wrote:<br>&gt; Hello everyone,<br>&gt;<br>&gt; A question that doesn't leave me for a while (like a year or so).<br>&gt;<br>&gt; If I remember right, a dozen of versions ago the following code did type
 check.<br>&gt;<br>&gt; ~~~~<br>&gt; data P (A : Set) : Set where<br>&gt;&nbsp; &nbsp; pack : A → P A<br>&gt;<br>&gt; data N : Set → Set where<br>&gt;&nbsp; &nbsp; packn : {A : Set} → A → N A<br>&gt; ~~~~<br>&gt;<br>&gt; Now it complains:<br>&gt;<br>&gt; ~~~~<br>&gt; The type of the constructor does not fit in the sort of the<br>&gt; datatype, since Set₁ is not less or equal than Set<br>&gt; when checking the constructor packn in the declaration of N<br>&gt; ~~~~<br>&gt;<br>&gt; I can't help but wonder about a justification for this.<br>&gt; It is said that parameters transform into constructors' implicit arguments, but the code above makes me think that, strictly speaking, it isn't the case.<br>&gt;<br>&gt; Best regards,<br>&gt;&nbsp; &nbsp; Jan<br>&gt; _______________________________________________<br>&gt; Agda mailing list<br>&gt; <a ymailto="mailto:Agda@lists.chalmers.se"
 href="mailto:Agda@lists.chalmers.se">Agda@lists.chalmers.se</a><br>&gt; <a href="https://lists.chalmers.se/mailman/listinfo/agda" target="_blank">https://lists.chalmers.se/mailman/listinfo/agda</a><br>&gt;<br><br>-- <br>Andreas Abel&nbsp; &lt;&gt;&lt;&nbsp; &nbsp; &nbsp; Du bist der geliebte Mensch.<br><br>Theoretical Computer Science, University of Munich<br>Oettingenstr. 67, D-80538 Munich, GERMANY<br><br><a ymailto="mailto:andreas.abel@ifi.lmu.de" href="mailto:andreas.abel@ifi.lmu.de">andreas.abel@ifi.lmu.de</a><br>http://www2.tcs.ifi.lmu.de/~abel/<br>_______________________________________________<br>Agda mailing list<br><a ymailto="mailto:Agda@lists.chalmers.se" href="mailto:Agda@lists.chalmers.se">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><br><br><br> </div> </div>  </div></body></html>