coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jacques-Henri Jourdan <jacques-henri.jourdan AT normalesup.org>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Primitive Projections and eta
- Date: Wed, 7 Dec 2016 08:50:35 +0100
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jacques-henri.jourdan AT normalesup.org; spf=Neutral smtp.mailfrom=jacques-henri.jourdan AT normalesup.org; spf=None smtp.helo=postmaster AT ulminfo.fr
- Ironport-phdr: 9a23:BYuoVhPjczA33d0no90l6mtUPXoX/o7sNwtQ0KIMzox0Ivj4rarrMEGX3/hxlliBBdydsKMfzbeP+PyxEUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQtFiT6zbL9oLBi6sArdu8YSjIB/Nqs/1xzFr2dSde9L321oP1WTnxj95se04pFu9jlbtuwi+cBdT6j0Zrw0QrNEAjsoNWA1/9DrugLYTQST/HscU34ZnQRODgPY8Rz1RJbxsi/9tupgxCmXOND9QL4oVTi+6apgVRnlgzoFOTEk6mHaktF+grxVoByhpBJxzYDbb46XO/ViZa7dcs8WSHBGUMpNWSFMAIWxZJYPAeobOuZYqpHwqV8UohSiHAmsGf3gyiRRinH0w6I61f4hEQDb1wIkGNIOrW7Uo8jvO6cUTOu4y6vIwi/fYPNPxDfy9pPIfgkhof6SW7Jwa8vRxVMtFwPCk1WQs5HqMCmT1ukWtWib6PBgVee1hG4jtQ5xuSWvxt82honOnIIVxUnJ+CNky4g7It24TVR0Yd+iEJZItiGaMZF2QsI4TG1ytiY60LsLsoO4cigS0JkqxwTTZ+GJfoWI+B7vSeWcLDRiiH54dr+ygw6+/VWix+D/TMW4zExGojdBn9XSrHwA2Rre4dWdRPRn5EeuwzOP2hjT6u5aJUA0krLWK4Mlwr41l5oTt0rDHijslEX4lq+abkQk+u625OT7erjrpoWQO5J6hwz+KKgih8+yDOciPgQTUWWW/fyw1Lj58k34RLVKgOc2kq7csJ3CJ8QUvLK2AxZI0ok98BazFjem38oenXkdLVJJYhCHj4/0O1HUPf/3F/G/jk+qkDds3fDGO6fuApHTIXjYjbfhZaxx60lGyAo81dxf/Y5bCqkdIPLvXU/8rMDXDhggMwCt3+nnDMh92ZgFVGKUAq6ZNbvSvkWS6uIuJemMfo4VtyznJ/gr/f69xUM+zFQaZOyi2YYdQHG+BPVvZUuDMlT2hdJUM24BpxczV6nKhVuYUHZxYGuoU6s6rmU5AYm/EIrYA4CghqaAmiW8A4dab2ZuDFeWFH7sep6ZQ7ELci3EcZwpqSANSbX0E9xp7hqprgKvk7c=
Le 07/12/2016 à 08:32, Ralf Jung a
écrit :
Hi, As I understand it, any record declared with the [Record] vernacular whose projections can be defined, which has at least one projection, automatically gets eta. That is, the following records do not enjoy eta: Set Primitive Projections. Record unit := tt {}. Record inhabited (A : Type) : Prop := inhabits { inhabited_val : A }. Record unnamed_inhabitant (A : Type) := { _ : A }. Inductive prod A B := pair { fst : A ; snd : B }. and all records which do not suffer from any of these "problems" will automatically get eta conversion when primitive projections are turned on. Someone else (Matthieu?) can correct me if I've missed anything. I see; in our case, we used 'Inductive' instead of 'Record' so we did not get eta. Thanks! That's kind of a surprising difference between these vernaculars, at the very least, it should be documented. Well, I think it is: "The option Set Primitive Projections turns on the use of primitive projections when defining subsequent records." Kind regards, Ralf On Tue, Dec 6, 2016 at 3:57 PM Ralf Jung <jung AT mpi-sws.org <mailto:jung AT mpi-sws.org>> wrote: Hi all, We started to play around with primitive projections a little in our development, and if they work (which unfortunately still is a rather big if), we could achieve some fairly significant performance improvements: Coq 8.6 got >7% faster (that's total compilation time!) by switching the record we use for sealing some of our core definitions to primitive projections. That's pretty impressive! One thing we couldn't figure out though is when we get eta conversion for primitive projections. The aforementioned record used for sealing does not have eta (according to About), while other records do. Are the rules for when a primitive record gets eta written down anywhere? All I could find in the documentation is the two paragraphs in <https://coq.inria.fr/distrib/8.6beta1/refman/Reference-Manual004.html>, which don't even mention that primitive projections have anything to do with eta conversion. Kind regards, Ralf |
Attachment:
signature.asc
Description: OpenPGP digital signature
- [Coq-Club] Primitive Projections and eta, Ralf Jung, 12/06/2016
- Re: [Coq-Club] Primitive Projections and eta, Jason Gross, 12/06/2016
- Re: [Coq-Club] Primitive Projections and eta, Ralf Jung, 12/07/2016
- Re: [Coq-Club] Primitive Projections and eta, Jacques-Henri Jourdan, 12/07/2016
- Re: [Coq-Club] Primitive Projections and eta, Ralf Jung, 12/07/2016
- Re: [Coq-Club] Primitive Projections and eta, Matthieu Sozeau, 12/07/2016
- Re: [Coq-Club] Primitive Projections and eta, Maxime Dénès, 12/07/2016
- Re: [Coq-Club] Primitive Projections and eta, Matthieu Sozeau, 12/07/2016
- Re: [Coq-Club] Primitive Projections and eta, Maxime Dénès, 12/07/2016
- Re: [Coq-Club] Primitive Projections and eta, Matthieu Sozeau, 12/07/2016
- Re: [Coq-Club] Primitive Projections and eta, Ralf Jung, 12/07/2016
- Re: [Coq-Club] Primitive Projections and eta, Jacques-Henri Jourdan, 12/07/2016
- Re: [Coq-Club] Primitive Projections and eta, Ralf Jung, 12/07/2016
- Re: [Coq-Club] Primitive Projections and eta, Jason Gross, 12/06/2016
Archive powered by MHonArc 2.6.18.