Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Convertibility with η-equivalence

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Convertibility with η-equivalence


Chronological Thread 
  • From: Thorsten Altenkirch <Thorsten.Altenkirch AT nottingham.ac.uk>
  • To: "coq-club AT inria.fr" <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Convertibility with η-equivalence
  • Date: Thu, 30 Sep 2021 08:34:51 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=exmail.nottingham.ac.uk; dmarc=pass action=none header.from=exmail.nottingham.ac.uk; dkim=pass header.d=exmail.nottingham.ac.uk; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=AXqBFNCkhr0+PClCwuHPVDCTCMpD1GE4moCmNN6p/Co=; b=Rp9Qg0uKeJ9Zrw2OrsXQ4OdHhJR1pIk2I9M3tW2byg1TbrxZAq/BBhL1zRj54sVOQ8jM2VlrmFy+E5WZ5tctv6CtEwgAGDfD+SzJEGkvfUWZfmLvRZLWYO9ZP37NTCVrBmXhDCbQCOQO6IEG8YQFp6GfZOiKgBHv06mjIHGbkaDcbZn08OWwwRayc1e3SqrgbJ2PrLdUAxXX2iSdVQHjs9zepgLMMGf6wVdf2xp0vBMK2PMMrr20Jm4rh+bPERD+sIBn57H5P/QytsjHTfbJLgyxjmcQkXUhVwk2kSsduAFjlsAAhucPV1necFwuZuzZLQLO6eOlQU0EWpZBknuUrg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lkEL5taTXn0wHlmCRoHBaLoLgxkkv8PxWKVo+Kdr+ym3CagWXfogFZvAxNxXd6AcHN4NUUQvuTWU4xCoufZ8cPKedbpy6VwvyDqQtsifunjyWiX+MgXwDJUqj/f7wIzg73xsaNkwJQFhLHTwKiIFlbeIBmLmFMSwY24A0l8iVkEVXIm32TFtxKDwyjbepLnBkNPqrpdf3mH8lD7Zs2zGKoavOiXhxf/J5LOnCpsV9n3yckzdCnQdBARJ49+UQ/Ms/b2617O5BWIhikd+qdzfUN/X2hovRkJ/alYajeLzMIMdITG2TNVz/pUlsSZF4m199Q7D31GqyeIOgan5A5Q3Nw==
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=Thorsten.Altenkirch AT nottingham.ac.uk; spf=Pass smtp.mailfrom=Thorsten.Altenkirch AT nottingham.ac.uk; spf=None smtp.helo=postmaster AT uidappmx02.nottingham.ac.uk
  • Ironport-hdrordr: A9a23:vuPYj62YD6csLi/C4kkalgqjBelxeYIsimQD101hICG9Lfbo9fxGzc5rtiMc1gxwZJh5o6H9BEDyewKiyXcV2/hRAV7MZnidhILFFvAE0WKA+UyhJ8SdzJ8h6U4IScEXY7ecYTcV7LeekW2F+r0bsaC6GdWT9JzjJgBWPHlXgs9bnmFEIzfeNnczaBhNBJI/GpbZzNFAvSCcdXMeadn+LmUZXsDYzue7167OUFojPVoK+QOOhTSn5PrRCB6DxCoTVDtJ3PML7XXFqQrk/a+u2svLiCM0llWjqqi+quGRjeerN/b8zPT97Q+c0zpAUb4RH4FqegpF+N1Hpmxay+Uk6C1QQfibo0mhD11d5yGdgTXI4XIVw0XDjWSzp1bOyPaJGA4SOo56nIpcNjze9kZIhqAg7EsD5RPri3IcZymw7BjV9pzGUQpnmVGzpmdnmekPj2ZHWY9bc7NJq5cDlXklXavoMRiKo7zPKtMeRv00JcwmBm+yfjTcpC1i0dasVnM8ElOPRVUDoNWc13xTkGpix0UVycQDljNYnahNBKVs9qDBKOBlhbtORsgZYeZ0A/oAW9K+DijITQjXOGyfLFz7HOUMOm7LqZTw/LIpjdvaNKAg3d83gtDMQVlYvWk9dwbnDtCPxoRC9lTXTGC0TV3Wu4ljDlhCy/TBrZ/QQGO+oXwV4r6dSsQkc7vmsqyISeBr6tfY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JUNZH23EPlqOViVbWTsj9sZFGcFpAs+TOjkiF2YVj5TYm6/Ubw85jE8EoKmFpvDSZ6rgLCbwCq7GoFWaX5AClCPEHfobZmLW/cXZSKUJc9hjiAEVbmnS48u1RGhrgr6x6B9IeXI4CEYqJHj2MBv5+LPjREy6SB0D8OF3m6RSGF0h3oESCMy3KBiukNw0UyD0Kh9g/xAD9Nf/fJJUgEgNZ7d1eN2Ed7yWhiSNuuOHRytRczjCjUsRPowxcUPagBzAZ/q2hvExm+hB6Ifv72NHp09tKzGiSvfPcF4nkrG07M6k1QgCuJLKWCgha9l/AibU7LJlF+Ci6usM40YwCPL92aZxmqmukZETA92XqXMWDYWbQ3LroKqtQv5U7ayBOF/YUN6wsmYJ/4SAjUIpUhHSP77INHOOzj3nWCsGReOybOFaczjcCMA33eFYKDruwYU4WqHMwc+DyLnqmmYET88TDoHhmvq9vViqXW0TkYxiQiBKVBiheLdxw==

Just some comments: the eta rule is a way to implement extensionality for pure functions, hence it is not really a form of computation unlike beta. Hence we shouldn’t think of it as a form of reduction it is an equivalence and reduction isn’t the best way to decide it. Also it makes very little sense on untyped terms, this seems to be rather some formalist game.

 

Thorsten

 

From: <coq-club-request AT inria.fr> on behalf of Jonathan Chan <jcxz AT cs.ubc.ca>
Reply to: "coq-club AT inria.fr" <coq-club AT inria.fr>
Date: Tuesday, 28 September 2021 at 19:03
To: "coq-club AT inria.fr" <coq-club AT inria.fr>
Subject: Re: [Coq-Club] Convertibility with η-equivalence

 

Thanks for the detailed reply Meven! The η-conversion rule in Abel's paper looks like it could be adapted to be untyped by checking that either side is a lambda (like in the Coq manual) instead of checking the type...

Out of curiosity, how would the η laws be incorporated into α-equivalence? What were the issues you ran into?

On 2021-09-28 02:17, Meven LENNON-BERTRAND wrote:

[CAUTION: Non-UBC Email]

Hello Jonathan,

As far as I know, the theory of η-conversion in the Coq setting is quite muddy. I've been working on this recently with the people in the Gallinette team in Nantes and the MetaCoq team, so here are my two cents.

η-reduction cannot be adopted as such, because it would not respect subject reduction, as the cumulativity of product types in Coq is equivariant on domain (that is, Π x : A . B <= Π x : A' . B' when A = A' and B <= B'). Indeed, if A' < A then f : Π x : A . B |- λ x : A'. f x : Π x : A' . B (because by cumulativity x : A' |- x : A) but λ x : A' . f x ->η f and it is not the case that f : Π x : A . B |- f : Π x : A' . B. Also, it is quite an annoying rule to work with, since it is very non-local, as one has to test for variable freeness.
η-expansion also poses its own problems in the setting of Coq, notably that without types to know when to trigger it one could a priori fire it indefinitely (defeating normalization), and that generating the correct typing annotation on the variable bound by the λ is impossible (and so again this threatens subject reduction).
A third option, which is closer to what Coq does, is to not see η as a reduction in one or the other direction, but only as an equality rule, i.e. incorporate it in α-equality. But this also has some weird technical issues (again because of untyped terms).
So in the end, I am not aware of any satisfactory ways to treat η laws in the untyped CIC setting, and this is why MetaCoq still does not have η-conversion in its theory...

The only way out I see, which is how I've come to think of those rules, is that they are actually an algorithm for typed conversion, but one that does not maintain types as they are in fact not needed, since for rules η1 and η2 you only need to look at the other side to perform η expansion. In fact, those rules are very close to the ones for algorithmic conversion in Abel et al.'s Decidability of Conversion for Type Theory in Type Theory.

As for transitivity, no it does not hold directly. I guess the closest you can get is the paper above, where transitivity is proven for the typed, algorithmic system by induction on the conversion derivation – a proof that should adapt reasonably well to the untyped setting.

Best,

Meven LENNON-BERTRAND
Doctorant, Équipe Gallinette – LS2N – Université de Nantes
www.meven.ac

han


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.






Archive powered by MHonArc 2.6.19+.

Top of Page