Take a look at sage/categories/pushout.py.  You will need to define
construction() methods on both A and B, which return pairs (F_A, X_A) and
(F_B, X_B), where the F are ConstructionFunctors with F_A(X_A) = A and
F_B(X_B) = B.  You then need to tell Sage how to merge F_A and F_B.  See
pushout.py for details and examples.
David

On Fri, Jan 2, 2015 at 1:36 PM, Daniel Krenn <kr...@aon.at> wrote:

> I've tried to reduce my problem to the following set-up and question:
>
> Say we have algebraic structures A and B (think of groups) constructed
> like this:
>
>   A = CreateGroup('alpha')
>   B = CreateGroup('beta')
>
> Elements are then
>
>   a = A.an_element()
>   b = B.an_element()
>
> Now I want to perform a binary operation on a and b, e.g.
>
>   c = a * b
>
> Thus, the coercion model has to find a parent where both live in (there
> is no coercion from A to B or vice versa).
>
> I have a common parent C which can be created from A and B:
>
>   C = PlugTogether(A, B)
>
> (think here of something similar to a cartesian product). This parent C
> is what we want to find, but how can the coercion model do this? How can
> it discover this PlugTogether construction?
>
> I've read about functorial constructions, but are these here the key? If
> yes, how does this work (since there are two groups involved)?
>
> Best wishes
>
> Daniel
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to