coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Vadim Zaliva <vzaliva AT cmu.edu>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] setoid rewriting -- naive questions
- Date: Tue, 18 Nov 2014 15:25:56 -0800
On Nov 18, 2014, at 12:41 , Daniel Schepler <dschepler AT gmail.com> wrote:I often define the equivalence on container types using an inductive with constructors which are directly of a Proper type:
Daniel,
That is very helpful. However when I try to reconcile your definition with standard library vector
type I run into the same problem with Proper definition for Vcons.
Your vector definition:
Inductive vector (A:Type) : nat -> Type :=
| vector_nil : vector A 0
| vector_cons : forall {n:nat}, A -> vector A n -> vector A (S n).
Standard library one:
Inductive t A : nat -> Type :=
|nil : t A 0
|cons : forall (h:A) (n:nat), t A n -> t A (S n).
I could not make it work with this:
…
| vector_cons_proper : forall n:nat,
Proper ((=) ==> vector_equiv A n ==> vector_equiv A (S n))
(@Vcons A n).
As cons types differ. I am working with standard vectors and would like to proove that Cons
is proper in first argument wrt ‘(=)’ for them.
P.S. I am also not sure I fully understand the mechanism of inductive Proper definition. Would it be
correct to say that Inductive type here is just a syntactic trick and the the same could be achieved
with non-inductive definition?
Sincerely,
Vadim
Vadim
- [Coq-Club] setoid rewriting -- naive questions, Vadim Zaliva, 11/18/2014
- Re: [Coq-Club] setoid rewriting -- naive questions, Robbert Krebbers, 11/18/2014
- Re: [Coq-Club] setoid rewriting -- naive questions, Vadim Zaliva, 11/18/2014
- Re: [Coq-Club] setoid rewriting -- naive questions, Daniel Schepler, 11/18/2014
- Re: [Coq-Club] setoid rewriting -- naive questions, Vadim Zaliva, 11/19/2014
- Re: [Coq-Club] setoid rewriting -- naive questions, Daniel Schepler, 11/19/2014
- Re: [Coq-Club] setoid rewriting -- naive questions, Vadim Zaliva, 11/19/2014
- Re: [Coq-Club] setoid rewriting -- naive questions, Vadim Zaliva, 11/19/2014
- Re: [Coq-Club] setoid rewriting -- naive questions, Daniel Schepler, 11/19/2014
- Re: [Coq-Club] setoid rewriting -- naive questions, Vadim Zaliva, 11/19/2014
- Re: [Coq-Club] setoid rewriting -- naive questions, Jonathan, 11/19/2014
- Re: [Coq-Club] setoid rewriting -- naive questions, Daniel Schepler, 11/19/2014
- Re: [Coq-Club] setoid rewriting -- naive questions, Robbert Krebbers, 11/19/2014
- Re: [Coq-Club] setoid rewriting -- naive questions, Vadim Zaliva, 11/19/2014
- Re: [Coq-Club] setoid rewriting -- naive questions, Daniel Schepler, 11/19/2014
- Re: [Coq-Club] setoid rewriting -- naive questions, Vadim Zaliva, 11/19/2014
- Re: [Coq-Club] setoid rewriting -- naive questions, Daniel Schepler, 11/19/2014
- Re: [Coq-Club] setoid rewriting -- naive questions, Vadim Zaliva, 11/19/2014
- Re: [Coq-Club] setoid rewriting -- naive questions, Daniel Schepler, 11/18/2014
- Re: [Coq-Club] setoid rewriting -- naive questions, Vadim Zaliva, 11/18/2014
- Re: [Coq-Club] setoid rewriting -- naive questions, Robbert Krebbers, 11/18/2014
Archive powered by MHonArc 2.6.18.