Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
trax #18411 fixing a typo and doctest continuation
Browse files Browse the repository at this point in the history
  • Loading branch information
Frédéric Chapoton committed Sep 12, 2015
1 parent 10df218 commit 57b82e3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/sage/categories/cartesian_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def __call__(self, args):
sage: _.category()
Category of Cartesian products of finite enumerated sets
sage: cartesian_product([set([0,1,2]), [0,1])
sage: cartesian_product([set([0,1,2]), [0,1]])
The cartesian product of ({0, 1, 2}, {0, 1})
sage: _.category()
Category of Cartesian products of sets
Expand Down
16 changes: 8 additions & 8 deletions src/sage/rings/quotient_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
sage: from sage.rings.noncommutative_ideals import Ideal_nc
sage: from itertools import product
sage: class PowerIdeal(Ideal_nc):
... def __init__(self, R, n):
... self._power = n
... self._power = n
... Ideal_nc.__init__(self,R,[R.prod(m) for m in product(R.gens(), repeat=n)])
... def reduce(self,x):
... R = self.ring()
... return add([c*R(m) for m,c in x if len(m)<self._power],R(0))
...
....: def __init__(self, R, n):
....: self._power = n
....: self._power = n
....: Ideal_nc.__init__(self, R, [R.prod(m) for m in product(R.gens(), repeat=n)])
....: def reduce(self,x):
....: R = self.ring()
....: return add([c*R(m) for m,c in x if len(m)<self._power],R(0))
....:
sage: F.<x,y,z> = FreeAlgebra(QQ, 3)
sage: I3 = PowerIdeal(F,3); I3
Twosided Ideal (x^3, x^2*y, x^2*z, x*y*x, x*y^2, x*y*z, x*z*x, x*z*y,
Expand Down

0 comments on commit 57b82e3

Please sign in to comment.