Opened 4 years ago

Closed 4 years ago

#19073 closed enhancement (fixed)

categorial constructions, pushout and coercions (extended) for asymptotic ring and growth groups

Reported by: dkrenn Owned by:
Priority: major Milestone: sage-6.10
Component: asymptotic expansions Keywords: asymptotics
Cc: behackl Merged in:
Authors: Daniel Krenn Reviewers: Clemens Heuberger
Report Upstream: N/A Work issues:
Branch: 8a32f1f (Commits) Commit: 8a32f1fa6d04cc3364430ece45895069ef7d5352
Dependencies: #17716, #18182, #19028, #18223 Stopgaps:

Description (last modified by cheuberg)

Extend coercions and deal with pushout constructions.

See also meta ticket #17601.

Change History (34)

comment:1 Changed 4 years ago by dkrenn

  • Branch set to u/dkrenn/asy/groups-coercion

comment:2 Changed 4 years ago by git

  • Commit set to a23d36e27626c71270bc645aee281fa061fb5a65

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

225e240new element constructor for cartesian products
296f432combine_exceptions function
68988a8fix a bug in element_constructor and rewrite it
7cd6018rewrite repr of term
1b73481correct a bug in term constructor
1cd896bextend has coercion
287c0aemake asymptotic ring a poset (Part I)
3030d88variable_names
74f2db0more cleanup and using generalizing methods for cartesian product
a23d36econstruction and functor and doctests

comment:3 Changed 4 years ago by git

  • Commit changed from a23d36e27626c71270bc645aee281fa061fb5a65 to a3b2cc6bf07c385460005aeca3acfc15b08ee82a

Branch pushed to git repo; I updated commit sha1. New commits:

3b49e70pushout: correct str/repr (switch to be constistent with remaining Sage)
a3b2cc6Merge branch 'pushout/functor-str' into u/dakrenn/asy/rings-coercion

comment:4 Changed 4 years ago by dkrenn

  • Description modified (diff)

comment:5 Changed 4 years ago by git

  • Commit changed from a3b2cc6bf07c385460005aeca3acfc15b08ee82a to e9acd0ea452a0b410fb9804e68fc6c3e7cda5233

Branch pushed to git repo; I updated commit sha1. New commits:

19247a5fix derived classes
dacbfcbmore replacements of __str__ by _repr_
d1356e5Merge branch 'pushout/functor-str' into u/dakrenn/asy/rings-coercion
27601bafix missing docs
e1acc40improve docs (seealso, links, etc)
98e8860make doctest coverage 100% (asymptotic_ring)
e9acd0ecleanup (remove a comment)

comment:6 Changed 4 years ago by behackl

  • Cc behackl added

comment:7 Changed 4 years ago by dkrenn

  • Status changed from new to needs_review

comment:8 Changed 4 years ago by dkrenn

  • Dependencies changed from #17600, #18930, #18182, #19028, #18587, #18223, #18586 to #17600, #17716, #18930, #18182, #19028, #18587, #18223, #18586

comment:9 Changed 4 years ago by git

  • Commit changed from e9acd0ea452a0b410fb9804e68fc6c3e7cda5233 to 963f9da12b9d8d5441d277556bcfdef94842eddb

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

58f931dadd asymptotic_expansions index
39621adMerge branch 't/17600/asy/growthGroup' into t/19073/asy/groups-coercion
9d6f2daMerge branch 't/17600/asy/growthGroup' into t/18930/asy/growthGroup-factory
6da5adeMerge branch 't/18930/asy/growthGroup-factory' into t/17715/asy/asymptoticTerm
2c1c39dMerge branch 't/17715/asy/asymptoticTerm' into t/17716/asy/asymptoticExpression
41a80a2Merge branch 't/17716/asy/asymptoticExpression' into t/19073/asy/groups-coercion
ca5da4aMerge branch 't/18930/asy/growthGroup-factory' into t/18587/asy/growth-group-cartesian
ac80aebadd growth_group_cartesian to index
96f7101Merge branch 't/18587/asy/growth-group-cartesian' into t/19028/asy/growthGroup-exponential
963f9daMerge branch 't/19028/asy/growthGroup-exponential' into t/19073/asy/groups-coercion

comment:10 Changed 4 years ago by dkrenn

merged 6.9.beta5

comment:11 Changed 4 years ago by dkrenn

  • Component changed from symbolics to asymptotic expansions

comment:12 Changed 4 years ago by git

  • Commit changed from 963f9da12b9d8d5441d277556bcfdef94842eddb to 8d6de433b27f16c165ed1495e12e6293f147d59a

Branch pushed to git repo; I updated commit sha1. New commits:

cd17673Merge tag '6.9.beta6' into t/18182/18182-on-6.8
3eefe25correct typo in AUTHORS
5fe52e4fix doctests since name of cartesian product functor has changed
60b9375revert changes in base_ring of category_object and adapt doctests
8d6de43Merge remote-tracking branch 'trac/u/dkrenn/18182/pushout' into t/19073/asy/groups-coercion

comment:13 Changed 4 years ago by dkrenn

merged 6.9.beta6 (with #18182)

comment:14 Changed 4 years ago by git

  • Commit changed from 8d6de433b27f16c165ed1495e12e6293f147d59a to 6180b439d45e4aac2278fc1300101f1aa6ba6800

Branch pushed to git repo; I updated commit sha1. New commits:

c16587cfix bug (tower has only one entry which is None)
6180b43Merge branch 'u/dkrenn/18182/pushout' of trac.sagemath.org:sage into t/19073/asy/groups-coercion

comment:15 Changed 4 years ago by git

  • Commit changed from 6180b439d45e4aac2278fc1300101f1aa6ba6800 to 36e16a307cb5f4e5751d7f3c529539f4b5daa096

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

538e1e4doctest for simplify-keyword
e98964bremove superfluous doctest
5cf2a31doctests for AsymptoticRing.__init__
dc00f95improve documentation of _element_constructor_
abb08ffimprove _element_constructor_
78b9e96Trac #17716: additional doctest
055e35bTrac #17716: Fix ReSt error
e8e2501make entry in reference/index
e86db32Merge branch 'u/dkrenn/asy/asymptoticExpression' of trac.sagemath.org:sage into t/19073/asy/groups-coercion
36e16a3fix doctests after merge

comment:16 Changed 4 years ago by dkrenn

Merged in changes in dependencies.

comment:17 Changed 4 years ago by git

  • Commit changed from 36e16a307cb5f4e5751d7f3c529539f4b5daa096 to dd82094ee12535fe218a6a1d0d96a8c60b6b3f2d

Branch pushed to git repo; I updated commit sha1. New commits:

dd82094fix duplicated docstring-parts

comment:18 Changed 4 years ago by cheuberg

  • Branch changed from u/dkrenn/asy/groups-coercion to u/cheuberg/asy/groups-coercion

comment:19 Changed 4 years ago by git

  • Commit changed from dd82094ee12535fe218a6a1d0d96a8c60b6b3f2d to e2070b1eade3c10b528757d362d63db499d7e5e6

Branch pushed to git repo; I updated commit sha1. New commits:

2e0f69fTrac #19073: Fix ReSt errors and links
22c6bf6Trac #19073: Fix minor errors
1f672aeTrac #19073: language issues
e2070b1Trac #19073: mark doctests as indirect

comment:20 follow-up: Changed 4 years ago by cheuberg

  • Description modified (diff)
  • Reviewers set to Clemens Heuberger
  • Status changed from needs_review to needs_work

I reviewed this ticket without reviewing its dependency #18182. I have added a few reviewer commits.

Here are some further comments.

  1. growth_group.combine_exceptions: missing INPUT and OUTPUT blocks
  2. Why is the default category now a monoid instead of a group?
  3. GenericGrowthGroup._pushout_:
    • explain why there is no common canonical parent for objects with parents: Growth Group QQ^x and Growth Group x^QQ (commutativity of pushouts vs. non-commutativity of cartesian products of growth groups with the same generator?)
    • What is the role of the lines
              if isinstance(other, GenericGrowthGroup):
                  pass
      
  4. growth_group_cartesian.merge_overlapping:
    • add more information to docstring: missing INPUT: and OUTPUT: blocks
    • find_mergedoverlapping_index: key is evaluated frequently
  5. _convert_factors_: remove list in penultimate line of code.
  6. TermWithCoefficientMonoid._element_constructor_: what is the point of catching and immediately re-raising an exception in
    try:
    	return self.element_class(self, data, coefficient)
    except:
    	raise
    
  7. AsymptoticRing.__init__: why is an Asymptoticring now a poset?

comment:21 Changed 4 years ago by dkrenn

  • Branch changed from u/cheuberg/asy/groups-coercion to u/dkrenn/asy/groups-coercion

comment:22 in reply to: ↑ 20 ; follow-up: Changed 4 years ago by dkrenn

  • Commit changed from e2070b1eade3c10b528757d362d63db499d7e5e6 to b3066794998b177bccbba2e4e50cf2f235a39ad9
  • Status changed from needs_work to needs_review

Replying to cheuberg:

I reviewed this ticket without reviewing its dependency #18182. I have added a few reviewer commits.

Cross-review...ok.

  1. growth_group.combine_exceptions: missing INPUT and OUTPUT blocks

Added.

  1. Why is the default category now a monoid instead of a group?

A monoid is all what is needed to make the asymptotic ring a ring. Of course usually this will be a group to allow inversions in the ring, but as a minimal requirement, we have Monoids()

  1. GenericGrowthGroup._pushout_:
    • explain why there is no common canonical parent for objects with parents: Growth Group QQ^x and Growth Group x^QQ (commutativity of pushouts vs. non-commutativity of cartesian products of growth groups with the same generator?)

Documented.

  • What is the role of the lines
            if isinstance(other, GenericGrowthGroup):
                pass
    

elif forgotten in the line following this. Rewritten completely.

  1. growth_group_cartesian.merge_overlapping:
    • add more information to docstring: missing INPUT: and OUTPUT: blocks

Added and extended.

  • find_mergedoverlapping_index: key is evaluated frequently

Now cached.

  1. _convert_factors_: remove list in penultimate line of code.

Done.

  1. TermWithCoefficientMonoid._element_constructor_: what is the point of catching and immediately re-raising an exception in
    try:
    	return self.element_class(self, data, coefficient)
    except:
    	raise
    

No point; changed. (I think this changed at some point and was forgotten)

  1. AsymptoticRing.__init__: why is an Asymptoticring now a poset?

Removed (this was planned to be done on #19083).


New commits:

56990b0Trac #19073, comment 20, 1: add missing INPUT/OUTPUT block of combine_exceptions
f2e0d84Trac #19073, comment 20, 4: missing INPUT/OUTPUT block of merge_overlapping and extend description
247ab54Trac #19073, comment 20, 4: cache keys
753f252Trac #19073, comment 20, 5: remove unnecessary list
2473d02Trac #19073, comment 20, 6: simplify try/except
2aebbc8Trac #19073, comment 20, 7: remove Poset category from AsymptoticRing
5c94f32Trac #19073, comment 20, 3: rewrite first few lines of _pushout_
b306679Trac #19073, comment 20, 3: document a test in pushout

comment:23 Changed 4 years ago by git

  • Commit changed from b3066794998b177bccbba2e4e50cf2f235a39ad9 to 311fc97974e60bd4a96629fd8edef00d026fa19b

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

bc70cb9Trac #18182, comment 20, 7: rename CartesianProductPolys --> CartesianProductPoly
592a551Merge branch 'u/dkrenn/coercion/pushout' of trac.sagemath.org:sage into t/19073/asy/groups-coercion
70aa9c4rename CartesianProductPosets to CartesianProductPoset
f21990dcode-simplify CartesianProduct assignment
8f9a619add a doctest dealing with coercion while comparing
3b923b7Merge branch 'u/dkrenn/cat/cartesian-product-posets' of trac.sagemath.org:sage into t/18587/asy/growth-group-cartesian
74547e6fix code after changes by previous merge
23c9a49Merge branch 't/18587/asy/growth-group-cartesian' into t/19028/asy/growthGroup-exponential
09221f0fixup due to changes in #18587 (coming from #18223)
311fc97Merge branch 'u/dkrenn/asy/growthGroup-exponential' of trac.sagemath.org:sage into t/19073/asy/groups-coercion

comment:24 Changed 4 years ago by dkrenn

Merge in all dependencies.

comment:25 Changed 4 years ago by dkrenn

  • Dependencies changed from #17600, #17716, #18930, #18182, #19028, #18587, #18223, #18586 to #17716, #18182, #19028, #18223, #18586

comment:26 Changed 4 years ago by cheuberg

  • Branch changed from u/dkrenn/asy/groups-coercion to u/cheuberg/asy/groups-coercion

comment:27 Changed 4 years ago by git

  • Commit changed from 311fc97974e60bd4a96629fd8edef00d026fa19b to 1583ffcaa805fe5021fa014dbe1ab99636466e5f

Branch pushed to git repo; I updated commit sha1. New commits:

2a80346Trac #19073: simplify signatures of helper functions in merge_overlapping
1583ffcTrac #19073: Reword and add doctest for _pushout_

comment:28 in reply to: ↑ 22 ; follow-up: Changed 4 years ago by cheuberg

Replying to dkrenn:

Replying to cheuberg:

  1. Why is the default category now a monoid instead of a group?

A monoid is all what is needed to make the asymptotic ring a ring. Of course usually this will be a group to allow inversions in the ring, but as a minimal requirement, we have Monoids()

Ok, this explains why a GenericGrowthGroup is only a monoid.

The derived classes MonomialGrowthGroup and ExponentialGrowthGroup, however, will be groups in many cases. Perhaps this can be resolved in or after #19083.

  1. GenericGrowthGroup._pushout_:
    • explain why there is no common canonical parent for objects with parents: Growth Group QQ^x and Growth Group x^QQ (commutativity of pushouts vs. non-commutativity of cartesian products of growth groups with the same generator?)

Documented.

I reworded that and added further doctests.

  • find_mergedoverlapping_index: key is evaluated frequently

Now cached.

However, the helper functions only need the keys, I added a commit to do so.

Please cross-review my changes and add item 2. to the TODO list of #19083 or, alternatively, open a ticket for that. After that, consider this to be a conditional positive_review from my side, conditional on #18182.

comment:29 Changed 4 years ago by dkrenn

  • Branch changed from u/cheuberg/asy/groups-coercion to u/dkrenn/asy/groups-coercion

comment:30 in reply to: ↑ 28 Changed 4 years ago by dkrenn

  • Commit changed from 1583ffcaa805fe5021fa014dbe1ab99636466e5f to 8a32f1fa6d04cc3364430ece45895069ef7d5352
  • Status changed from needs_review to positive_review

Replying to cheuberg:

Replying to dkrenn:

Replying to cheuberg:

  1. Why is the default category now a monoid instead of a group?

A monoid is all what is needed to make the asymptotic ring a ring. Of course usually this will be a group to allow inversions in the ring, but as a minimal requirement, we have Monoids()

Ok, this explains why a GenericGrowthGroup is only a monoid.

The derived classes MonomialGrowthGroup and ExponentialGrowthGroup, however, will be groups in many cases. Perhaps this can be resolved in or after #19083.

Ok. Added it as a work issue on #19083.

  1. GenericGrowthGroup._pushout_:
    • explain why there is no common canonical parent for objects with parents: Growth Group QQ^x and Growth Group x^QQ (commutativity of pushouts vs. non-commutativity of cartesian products of growth groups with the same generator?)

Documented.

I reworded that and added further doctests.

Corrected PEP8.

  • find_mergedoverlapping_index: key is evaluated frequently

Now cached.

However, the helper functions only need the keys, I added a commit to do so.

Thanks.

Please cross-review my changes and add item 2. to the TODO list of #19083 or, alternatively, open a ticket for that. After that, consider this to be a conditional positive_review from my side, conditional on #18182.

Everything done.


New commits:

8a32f1fcorrect PEP8-spacings in doctest

comment:31 Changed 4 years ago by cheuberg

  • Dependencies changed from #17716, #18182, #19028, #18223, #18586 to #17716, #18182, #19028, #18223
  • Milestone changed from sage-6.9 to sage-6.10

Removed dependency on "duplicate" ticket #18586.

comment:32 Changed 4 years ago by vbraun

  • Status changed from positive_review to needs_work

This is probably due to one of the tickets in beta2, probably best to wait for the next release and then fix:

sage -t --long src/sage/combinat/rigged_configurations/kr_tableaux.py
**********************************************************************
File "src/sage/combinat/rigged_configurations/kr_tableaux.py", line 1671, in sage.combinat.rigged_configurations.kr_tableaux.KRTableauxTypeDTri2Element.e
Failed example:
    KRT.module_generators[0].e(0)
Exception raised:
    Traceback (most recent call last):
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 496, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 858, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.combinat.rigged_configurations.kr_tableaux.KRTableauxTypeDTri2Element.e[1]>", line 1, in <module>
        KRT.module_generators[Integer(0)].e(Integer(0))
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/combinat/rigged_configurations/kr_tableaux.py", line 1680, in e
        ret = ret.to_virtual_configuration().e(0)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/combinat/rigged_configurations/rigged_configuration_element.py", line 1327, in e
        ret = self.to_tensor_product_of_kirillov_reshetikhin_tableaux().e(a)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/combinat/crystals/tensor_product.py", line 1258, in e
        position = self.positions_of_unmatched_plus(i)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/combinat/crystals/tensor_product.py", line 1400, in positions_of_unmatched_plus
        l = self.positions_of_unmatched_minus(i, dual=True, reverse=True)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/combinat/crystals/tensor_product.py", line 1380, in positions_of_unmatched_minus
        plus = self[j].epsilon(i)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/combinat/rigged_configurations/kr_tableaux.py", line 1532, in epsilon
        return KirillovReshetikhinTableauxElement.epsilon(self, i)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/combinat/rigged_configurations/kr_tableaux.py", line 1373, in epsilon
        return self.to_kirillov_reshetikhin_crystal().epsilon0()
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/combinat/rigged_configurations/kr_tableaux.py", line 1160, in to_kirillov_reshetikhin_crystal
        return self.parent().kirillov_reshetikhin_crystal()(self)
      File "sage/structure/parent.pyx", line 1098, in sage.structure.parent.Parent.__call__ (/mnt/disk/home/buildslave-sage/slave/sage_git/build/src/build/cythonized/sage/structure/parent.c:9821)
        return mor._call_(x)
      File "sage/structure/coerce_maps.pyx", line 109, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (/mnt/disk/home/buildslave-sage/slave/sage_git/build/src/build/cythonized/sage/structure/coerce_maps.c:4543)
        raise
      File "sage/structure/coerce_maps.pyx", line 104, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (/mnt/disk/home/buildslave-sage/slave/sage_git/build/src/build/cythonized/sage/structure/coerce_maps.c:4436)
        return C._element_constructor(x)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/combinat/crystals/kirillov_reshetikhin.py", line 3024, in _element_constructor_
        return self.module_generator().f_string(f_str)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/combinat/crystals/kirillov_reshetikhin.py", line 543, in module_generator
        return [ b for b in self.module_generators if b.weight() == weight][0]
    IndexError: list index out of range
**********************************************************************

comment:33 Changed 4 years ago by vbraun

  • Status changed from needs_work to positive_review

Nevermind was casued by something else

comment:34 Changed 4 years ago by vbraun

  • Branch changed from u/dkrenn/asy/groups-coercion to 8a32f1fa6d04cc3364430ece45895069ef7d5352
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.