#18587: cartesian products of growth groups
-------------------------------------+-------------------------------------
Reporter: dkrenn | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.9
Component: asymptotic | Resolution:
expansions | Merged in:
Keywords: asymptotics, | Reviewers: Clemens Heuberger
gsoc15 | Work issues:
Authors: Benjamin Hackl, | Commit:
Daniel Krenn | 7f209ea7928606090e597d0633685649739932b8
Report Upstream: N/A | Stopgaps:
Branch: u/behackl/asy |
/growth-group-cartesian |
Dependencies: #18223, #18586, |
#18930 |
-------------------------------------+-------------------------------------
Changes (by behackl):
* status: needs_work => needs_review
* commit: 6d3e4f4ce27b8b0cb252f05a352458f7075e0b1a =>
7f209ea7928606090e597d0633685649739932b8
* branch: u/cheuberg/asy/growth-group-cartesian => u/behackl/asy/growth-
group-cartesian
Comment:
Replying to [comment:22 cheuberg]:
> Replying to [comment:21 behackl]:
> > Replying to [comment:18 cheuberg]:
> > > 2. `Variable.__init__`: `ValueError` "is not a valid name": not
tested
> >
> > Removed this particular piece of code; the check is not necessary: the
parser only allows strings that are valid identifiers (see my answer to
3.).
>
> I do not think so: `extract_variable_names` is only called when `repr is
None`, the removed code was only called when `repr is not None`. Indeed,
the following does now work:
> {{{
> sage: from sage.rings.asymptotic.growth_group import Variable
> sage: Variable("(:-)", repr="icecream").var_bases
> ('(:-)',)
> }}}
>
Mea culpa, I misread the code. I've reverted the commit.
> > > 7. `GrowthGroupFactory.create_key_and_extra_argument`: Again, my
suggestion is to delegate the string parsing to the symbolic ring. Note
that `SR('x^ZZ')` happily accepts `ZZ` as a variable, so I imagine that
postprocessing here would not involve big problems. I do not read this
string parser here before the decision on its eventual fate.
> >
> > Unfortunately, I think that this should not be parsed by the symbolic
ring: the cartesian product which we model with `*` is not commutative: if
the same variable is used, the growth groups are ordered
lexicographically. By using the symbolic ring, the input order might be
destroyed/ignored.
>
> I see.
>
> The current code makes some effort to recognize `**` in
`create_key_and_extra_args`, but `**` is not recognized in
`create_object`.
>
>
Minor discrepancies like this are fixed on the cleanup ticket #19083. No
need to introduce additional merge conflicts here.
>
> > > 9. `CartesianProductFactory`:
> > > - the example with "do not have disjoint variables" is somewhat
puzzeling, because the cartesian product of `A` and `B` was allowed.
> >
> > I understand the confusion. However, I think that the error message is
quite helpful in this case:
> > {{{
> > sage: cartesian_product([A, E]); G
> > Traceback (most recent call last):
> > ...
> > ValueError: Growth groups (Growth Group x^ZZ, Growth Group x^ZZ *
y^ZZ) do not have pairwise disjoint variables.
> > }}}
> >
> > Mainly, this is because the cartesian product cannot decide which
order to use in this case.
> perhaps rephrase error message along the lines of "factors must have
equal or disjoint variables"?
>
Done; improved the error message.
> > Also, I think that we should restrict building cartesian products of
growth groups such that a factor may only occur once (currently, `x^ZZ *
x^ZZ` is possible). I'll discuss this with Daniel.
>
> that might be hard.
>
Turns out that this is very true. We will start with disallowing certain
products like `x^ZZ * x^ZZ` and `x^ZZ * x^QQ` in the cleanup ticket.
Altering the factory here only produces more merge conflicts with #19083
(the entire factory is rewritten there, meaning that the code would have
to be written twice).
----
New commits:
||[http://git.sagemath.org/sage.git/commit/?id=66759bb07e885f55decc3d09319f68f6d646f634
66759bb]||{{{Revert "remove unreachable ValueError (comment 2)"}}}||
||[http://git.sagemath.org/sage.git/commit/?id=064256413e24934e44328446dd093d8d56a786c3
0642564]||{{{doctest added}}}||
||[http://git.sagemath.org/sage.git/commit/?id=7f209ea7928606090e597d0633685649739932b8
7f209ea]||{{{improved error message (equal or disjoint var.)}}}||
--
Ticket URL: <http://trac.sagemath.org/ticket/18587#comment:25>
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.