-
-
Notifications
You must be signed in to change notification settings - Fork 514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Categories over a base ring category #15801
Comments
comment:1
As commented on #10963, I see some questions to be addressed. If I understand correctly, we sometimes do want to specify the base ring/field, and Volker says that this should be by a "mixin" category (lets call it First complication: We not only have base rings, but (for bimodules) left and right base rings. Should this be reflected in the "FixedBaseBla" categories as well? And another complication: We want to have categories expressing the fact that a field (not just a ring) is acting on the objects, and then want to compute the join. Is there an easy programmatic way to let an error be raised when someone tries to compute the join "Algebras(Fields()) & FixedBaseRing(ZZ)"? |
comment:2
Replying to @simon-king-jena:
Or more precisely, it would accept both kinds of input.
Yup. And later in the category of "polynomial rings over a quotient field."
Yes.
Yes, though I would write it as taking the join with Algebras(QQ).
We will want to accept both:
and
In a first step, I would not bother about mixed calls likes
I don't see a trivial way to do it at this point. It certainly would
So this issue should not prevent us to proceed even if we don't find a good way out. |
comment:3
OK, that's the other possibility: Rather than having a separate mix-in category I have already done some experiments in that direction. We certainly want When I tried it yesterday, Nicolas' bounded C3 algorithm barked at me. Reason (if I recall correctly, I can't use my laptop right now): We want that One possible approach to solve that problem: The strict super-categories of a category with fixed base ring should all be categories with unspecified base rings. Hence, |
comment:4
Replying to @simon-king-jena:
This sounds reasonable. A variant would be, for a category over base I'd say that we certainly want In fact, maybe Here Modules(R) would play a role similar to the category Cheers, |
Dependencies: 10963 |
comment:5
We want to build on top of #10963, right? Replying to @nthiery:
I think
Yes, but then one needs a category
Hmmm. Yes, in that case one wouldn't need an ugly
Well, that's what I commented on at #10963: I was playing with the idea of an axiom |
Changed dependencies from 10963 to #10963 |
comment:7
Replying to @simon-king-jena:
Definitely.
That would be for free if we make Algebras a functorial construction:
Right, if we go the join way, we will need to handle the base case of |
comment:8
Just a little note. In [#10963 comment:261] it was noted that base categories are referenced strongly by a global cache, and hence are prone to cause "memory leaks". This was rebutted there by noting that the number of categories created is uniformly bounded, so the memory use is manageable. This is clearly not true for these parametrized "categories with fixed base". The work on this ticket will improve the situation, because categories parametrized by elements from an infinite set will be less often created, but it's worthwhile to try and think of what to do if they do get created. Perhaps we should really try and avoid them completely? Certainly the infrastructure requirements to support them is radically different, because such parametrized categories need to be deallocatable (I'm impressed that Firefox's spell checker accepts that word and not Firefox). |
comment:9
A simple test that detects some of the problems #10963 presently causes:
On 6.2beta4 this happily runs with constant memory footprint and about constant time per iteration. With #10963 applied, it gradually eats memory. The reason is that "integers mod p" and their categories pile up in memory. The iterations also take about twice as long and they slow down over time (as one would expect with memory use increasing). (see #13925 for why the choice of algorithm might not be so sensible, but it's a useful test for our purposes here) |
comment:10
Hi! I started to work on this. We can now do:
(TODO: would be nicer as Category of algebras over fields) and by default, polynomial rings are created in such categories:
All tests pass in the sage/rings/polynomial. Here are the new timing for Simon's benchmark about creating lots of With Sage 5.0.1:
With develop (6.2.beta7):
With #10963:
With #10963 and this ticket:
Sounds like the time-performance issue for polynomials is indeed fixed for polynomials :-) Now, on to matrices! |
comment:13
Replying to @nbruin:
For the record: I just checked, and with the current version of this Cheers, Last 10 new commits:
|
Commit: |
comment:14
Replying to nbruin:
For the record, here is what I currently get on my machine: With this ticket applied on top of #10963:
Same, without systematic full category initialization for matrices:
With vanilla 6.2.beta6 (no systematic full category initialization for matrices):
Hence #15801 as is seems to be going a long way toward fixing this What do you think? On to the elliptic curve benchmarks. Cheers, |
comment:15
On the benchmark from #11900, I get significantly the same timing with develop and #10963+#15801:
This, despite the additional full category initialization. |
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
|
comment:17
Up to merging in #15919, it's likely that all long test will pass. Running them now. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:19
So Also I think we should not loose support for having the category of algebras over a fixed base ring. For example, given two representations Actually... |
This comment has been minimized.
This comment has been minimized.
comment:20
Replying to @tscrim:
Yup. And at some point we will want weaker things like
I agree with that, though more if we want to manipulate the category
Well, as you say, we have two distinct categories:
so we are fine, aren't we? Cheers, |
comment:21
Until I make a group ring over a group ring. Actually, maybe a less contrived example of modules over |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:57
Pdf compilation fixed in #10963 and merged here. |
comment:58
I think the quiver issue should be discussed here. Nicolas, do you agree with Darij that quiver representations over QQ should live in |
comment:59
Replying to @simon-king-jena:
Ok.
No strong opinion either way, but yes, I would lean in this direction If it makes it easier to switch, so much the better :-) Cheers, |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:61
Replying to @simon-king-jena:
Done. Please review! Running all long tests now. |
comment:62
Sorry for my being too slow. I wanted to try and fix it, but was busy with some other tickets. Thank you for doing it, and I'll now try to review. |
comment:63
I read the latest commit, and it seems good. Hence, I wait for the test results... |
comment:64
The pdf does build... |
comment:65
I get numerous errors of the following type:
Never seen such errors before. |
Changed work issues from doc-pdf to none |
comment:66
Is this perhaps an issue of sage-6.3.beta0? |
comment:67
Thanks Simon for reviewing this! Could you have a quick look as well at the small last commit on #10963? For the git error, IIRC you need a recent version of git for all tests to pass, and doing Cheers, |
comment:68
Simon, are you using |
comment:69
Tests pass for me, so I'm going to set this to positive review. I also only use my system-wide |
comment:70
Replying to @tscrim:
Are you sure that you use your system-wide Best regards, |
comment:71
Replying to @darijgr:
I am now talking about the git that I use, but about the git that |
comment:72
Replying to @nthiery:
It doesn't, because git is already installed. |
Changed branch from public/categories/over-a-base-ring-category-15801 to |
Currently, to construct a category of algebras, we need to specify the
base ring:
A side effect is that the construction of e.g.
GF(p)['x']
for alot of
p
's in number theoretic calculations triggers theconstruction of many parallel hierarchies of categories.
This is a waste because in most situations only the category of the
base ring is relevant. In particular, the generic code provided to
parents/elements/... only depends on the latter.
The purpose of this ticket is to allow for only specifying the
category of the base ring, as in:
with
constructing a subcategory of the former. Then go trough the code,
decide in each case whether we want to use
Algebras(QQ)
orAlgebras(Fields())
, and update the doctests accordingly. In mostcase, the latter idiom will be preferable, unless we need some
operation on the category itself.
This would fix the regression noted on #15792 and made worse by
#10963.
Further features for this ticket or follow-up tickets would be to:
make
Modules(...)
into a covariant functorialconstructions. This would give a proper framework for the feature
Modules(QQ)
->VectorSpaces(QQ)
instead of having totackle it with a special hack.
implement a
PolynomialRings(...)
covariant functorialconstruction.
Depends on #10963
Depends on #16275
CC: @sagetrac-sage-combinat @vbraun @simon-king-jena @darijgr
Component: categories
Author: Nicolas M. Thiéry
Branch/Commit:
15658bd
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/15801
The text was updated successfully, but these errors were encountered: