Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Ideal eliminator for { l : list T & length l = n}

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Ideal eliminator for { l : list T & length l = n}


Chronological Thread 
  • From: Talia Ringer <tringer AT cs.washington.edu>
  • To: Coq-Club <coq-club AT inria.fr>
  • Subject: [Coq-Club] Ideal eliminator for { l : list T & length l = n}
  • Date: Thu, 20 Feb 2020 20:44:03 -0800
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=tringer AT cs.washington.edu; spf=Pass smtp.mailfrom=tringer AT cs.washington.edu; spf=None smtp.helo=postmaster AT mail-io1-f43.google.com
  • Ironport-phdr: 9a23:b3c7RxO6zc8wkkOho3sl6mtUPXoX/o7sNwtQ0KIMzox0LfT6rarrMEGX3/hxlliBBdydt6sYzbqN+P+7EUU7or+/81k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjWwba59IRmsrgjcuMYajIlsJ60s1hbHv3xEdvhZym9vOV+dhQv36N2q/J5k/SRQuvYh+NBFXK7nYak2TqFWASo/PWwt68LlqRfMTQ2U5nsBSWoWiQZHAxLE7B7hQJj8tDbxu/dn1ymbOc32Sq00WSin4qx2RhLklDsLOjgk+2zRl8d+jr9UoAi5qhNww4DaboKbOudgcKzBZt4VX3ZNU9xLWiBdHo+xbY0CBPcBM+ZCqIn9okMDowWkCgmoBePg0CJDiGP33a083OQuDxvG1xEnEtISqnTUrdP1NKgMXuCv16TH0S7DY+lY2Djn84jIchEhofeDXbJsdsrRz1MjGB3YgVWNsIHoOS6e2OoKs2ie9eVgVOSvhnYoqwFwvjivxtoshZLTio0JzVDE8CN0y5s2K92gUEN3f8KoHZ9KuyyZN4Z6WN4uTmBptSogxbALt5i2dzUQxps93R7QcfmHfpCI4h39UOaRJi91hHd/d7K+gxa+6EmgyurhWsWt3lZHoSRInsPDtnAK0BzT5cyHReVn8ki93jaP0hjf6uBCIU8qiarWM4AtzqI0m5YJsknOHjX6lFj3gaKXbEkp9eal5/ziYrr8p5+cM4F0ihv5MqQrgsG/Hf44MgkIX2iU5+u8zqbu8lHiQLlQgPw5iLLZsJDbJcQdqa65HwhV0oA55xmhEjimzcwUnWMbI1JdZBKHk4/pNknSL/D/FPezmkijkDN2x//dJbDhGZXMLn3bkLj7Z7p96khcyBAyzd9F/Z5UBKsBc7rPXRras8WdJRskOUTgyOH+Td55y4k2WGSVA6bfPrmE4nGS4ed6H+CIZYZdgjf7JPU/r6ryl34/llIHVaKym4Qec3C5GPt6JEPfbHbx1IRSWVwWtxYzGbS5wGaJViReMi7rA/AMowojAYfjNr/tA5i3ieXQjiygWIJffWBHDF+QFnGueomZCa9VOXCiZ/R5mzlBboCPDooo1BWgrgj/kus1JfGS5SQDtZPl28Ry4avemQxgrGUpXfTY6HmESiRPpk1NRzIy2/oi80l0y1PG0K8hxvIETppc4PRGVgp8PpnZnbR3

Hello,

I've been working on extending DEVOID a lot recently (I'll send out info about a mailing list at some point soon, for people who want to hear more about what we've been up to). One thing I keep coming back to is supporting lifting between { l : list T & length l = n } and (vector T n), instead of just (list T) and (sigT (vector T)). Or the analogous problem for the other equivalences in the class like this that DEVOID handles.

It should be really easy to extend DEVOID to compose liftings, and some early thoughts on that are here. The second equivalence follows very trivially from the first, and with the original equivalence that DEVOID finds, you can always lifting between { l : list T & length l = n } and { s : sigT (vector T) & projT1 s = n }. Two questions follow from this.

Eliminator for { l : list T & length l = n }

I keep hearing from people that { l : list T & length l = n } is easier to use than (vector T n). I understand why this is true in theory, but I haven't found it to be true in practice. I don't find it any easier to deal with the rewrites at the term level than at the type level. Is there an eliminator that people typically use for this that lets them cleanly separate the list proofs and functions from the length proofs? If so, what is it?

"Relational UIP"

Another question follows from that. One reason { l : list T & length l = n } is a particularly easy case is that nat is an hset. So we can show that all equalities between proofs of (length l = n) are equal. Lately I've been very frustratingly trying to figure out if I can make that any easier when the index type isn't necessarily an hset, but when there's still some equivalence between { a : A & indexer a = i_b } and B i_b. It seems to me that, in theory, this class of types should be easier to deal with than indexed types in general, even when the type of i_b is not an hset. In practice, I can't figure out a way to make that true without assuming any axioms.

The simplest example I can think of looks like this:

Inductive A: Type :=
| foo : A.

Inductive B : Type -> Type :=
| bar : B nat.

Clearly, we can't show that all equalities between terms of type Type are equal to each other. But we do know that if we have a B, it's not any type. It must be nat in particular.

Is there any way we can use this information to make it easier to show equalities between terms of type B? This question is a bit more open-ended.

Talia

 



Archive powered by MHonArc 2.6.18.

Top of Page