coq-club AT inria.fr
Subject: The Coq mailing list
List archive
Re: [Coq-Club] Rewriting inside map expressions to manipulate finite/indexed sum expessions
Chronological Thread
- From: Agnishom Chattopadhyay <agnishom AT cmi.ac.in>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Rewriting inside map expressions to manipulate finite/indexed sum expessions
- Date: Wed, 8 Jul 2020 18:16:52 -0500
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=agnishom AT cmi.ac.in; spf=Pass smtp.mailfrom=agnishom AT cmi.ac.in; spf=None smtp.helo=postmaster AT mail.cmi.ac.in
- Ironport-phdr: 9a23:HiX3UhQfptHer8Y7t3UMP/QgDdpsv+yvbD5Q0YIujvd0So/mwa6zZRCN2/xhgRfzUJnB7Loc0qyK6v6mADxLu87J8ChbNsAVClld0YRetjdjKfbNMVf8Iv/uYn5yN+V5f3ghwUuGN1NIEt31fVzYry76xzcTHhLiKVg9fbytScbdgMutyu+95YDYbRlWizqhe7NyKwi9oRnMusUMjoZuN6c8xgHUrnZLdOha239kLk+Xkxrg+8u85pFu/zlQtv4768JMTaD2dLkkQLJFCzgrL3o779DxuxnZSguP6HocUmEInRdNHgPI8hL0UIrvvyXjruZy1zWUMsPwTbAvRDSt9LxrRwPyiCcGLDE27mfagdFtga1BoRKhoxt/w5PIYIyQKfFzcL/Rcc8cSGFcWMtaSi5PDZ6mb4YXAOUBM+RXoYnzqVUNsBWwGxWjCfj1xTNUnHL7x7E23/gjHAzAwQcuH8gOsHPRrNjtKKoSXua1zKjTzTXDaPNW3Cr25ZbIch87vfGMQbVwcdLLxkYyFwPEjk+fqIz4ND6SzOsNvG6b7+t7VeKvjG4nrhp8rSSqxsctkIXGnJ4axkrF9SV/2Ys4I8CzR0Fnb9C+CpRQqz2aOJVsQsMkW2xltyU3xLIatZKnciYEx5cqyR7BZ/GGcIWE/B3tWeWMLTtmi39oZrayihm8/0S8yuDyVsq53lhFoydbjtXAq34A2hrO4caJTft9+12u2TeJ1w3L7OFLO1w0mbDeK54gxL4wl4IfsUXFHi/smUX5lrWadks++uWu9u/pYa3mq4eBO4NpigzyKLoil8O8DOgiLAQCQnKX9fm/2bH/5UH1XqlGg/ksnqTasJ3WP9kXq6+4DgNPz4ou6QizAjG729oCh3YHNkhKeBefgojpJV7OJPf4AO+6g1u2kTdrw+rKMaHkApXMNHTMiqvucax8605a0AYzzNZf6IxICrwZPf7/R0/8uMbGAhI2MAG42fjrBMhn2o8DWm+DHreVMKbIvl+J4uIvLfOMZIgQuDvlMfcl6PjujX4imV8deqmp2IAaZ2y9HvRnOUmWe2bjjs0AEWcMpgY+VvDliEWeUT5PYHa/R74z5jYiCI6/EYjDQp2tj6ea0SegHpxWY3hGBUqWHXfpcYWEQfYMZziILs9viDxXHYSmHoQmzFSlsBLw47thNOvdvCMC5rz5090gzuLVlAoy8jk8JMSUz32KV2h4nnIBVndi1a95oFd9zVKr2q15xfVTU91VsaAaGjwmPILRmrQpQ+v5XRjMK4/QGQSWB+6+CDR0deofhtoHYkJzAdKn10mR1C+rRbYe0b2NVsVtrvDsmkPpLsM48E7okbE7hgB/EMBKNCuvjeh+8VqLXtObowCij6+vMJ8k8mvN+WOElDTcuUhZVEh7VKSDVHtZZ02E9dk=
Thanks.
I am still having some difficulties. In my proof, I am working with a lattice, so I have finite meets and finite joins. So, for example join_b lo hi f = f lo `join` f (lo + 1) `join` ... `join` f hi. I have the following theorem.
Lemma join_b_ext {A : Type} `{Lattice A} `{BoundedLattice A} (lo hi : nat) (f g : nat -> A)
: (forall a, f a = g a) -> join_b lo hi f = join_b lo hi g.
: (forall a, f a = g a) -> join_b lo hi f = join_b lo hi g.
Now, let's say I have the following goal in some theorem:
bottom =
join_b lo (Init.Nat.min i lo)
(fun j : nat => join_b 0 (Init.Nat.min (i - j) 0) (fun j0 : nat => robustness ϕ τ (i - j - j0)))
join_b lo (Init.Nat.min i lo)
(fun j : nat => join_b 0 (Init.Nat.min (i - j) 0) (fun j0 : nat => robustness ϕ τ (i - j - j0)))
I want to rewrite the (Init.Nat.min (i - j) 0) as just 0. Trying `under join_b_ext do replace (min (i-j) 0) with 0.` does not help because `Error: The reference j was not found in the current environment.`
I understand the error, but what is the best way to deal with this?
On Wed, Jul 8, 2020 at 4:01 PM Laurent Thery <Laurent.Thery AT inria.fr> wrote:
On 7/8/20 10:37 PM, Agnishom Chattopadhyay wrote:
> Does loading ssreflect change the standard behaviour of tacticals like
> in/by/with/etc? This is a problem since a large part of my proof script
> uses things like rewrite H in H0.
yes it does, it is explained in
https://coq.inria.fr/distrib/current/refman/proof-engine/ssreflect-proof-language.html
in particular rewrite has a slighy different semantics
but has some extra capability like a powerful pattern selection.
If you want to do use the standard rewrite, just add <- in front the
first theorem. So rewrite ->H in H0 should work.
--
Laurent
- [Coq-Club] Rewriting inside map expressions to manipulate finite/indexed sum expessions, Agnishom Chattopadhyay, 07/08/2020
- Re: [Coq-Club] Rewriting inside map expressions to manipulate finite/indexed sum expessions, Laurent Thery, 07/08/2020
- Re: [Coq-Club] Rewriting inside map expressions to manipulate finite/indexed sum expessions, Erik Martin-Dorel, 07/08/2020
- Re: [Coq-Club] Rewriting inside map expressions to manipulate finite/indexed sum expessions, Agnishom Chattopadhyay, 07/08/2020
- Re: [Coq-Club] Rewriting inside map expressions to manipulate finite/indexed sum expessions, Laurent Thery, 07/08/2020
- Re: [Coq-Club] Rewriting inside map expressions to manipulate finite/indexed sum expessions, Agnishom Chattopadhyay, 07/09/2020
- Re: [Coq-Club] Rewriting inside map expressions to manipulate finite/indexed sum expessions, Laurent Thery, 07/09/2020
- Re: [Coq-Club] Rewriting inside map expressions to manipulate finite/indexed sum expessions, Agnishom Chattopadhyay, 07/09/2020
- Re: [Coq-Club] Rewriting inside map expressions to manipulate finite/indexed sum expessions, Kyle Stemen, 07/09/2020
- Re: [Coq-Club] Rewriting inside map expressions to manipulate finite/indexed sum expessions, Kyle Stemen, 07/09/2020
- Re: [Coq-Club] Rewriting inside map expressions to manipulate finite/indexed sum expessions, Laurent Thery, 07/09/2020
- Re: [Coq-Club] Rewriting inside map expressions to manipulate finite/indexed sum expessions, Agnishom Chattopadhyay, 07/09/2020
- Re: [Coq-Club] Rewriting inside map expressions to manipulate finite/indexed sum expessions, Laurent Thery, 07/08/2020
- Re: [Coq-Club] Rewriting inside map expressions to manipulate finite/indexed sum expessions, Agnishom Chattopadhyay, 07/08/2020
- Re: [Coq-Club] Rewriting inside map expressions to manipulate finite/indexed sum expessions, Erik Martin-Dorel, 07/08/2020
- Re: [Coq-Club] Rewriting inside map expressions to manipulate finite/indexed sum expessions, Laurent Thery, 07/08/2020
Archive powered by MHonArc 2.6.19+.