#18223: new categories for cartesian products with orders
-------------------------------------+-------------------------------------
Reporter: dkrenn | Owner:
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-6.7
Component: categories | Resolution:
Keywords: sd67 | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
public/ticket/18223 | b924b94bc2e1aa12021cc70b3a919532aa1e350a
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
Salut Nicolas,
Replying to [comment:10 nthiery]:
> We had discussed this design with Daniel, and take my share of the
blame. I am not quite happy with this solution. I am not quite happy with
other solutions either. So that's a good occasion for a discussion!
On the other hand the feature is clearly missing. So we need to find a
solution.
> I guess the main question is whether there will be other categories in
> the long run where there will be several variants for the cartesian
> product, and we want everything to interplay.
>
> If not, then having a specific cartesian product for posets is
> probably ok.
>
> If yes, we would want to have some syntax where we can specify options
> for the various structures.
> {{{
> sage: cartesian_product([A,B,C], poset options, xxx options, ...)
> }}}
This worries me a lot since cartesian product is intended for any kind of
structures... not only poset. If you start adding specific options into
this machinery it will be horrible as well.
> This is more or less what the proposed syntax aims for. But it has the
> drawbacks you mention. Possibly this would not be so bad if the
> category was parametrized by a "term order":
>
> {{{
> sage: cartesian_product([A,B,C],
Posets().CartesianProducts(term_order="lex")
> }}}
This is already nicer. Though, there is a problem with morphisms then (see
my remark 3 in [comment:9 comment:9]). The order in a cartesian product
can not be parametrized if the morphisms are monotone functions. So doing
the above will prevent defining morphisms in that way. I do not know
whether it is what we want to do here.
Note that the following almost works
{{{
B = cartesian_product([A0, A1, A2])
my_cmp = lambda x,y: x[0] <= y[0] and x[1] <= y[1] and x[2] <= y[2]
P = Poset((B, my_cmp))
}}}
I say almost, because building a `Poset` is infinitely slow as always and
works only for finite posets.
Vincent
--
Ticket URL: <http://trac.sagemath.org/ticket/18223#comment:11>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.