Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Rewrite with setoid equality

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Rewrite with setoid equality


Chronological Thread 
  • From: richard dapoigny <richard.dapoigny AT univ-savoie.fr>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Rewrite with setoid equality
  • Date: Tue, 21 Jul 2015 16:57:46 +0200
  • Organization: LISTIC

Thanks a lot Matthieu. It was a problem of parentheses!
The correct form is: Lemma ProtoTh5 : forall (p q:Prop), (forall f:Morphism,   p ≡≡ ((forall r, (p ≡≡ f r)) ≡≡ (forall r, (q ≡≡ f r)))) -> q.
(T is a parameter of the module and then, there is no need to provide it in the arguments)
Cheers,
Richard

Le 21/07/2015 16:13, Matthieu Sozeau a écrit :
Hi Richard,

  I suppose it's your parentheses that are incorrect:

Lemma ProtoTh5 : forall (p q:Prop), forall (T :Morphism), (forall f:Morphism, 
                    p ≡≡ ((forall r, (p ≡≡ f r)) ≡≡ forall r, (q ≡≡ f r))) -> q.

would probably be better (notice the forall r0 renaming in your version).

Cheers,
-- Matthieu

On Tue, Jul 21, 2015 at 4:03 PM richard dapoigny <richard.dapoigny AT univ-savoie.fr> wrote:
Le 21/07/2015 14:29, Matthieu Sozeau a écrit :
Hi Richard,
  I can't replay you script so it's unclear what happens.

Best, -- Matthieu
Hi Matthieu,
Just before the rewrite tactic, i.e., with:
================================================

Lemma ProtoTh5 : forall (p q:Prop), (forall f:Morphism,
                    p ≡≡ (forall r, (p ≡≡ f r) ≡≡ forall r, (q ≡≡ f r))) -> q.
Proof.
intros p q H1.
specialize (H1 T).
assert (H2:(forall p:Prop, (forall r, p ≡≡ T r) ≡≡ p)).
apply ProtoTh4.
assert (H3:=H2).
specialize (H2 p).
specialize (H3 q).
================================================
I have the following demonstration step:
================================================
1 subgoals
p : Prop
q : Prop
H1 : p ≡≡ (forall r : Prop, (p ≡≡ T r) ≡≡ (forall r0 : Prop, q ≡≡ T r0))
H2 : (forall r : Prop, p ≡≡ T r) ≡≡ p
H3 : (forall r : Prop, q ≡≡ T r) ≡≡ q
______________________________________(1/1)
q
===============================================
The objective is to rewrite (forall r : Prop, p ≡≡ T r) with p in the _expression_ of H1 (and the same job for (forall r : Prop, q ≡≡ T r) in such a way to get the form:
H1 : p ≡≡ (p ≡≡ q)
Cheers,
Richard




Archive powered by MHonArc 2.6.18.

Top of Page