coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Christopher Ernest Sally <christopherernestsally AT gmail.com>
- To: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Rewriting/Morphism/Partial Point-wise equality
- Date: Sat, 8 May 2021 11:23:06 -0700
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=christopherernestsally AT gmail.com; spf=Pass smtp.mailfrom=christopherernestsally AT gmail.com; spf=None smtp.helo=postmaster AT mail-io1-f52.google.com
- Ironport-hdrordr: A9a23:3aIztqy3b5gs5tAGQhLSKrPwFb1zdoMgy1knxilNoH1uA7WlfqWV9sjzuiWE7Qr5NEtQ++xofZPwIk80lqQV3WByB8bHYOCOggLBR72Kr7GD/9SKIVyYygcy79YHT0G8MrHN5JpB4PoSLDPWLz/o+re6zJw=
- Ironport-phdr: A9a23:1znc2hWhEDanwpTDGRbJnwLk/iXV8KxzVTF92vMcY1JmTK2v8tzYMVDF4r011RmVBNSdsa4YwLqN+4nbGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2aFLduGC94iAPERvjKwV1Ov71GonPhMiryuy+4ZLebxhMiTanf79/Ixq7oQrSu8QYnIBvNrs/xhzVr3VSZu9Y33loJVWdnxb94se/4ptu+DlOtvwi6sBNT7z0c7w3QrJEAjsmNXs15NDwuhnYUQSP/HocXX4InRdOHgPI8Qv1Xpb1siv9q+p9xCyXNtD4QLwoRTiv6bpgRRn1gykFKjE56nnahcN+jK1ZoByvqR9xzZPKbo6JL/dxZL/RcMkASGZdQspcVSpMCZ68YYsVCOoBOP5Vopf9p1sUrBu+HhWsBOT3yj9ImHD2x7Ax3es7EQHAwgMgBM4Ou2nJotrvMKcSVeC0x7TPwDrfb/NWwzb96JPUchAmufGMXax/cdDPxkk1EQPKkE6QqZD+PzyP0uQNt2ia4vFvVeKqkWEnqgVxriKzyccrj4nEn4QYwU3L+itl2og6P8G4SFJlbt6+FptdryKXOop2TM0iQGxmtzo3x7wItJO5ciUHxokqygDCZvCbfYWF7A/vWfqMLTp4in9reL2xiwiy/EW8yODxV9W43UtMoyFYnNfMsXUN2AbS6siBUvZ98Uah2SqP1wDO8e5IO1w7la3eK5Mn37U+lYITvFzdEiPqnEj6lqybe0U+9uS16unqY6/qq5+CO4JylwrwKL4hmtalDuQ9KgUOX3aU+eC71LD7+E32WrRKjvkvnqnYt5DWON0XpqC5DgNLyIoj5BG/DzCp0NQcg3YLNk5KeBWCj4TxOlHOJu73DeunjliyjDtmw+rKM77hD5nXM3TOkbbscax95kJC0AYzyMpQ55NQCrEPOvLzXUrxucTEAR85KQy0wv3nCMl61oMGWWKAHLWZP73IsV+O+O0vOPWMZJQPtzb5L/gk5+XjjXA8mVAHfKmp2YEbZ2y/HvRjO0mZe2bjgs8dEWcWuQozVPDliFqbUTJKe3myW7886SogBYK9DYbDQ5itj6ab0Ce6GJ1WfGFGBUqWHXfmbYXXE8sLPSmVO4pqliEOHeyqTJZk3hWzvif7zaBmJ6za4HtLm4jk0Y1e5/fSjg017Tx5FYywyWeAVH08pWoMQy5+iKt/u01m1lCb0aVijuZeGMdP/PpNVhYSOpvVzug8ANf3DFGSNuyVQUqrF431SQo6Scg8lodmi6dVHtyjilXC2HPvDeJP0bOMA5Mw/+TX2H2jf66VLl7J0aAgix8tRc4dbQVOaYZw8gHSA8jClEDLzs6X
Thanks for the tips!
On Thu, 6 May 2021 at 23:46, Xavier Leroy <Xavier.Leroy AT inria.fr> wrote:
On Thu, May 6, 2021 at 6:02 PM Christopher Ernest Sally <christopherernestsally AT gmail.com> wrote:Hi ClubIn a dev, I'm working with a common representation of fixed width integers, i.e. int := (Z, <a proof that the Z is in some bound>).When doing arithmetic over the Z, I want to ignore the proof (and having proof irrelevance is fine for the dev).I have 2 questions
- Is there an easy / already-common way to set the dev up for this?
You can look at CompCert's Integers module, it follows exactly this approach: https://github.com/AbsInt/CompCert/blob/master/lib/Integers.v
- Or am I left with declaring eq' x y:= fst x = fst y and then a whole bunch of compat axioms, Morphisms etc?
No, becauseforall (x y: {n : Z | P n}), proj1_sig x = proj1_sig y -> x = yif you assume proof irrelevance or if you define P such that proofs of P n are unique.So, your eq' implies Logic.eq, and you don't need setoids, morphisms, etc.Hope this helps,- Xavier Leroy
- A more general problem I have is when working with functions that return an in, (e.g. f x = y) I obviously have Logic.eq, and when rewriting with such equalities, I sometimes get a goal where I'm trying to prove Logic.eq x y from a eq' x y hypothesis. Is there a general fix for this? from both a mathematical and Coq (mechanisms) perspective.
- [Coq-Club] Rewriting/Morphism/Partial Point-wise equality, Christopher Ernest Sally, 05/06/2021
- Re: [Coq-Club] Rewriting/Morphism/Partial Point-wise equality, Xavier Leroy, 05/06/2021
- Re: [Coq-Club] Rewriting/Morphism/Partial Point-wise equality, Christopher Ernest Sally, 05/08/2021
- Re: [Coq-Club] Rewriting/Morphism/Partial Point-wise equality, Emilio Jesús Gallego Arias, 05/06/2021
- Re: [Coq-Club] Rewriting/Morphism/Partial Point-wise equality, Xavier Leroy, 05/06/2021
Archive powered by MHonArc 2.6.19+.