intfierz.red 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. module intfierz; % Interface with Rodionov-Fierzing Routine.
  2. exports calc_map_tar,calc_den_tar,pre!-calc!-map_ $
  3. imports mk!-numr,map_!-to!-strand $
  4. lisp$
  5. %----------- DELETING VERTS WITH _0'S ------------------------------$
  6. %symbolic procedure sort!-map_(map_,tadepoles,deltas,s)$
  7. %if null map_ then list(s,tadepoles,deltas)
  8. %else
  9. % begin
  10. % scalar vert,edges$
  11. % vert:=incident1('!_0,car map_,'ll)$
  12. % return
  13. % if null vert then sort!-map_(cdr map_,tadepoles,deltas,
  14. % car map_ . s)
  15. % else if car vert = cadr vert then
  16. % sort!-map_(cdr map_,caar vert . tadepoles,deltas,s)
  17. % else sort!-map_(cdr map_,tadepoles,list('cons,caar vert,
  18. % caadr vert) . deltas,s)
  19. % end$
  20. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  21. %%%%% modified 17.09.90 A.Taranov %%%%%%%%%%%%%%%%%%%%%
  22. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  23. symbolic procedure sort!-map_(map_,tadepoles,deltas,poles,s)$
  24. % tadepoles are verts with 1 0_ edge and contracted others
  25. % deltas are verts with 1 0_ edge
  26. % poles are verts with at list 2 0_ edges
  27. if null map_ then list(s,tadepoles,deltas,poles)
  28. else
  29. begin
  30. scalar vert,tdp$
  31. vert:=incident1('!_0,car map_,'ll)$
  32. if null vert then tdp:=tadepolep car map_
  33. else %%%% vertex contain !_0 edge
  34. return
  35. if (caar vert = '!_0) then
  36. sort!-map_(cdr map_,tadepoles,deltas,caadr vert . poles,s)
  37. else if (caadr vert = '!_0) then
  38. sort!-map_(cdr map_,tadepoles,deltas,caar vert . poles,s)
  39. else if car vert = cadr vert then
  40. sort!-map_(cdr map_,caar vert . tadepoles,deltas,
  41. poles,s)
  42. else sort!-map_(cdr map_,tadepoles,list('cons,
  43. caar vert,caadr vert) . deltas,poles,
  44. s)$
  45. %%%%% here car Map_ was checked to be a real tadpole
  46. return
  47. if null tdp then sort!-map_(cdr map_,tadepoles,deltas,
  48. poles,car map_ . s)
  49. else sort!-map_(cdr map_,cadr tdp . tadepoles,deltas,
  50. caar tdp . poles,s)
  51. end$
  52. symbolic procedure tadepolep vrt; %%%%%% 17.09.90
  53. % return edge1 . edge2 if vrt is tadpole,
  54. % NIL otherwise.
  55. % edge1 correspond to 'pole', edge2 - to 'loop' of a tadpole.
  56. if car vrt = cadr vrt then caddr vrt . car vrt
  57. else if car vrt = caddr vrt then cadr vrt . car vrt
  58. else if cadr vrt = caddr vrt then car vrt . cadr vrt
  59. else nil;
  60. symbolic procedure del!-tades(tades,edges)$
  61. if null tades then edges
  62. else del!-tades(cdr tades,delete(car tades,edges))$
  63. symbolic procedure del!-deltas(deltas,edges)$
  64. if null cdr deltas then edges
  65. else del!-deltas(cdr deltas,del!-tades(cdar deltas,edges))$
  66. %--------------- EVALUATING MAP_S -----------------------------------$
  67. symbolic procedure pre!-calc!-map_(map_,edges)$
  68. % : (STRAND NEWMAP_ TADEPOLES DELTAS)$
  69. begin
  70. scalar strand,w$
  71. w:=sort!-map_(map_,nil,list 1,nil,nil)$
  72. % delete from edge list deltas,poles and tades
  73. edges:=del!-deltas(caddr w,
  74. del!-tades(cadr w,delete('!_0,edges)))$
  75. strand:= if car w then map_!-to!-strand(edges,car w)
  76. else nil$
  77. return strand . w
  78. end$
  79. symbolic procedure calc_map_tar(gstrand,alst)$
  80. % THIRD VERSION.$
  81. begin
  82. scalar poles,edges,strand,deltas,tades,map_$
  83. strand:=car gstrand$
  84. map_:=cadr gstrand$
  85. tades:=caddr gstrand $
  86. deltas:=car cdddr gstrand $
  87. poles:= car cddddr gstrand $
  88. if ev!-poles(poles,alst) then return 0; %%%%% result is zero
  89. return constimes list(constimes deltas,
  90. constimes ev!-tades(tades,alst),
  91. (if null map_ then 1
  92. else strand!-alg!-top(strand,map_,alst)))
  93. end$
  94. symbolic procedure ev!-poles(poles,alst)$ %%% 10.09.90
  95. if null poles then nil
  96. else if getedge(car poles,alst) = 0 then ev!-poles(cdr poles,alst)
  97. else poles$
  98. symbolic procedure ev!-deltas(deltas)$
  99. if null deltas then list 1
  100. else ('cons . car deltas) . ev!-deltas(cdr deltas)$
  101. symbolic procedure ev!-tades(tades,alst)$
  102. if null tades then list 1
  103. else binc(ndim!*,getedge(car tades,alst))
  104. . ev!-tades(cdr tades,alst)$
  105. %------------------------ DENOMINATOR CALCULATION -------------------$
  106. symbolic procedure ev!-edgeloop(edge,alst)$
  107. % EVALUATES LOOP OF 'EDGE' COLORED VIA 'ALST'$
  108. binc(ndim!*,getedge(s!-edge!-name edge,alst) )$
  109. symbolic procedure ev!-denom2(vert,alst)$
  110. % EVALUATES DENOM FOR PROPAGATOR$
  111. ev!-edgeloop(car vert,alst)$
  112. symbolic procedure ev!-denom3(vert,alst)$
  113. % EVALUATES DENOM FOR 3 - VERTEX$
  114. begin
  115. scalar e1,e2,e3,lines,sign,!3j,numr$
  116. e1:=getedge(s!-edge!-name car vert,alst)$
  117. e2:=getedge(s!-edge!-name cadr vert,alst)$
  118. e3:=getedge(s!-edge!-name caddr vert,alst)$
  119. lines:=(e1+e2+e3)/2$
  120. e1:=lines-e1$
  121. e2:=lines-e2$
  122. e3:=lines-e3$
  123. sign:=(-1)**(e1*e2+e1*e3+e2*e3)$
  124. numr:=mk!-numr(ndim!*,0,lines)$
  125. numr:=(if numr then (constimes numr)
  126. else 1)$
  127. !3j:=listquotient(numr,
  128. factorial(e1)*factorial(e2)*factorial(e3)*sign)$
  129. return !3j
  130. end$
  131. symbolic procedure binc(n,p)$
  132. % BINOMIAL COEFF C(N,P)$
  133. if 0 = p then 1 else
  134. listquotient(constimes mk!-numr(n,0,p),factorial p)$
  135. symbolic procedure calc_den_tar(den_,alst)$
  136. (lambda u$ if null u then 1
  137. else if null cdr u then car u
  138. else constimes u )
  139. denlist(den_,alst)$
  140. symbolic procedure denlist(den_,alst)$
  141. if null den_ then nil
  142. else if length car den_ = 2 then
  143. ev!-denom2(car den_,alst) . denlist(cdr den_,alst)
  144. else ev!-denom3(car den_,alst) . denlist(cdr den_,alst)$
  145. endmodule;
  146. end;