Opened 4 years ago

Closed 4 years ago

## #25276 closed defect (fixed)

Reported by: Owned by: jhpalmieri major sage-8.4 algebra mmarco, tscrim John Palmieri Travis Scrimshaw N/A 2bf55eb 2bf55eb6742f5d0183b3a6f771ea702d012c063e

### Description

Two bugs with `GradedCommutativeAlgebra`:

• `GradedCommutativeAlgebra(QQ, 'x')` does not work: it seems to not work with only one generator.

### comment:1 Changed 4 years ago by tscrim

The first problem is a bug in the construction of `g_algebra`:

```sage: F.<x,y> = FreeAlgebra(QQ)
sage: F.g_algebra({})
Noncommutative Multivariate Polynomial Ring in x, y over Rational Field, nc-relations: {}
sage: F.<x> = FreeAlgebra(QQ, 1)
sage: F.g_algebra({})
// ** commutative ring with 1 variable
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
...
TypeError: Cannot convert sage.rings.polynomial.plural.NCPolynomialRing_plural to sage.rings.polynomial.multi_polynomial_libsingular.MPolynomialRing_libsingular
```

Looks like a special case with 1 variable is not handled properly on Sage's side, but I am not sure.

The second problem comes from this:

```sage: E = GradedCommutativeAlgebra(QQ,'x,y')
sage: E.cover().domain()
Noncommutative Multivariate Polynomial Ring in x, y over Rational Field, nc-relations: {y*x: -x*y}
sage: _.hom([x,y])
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
<ipython-input-32-d481fe5146fc> in <module>()
----> 1 _.hom([x,y])

/home/uqtscrim/sage/local/lib/python2.7/site-packages/sage/structure/parent_gens.pyx in sage.structure.parent_gens.ParentWithGens.hom (build/cythonized/sage/structure/parent_gens.c:3773)()
286         """
287         if self._element_constructor is not None:
--> 288             return parent.Parent.hom(self, im_gens, codomain, check)
289         if isinstance(im_gens, parent.Parent):
290             return self.Hom(im_gens).natural_map()

/home/uqtscrim/sage/local/lib/python2.7/site-packages/sage/structure/parent.pyx in sage.structure.parent.Parent.hom (build/cythonized/sage/structure/parent.c:12711)()
1380            return self.Hom(codomain)(im_gens)
1381        else:
-> 1382            return self.Hom(codomain)(im_gens, check=check)
1383
1384     #################################################################################

/home/uqtscrim/sage/local/lib/python2.7/site-packages/sage/rings/homset.pyc in __call__(self, im_gens, check)
182             return self._coerce_impl(im_gens)
183         else:
--> 184             return morphism.RingHomomorphism_im_gens(self, im_gens, check=check)
185
186     def natural_map(self):

/home/uqtscrim/sage/local/lib/python2.7/site-packages/sage/rings/morphism.pyx in sage.rings.morphism.RingHomomorphism_im_gens.__init__ (build/cythonized/sage/rings/morphism.c:8719)()
1036             if len(im_gens) != parent.domain().ngens():
1037                 raise ValueError("number of images must equal number of generators")
-> 1038             t = parent.domain()._is_valid_homomorphism_(parent.codomain(), im_gens)
1039             if not t:
1040                 raise ValueError("relations do not all (canonically) map to 0 under map determined by images of generators")

/home/uqtscrim/sage/local/lib/python2.7/site-packages/sage/structure/parent.pyx in sage.structure.parent.Parent._is_valid_homomorphism_ (build/cythonized/sage/structure/parent.c:11950)()
1252        is raised.
1253        """
-> 1254        raise NotImplementedError("Verification of correctness of homomorphisms from %s not yet implemented."%self)
1255
1256     def Hom(self, codomain, category=None):

NotImplementedError: Verification of correctness of homomorphisms from Noncommutative Multivariate Polynomial Ring in x, y over Rational Field, nc-relations: {y*x: -x*y} not yet implemented.
```

So IMO that is not strictly a bug, but a missing feature.

### comment:2 Changed 4 years ago by vdelecroix

• Milestone changed from sage-8.3 to sage-8.4

update milestone 8.3 -> 8.4

### comment:3 Changed 4 years ago by jhpalmieri

• Branch set to u/jhpalmieri/singly-generated-dga

### comment:4 Changed 4 years ago by jhpalmieri

• Commit set to 79bb0c2ab64477dbe483ed500b276e3d32f18ee5

Here is a branch dealing with the singly generated case. I will move the morphism issue to a separate ticket.

New commits:

 ​79bb0c2 `trac 25276: implement singly generated differental graded commutative algebras`

### comment:5 Changed 4 years ago by jhpalmieri

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

### comment:6 Changed 4 years ago by jhpalmieri

See #26027 for morphisms.

### comment:7 Changed 4 years ago by tscrim

• Reviewers set to Travis Scrimshaw

Can you also add an example for when the generator is even? Otherwise LGTM.

### comment:8 Changed 4 years ago by git

• Commit changed from 79bb0c2ab64477dbe483ed500b276e3d32f18ee5 to 2bf55eb6742f5d0183b3a6f771ea702d012c063e

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

 ​2bf55eb `trac 25276: add one more example`

Good idea.

### comment:10 Changed 4 years ago by tscrim

• Status changed from needs_review to positive_review

Thank you.

### comment:11 Changed 4 years ago by vbraun

• Branch changed from u/jhpalmieri/singly-generated-dga to 2bf55eb6742f5d0183b3a6f771ea702d012c063e
• Resolution set to fixed
• Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.