Skip to content

Commit b1ca279

Browse files
Merge pull request #31 from mohamed-barakat/devel
added support for options (reduced_)basis_of_relative_syzygies
2 parents 123fe9b + a467f65 commit b1ca279

4 files changed

Lines changed: 70 additions & 24 deletions

File tree

PackageInfo.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SetPackageInfo( rec(
1010

1111
PackageName := "LoopIntegrals",
1212
Subtitle := "Compute master integrals using commutative and noncommutative methods from computational algebraic geometry",
13-
Version := "2023.11-03",
13+
Version := "2023.11-04",
1414

1515
Date := (function ( ) if IsBound( GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE ) then return GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE; else return Concatenation( ~.Version{[ 1 .. 4 ]}, "-", ~.Version{[ 6, 7 ]}, "-01" ); fi; end)( ),
1616

examples/1LoopBox.g

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,7 @@ gen2 := GeneratorsOfScalelessSectors( LD, [ 2, 2, 2, 2 ] );
120120
#! <An unevaluated 1 x 4 matrix over an external ring>
121121
Display( gen2 );
122122
#! D1*D2*D3^2*D4^2,D1^2*D2*D3*D4^2,D1*D2^2*D3^2*D4,D1^2*D2^2*D3*D4
123+
prel2 := ColumnReversedMatrixOfCoefficientsOfParametricIBPs( LD, 2 );
124+
#! [ <A non-zero 7 x 11 matrix over an external ring>,
125+
#! [ D1_*D3_, D1_*D4_, D2_*D4_, D3_*D4_, D1_, D2_, D3_, D4_, 1, D1, D2 ] ]
123126
#! @EndExample

gap/LoopIntegrals.gd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,12 @@ DeclareAttribute( "BasisOfIBPRelations",
206206
IsLoopDiagram );
207207

208208
#! @Arguments LD
209-
DeclareAttribute( "MatrixOfSpecialIBPRelations",
210-
IsLoopDiagram );
209+
DeclareOperation( "MatrixOfSpecialIBPRelations",
210+
[ IsLoopDiagram ] );
211211

212212
#! @Arguments LD
213-
DeclareAttribute( "BasisOfSpecialIBPRelations",
214-
IsLoopDiagram );
213+
DeclareOperation( "BasisOfSpecialIBPRelations",
214+
[ IsLoopDiagram ] );
215215

216216
#! @Arguments LD
217217
DeclareAttribute( "MatrixOfIBPRelationsInWeylAlgebra",

gap/LoopIntegrals.gi

Lines changed: 62 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,10 +1310,19 @@ InstallMethod( MatrixOfSpecialIBPRelations,
13101310

13111311
## Q[m,s,D][D1,...,Ds]
13121312
syz := SyzygiesOfColumns( PairOfMatricesOfLoopDiagramInPropagators( LD ) );
1313-
#syz := ReducedBasisOfColumnModule( syz );
13141313

1315-
## this line speeds up the linear algebra in the rational double shift algebra
1316-
syz := BasisOfColumnModule( syz );
1314+
if ValueOption( "basis_of_relative_syzygies" ) = true then
1315+
1316+
## this line might sometimes speed up the linear algebra in the rational double shift algebra
1317+
syz := BasisOfColumnModule( syz );
1318+
1319+
fi;
1320+
1321+
if ValueOption( "reduced_basis_of_relative_syzygies" ) = true then
1322+
1323+
syz := ReducedBasisOfColumnModule( syz );
1324+
1325+
fi;
13171326

13181327
return MatrixOfIBPRelations( syz, LD );
13191328

@@ -1328,8 +1337,18 @@ InstallMethod( MatrixOfSpecialIBPRelations,
13281337

13291338
syz := SyzygiesOfColumns( PairOfMatricesOfLoopDiagramInPropagators( LD ) );
13301339

1331-
## this line speeds up the linear algebra in the rational double shift algebra
1332-
syz := BasisOfColumnModule( syz );
1340+
if ValueOption( "basis_of_relative_syzygies" ) = true then
1341+
1342+
## this line might sometimes speed up the linear algebra in the rational double shift algebra
1343+
syz := BasisOfColumnModule( syz );
1344+
1345+
fi;
1346+
1347+
if ValueOption( "reduced_basis_of_relative_syzygies" ) = true then
1348+
1349+
syz := ReducedBasisOfColumnModule( syz );
1350+
1351+
fi;
13331352

13341353
return MatrixOfIBPRelations( syz, LD, exponents );
13351354

@@ -1411,8 +1430,18 @@ InstallMethod( MatrixOfSpecialIBPRelationsInWeylAlgebra,
14111430

14121431
syz := SyzygiesOfColumns( PairOfMatricesOfLoopDiagramInPropagators( LD ) );
14131432

1414-
## this line speeds up the linear algebra in the rational double shift algebra
1415-
syz := BasisOfColumnModule( syz );
1433+
if ValueOption( "basis_of_relative_syzygies" ) = true then
1434+
1435+
## this line might sometimes speed up the linear algebra in the rational double shift algebra
1436+
syz := BasisOfColumnModule( syz );
1437+
1438+
fi;
1439+
1440+
if ValueOption( "reduced_basis_of_relative_syzygies" ) = true then
1441+
1442+
syz := ReducedBasisOfColumnModule( syz );
1443+
1444+
fi;
14161445

14171446
ibps := List( [ 1 .. NrColumns( syz ) ], j -> IBPRelationInWeylAlgebra( CertainColumns( syz, [ j ] ), LD ) );
14181447

@@ -1480,6 +1509,9 @@ InstallMethod( MatrixOfCoefficientsOfIBPs,
14801509
function( IBPS )
14811510
local Y, weights_a, weights_D, weights, powers, coeffs, orig, monoms, deg, A;
14821511

1512+
## example: 1LoopBubble.g
1513+
## called by MatrixOfCoefficientsOfParametricIBPs( LD, 2 : basis_of_relative_syzygies := false );
1514+
14831515
## example: Q[d,s][a1,a2]<D1,D1_,D2,D2_>/( D2*D2_-1, D1*D1_-1 )
14841516
Y := HomalgRing( IBPS );
14851517

@@ -1601,6 +1633,9 @@ InstallMethod( MatrixOfCoefficientsOfIBPs,
16011633
function( IBPS, degree )
16021634
local Y, weights_a, weights_D, weights, powers, subset;
16031635

1636+
## example: 1LoopBubble.g
1637+
## called by MatrixOfCoefficientsOfParametricIBPs( LD, 2 : basis_of_relative_syzygies := false );
1638+
16041639
## example: Q[d,s][a1,a2]<D1,D1_,D2,D2_>/( D2*D2_-1, D1*D1_-1 )
16051640
Y := HomalgRing( IBPS );
16061641

@@ -1651,7 +1686,10 @@ InstallMethod( MatrixOfCoefficientsOfParametricIBPs,
16511686
[ IsLoopDiagram and HasPropagators, IsInt, IsHomalgRing ],
16521687

16531688
function( LD, degree, Qa )
1654-
local sibps, coeffs_monoms, coeffs, monoms, homalg_io_mode, m, trafo, pure_monoms, mixed_monoms, range;
1689+
local sibps, coeffs_monoms, coeffs, monoms, homalg_io_mode, m, pure_monoms, mixed_monoms, trafo, range;
1690+
1691+
## example: 1LoopBubble.g
1692+
## MatrixOfCoefficientsOfParametricIBPs( LD, 2 : basis_of_relative_syzygies := false );
16551693

16561694
sibps := MatrixOfSpecialIBPRelations( LD );
16571695

@@ -1685,6 +1723,15 @@ InstallMethod( MatrixOfCoefficientsOfParametricIBPs,
16851723

16861724
m := Qa * coeffs;
16871725

1726+
## example: monoms[1] = [ D1*D2_^2, D1_^2*D2, D1*D2_, D1_*D2 ]
1727+
mixed_monoms := Length( monoms[1] );
1728+
1729+
## example:
1730+
## monoms[2] = [ D2, D1, 1 ], ## pure monomials in D: only Di
1731+
## monoms[3] = [ D2_, D1_, D2_^2, D1_*D2_, D1_^2 ] ## pure monomials in D_: only Dj_
1732+
## pure_monom = [ D2, D1, 1; D2_, D1_, D2_^2, D1_*D2_, D1_^2 ]
1733+
pure_monoms := Concatenation( monoms[2], monoms[3] );
1734+
16881735
trafo := ValueOption( "trafo" );
16891736

16901737
if not trafo = true then
@@ -1696,18 +1743,13 @@ InstallMethod( MatrixOfCoefficientsOfParametricIBPs,
16961743
m := CertainColumns( m, [ 1 .. NrColumns( m ) - NrRows( m ) ] );
16971744
fi;
16981745

1699-
## example: [ D2, D1, 1; D2_, D1_, D2_^2, D1_*D2_, D1_^2 ], where
1700-
## monoms[2] = [ D2, D1, 1 ], ## pure monomials in D: only Di
1701-
## monoms[3] = [ D2_, D1_, D2_^2, D1_*D2_, D1_^2 ] ## pure monomials in D_: only Dj_
1702-
pure_monoms := Concatenation( monoms[2], monoms[3] );
1703-
17041746
## extract the lower right corner which gives relations among the pure_monoms,
17051747
## and trim the trafo matrix accordingly:
17061748
## ( * | * | * )
1707-
## ( 0 | x | 0 ) -> ( x | 0 )
1708-
## ( 0 | y | z ) -> ( y | z )
1709-
mixed_monoms := Length( monoms[1] );
1710-
1749+
## ( 0 | u | v ) -> ( u | v )
1750+
## ( 0 | x | 0 ) -> ( x | 0 )
1751+
## ( 0 | y | z ) -> ( y | z )
1752+
17111753
range := ZeroRows( CertainColumns( m, [ 1 .. mixed_monoms ] ) );
17121754

17131755
m := CertainRows( CertainColumns( m, [ mixed_monoms + 1 .. NrColumns( m ) ] ), range );
@@ -1718,8 +1760,9 @@ InstallMethod( MatrixOfCoefficientsOfParametricIBPs,
17181760

17191761
## exclude the rows which give relations (here x) exclusively among the D's,
17201762
## and trim the trafo matrix accordingly:
1721-
## ( x | 0 )
1722-
## ( y | z ) -> ( y | z )
1763+
## ( 0 | u | v )
1764+
## ( 0 | x | 0 ) -> ( u | v )
1765+
## ( 0 | y | z ) -> ( y | z )
17231766
range := NonZeroRows( CertainColumns( m, [ Length( monoms[2] ) + 1 .. NrColumns( m ) ] ) );
17241767

17251768
m := CertainRows( m, range );

0 commit comments

Comments
 (0)