coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Xavier Leroy <Xavier.Leroy AT inria.fr>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Rewriting/Morphism/Partial Point-wise equality
- Date: Thu, 6 May 2021 18:39:10 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=Xavier.Leroy AT inria.fr; spf=Pass smtp.mailfrom=xavier.leroy AT gmail.com; spf=None smtp.helo=postmaster AT mail-wr1-f43.google.com
- Ironport-hdrordr: A9a23:zq8w76NBNI8AisBcTsKjsMiBIKoaSvp037BL7TEWdfU7SL37qynDpoV56fawslYssRIb9+xoWpPwJE80nKQdieIs1PWZPTUO01HYSL2Kg7GSpAEI2BeSygee781dmmRFZOEYxGIUsfrH
- Ironport-phdr: A9a23:ztK0VxY76X33Yjq4AJDkyRP/LTHF0IqcDmcuAnoPtbtCf+yZ8oj4OwSHvLMx1Q6PB9mDoK4bw8Pt8InYEVQa5piAtH1QOLdtbDQizfssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1JuPoEYLOksi7ze+/94DXbglSmjawbq9+IBq5oAjTq8IbnZZsJqEtxxXTv3BGYf5WxWRmJVKSmxbz+MK994N9/ipTpvws6ddOXb31cKokQ7NYCi8mM30u683wqRbDVwqP6WACXWgQjxFFHhLK7BD+Xpf2ryv6qu9w0zSUMMHqUbw5Xymp4qF2QxHqlSgHLSY0/27ZisNyjKxVrhGvqQFhzYHIe4yaLuZyc7nHcN8GWWZMXMBcXDFBDIOmaIsPCvIMMudCoInjplsBswG+DhSqCuzx0D9IgX/31rA93usgCw7Gwg0gEMwUsHjOqtv6Kr0SUee1zaTTzDXDaelW2Tbn54TSfBAhu+iBULRtesXe1UchDRnKjkmMqYP7JTOV0PwAvmqG4uRuSe+ihWAppgJvrzah28oiipXFi4Ebx13K6Ch13YU4K924RkN7btCqHphduiKVOoZ0Tc4uXmJltDs5x7AApJW1ci8KyJE9yB7ebfyKa4eI4hP/VOaRPDd3n2hpd664hxa390Wr1+7yVtGs3VpUsiZIlsPAu3MN2hDJ9MSLVOZx8l2u1DuB0Q3Y9/tKLloulaXBLp4s2r4wmYQXsUTEBiL2nV/5jK6Sdkk99Omo8fnrbqzoppKTOYJ4kA7+MqMpmsywBeQ3LBICUHSc+eS5zLHj/Ev5T6tWjvAujKXVrJTXKd4Yq6O5GQNZzJgv5wulAzqp3tkUhXwHI0hEeBKDgYjpIVbOIPXgAPawmVusjjZryO7cPrH7BpXCMGLDkLDhfLtm5E5czRA8zdFb555OFr4BJ/fzVlfrtNPEFh85LxC0w+H/Bdph0YMeQHuDDbOdMKPPqlCF/fkvIumJZI8NojnxMfkl5/j0jX84g1ARZ6ep3YFEIEy/S/9hOgCSZWfmqtYHC2YD+AQkH8Lwj1jXYTdNZnuoF4Yx/DYqQNaWBJnCS5rrpLGb2zaTH5tMZ2kABEraQiSgTJmNR/pZMHHaGcRmiDFRDdBJqqck3BCq8RDgkv9pcrGS9SofupbuktNy4r+L/fnX3T1yFcWUlW+XHTkcdowgSDo/3aQ5qkt4mA7r7A==
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, because
forall (x y: {n : Z | P n}), proj1_sig x = proj1_sig y -> x = y
if 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+.