Skip to content
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

Implement categories for super algebras/modules #18044

Closed
tscrim opened this issue Mar 24, 2015 · 44 comments
Closed

Implement categories for super algebras/modules #18044

tscrim opened this issue Mar 24, 2015 · 44 comments

Comments

@tscrim
Copy link
Collaborator

tscrim commented Mar 24, 2015

After some design discussion, a proposal for an implementation is to be a subcategory of Graded algebras/modules whose default even/odd considers the given grading as being ZZ / 2 ZZ compatible. Thus it will have the following methods:

  • is_even()
  • is_odd()
  • is_even_odd()

The API will be the user defines a degree method which is then called by is_even_odd() and taken mod 2. Therefore if the user wants to have a special grading group, then the user can override is_even_odd() to translate that into 0 or 1. The hook of is_even_odd also allows the user to change the super behavior away from the grading group (which will get used in #17096).

Depends on #18174

CC: @nthiery @darijgr

Component: categories

Keywords: super, sd67

Author: Travis Scrimshaw

Branch/Commit: 16a3791

Reviewer: Darij Grinberg

Issue created by migration from https://trac.sagemath.org/ticket/18044

@tscrim tscrim added this to the sage-6.6 milestone Mar 24, 2015
@tscrim tscrim self-assigned this Mar 24, 2015
@tscrim
Copy link
Collaborator Author

tscrim commented Mar 24, 2015

Commit: cd6d21a

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 24, 2015

New commits:

cd6d21aCreated super categories for algebras and modules.

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 24, 2015

@darijgr
Copy link
Contributor

darijgr commented Mar 28, 2015

comment:2
+ def Super(self, base_ring=None):
+ r"""
+ Return the subcategory of the super objects of ``self``.

Is this really a subcategory? Super Lie algebras are not Lie algebras and cannot be reasonably made into such short of taking the even part...

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 28, 2015

comment:3

Good point (this is different than Graded, which is where I copied things from). Think we should just replace the word "sub" with "associated"? If so, I can go make this change (in about 2 hours).

@darijgr
Copy link
Contributor

darijgr commented Mar 28, 2015

comment:4

I'd just say "Return the super-analogue of self" (the word "analogue" is a bit weasel, but I think it's better to err on this side). In general, there should be a canonical embedding from C into C.Super(), not the other way round.

What do you mean by "Same as :meth:Graded"?

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 28, 2015

comment:5

Replying to @darijgr:

I'd just say "Return the super-analogue of self" (the word "analogue" is a bit weasel, but I think it's better to err on this side). In general, there should be a canonical embedding from C into C.Super(), not the other way round.

It's more of there is not a forgetful functor from C.super() to C, but I'll make this change.

What do you mean by "Same as :meth:Graded"?

Meaning I copied it. <.< >.>

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 28, 2015

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

3d33730Merge branch 'develop' into public/categories/super_categories-18044
0ce1cadChanging the wording of the Super method.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 28, 2015

Changed commit from cd6d21a to 0ce1cad

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 28, 2015

comment:7

I've made the change. Although actually, forgetting the "super" doesn't change the multiplication, just removes the notion of supercommuting elements and the degree. So there is a forgetful functor at least, right (or am I overthinking things)?

@darijgr
Copy link
Contributor

darijgr commented Mar 29, 2015

comment:8

Forgetting the grading on a superalgebra gives you an algebra, yes. But forgetting the grading on a Lie superalgebra does not give you a Lie algebra; it gives something weird and unnamed. So forgetful functors should only exist in specific categories.

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 29, 2015

comment:9

True, but I think for now we can live with the slight abuse since there are not plans currently (at least by me) to implement Lie superalgebras. Then again, IDK how much of the code I've written wouldn't work in the category for Lie superalgebras. ehh...I think we can cross that bridge if/when that's an issue.

@darijgr
Copy link
Contributor

darijgr commented Mar 29, 2015

comment:10

Sorry but the assumption that "super X are graded X" (or just "super X are X") is fundamentally wrong. The longer we keep it in, the harder it will be to cross that bridge. It already causes wrong results:

sage: C = HopfAlgebras(QQ).Super()
sage: C.super_categories()
[Category of hopf algebras over Rational Field,
 Category of super algebras over Rational Field]

Super Hopf algebras are not Hopf algebras. In a Hopf algebra,
(xy)_{(1)} \otimes (xy)_{(2)} = x_{(1)} y_{(1)} \otimes x_{(2)} y_{(2)}
(using sumfree Sweedler notation), while in a super Hopf algebra,
(xy)_{(1)} \otimes (xy)_{(2)} = (-1)^{\deg y_{(1)} \deg x_{(2)}} x_{(1)} y_{(1)} \otimes x_{(2)} y_{(2)}.

In other news: In the lift_module_morphism method for Clifford algebras, did you really mean Graded in

        return Cl.module_morphism(on_basis=f, codomain=self,
                                  category=AlgebrasWithBasis(self.base_ring()).Graded())

(and not Super)?

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 29, 2015

comment:11

Then I guess we need to change the default super categories thingy and just be explicit about things.
So then the category hierarchy should be

SuperHopf    GradedHopf
    |           |
SuperAlg      Hopf
       \     /
         Alg

right? So we could do an explicit override of the SuperHopf's super category (at least, this is probably one of the very few instances where a super object is different notation from the graded).

@darijgr
Copy link
Contributor

darijgr commented Apr 2, 2015

comment:12

Replying to @tscrim:

So we could do an explicit override of the SuperHopf's super category (at least, this is probably one of the very few instances where a super object is different notation from the graded).

Sorry, I just don't like this whole paradigm where a category liberally makes assumptions that the subcategory has to override if they are not satisfied. The category framework was created to mirror the mathematical structure of algebraic categories (or so I have been told). Mathematically, there is no reason why a superX should canonically be an X; the fact that this holds for many of the standard Xes (algebras, modules, etc.) is not inherent to the notion of "super"ness but to these Xes, so it shouldn't be reflected in any automatic inheritance. Does the way you implemented Super require SuperX to derive from X?

@tscrim
Copy link
Collaborator Author

tscrim commented Apr 2, 2015

comment:13

Currently yes, but I'm going to change it so that you have to explicitly set X to be supercategory of superX.

@darijgr
Copy link
Contributor

darijgr commented Apr 2, 2015

comment:14

Thank you!

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 2, 2015

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

b29650bMade it so you must explicitly designate graded as a super category

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 2, 2015

Changed commit from 0ce1cad to b29650b

@tscrim
Copy link
Collaborator Author

tscrim commented Apr 2, 2015

comment:16

I'm not happy with this because of how certain things in the category hierarchy are respected, even in this new version. In particular:

sage: C = HopfAlgebras(ZZ).WithBasis().Super(); C
Category of super hopf algebras with basis over Integer Ring
sage: sorted(C.super_categories(), key=str)
[Category of hopf algebras with basis over Integer Ring,
 Category of super algebras over Integer Ring,
 Category of super algebras with basis over Integer Ring]

I don't know a way around this currently...

However I'm starting to wonder if this is what we want. If we want two notions of super, the first is via a functorial construction for things like modules and algebras (and rings once the graded versions get implemented), and for other things if we want the Super call to go to a Category_over_base_ring subclass. Mainly the first examples satisfy the conditions of the regressive covariant functorial construction, but the others, like Hopf and Lie algebras, don't. Doing things this way also seem like they will simplify the implementation as a fringe benefit. Thoughts (inc. from Nicolas)?

@nthiery
Copy link
Contributor

nthiery commented Apr 7, 2015

comment:17

Replying to @tscrim:

(inc. from Nicolas)?

I don't have the big picture at this point. Let's discuss this in Montreal!

@tscrim
Copy link
Collaborator Author

tscrim commented Apr 13, 2015

Dependencies: #18174

@tscrim
Copy link
Collaborator Author

tscrim commented Apr 13, 2015

comment:18

#18174 will simplify this a bit.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 14, 2015

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

7554dbd1 step forward, 2 steps back.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 14, 2015

Changed commit from 7554dbd to caada13

@tscrim
Copy link
Collaborator Author

tscrim commented Apr 14, 2015

Changed keywords from super to super, sd67

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 16, 2015

Changed commit from caada13 to 26859cb

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 16, 2015

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

26859cbmanual merge with sage 6.7.beta1

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 16, 2015

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

6051865add a doctest which hopefully works (hard to check while compiling)

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 16, 2015

Changed commit from 26859cb to 6051865

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 9, 2015

Changed commit from 6051865 to b91cd82

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 9, 2015

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

570bc49Merge branch 'public/categories/super_categories-18044' into 6.9.b1
b91cd82trac #18044 correct one typo in the doc

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 3, 2015

Changed commit from b91cd82 to 0579337

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 3, 2015

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

7fd1df2Merge branch 'public/categories/super_categories-18044' of trac.sagemath.org:sage into public/categories/super_categories-18044
0579337Some reviewer tweaks and doc additions.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 3, 2015

Changed commit from 0579337 to aec22cc

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 3, 2015

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

aec22ccAdded one more test.

@darijgr
Copy link
Contributor

darijgr commented Oct 3, 2015

comment:27

LGTM now; thanks for the commit!

For posterity: There are design issues that I don't fully like, but that are standard for Sage.

@tscrim
Copy link
Collaborator Author

tscrim commented Oct 3, 2015

Reviewer: Darij Grinberg

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 6, 2015

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

16a3791Marked a doctest as indirect doctest.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 6, 2015

Changed commit from aec22cc to 16a3791

@tscrim
Copy link
Collaborator Author

tscrim commented Oct 6, 2015

comment:30

One test should have been marked as # indirect doctest.

@vbraun
Copy link
Member

vbraun commented Oct 12, 2015

Changed branch from public/categories/super_categories-18044 to 16a3791

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants