#26027 closed enhancement (fixed)

Implement morphisms for differential graded commutative algebras

Reported by: jhpalmieri Owned by:
Priority: minor Milestone: sage-8.4
Component: algebra Keywords:
Cc: tscrim Merged in:
Authors: John Palmieri Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 9d79cdc (Commits) Commit: 9d79cdc8797764361918ffb668deb5cbdbcedc96
Dependencies: Stopgaps:

Description

As reported on ​ask.sagemath.org, homomorphisms have not been implemented for differential graded commutative algebras.

Change History (11)

comment:1 Changed 11 months ago by jhpalmieri

  • Cc tscrim added

This may involve implementing homomorphisms for NCPolynomialRing_plural. As it stands, I don't know a good way to check the noncommutative relations for a potential ring homomorphism. That is, if I have

sage: A.<x,y> = GradedCommutativeAlgebra(QQ)
sage: R = A.cover_ring()
sage: R.relations()
{y*x: -x*y}

how can I check whether f(y*x) + f(x*y) == 0? The issue is that y*x is an element of the free algebra on x and y, while -x*y is an element of R, but there is no way (as far as I can see) of coercing or converting elements of the free algebra to elements of its quotient R. For example, the construction of R as a g_algebra doesn't remember the original free algebra, and R(y*x) doesn't work.

comment:2 Changed 11 months ago by tscrim

You could manually substitute in monomials variable-by-variable. It should be there automatically (e.g., in the _element_constructor_ for g-algebras on the Sage side). I don't know off-hand how easy it would be to add that, but I imagine that would be easy enough to add.

comment:3 Changed 10 months ago by jhpalmieri

  • Branch set to u/jhpalmieri/dga-morphism

comment:4 Changed 10 months ago by jhpalmieri

  • Authors set to John Palmieri
  • Commit set to abe62ab57699966f8ab56141e19983f68238fec1
  • Status changed from new to needs_review

Here is an implementation.


New commits:

abe62abtrac 26027: morphisms for graded commutative algebras

comment:5 follow-up: Changed 10 months ago by tscrim

  • Reviewers set to Travis Scrimshaw

Overall it looks good, but I have two comments:

I don't understand why you have an _im_gens_ method for the elements. The GCAlgebraMorphism._call_ will only used for one type of element. Since the necessary data is part of the element's API, you can just use it there. There does not need to be a need for this indirection (which means it could be a heavier maintenance burden).

Why are you using self.parent()(0) instead of self.parent().zero()?

comment:6 in reply to: ↑ 5 Changed 10 months ago by jhpalmieri

Replying to tscrim:

Overall it looks good, but I have two comments:

I don't understand why you have an _im_gens_ method for the elements. The GCAlgebraMorphism._call_ will only used for one type of element. Since the necessary data is part of the element's API, you can just use it there. There does not need to be a need for this indirection (which means it could be a heavier maintenance burden).

Good idea. I've changed this.

Why are you using self.parent()(0) instead of self.parent().zero()?

Because that was in the code I copied from free_algebra_element.py. I've changed both to use zero() instead of (0). If doctests pass, I will update the branch.

comment:7 Changed 10 months ago by git

  • Commit changed from abe62ab57699966f8ab56141e19983f68238fec1 to 9d79cdc8797764361918ffb668deb5cbdbcedc96

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

f6a8055trac 26027: morphisms for graded commutative algebras
9d79cdctrac 26027: use self.zero() instead of self(0) in a few places.

comment:8 Changed 10 months ago by jhpalmieri

Here is the new branch.

comment:9 Changed 10 months ago by tscrim

  • Status changed from needs_review to positive_review

Thanks. LGTM.

comment:10 Changed 10 months ago by jhpalmieri

Thanks for the feedback and the review.

comment:11 Changed 10 months ago by vbraun

  • Branch changed from u/jhpalmieri/dga-morphism to 9d79cdc8797764361918ffb668deb5cbdbcedc96
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.