Opened 10 years ago

Closed 9 years ago

#13856 closed enhancement (fixed)

Add a top_class method to the Steenrod algebra

Reported by: cnassau Owned by: jhpalmieri
Priority: minor Milestone: sage-5.8
Component: algebraic topology Keywords: Steenrod algebra
Cc: Merged in: sage-5.8.beta0
Authors: Christian Nassau Reviewers: John Palmieri
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

The attached patch introduces a new method top_class that computes the highest dimensional basis element of a finite sub algebra of the Steenrod algebra:

  sage: SteenrodAlgebra(3,profile=((2,1),(2,2,2,2))).top_class()
  Q_0 Q_1 Q_2 Q_3 P(8,2)
  sage: SteenrodAlgebra(2,profile=(3,2,1),basis='pst').top_class()
  P^0_1 P^0_2 P^1_1 P^0_3 P^1_2 P^2_1
  sage: SteenrodAlgebra(7).top_class()
  Traceback (most recent call last):
  ...
  ValueError: the algebra is not finite dimensional

Attachments (1)

topclass.patch (3.2 KB) - added by cnassau 9 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 10 years ago by cnassau

  • Status changed from new to needs_review

comment:2 follow-up: Changed 9 years ago by jhpalmieri

I suppose it might be slightly better to define AM to just be SteenrodAlgebra(basis='milnor', p=p): you just need to multiply in it, you don't need to use its profile function. If someone is working with many subalgebras at a single prime, then each call to your version of AM will create a new subalgebra, whereas each call to SteenrodAlgebra(basis='milnor', p=p) just will only create an instance of the Steenrod algebra the first time through.

Otherwise, this looks good to me.

Changed 9 years ago by cnassau

comment:3 in reply to: ↑ 2 Changed 9 years ago by cnassau

Replying to jhpalmieri:

I suppose it might be slightly better to define AM to just be SteenrodAlgebra(basis='milnor', p=p): you just need to multiply in it, you don't need to use its profile function. If someone is working with many subalgebras at a single prime, then each call to your version of AM will create a new subalgebra, whereas each call to SteenrodAlgebra(basis='milnor', p=p) just will only create an instance of the Steenrod algebra the first time through.

Otherwise, this looks good to me.

I have changed the line as you suggested, but also added a cast to self at the end. This is intended to make sure that

A.top_class().parent() is A

although I don't know if that's important. Anyway, I have also added this as a doctest.

Thanks for looking into this,
Christian

comment:4 follow-up: Changed 9 years ago by jhpalmieri

Perhaps for another ticket: I think your code reveals a bug. What do you think about this change:

  • sage/algebras/steenrod/steenrod_algebra.py

    diff --git a/sage/algebras/steenrod/steenrod_algebra.py b/sage/algebras/steenrod/steenrod_algebra.py
    a b  
    20082008            else:
    20092009                a = x.milnor()
    20102010                if self.basis_name() == 'milnor':
    2011                     return a
    2012                 return a.change_basis(self.basis_name())
     2011                    return self._from_dict(a.monomial_coefficients(), coerce=True)
     2012                a = a.change_basis(self.basis_name())
     2013                return self._from_dict(a.monomial_coefficients(), coerce=True)
    20132014        raise ValueError("Element does not lie in this Steenrod algebra")
    20142015
    20152016    def __contains__(self, x):

As it stands:

sage: SteenrodAlgebra(2,profile=(3,2,1), basis='pst')(Sq(4)).parent()
mod 2 Steenrod algebra, pst_revz basis

With the change:

sage: SteenrodAlgebra(2,profile=(3,2,1), basis='pst')(Sq(4)).parent()
sub-Hopf algebra of mod 2 Steenrod algebra, pst_revz basis, profile function [3, 2, 1]

My suggested patch would need some doctests, but it would also allow you to change your last line:

  • sage/algebras/steenrod/steenrod_algebra.py

    diff --git a/sage/algebras/steenrod/steenrod_algebra.py b/sage/algebras/steenrod/steenrod_algebra.py
    a b  
    28212822            e = [k for k in range(0,len(ep)) if ep[k]==2]
    28222823            r = [p**k-1 for k in rp]
    28232824            ans = AM.monomial((tuple(e),tuple(r)))
    2824         return self(ans.change_basis(self.basis_name()))
     2825        return self(ans)
    28252826
    28262827    def order(self):
    28272828        r"""

comment:5 in reply to: ↑ 4 Changed 9 years ago by cnassau

Replying to jhpalmieri:

I think I would generally expect that "P(x).parent() is P" for every parent P, so your change seems pretty sensible. But maybe this expectation is too naive, as I've recently come across the (new?) notion of a "facade set" - I haven't studied those but they made me wonder whether a subalgebra should best be a facade for the ambient parent? Currently I have no idea what the impact of that approach would be... so I think we should indeed leave this question for a different ticket.

Best,
Christian

comment:6 Changed 9 years ago by jhpalmieri

  • Reviewers set to John Palmieri
  • Status changed from needs_review to positive_review

Looks good to me.

comment:7 Changed 9 years ago by jdemeyer

  • Milestone changed from sage-5.7 to sage-5.8

comment:8 Changed 9 years ago by jdemeyer

  • Merged in set to sage-5.8.beta0
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.