Skip to content

Commit

Permalink
turn one argument operations into attributes
Browse files Browse the repository at this point in the history
now all options are passed to the LoopDiagram constructor
  • Loading branch information
mohamed-barakat committed Jun 19, 2021
1 parent e9f1492 commit cb99183
Show file tree
Hide file tree
Showing 8 changed files with 238 additions and 341 deletions.
2 changes: 1 addition & 1 deletion PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SetPackageInfo( rec(
PackageName := "LoopIntegrals",
Subtitle := "Compute master integrals using commutative and noncommutative methods from computational algebraic geometry",
Version := Maximum( [
"2021.03-02", ## Mohamed's version
"2021.06-01", ## Mohamed's version
## this line prevents merge conflicts
] ),

Expand Down
2 changes: 2 additions & 0 deletions doc/Doc.autodoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ This package is an ongoing work to compute master integrals using commutative an

@Subsection Kite
@InsertChunk Kite
@InsertChunk Kite_no_abbreviation

@Subsection 2 Loop nonplanar ladder
@InsertChunk 2LoopNonPlanarLadder

@Subsection 2 Loop cusp anomalous dimensions
@InsertChunk 2LoopCuspAnomalousDimensions
@InsertChunk 2LoopCuspAnomalousDimensions_rational

@Subsection 2 Loop box
@InsertChunk 2LoopBox
Expand Down
14 changes: 0 additions & 14 deletions examples/2LoopCuspAnomalousDimensions.g
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,6 @@ SetPropagators( LD,
2*k1*v1 - 1, 2*k1*v2 - 1, k1^2 ] );
SetNumerators( LD, -[ k2^2 ] );
SetExtraLorentzInvariants( LD, [ cos ] );
e12 := PairOfMatricesOfLoopDiagramInPropagators( LD : rational := true );
#! [ <A 8 x 6 matrix over an external ring>,
#! <A 6 x 6 matrix over an external ring> ]
Display( e12[1] );
#! 0, 0, D3+D6-N7, D4-1, D5-1, 2*D6,
#! 0, 0, -D3+D6-N7,D1-1, D2-1, -D3+D6+N7,
#! 0, 0, -D1+D4, -2, (-2*cos),D4-1,
#! 0, 0, -D2+D5, (-2*cos),-2, D5-1,
#! D4-1, D5-1, -D3-D6+N7,0, 0, 0,
#! D1-1, D2-1, D3-D6+N7, 0, 0, 0,
#! -2, (-2*cos),D1-D4, 0, 0, 0,
#! (-2*cos),-2, D2-D5, 0, 0, 0
s := SyzygiesOfRows( e12 );
#! <A non-zero 46 x 8 matrix over an external ring>
E12 := PairOfMatricesOfLoopDiagramInPropagators( LD );
#! [ <A 8 x 6 matrix over an external ring>,
#! <A 6 x 6 matrix over an external ring> ]
Expand Down
33 changes: 33 additions & 0 deletions examples/2LoopCuspAnomalousDimensions_rational.g
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#! @Chunk 2LoopCuspAnomalousDimensions_rational

LoadPackage( "LoopIntegrals" );

#! @Example
LD := LoopDiagram( "k1, k2", "v1, v2" : rational := true );
#! <A loop diagram with loop momenta [ k1, k2 ] & external momenta [ v1, v2 ]>
cos:= v1*v2;;
SetAbbreviation( cos, "cos" );
rel := [ v1^2 - 1, v2^2 - 1 ];;
SetRelationsOfExternalMomenta( LD, rel );
SetIndependentLorentzInvariants( LD,
[ k1^2, k1*k2, k1*v1, k1*v2, k2^2, k2*v1, k2*v2, cos ] );
SetPropagators( LD,
-[ 2*k2*v1 - 1, 2*k2*v2 - 1, (k1 - k2)^2,
2*k1*v1 - 1, 2*k1*v2 - 1, k1^2 ] );
SetNumerators( LD, -[ k2^2 ] );
SetExtraLorentzInvariants( LD, [ cos ] );
E12 := PairOfMatricesOfLoopDiagramInPropagators( LD );
#! [ <A 8 x 6 matrix over an external ring>,
#! <A 6 x 6 matrix over an external ring> ]
Display( E12[1] );
#! 0, 0, D3+D6-N7, D4-1, D5-1, 2*D6,
#! 0, 0, -D3+D6-N7,D1-1, D2-1, -D3+D6+N7,
#! 0, 0, -D1+D4, -2, (-2*cos),D4-1,
#! 0, 0, -D2+D5, (-2*cos),-2, D5-1,
#! D4-1, D5-1, -D3-D6+N7,0, 0, 0,
#! D1-1, D2-1, D3-D6+N7, 0, 0, 0,
#! -2, (-2*cos),D1-D4, 0, 0, 0,
#! (-2*cos),-2, D2-D5, 0, 0, 0
s := SyzygiesOfRows( E12 );
#! <A non-zero 46 x 8 matrix over an external ring>
#! @EndExample
17 changes: 0 additions & 17 deletions examples/Kite.g
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,6 @@ Display( e12[2] );
#! 0, 0, -l2l2,0, 0,
#! 0, 0, 0, -l2l2+2*l2p-s,0,
#! 0, 0, 0, 0, -l1l1-l2l2-2*l1l2
e12 := PairOfMatricesOfLoopDiagramInIndependentLorentzInvariants( LD :
abbreviation := false );
#! [ <An unevaluated non-zero 6 x 5 matrix over an external ring>,
#! <An unevaluated non-zero 5 x 5 matrix over an external ring> ]
Display( e12[1] );
#! -2*x1,-2*x1-2*x4,0, 0, -2*x1-2*x3,
#! -2*x3,-2*x3-2*x5,0, 0, -2*x2-2*x3,
#! -2*x4,-2*x4-2*x6,0, 0, -2*x4-2*x5,
#! 0, 0, -2*x3,-2*x3+2*x4,-2*x1-2*x3,
#! 0, 0, -2*x2,-2*x2+2*x5,-2*x2-2*x3,
#! 0, 0, -2*x5,-2*x5+2*x6,-2*x4-2*x5
Display( e12[2] );
#! -x1,0, 0, 0, 0,
#! 0, -x1-2*x4-x6,0, 0, 0,
#! 0, 0, -x2,0, 0,
#! 0, 0, 0, -x2+2*x5-x6,0,
#! 0, 0, 0, 0, -x1-x2-2*x3
E12 := PairOfMatricesOfLoopDiagramInPropagators( LD );
#! [ <A 6 x 5 matrix over an external ring>,
#! <A 5 x 5 matrix over an external ring> ]
Expand Down
31 changes: 31 additions & 0 deletions examples/Kite_no_abbreviation.g
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#! @Chunk Kite_no_abbreviation

LoadPackage( "LoopIntegrals" );

#! @Example
LD := LoopDiagram( "l1..2", "p", 4 : abbreviation := false );
#! <A loop diagram with loop momenta [ l1, l2 ] & external momenta [ p ]>
s := p^2;;
SetAbbreviation( s, "s" );
SetRelationsOfExternalMomenta( LD, [ ] );
SetIndependentLorentzInvariants( LD, [ l1^2, l2^2, l1*l2, l1*p, l2*p, s ] );
SetPropagators( LD, -[ l1^2, (l1+p)^2, l2^2, (l2-p)^2, (l1+l2)^2 ] );
SetNumerators( LD, -[ ] );
SetExtraLorentzInvariants( LD, [ s ] );
e12 := PairOfMatricesOfLoopDiagramInIndependentLorentzInvariants( LD );
#! [ <An unevaluated non-zero 6 x 5 matrix over an external ring>,
#! <An unevaluated non-zero 5 x 5 matrix over an external ring> ]
Display( e12[1] );
#! -2*x1,-2*x1-2*x4,0, 0, -2*x1-2*x3,
#! -2*x3,-2*x3-2*x5,0, 0, -2*x2-2*x3,
#! -2*x4,-2*x4-2*x6,0, 0, -2*x4-2*x5,
#! 0, 0, -2*x3,-2*x3+2*x4,-2*x1-2*x3,
#! 0, 0, -2*x2,-2*x2+2*x5,-2*x2-2*x3,
#! 0, 0, -2*x5,-2*x5+2*x6,-2*x4-2*x5
Display( e12[2] );
#! -x1,0, 0, 0, 0,
#! 0, -x1-2*x4-x6,0, 0, 0,
#! 0, 0, -x2,0, 0,
#! 0, 0, 0, -x2+2*x5-x6,0,
#! 0, 0, 0, 0, -x1-x2-2*x3
#! @EndExample
Loading

0 comments on commit cb99183

Please sign in to comment.