|
89 | 89 | tests |
90 | 90 | , |
91 | 91 | TestCreate[ |
92 | | - Module[{setup, t1, t2}, |
| 92 | + Module[{setup, t1, t2, res}, |
93 | 93 | setup = GetFunKitSetupScalar[]; |
94 | 94 | t1 = FTerm[1, Propagator[{Phi, Phi}, {i1, i2}], Propagator[{Phi, Phi}, {i2, i3}]]; |
95 | 95 | t2 = FTerm[1, Propagator[{Phi, Phi}, {i1, i2}], Propagator[{Phi, Phi}, {i2, i3}]]; |
96 | | - FunKit`Private`TermsEqualAndSum[setup, t1, t2] |
| 96 | + res = FunKit`Private`TermsEqualAndSum[setup, t1, t2]; |
| 97 | + FunKit`Private`NormalizeSuperIndices[setup, res] |
97 | 98 | ] |
98 | 99 | , |
99 | | - FTerm[2, Propagator[{Phi, Phi}, {i2, i1}], Propagator[{Phi, Phi}, {i3, i2}]] |
| 100 | + FTerm[2, Propagator[{Phi, Phi}, {sIdx1, i1}], Propagator[{Phi, Phi}, {i3, sIdx1}]] |
100 | 101 | , |
101 | 102 | TestID -> "TermsEqualAndSum: identical bosonic terms" |
102 | 103 | ] |
|
106 | 107 | tests |
107 | 108 | , |
108 | 109 | TestCreate[ |
109 | | - Module[{setup, t1, t2}, |
| 110 | + Module[{setup, t1, t2, res}, |
110 | 111 | setup = GetFunKitSetupScalar[]; |
111 | 112 | t1 = FTerm[1, Propagator[{Phi, Phi}, {i1, i2}], Propagator[{Phi, Phi}, {i2, i3}]]; |
112 | 113 | t2 = FTerm[1, Propagator[{Phi, Phi}, {i1, b}], Propagator[{Phi, Phi}, {b, i3}]]; |
113 | | - FunKit`Private`TermsEqualAndSum[setup, t1, t2] |
| 114 | + res = FunKit`Private`TermsEqualAndSum[setup, t1, t2]; |
| 115 | + FunKit`Private`NormalizeSuperIndices[setup, res] |
114 | 116 | ] |
115 | 117 | , |
116 | | - FTerm[2, Propagator[{Phi, Phi}, {i2, i1}], Propagator[{Phi, Phi}, {i3, i2}]] |
| 118 | + FTerm[2, Propagator[{Phi, Phi}, {sIdx1, i1}], Propagator[{Phi, Phi}, {i3, sIdx1}]] |
117 | 119 | , |
118 | 120 | TestID -> "TermsEqualAndSum: different index names" |
119 | 121 | ] |
|
195 | 197 | tests |
196 | 198 | , |
197 | 199 | TestCreate[ |
198 | | - Module[{setup, t1, t2}, |
| 200 | + Module[{setup, t1, t2, res}, |
199 | 201 | setup = GetFunKitSetupYukawa[]; |
200 | 202 | t1 = FTerm[1, Propagator[{Psi, Psibar}, {i1, i2}], GammaN[{Psi, Psibar, Phi}, {-i1, -i3, -i4}], GammaN[{Psi, Psibar, Phi}, {-i5, -i2, -i6}], Propagator[{Psi, Psibar}, {i3, i5}], Propagator[{Phi, Phi}, {i4, i6}]]; |
201 | 203 | t2 = FTerm[1, Propagator[{Psi, Psibar}, {a, b}], GammaN[{Psi, Psibar, Phi}, {-a, -c, -d}], GammaN[{Psi, Psibar, Phi}, {-e, -b, -f}], Propagator[{Psi, Psibar}, {c, e}], Propagator[{Phi, Phi}, {d, f}]]; |
202 | | - FunKit`Private`TermsEqualAndSum[setup, t1, t2] |
| 204 | + res = FunKit`Private`TermsEqualAndSum[setup, t1, t2]; |
| 205 | + FunKit`Private`NormalizeSuperIndices[setup, res] |
203 | 206 | ] |
204 | 207 | , |
205 | | - FTerm[2, Propagator[{Psi, Psibar}, {i1, i2}], GammaN[{Phi, Psibar, Psi}, {-i4, -i3, -i1}], GammaN[{Phi, Psibar, Psi}, {-i6, -i2, -i5}], Propagator[{Psi, Psibar}, {i3, i5}], Propagator[{Phi, Phi}, {i6, i4}]] |
| 208 | + FTerm[2, Propagator[{Psi, Psibar}, {sIdx1, sIdx2}], GammaN[{Phi, Psibar, Psi}, {-sIdx3, -sIdx4, -sIdx1}], GammaN[{Phi, Psibar, Psi}, {-sIdx5, -sIdx2, -sIdx6}], Propagator[{Psi, Psibar}, {sIdx4, sIdx6}], Propagator[{Phi, Phi}, {sIdx5, sIdx3}]] |
206 | 209 | , |
207 | 210 | TestID -> "TermsEqualAndSum: identical fermionic diagrams" |
208 | 211 | ] |
|
212 | 215 | tests |
213 | 216 | , |
214 | 217 | TestCreate[ |
215 | | - Module[{setup, t1, t2}, |
| 218 | + Module[{setup, t1, t2, res}, |
216 | 219 | setup = GetFunKitSetupYukawa[]; |
217 | 220 | t1 = FTerm[1, Propagator[{Psi, Psibar}, {i1, i2}], GammaN[{Psi, Psibar, Phi}, {-i1, -i3, -i4}], GammaN[{Psi, Psibar, Phi}, {-i5, -i2, -i6}], Propagator[{Psi, Psibar}, {i3, i5}], Propagator[{Phi, Phi}, {i4, i6}]]; |
218 | 221 | t2 = FTerm[-1, Propagator[{Psibar, Psi}, {b, a}], GammaN[{Psibar, Phi, Psi}, {-c, -d, -a}], GammaN[{Phi, Psi, Psibar}, {-f, -e, -b}], Propagator[{Psibar, Psi}, {e, c}], Propagator[{Phi, Phi}, {d, f}]]; |
219 | | - FunKit`Private`TermsEqualAndSum[setup, t1, t2] |
| 222 | + res = FunKit`Private`TermsEqualAndSum[setup, t1, t2]; |
| 223 | + FunKit`Private`NormalizeSuperIndices[setup, res] |
220 | 224 | ] |
221 | 225 | , |
222 | | - FTerm[2, Propagator[{Psi, Psibar}, {i1, i2}], GammaN[{Phi, Psibar, Psi}, {-i4, -i3, -i1}], GammaN[{Phi, Psibar, Psi}, {-i6, -i2, -i5}], Propagator[{Psi, Psibar}, {i3, i5}], Propagator[{Phi, Phi}, {i6, i4}]] |
| 226 | + FTerm[2, Propagator[{Psi, Psibar}, {sIdx1, sIdx2}], GammaN[{Phi, Psibar, Psi}, {-sIdx3, -sIdx4, -sIdx1}], GammaN[{Phi, Psibar, Psi}, {-sIdx5, -sIdx2, -sIdx6}], Propagator[{Psi, Psibar}, {sIdx4, sIdx6}], Propagator[{Phi, Phi}, {sIdx5, sIdx3}]] |
223 | 227 | , |
224 | 228 | TestID -> "TermsEqualAndSum: reordered fermionic fields" |
225 | 229 | ] |
226 | 230 | ]; |
227 | 231 |
|
| 232 | +AppendTo[ |
| 233 | + tests |
| 234 | + , |
| 235 | + TestCreate[ |
| 236 | + Module[{setup, t1, t2}, |
| 237 | + setup = GetFunKitSetupFourFermion[]; |
| 238 | + t1 = FTerm[GammaN[{Psibar, Psibar, Psi, Psi}, {-i1, -i2, -i3, -i4}], Propagator[{Psi, Psibar}, {i1, i3}], Propagator[{Psi, Psibar}, {i2, i4}]]; |
| 239 | + t2 = FTerm[GammaN[{Psibar, Psibar, Psi, Psi}, {-i1, -i2, -i3, -i4}], Propagator[{Psi, Psibar}, {i1, i4}], Propagator[{Psi, Psibar}, {i2, i3}]]; |
| 240 | + FunKit`Private`TermsEqualAndSum[setup, t1, t2] |
| 241 | + ] |
| 242 | + , |
| 243 | + FTerm[0] |
| 244 | + , |
| 245 | + TestID -> "FSimplify 4F: Identify two tadpoles with switched legs correctly (expect FEx[] after simplification)" |
| 246 | + ] |
| 247 | +]; |
| 248 | + |
| 249 | +AppendTo[ |
| 250 | + tests |
| 251 | + , |
| 252 | + TestCreate[ |
| 253 | + Module[{setup, t1, t2, res}, |
| 254 | + setup = GetFunKitSetupFourFermion[]; |
| 255 | + t1 = FTerm[GammaN[{Psibar, Psibar, Psi, Psi}, {-i1, -i2, -i3, -i4}], Propagator[{Psi, Psibar}, {i1, i3}], Propagator[{Psi, Psibar}, {i2, i4}]]; |
| 256 | + t2 = FTerm[-1, GammaN[{Psibar, Psibar, Psi, Psi}, {-i1, -i2, -i3, -i4}], Propagator[{Psi, Psibar}, {i1, i4}], Propagator[{Psi, Psibar}, {i2, i3}]]; |
| 257 | + res = FunKit`Private`TermsEqualAndSum[setup, t1, t2]; |
| 258 | + FunKit`Private`NormalizeSuperIndices[setup, res] |
| 259 | + ] |
| 260 | + , |
| 261 | + FTerm[2, GammaN[{Psibar, Psibar, Psi, Psi}, {-sIdx1, -sIdx2, -sIdx3, -sIdx4}], Propagator[{Psi, Psibar}, {sIdx2, sIdx4}], Propagator[{Psi, Psibar}, {sIdx1, sIdx3}]] |
| 262 | + , |
| 263 | + TestID -> "FSimplify 4F: Identify two tadpoles with switched legs correctly (expect NOT FEx[] after simplification)" |
| 264 | + ] |
| 265 | +]; |
| 266 | + |
228 | 267 | (********************************************************************************** |
229 | 268 | Section 4: FSimplify — bosonic simplification — 5 tests |
230 | 269 | **********************************************************************************) |
|
240 | 279 | FTakeDerivatives[setup, WetterichEquation, {Phi[i1], Phi[i2]}] // |
241 | 280 | FTruncate // |
242 | 281 | FSimplify; |
243 | | - Length[result] - 1 === 2 |
| 282 | + Length[result] - 1 |
244 | 283 | ] |
245 | 284 | , |
246 | | - True |
| 285 | + 2 |
247 | 286 | , |
248 | | - TestID -> "FSimplify: scalar 2-point flow" |
| 287 | + TestID -> "FSimplify: scalar 2-point flow has 2 terms (tadpole and polarization)" |
249 | 288 | ] |
250 | 289 | ]; |
251 | 290 |
|
|
265 | 304 | , |
266 | 305 | 4 |
267 | 306 | , |
268 | | - TestID -> "FSimplify: scalar 4-point flow" |
| 307 | + TestID -> "FSimplify: scalar 4-point flow has 4 terms (1 diagram with two 4-point vertices, 2 diagrams with one 4-point vertex, 1 diagram with no 4-point vertices)" |
269 | 308 | ] |
270 | 309 | ]; |
271 | 310 |
|
|
390 | 429 | Section 6: FSimplify — four-fermion interactions — 5 tests |
391 | 430 | **********************************************************************************) |
392 | 431 |
|
| 432 | +AppendTo[ |
| 433 | + tests |
| 434 | + , |
| 435 | + TestCreate[ |
| 436 | + Module[{setup, eq1, eq2}, |
| 437 | + setup = GetFunKitSetupFourFermion[]; |
| 438 | + eq1 = FTerm[GammaN[{Psibar, Psibar, Psi, Psi}, {-i1, -i2, -i3, -i4}], Propagator[{Psi, Psibar}, {i1, i3}], Propagator[{Psi, Psibar}, {i2, i4}]]; |
| 439 | + eq2 = FTerm[GammaN[{Psibar, Psibar, Psi, Psi}, {-i1, -i2, -i3, -i4}], Propagator[{Psi, Psibar}, {i1, i4}], Propagator[{Psi, Psibar}, {i2, i3}]]; |
| 440 | + FSimplify[setup, FEx[eq1, eq2]] |
| 441 | + ] |
| 442 | + , |
| 443 | + FEx[] |
| 444 | + , |
| 445 | + TestID -> "FSimplify 4F: Identify two tadpoles with switched legs correctly (expect FEx[] after simplification)" |
| 446 | + ] |
| 447 | +]; |
| 448 | + |
| 449 | +AppendTo[ |
| 450 | + tests |
| 451 | + , |
| 452 | + TestCreate[ |
| 453 | + Module[{setup, eq1, eq2}, |
| 454 | + setup = GetFunKitSetupFourFermion[]; |
| 455 | + eq1 = FTerm[GammaN[{Psibar, Psibar, Psi, Psi}, {-i1, -i2, -i3, -i4}], Propagator[{Psi, Psibar}, {i1, i3}], Propagator[{Psi, Psibar}, {i2, i4}]]; |
| 456 | + eq2 = FTerm[-1, GammaN[{Psibar, Psibar, Psi, Psi}, {-i1, -i2, -i3, -i4}], Propagator[{Psi, Psibar}, {i1, i4}], Propagator[{Psi, Psibar}, {i2, i3}]]; |
| 457 | + FSimplify[setup, FEx[eq1, eq2]] =!= FEx[] |
| 458 | + ] |
| 459 | + , |
| 460 | + True |
| 461 | + , |
| 462 | + TestID -> "FSimplify 4F: Identify two tadpoles with switched legs correctly (expect NOT FEx[] after simplification)" |
| 463 | + ] |
| 464 | +]; |
| 465 | + |
393 | 466 | AppendTo[ |
394 | 467 | tests |
395 | 468 | , |
|
0 commit comments