Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Singular polynomial comparison #39018

Merged
merged 16 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/doc/de/tutorial/tour_advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ wir diese schneiden und dann die irreduziblen Komponenten berechnen.
sage: V = C2.intersection(C3)
sage: V.irreducible_components()
[Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
y,
x - 1,
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
y - 1,
x,
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
y,
x - 1,
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
x + y + 2,
2*y^2 + 4*y + 3]
Expand Down
6 changes: 3 additions & 3 deletions src/doc/en/tutorial/tour_advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ intersecting them and computing the irreducible components.
sage: V = C2.intersection(C3)
sage: V.irreducible_components()
[Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
y,
x - 1,
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
y - 1,
x,
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
y,
x - 1,
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
x + y + 2,
2*y^2 + 4*y + 3]
Expand Down
6 changes: 3 additions & 3 deletions src/doc/fr/tutorial/tour_advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ irréductibles.
sage: V = C2.intersection(C3)
sage: V.irreducible_components()
[Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
y,
x - 1,
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
y - 1,
x,
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
y,
x - 1,
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
x + y + 2,
2*y^2 + 4*y + 3]
Expand Down
6 changes: 3 additions & 3 deletions src/doc/ja/tutorial/tour_advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ Sageでは,任意の代数多様体を定義することができるが,そ
sage: V = C2.intersection(C3)
sage: V.irreducible_components()
[Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
y,
x - 1,
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
y - 1,
x,
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
y,
x - 1,
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
x + y + 2,
2*y^2 + 4*y + 3]
Expand Down
6 changes: 3 additions & 3 deletions src/doc/pt/tutorial/tour_advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ irredutíveis.
sage: V = C2.intersection(C3)
sage: V.irreducible_components()
[Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
y,
x - 1,
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
y - 1,
x,
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
y,
x - 1,
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
x + y + 2,
2*y^2 + 4*y + 3]
Expand Down
6 changes: 3 additions & 3 deletions src/doc/ru/tutorial/tour_advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ Sage позволяет создавать любые алгебраически
sage: V = C2.intersection(C3)
sage: V.irreducible_components()
[Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
y,
x - 1,
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
y - 1,
x,
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
y,
x - 1,
Closed subscheme of Affine Space of dimension 2 over Rational Field defined by:
x + y + 2,
2*y^2 + 4*y + 3]
Expand Down
87 changes: 42 additions & 45 deletions src/sage/algebras/hecke_algebras/ariki_koike_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,14 @@ class ArikiKoikeAlgebra(Parent, UniqueRepresentation):
sage: T1 * L1 * T2 * L3 * T1 * T2
-(q-q^2)*L2*L3*T[2] + q*L1*L2*T[2,1] - (1-q)*L1*L2*T[2,1,2]
sage: L1^3
u0*u1*u2 + ((-u0*u1-u0*u2-u1*u2))*L1 + ((u0+u1+u2))*L1^2
u0*u1*u2 - ((u0*u1+u0*u2+u1*u2))*L1 + ((u0+u1+u2))*L1^2
sage: L3 * L2 * L1
L1*L2*L3
sage: u = LT.u()
sage: q = LT.q()
sage: (q + 2*u[0]) * (T1 * T2) * L3
(-2*u0+(2*u0-1)*q+q^2)*L3*T[1] + (-2*u0+(2*u0-1)*q+q^2)*L2*T[2]
+ (2*u0+q)*L1*T[1,2]
-(2*u0+(-2*u0+1)*q-q^2)*L3*T[1] - (2*u0+(-2*u0+1)*q-q^2)*L2*T[2]
+ (2*u0+q)*L1*T[1,2]

We check the defining relations::

Expand Down Expand Up @@ -789,11 +789,11 @@ def L(self, i=None):

sage: LT = algebras.ArikiKoike(1, 3).LT()
sage: LT.L(2)
u + (-u*q^-1+u)*T[1]
u - (u*q^-1-u)*T[1]
sage: LT.L()
[u,
u + (-u*q^-1+u)*T[1],
u + (-u*q^-1+u)*T[2] + (-u*q^-2+u*q^-1)*T[2,1,2]]
u - (u*q^-1-u)*T[1],
u - (u*q^-1-u)*T[2] - (u*q^-2-u*q^-1)*T[2,1,2]]
"""
G = self.algebra_generators()
if i is None:
Expand Down Expand Up @@ -824,18 +824,18 @@ def product_on_basis(self, m1, m2):
sage: L1^2 * T1 * L1^2 * T1
q*L1^2*L2^2 + (1-q)*L1^3*L2*T[1]
sage: L1^3 * T1 * L1^2 * T1
(-u0*u1*u2*u3+u0*u1*u2*u3*q)*L2*T[1]
+ ((u0*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u3+u2*u3)+(-u0*u1-u0*u2-u1*u2-u0*u3-u1*u3-u2*u3)*q)*L1^2*L2*T[1]
+ q*L1^2*L2^3
+ ((u0+u1+u2+u3)+(-u0-u1-u2-u3)*q)*L1^3*L2*T[1]
+ (1-q)*L1^3*L2^2*T[1]

sage: L1^2 * T1*T2*T1 * L2 * L3 * T2
(q-2*q^2+q^3)*L1^2*L2*L3 - (1-2*q+2*q^2-q^3)*L1^2*L2*L3*T[2]
Expand Down Expand Up @@ -1061,7 +1061,7 @@ def _Li_power(self, i, m):
sage: H = algebras.ArikiKoike(3, 2).LT()
sage: L2 = H.L(2)
sage: H._Li_power(2, 4)
((u0^2*u1*u2+u0*u1^2*u2+u0*u1*u2^2)) + ...
((u0^2*u1*u2+u0*u1^2*u2+u0*u1*u2^2)) ...
- (q^-1-1)*L1*L2^3*T[1] ...
- (q^-1-1)*L1^3*L2*T[1]
sage: H._Li_power(2, 4) == L2^4
Expand All @@ -1078,20 +1078,20 @@ def _Li_power(self, i, m):
L_1^0 = 1
L_1^1 = L1
L_1^2 = L1^2
L_1^3 = u0*u1*u2 + ((-u0*u1-u0*u2-u1*u2))*L1 + ((u0+u1+u2))*L1^2
L_1^3 = u0*u1*u2 - ((u0*u1+u0*u2+u1*u2))*L1 + ((u0+u1+u2))*L1^2
L_2^0 = 1
L_2^1 = L2
L_2^2 = L2^2
L_2^3 = u0*u1*u2 + (-u0*u1*u2*q^-1+u0*u1*u2)*T[1]
+ ((-u0*u1-u0*u2-u1*u2))*L2 + ((u0+u1+u2))*L2^2
L_2^3 = u0*u1*u2 - (u0*u1*u2*q^-1-u0*u1*u2)*T[1]
- ((u0*u1+u0*u2+u1*u2))*L2 + ((u0+u1+u2))*L2^2
+ ((u0+u1+u2)*q^-1+(-u0-u1-u2))*L1*L2*T[1]
- (q^-1-1)*L1*L2^2*T[1] - (q^-1-1)*L1^2*L2*T[1]
L_3^0 = 1
L_3^1 = L3
L_3^2 = L3^2
L_3^3 = u0*u1*u2 + (-u0*u1*u2*q^-1+u0*u1*u2)*T[2]
+ (-u0*u1*u2*q^-2+u0*u1*u2*q^-1)*T[2,1,2]
+ ((-u0*u1-u0*u2-u1*u2))*L3 + ((u0+u1+u2))*L3^2
L_3^3 = u0*u1*u2 - (u0*u1*u2*q^-1-u0*u1*u2)*T[2]
- (u0*u1*u2*q^-2-u0*u1*u2*q^-1)*T[2,1,2]
- ((u0*u1+u0*u2+u1*u2))*L3 + ((u0+u1+u2))*L3^2
+ ((u0+u1+u2)*q^-1+(-u0-u1-u2))*L2*L3*T[2]
- (q^-1-1)*L2*L3^2*T[2] - (q^-1-1)*L2^2*L3*T[2]
+ ((u0+u1+u2)*q^-2+(-2*u0-2*u1-2*u2)*q^-1+(u0+u1+u2))*L1*L3*T[1,2]
Expand Down Expand Up @@ -1376,11 +1376,11 @@ def L(self, i=None):

sage: T = algebras.ArikiKoike(1, 3).T()
sage: T.L(2)
u + (-u*q^-1+u)*T[1]
u - (u*q^-1-u)*T[1]
sage: T.L()
[u,
u + (-u*q^-1+u)*T[1],
u + (-u*q^-1+u)*T[2] + (-u*q^-2+u*q^-1)*T[2,1,2]]
u - (u*q^-1-u)*T[1],
u - (u*q^-1-u)*T[2] - (u*q^-2-u*q^-1)*T[2,1,2]]

TESTS:

Expand Down Expand Up @@ -1432,10 +1432,10 @@ def product_on_basis(self, m1, m2):
sage: T2 * (T2 * T1 * T0)
-(1-q)*T[2,1,0] + q*T[1,0]
sage: (T1 * T0 * T1 * T0) * T0
(-u0*u1)*T[1,0,1] + ((u0+u1))*T[0,1,0,1]
-u0*u1*T[1,0,1] + ((u0+u1))*T[0,1,0,1]
sage: (T0 * T1 * T0 * T1) * (T0 * T1)
(-u0*u1*q)*T[1,0] + (u0*u1-u0*u1*q)*T[1,0,1]
+ ((u0+u1)*q)*T[0,1,0] + ((-u0-u1)+(u0+u1)*q)*T[0,1,0,1]
-u0*u1*q*T[1,0] + (u0*u1-u0*u1*q)*T[1,0,1]
+ ((u0+u1)*q)*T[0,1,0] - ((u0+u1)+(-u0-u1)*q)*T[0,1,0,1]
sage: T1 * (T0 * T2 * T1 * T0)
T[1,0,2,1,0]
sage: (T1 * T2) * (T2 * T1 * T0)
Expand All @@ -1462,7 +1462,7 @@ def product_on_basis(self, m1, m2):
sage: T = algebras.ArikiKoike(2, 3).T()
sage: T0, T1, T2 = T.T()
sage: (T1 * T0 * T1) * (T0 * T0)
(-u0*u1)*T[1,0,1] + ((u0+u1))*T[0,1,0,1]
-u0*u1*T[1,0,1] + ((u0+u1))*T[0,1,0,1]
sage: T1 * T.L(3) * T2 * T1 * T0 - T1 * (T.L(3) * T2 * T1 * T0)
0

Expand Down Expand Up @@ -1674,42 +1674,39 @@ def _product_TT(self, kp, a, k, b):
sage: T._product_TT(1, 2, 0, 1)
T[1,0,0,0]
sage: T._product_TT(1, 3, 0, 1)
(-u0*u1*u2*u3)*T[1]
-u0*u1*u2*u3*T[1]
+ ((u0*u1*u2+u0*u1*u3+u0*u2*u3+u1*u2*u3))*T[1,0]
+ ((-u0*u1-u0*u2-u1*u2-u0*u3-u1*u3-u2*u3))*T[1,0,0]
- ((u0*u1+u0*u2+u1*u2+u0*u3+u1*u3+u2*u3))*T[1,0,0]
+ ((u0+u1+u2+u3))*T[1,0,0,0]
sage: T._product_TT(1, 2, 0, 2)
(-u0*u1*u2*u3)*T[1]
-u0*u1*u2*u3*T[1]
+ ((u0*u1*u2+u0*u1*u3+u0*u2*u3+u1*u2*u3))*T[1,0]
+ ((-u0*u1-u0*u2-u1*u2-u0*u3-u1*u3-u2*u3))*T[1,0,0]
- ((u0*u1+u0*u2+u1*u2+u0*u3+u1*u3+u2*u3))*T[1,0,0]
+ ((u0+u1+u2+u3))*T[1,0,0,0]
sage: T._product_TT(2, 1, 0, 3)
(-u0*u1*u2*u3)*T[2,1]
-u0*u1*u2*u3*T[2,1]
+ ((u0*u1*u2+u0*u1*u3+u0*u2*u3+u1*u2*u3))*T[2,1,0]
+ ((-u0*u1-u0*u2-u1*u2-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