|
1 | 1 | r"""
|
2 | 2 | Algebras With Basis
|
3 | 3 | """
|
4 |
| -#***************************************************************************** |
| 4 | +# **************************************************************************** |
5 | 5 | # Copyright (C) 2008 Teresa Gomez-Diaz (CNRS) <[email protected]>
|
6 | 6 | # 2008-2013 Nicolas M. Thiery <nthiery at users.sf.net>
|
7 | 7 | #
|
8 | 8 | # Distributed under the terms of the GNU General Public License (GPL)
|
9 | 9 | # https://www.gnu.org/licenses/
|
10 |
| -#****************************************************************************** |
| 10 | +# ***************************************************************************** |
11 | 11 |
|
12 | 12 | from sage.categories.cartesian_product import CartesianProductsCategory
|
13 | 13 | from sage.categories.category_with_axiom import CategoryWithAxiom_over_base_ring
|
@@ -106,7 +106,7 @@ class AlgebrasWithBasis(CategoryWithAxiom_over_base_ring):
|
106 | 106 | sage: TestSuite(AlgebrasWithBasis(QQ)).run()
|
107 | 107 | """
|
108 | 108 |
|
109 |
| - def example(self, alphabet=('a','b','c')): |
| 109 | + def example(self, alphabet=('a', 'b', 'c')): |
110 | 110 | """
|
111 | 111 | Return an example of algebra with basis.
|
112 | 112 |
|
@@ -259,7 +259,7 @@ def one_from_cartesian_product_of_one_basis(self):
|
259 | 259 | ....: SymmetricGroupAlgebra(QQ, 4)]).one()
|
260 | 260 | B[(0, [1, 2, 3])] + B[(1, [1, 2, 3, 4])]
|
261 | 261 | """
|
262 |
| - return self.sum_of_monomials( zip( self._sets_keys(), (set.one_basis() for set in self._sets)) ) |
| 262 | + return self.sum_of_monomials(zip(self._sets_keys(), (set.one_basis() for set in self._sets))) |
263 | 263 |
|
264 | 264 | @lazy_attribute
|
265 | 265 | def one(self):
|
@@ -370,7 +370,8 @@ def product_on_basis(self, t1, t2):
|
370 | 370 |
|
371 | 371 | TODO: optimize this implementation!
|
372 | 372 | """
|
373 |
| - return tensor( module.monomial(x1)*module.monomial(x2) for (module, x1, x2) in zip(self._sets, t1, t2) ) #. |
| 373 | + return tensor(module.monomial(x1) * module.monomial(x2) |
| 374 | + for module, x1, x2 in zip(self._sets, t1, t2)) |
374 | 375 |
|
375 | 376 | class ElementMethods:
|
376 | 377 | """
|
|
0 commit comments