coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jean-Francois Monin <jean-francois.monin AT univ-grenoble-alpes.fr>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] rewrite in the body of a let binding in a proof context
- Date: Tue, 1 Oct 2019 11:50:23 +0200
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jean-francois.monin AT univ-grenoble-alpes.fr; spf=Pass smtp.mailfrom=jean-francois.monin AT univ-grenoble-alpes.fr; spf=None smtp.helo=postmaster AT zm-mta-out-1.u-ga.fr
Here is a simple way without additional equalities or definitions.
Lemma rw (x := 2) (y:2=1): False.
revert x. rewrite y; intro x.
Jean-Francois
On Mon, Sep 30, 2019 at 09:17:06PM -0300, Beta Ziliani wrote:
> You can always lift the definitional equality into a Leibniz one and
> perform the rewrite there
> Assert (eqx2 : x = 2) by reflexivity.
> Rewrite y in eqxy.
> If you need get back a definitional equality with the new term, you can
> Pose (z := x).
> Assert (eqxz : x = z) by reflexivity.
> Rewrite eqxz.
> The last step is to change x with z in the goal.
>
> Written from mobile. Excuse my limited communication.
> On Mon, Sep 30, 2019, 7:51 PM Agnishom Chattopadhyay
>
> <[1]agnishom AT cmi.ac.in>
> wrote:
>
> I would think that the answer is no. x is not a propositional equality
> in the above example. It's a definitional equality. So, I don't think
> rewrite applies here.
> You can't do "rewrite x in y." either, for similar reasons. The
> [2]reference says "where eq is the Leibniz equality or a registered
> setoid equality"
> Note that you can prove this theorem with "inversion y.".
> --Agnishom
> On Mon, Sep 30, 2019 at 3:54 PM Abhishek Anand
>
> <[3]abhishek.anand.iitg AT gmail.com>
> wrote:
>
> Is there a way to rewrite in the body of a let binding in a proof
> context:?
> Lemma rw (x := 2) (y:2=1): False.
> rewrite y in x. (* Error: Found no subterm matching "2" in x. *)
> Thanks,
> -- Abhishek
--
Jean-Francois Monin
Verimag
Universite Grenoble Alpes
- Re: [Coq-Club] rewrite in the body of a let binding in a proof context, Agnishom Chattopadhyay, 10/01/2019
- Re: [Coq-Club] rewrite in the body of a let binding in a proof context, Beta Ziliani, 10/01/2019
- Re: [Coq-Club] rewrite in the body of a let binding in a proof context, Jean-Francois Monin, 10/01/2019
- <Possible follow-up(s)>
- Re: [Coq-Club] rewrite in the body of a let binding in a proof context, Beta Ziliani, 10/01/2019
- Re: [Coq-Club] rewrite in the body of a let binding in a proof context, Jason Gross, 10/01/2019
- Re: [Coq-Club] rewrite in the body of a let binding in a proof context, Beta Ziliani, 10/01/2019
Archive powered by MHonArc 2.6.18.