coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jianzhou Zhao <jianzhou AT seas.upenn.edu>
- To: coq-club AT inria.fr
- Subject: [Coq-Club] setoid_rewrite under binders
- Date: Sun, 25 Apr 2010 03:52:21 -0400
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=fciStcpzJoVoRYawkyFxTSEkQE+xpoSsGGqr4OMshq11RfGIHDnxBnS3f83rQ6pLhF JNA1OPtqvFMlZum/iOYexQ7GWu9W/SJz5ERcWwQUwgaZKjMNieOObO4tFMToYM0mtkHF D9wga/xpHNO/MKgcqF2Yydg8IRMuycXRu4esE=
Hi,
The code bellow was simplified to demonstrate the problem:
Parameter f : nat -> nat.
Axiom f_def : forall n:nat, f n = n.
Lemma L :
forall n (eq:f n = n) (p:forall n, f n = n->Prop),
p n eq=True -> n = 0.
intros n.
rewrite f_def.
This last rewrite fails, because if f_def change (f n) to n,
eq changes its signature, not matching p's type.
The tactic 'pattern (f n)' fails for the same reason.
The binder (forall n,) stops rewriting.
Can setoid_rewrite solve this problem? It claims it
works under binders
(http://coq.inria.fr/refman/Reference-Manual030.html#toc165)
Coq > intro n. setoid_rewrite f_def.
Error: found no subterm matching 'f ..." in the current goal.
Coq > intros n eq p. setoid_rewrite f_def in p.
Anomaly: build_signature: not enough products. Please report.
I thought the default eq relation '=' should be also a well-formed setoid.
Is my case the problem setoid addessed?
--
Jianzhou
- [Coq-Club] setoid_rewrite under binders, Jianzhou Zhao
- Re: [Coq-Club] setoid_rewrite under binders,
Matthieu Sozeau
- Re: [Coq-Club] setoid_rewrite under binders, Jianzhou Zhao
- Re: [Coq-Club] setoid_rewrite under binders,
Matthieu Sozeau
Archive powered by MhonArc 2.6.16.