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] Proper morphisms for family of functions
- Date: Wed, 30 Dec 2015 17:13:32 -0800
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=vadim.zaliva AT west.cmu.edu; spf=None smtp.mailfrom=vadim.zaliva AT west.cmu.edu; spf=None smtp.helo=postmaster AT mail-pf0-f180.google.com
- Ironport-phdr: 9a23:fnuboxQjVYEZtdfoBlhh60Mgodpsv+yvbD5Q0YIujvd0So/mwa64ZhGN2/xhgRfzUJnB7Loc0qyN4/6mATRIyK3CmU5BWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4Ov7yUtaLyZ/niabqo9X6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD86Fpy8kVWqLjOq88ULZwDTI8Mmlz6te4mwPESF6x73cdVy0kmx5JHQGNuA/oV5PwrCLSve9gniSWIJulHvgPRT2+4vIzG1fTgyAdOmth/Q==
On Dec 29, 2015, at 19:05 , Abhishek Anand <abhishek.anand.iitg AT gmail.com> wrote:I typically combine the dependent arguments with their indices, and pick an appropriate equality for the combination.
Thanks! I have another related question about Proper, this time with Type classes. In this case
I am working with functions, which are declared to be instances of a type class ‘O’. In example
below this class have just one field, f_proper, but may have more fields. I understand the source
of the problem: I try to rewrite o2, but there is dependent argument O_o2 which needs to be replaced
as well. What would be a good way to deal with this?
Here is a complete example:
Require Import MathClasses.interfaces.canonical_names.
Require Import MathClasses.theory.setoids.
Require Import MathClasses.implementations.peano_naturals.
Class O (op: nat -> nat) :=
f_proper : Proper ((=) ==> (=)) (op).
Definition o1 := plus 1.
Definition o2 := plus 2.
Definition o2' := compose (plus 1) (plus 1).
Instance O_o1: O o1. Admitted.
Instance O_o2: O o2. Admitted.
Instance O_o2': O o2'. Admitted.
Lemma oo: o2 = o2'. Proof. reflexivity. Qed.
Definition X
(f: nat -> nat)
(g: nat -> nat)
`{!O f}
`{!O g} := compose f g.
Lemma foo:
X o1 o2 = X o1 o2'.
Proof.
(* The following fails with:
Error: build_signature: no constraint can apply on a dependent argument
*)
setoid_rewrite oo.
Qed.
Sincerely,
Vadim Zaliva
Vadim Zaliva
--
CMU ECE PhD candidate
Mobile: +1(510)220-1060
Skype: vzaliva
- [Coq-Club] Proper morphisms for family of functions, Vadim Zaliva, 12/30/2015
- Re: [Coq-Club] Proper morphisms for family of functions, Abhishek Anand, 12/30/2015
- Re: [Coq-Club] Proper morphisms for family of functions, Vadim Zaliva, 12/31/2015
- Re: [Coq-Club] Proper morphisms for family of functions, Gregory Malecha, 12/31/2015
- Re: [Coq-Club] Proper morphisms for family of functions, Vadim Zaliva, 12/31/2015
- Re: [Coq-Club] Proper morphisms for family of functions, Gregory Malecha, 12/31/2015
- Re: [Coq-Club] Proper morphisms for family of functions, Vadim Zaliva, 12/31/2015
- Re: [Coq-Club] Proper morphisms for family of functions, Abhishek Anand, 12/30/2015
Archive powered by MHonArc 2.6.18.