coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Polina Vinogradova <polina.vino AT gmail.com>
- To: coq-club AT inria.fr
- Subject: [Coq-Club] Coercion of Fixpoint-defined elements of a Type Class
- Date: Wed, 16 Nov 2016 22:36:06 -0500
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=polina.vino AT gmail.com; spf=Pass smtp.mailfrom=polina.vino AT gmail.com; spf=None smtp.helo=postmaster AT mail-it0-f48.google.com
- Ironport-phdr: 9a23:qgD4MhdSMWn3AZbfOccl/MiRlGMj4u6mDksu8pMizoh2WeGdxc29bB7h7PlgxGXEQZ/co6odzbGH6Oa5BCddsN7B6ClEK8McEUddyI0/pE8JPo2sMQXDNvnkbig3ToxpdWRO2DWFC3VTA9v0fFbIo3e/vnY4ExT7MhdpdKyuQtaBx5f/6+fn8JrKJg5MmTCVYLVoLRzwox+CmNMRhN5aLaIwzBKBnHpOfOtMzG9vO1vbyw774sa29dh98iJXk/0k/s9EF679evJrHvRjED06PjVtt4XQvh7ZQF7X6w==
Hello !
I am trying to build a coercion that would allow me to apply the projection function found in the Product Type Class (category-theoretic notion thereof) to an n-fold product of an object A (in a category).
I need to to build a function akin to
Fixpoint func (A B:Obj) ( m:nat) ( f: B Hom (nthProd A m) )
( ... other parameters) : Prop :=
match m with
| 0 => ..
| S m' => ..
| S (S m') => func A (S m') (compose f Pi_2) ...
end.
for this , I need
(nthProd A (S (S m))) : (Product A (nthProd A (S m)))
(but it is merely of type Obj)
or something like that, so that
f : Hom B (Product A (nthProd A (S m)))
(compose f Pi_2) : Hom B (nthProd A (S m))
Alternatively, I need to build a function Pi_2' that would take the available arguments and produce a map of the right type to recursively call func with. Here, nthProd is
Fixpoint nthProd (A : RC) (n : nat) : Obj :=
match n with
| 0 => termial_obj
| S 0 => A
| S m => (Has_Products A (nthProd A m))
end.
I have been trying to work this out for a while now and I would really appreciate any ideas on defining the appropriate coercions or avoiding this problem in some other way!
Thank you!
Polina
- [Coq-Club] Coercion of Fixpoint-defined elements of a Type Class, Polina Vinogradova, 11/17/2016
- Re: [Coq-Club] Coercion of Fixpoint-defined elements of a Type Class, Amin Timany, 11/17/2016
- Re: [Coq-Club] Coercion of Fixpoint-defined elements of a Type Class, Polina Vinogradova, 11/17/2016
- Re: [Coq-Club] Coercion of Fixpoint-defined elements of a Type Class, Amin Timany, 11/17/2016
Archive powered by MHonArc 2.6.18.