@@ -1090,10 +1090,18 @@ InstallMethod( DoubleShiftAlgebra,
10901090 [ IsHomalgRing ] ,
10911091
10921092 function ( R )
1093- local Ds, D_s, c, exponents, B, A, shifts, pairs, Y;
1093+ local reverse, Ds, D_s, c, exponents, B, A, shifts, pairs, Y;
10941094
1095- if IsBound ( R!. DoubleShiftAlgebra ) then
1096- return R!. DoubleShiftAlgebra;
1095+ reverse := ValueOption( " reverse" );
1096+
1097+ if not reverse = true then
1098+ if IsBound ( R!. DoubleShiftAlgebra ) then
1099+ return R!. DoubleShiftAlgebra;
1100+ fi ;
1101+ else
1102+ if IsBound ( R!. DoubleShiftAlgebraWithReverseOrder ) then
1103+ return R!. DoubleShiftAlgebraWithReverseOrder;
1104+ fi ;
10971105 fi ;
10981106
10991107 Ds := RelativeIndeterminatesOfPolynomialRing( R );
@@ -1110,23 +1118,43 @@ InstallMethod( DoubleShiftAlgebra,
11101118
11111119 A := B * JoinStringsWithSeparator( exponents );
11121120
1113- if IsIdenticalObj( ValueOption( " pairs" ), false ) then
1114- shifts := Concatenation( Ds, D_s );
1115- pairs := false ;
1121+ if not reverse = true then
1122+
1123+ if IsIdenticalObj( ValueOption( " pairs" ), false ) then
1124+ shifts := Concatenation( Ds, D_s );
1125+ pairs := false ;
1126+ else
1127+ shifts := Concatenation( ListN( Ds, D_s, { d, d_} -> [ d, d_ ] ) );
1128+ pairs := true ;
1129+ fi ;
1130+
1131+ Y := DoubleShiftAlgebra( A, shifts : steps := - 1 , pairs := pairs );
1132+
11161133 else
1117- shifts := Concatenation( ListN( Ds, D_s, { d, d_} -> [ d, d_ ] ) );
1118- pairs := true ;
1134+
1135+ if IsIdenticalObj( ValueOption( " pairs" ), false ) then
1136+ shifts := Concatenation( D_s, Ds );
1137+ pairs := false ;
1138+ else
1139+ shifts := Concatenation( ListN( Ds, D_s, { d, d_} -> [ d_, d ] ) );
1140+ pairs := true ;
1141+ fi ;
1142+
1143+ Y := DoubleShiftAlgebra( A, shifts : steps := 1 , pairs := pairs );
1144+
11191145 fi ;
11201146
1121- Y := DoubleShiftAlgebra( A, shifts : steps := - 1 , pairs := pairs );
1122-
11231147 Y!. Ds := Ds;
11241148 Y!. D_s := D_s;
11251149
11261150 AmbientRing( Y )!. Ds := Ds;
11271151 AmbientRing( Y )!. D_s := D_s;
11281152
1129- R!. DoubleShiftAlgebra := Y;
1153+ if not reverse = true then
1154+ R!. DoubleShiftAlgebra := Y;
1155+ else
1156+ R!. DoubleShiftAlgebraWithReverseOrder := Y;
1157+ fi ;
11301158
11311159 return Y;
11321160
@@ -1137,10 +1165,18 @@ InstallMethod( DoubleShiftAlgebraWithDimensionShift,
11371165 [ IsHomalgRing ] ,
11381166
11391167 function ( R )
1140- local Ds, c, D_s, exponents, B, A, shifts, pairs, Y;
1168+ local reverse, Ds, c, D_s, exponents, B, A, shifts, pairs, Y;
1169+
1170+ reverse := ValueOption( " reverse" );
11411171
1142- if IsBound ( R!. DoubleShiftAlgebraWithDimensionShift ) then
1143- return R!. DoubleShiftAlgebraWithDimensionShift;
1172+ if not reverse = true then
1173+ if IsBound ( R!. DoubleShiftAlgebraWithDimensionShift ) then
1174+ return R!. DoubleShiftAlgebraWithDimensionShift;
1175+ fi ;
1176+ else
1177+ if IsBound ( R!. DoubleShiftAlgebraWithDimensionShiftAndReverseOrder ) then
1178+ return R!. DoubleShiftAlgebraWithDimensionShiftAndReverseOrder;
1179+ fi ;
11441180 fi ;
11451181
11461182 Ds := RelativeIndeterminatesOfPolynomialRing( R );
@@ -1161,37 +1197,85 @@ InstallMethod( DoubleShiftAlgebraWithDimensionShift,
11611197
11621198 A := B * JoinStringsWithSeparator( exponents );
11631199
1164- if IsIdenticalObj( ValueOption( " pairs" ), false ) then
1165- shifts := Concatenation( Ds, D_s );
1166- pairs := false ;
1200+ if not reverse = true then
1201+
1202+ if IsIdenticalObj( ValueOption( " pairs" ), false ) then
1203+ shifts := Concatenation( Ds, D_s );
1204+ pairs := false ;
1205+ else
1206+ shifts := Concatenation( ListN( Ds, D_s, { d, d_} -> [ d, d_ ] ) );
1207+ pairs := true ;
1208+ fi ;
1209+
1210+ Y := DoubleShiftAlgebra( A, shifts : steps := - 1 , pairs := pairs );
1211+
11671212 else
1168- shifts := Concatenation( ListN( Ds, D_s, { d, d_} -> [ d, d_ ] ) );
1169- pairs := true ;
1213+
1214+ if IsIdenticalObj( ValueOption( " pairs" ), false ) then
1215+ shifts := Concatenation( D_s, Ds );
1216+ pairs := false ;
1217+ else
1218+ shifts := Concatenation( ListN( Ds, D_s, { d, d_} -> [ d_, d ] ) );
1219+ pairs := true ;
1220+ fi ;
1221+
1222+ Y := DoubleShiftAlgebra( A, shifts : steps := 1 , pairs := pairs );
1223+
11701224 fi ;
11711225
1172- Y := DoubleShiftAlgebra( A, shifts : steps := - 1 , pairs := pairs );
1173-
11741226 Y!. Ds := Ds;
11751227 Y!. D_s := D_s;
11761228
11771229 AmbientRing( Y )!. Ds := Ds;
11781230 AmbientRing( Y )!. D_s := D_s;
11791231
1180- R!. DoubleShiftAlgebraWithDimensionShift := Y;
1232+ if not reverse = true then
1233+ R!. DoubleShiftAlgebraWithDimensionShift := Y;
1234+ else
1235+ R!. DoubleShiftAlgebraWithDimensionShiftAndReverseOrder := Y;
1236+ fi ;
11811237
11821238 return Y;
11831239
11841240end );
11851241
1242+ # #
1243+ InstallMethod( DoubleShiftAlgebraWithReverseOrder,
1244+ [ IsHomalgRing ] ,
1245+
1246+ function ( R )
1247+
1248+ return DoubleShiftAlgebra( R : reverse := true );
1249+
1250+ end );
1251+
1252+ # #
1253+ InstallMethod( DoubleShiftAlgebraWithDimensionShiftAndReverseOrder,
1254+ [ IsHomalgRing ] ,
1255+
1256+ function ( R )
1257+
1258+ return DoubleShiftAlgebraWithDimensionShift( R : reverse := true );
1259+
1260+ end );
1261+
11861262# #
11871263InstallMethod( RationalDoubleShiftAlgebra,
11881264 [ IsHomalgRing ] ,
11891265
11901266 function ( R )
1191- local Q, Ds, D_s, c, exponents, B, A, shifts, pairs, Y;
1267+ local Q, r, Ds, D_s, c, exponents, B, A, reverse , shifts, pairs, Y;
11921268
1193- if IsBound ( R!. RationalDoubleShiftAlgebra ) then
1194- return R!. RationalDoubleShiftAlgebra;
1269+ reverse := ValueOption( " reverse" );
1270+
1271+ if not reverse = true then
1272+ if IsBound ( R!. RationalDoubleShiftAlgebra ) then
1273+ return R!. RationalDoubleShiftAlgebra;
1274+ fi ;
1275+ else
1276+ if IsBound ( R!. RationalDoubleShiftAlgebraWithReverseOrder ) then
1277+ return R!. RationalDoubleShiftAlgebraWithReverseOrder;
1278+ fi ;
11951279 fi ;
11961280
11971281 Q := HomalgFieldOfRationalsInMaple();
@@ -1210,23 +1294,43 @@ InstallMethod( RationalDoubleShiftAlgebra,
12101294
12111295 A := B * JoinStringsWithSeparator( exponents );
12121296
1213- if IsIdenticalObj( ValueOption( " pairs" ), false ) then
1214- shifts := Concatenation( Ds, D_s );
1215- pairs := false ;
1297+ if not reverse = true then
1298+
1299+ if IsIdenticalObj( ValueOption( " pairs" ), false ) then
1300+ shifts := Concatenation( Ds, D_s );
1301+ pairs := false ;
1302+ else
1303+ shifts := Concatenation( ListN( Ds, D_s, { d, d_} -> [ d, d_ ] ) );
1304+ pairs := true ;
1305+ fi ;
1306+
1307+ Y := RationalDoubleShiftAlgebra( A, shifts : steps := - 1 , pairs := pairs );
1308+
12161309 else
1217- shifts := Concatenation( ListN( Ds, D_s, { d, d_} -> [ d, d_ ] ) );
1218- pairs := true ;
1310+
1311+ if IsIdenticalObj( ValueOption( " pairs" ), false ) then
1312+ shifts := Concatenation( D_s, Ds );
1313+ pairs := false ;
1314+ else
1315+ shifts := Concatenation( ListN( Ds, D_s, { d, d_} -> [ d_, d ] ) );
1316+ pairs := true ;
1317+ fi ;
1318+
1319+ Y := RationalDoubleShiftAlgebra( A, shifts : steps := 1 , pairs := pairs );
1320+
12191321 fi ;
12201322
1221- Y := RationalDoubleShiftAlgebra( A, shifts : steps := - 1 , pairs := pairs );
1222-
12231323 Y!. Ds := Ds;
12241324 Y!. D_s := D_s;
12251325
12261326 AmbientRing( Y )!. Ds := Ds;
12271327 AmbientRing( Y )!. D_s := D_s;
12281328
1229- R!. RationalDoubleShiftAlgebra := Y;
1329+ if not reverse = true then
1330+ R!. RationalDoubleShiftAlgebra := Y;
1331+ else
1332+ R!. RationalDoubleShiftAlgebraWithReverseOrder := Y;
1333+ fi ;
12301334
12311335 return Y;
12321336
@@ -1237,10 +1341,18 @@ InstallMethod( RationalDoubleShiftAlgebraWithDimensionShift,
12371341 [ IsHomalgRing ] ,
12381342
12391343 function ( R )
1240- local Q, Ds, c, D_s, exponents, B, A, shifts, pairs, Y;
1344+ local reverse, Q, Ds, c, D_s, exponents, B, A, shifts, pairs, Y;
1345+
1346+ reverse := ValueOption( " reverse" );
12411347
1242- if IsBound ( R!. RationalDoubleShiftAlgebraWithDimensionShift ) then
1243- return R!. RationalDoubleShiftAlgebraWithDimensionShift;
1348+ if not reverse = true then
1349+ if IsBound ( R!. RationalDoubleShiftAlgebraWithDimensionShift ) then
1350+ return R!. RationalDoubleShiftAlgebraWithDimensionShift;
1351+ fi ;
1352+ else
1353+ if IsBound ( R!. RationalDoubleShiftAlgebraWithDimensionShiftAndReverseOrder ) then
1354+ return R!. RationalDoubleShiftAlgebraWithDimensionShiftAndReverseOrder;
1355+ fi ;
12441356 fi ;
12451357
12461358 Q := HomalgFieldOfRationalsInMaple();
@@ -1263,28 +1375,68 @@ InstallMethod( RationalDoubleShiftAlgebraWithDimensionShift,
12631375
12641376 A := B * JoinStringsWithSeparator( exponents );
12651377
1266- if IsIdenticalObj( ValueOption( " pairs" ), false ) then
1267- shifts := Concatenation( Ds, D_s );
1268- pairs := false ;
1378+ if not reverse = true then
1379+
1380+ if IsIdenticalObj( ValueOption( " pairs" ), false ) then
1381+ shifts := Concatenation( Ds, D_s );
1382+ pairs := false ;
1383+ else
1384+ shifts := Concatenation( ListN( Ds, D_s, { d, d_} -> [ d, d_ ] ) );
1385+ pairs := true ;
1386+ fi ;
1387+
1388+ Y := RationalDoubleShiftAlgebra( A, shifts : steps := - 1 , pairs := pairs );
1389+
12691390 else
1270- shifts := Concatenation( ListN( Ds, D_s, { d, d_} -> [ d, d_ ] ) );
1271- pairs := true ;
1391+
1392+ if IsIdenticalObj( ValueOption( " pairs" ), false ) then
1393+ shifts := Concatenation( D_s, Ds );
1394+ pairs := false ;
1395+ else
1396+ shifts := Concatenation( ListN( Ds, D_s, { d, d_} -> [ d_, d ] ) );
1397+ pairs := true ;
1398+ fi ;
1399+
1400+ Y := RationalDoubleShiftAlgebra( A, shifts : steps := 1 , pairs := pairs );
1401+
12721402 fi ;
12731403
1274- Y := RationalDoubleShiftAlgebra( A, shifts : steps := - 1 , pairs := pairs );
1275-
12761404 Y!. Ds := Ds;
12771405 Y!. D_s := D_s;
12781406
12791407 AmbientRing( Y )!. Ds := Ds;
12801408 AmbientRing( Y )!. D_s := D_s;
12811409
1282- R!. RationalDoubleShiftAlgebraWithDimensionShift := Y;
1410+ if not reverse = true then
1411+ R!. RationalDoubleShiftAlgebraWithDimensionShift := Y;
1412+ else
1413+ R!. RationalDoubleShiftAlgebraWithDimensionShiftAndReverseOrder := Y;
1414+ fi ;
12831415
12841416 return Y;
12851417
12861418end );
12871419
1420+ # #
1421+ InstallMethod( RationalDoubleShiftAlgebraWithReverseOrder,
1422+ [ IsHomalgRing ] ,
1423+
1424+ function ( R )
1425+
1426+ return RationalDoubleShiftAlgebra( R : reverse := true );
1427+
1428+ end );
1429+
1430+ # #
1431+ InstallMethod( RationalDoubleShiftAlgebraWithDimensionShiftAndReverseOrder,
1432+ [ IsHomalgRing ] ,
1433+
1434+ function ( R )
1435+
1436+ return RationalDoubleShiftAlgebraWithDimensionShift( R : reverse := true );
1437+
1438+ end );
1439+
12881440# #
12891441InstallMethod( AssociatedWeylAlgebra,
12901442 [ IsLoopDiagram and HasRelationsOfExternalMomenta and HasPropagators and HasNumerators and HasExtraLorentzInvariants ] ,
0 commit comments