/* dgfunctions3.txt Dec. 12, 2018 Maxima by Example, Ch. 12 Dirac Algebra and Quantum Electrodynamics, Edwin L. (Ted) Woollett, http://web.csulb.edu/~woollett/ woollett@charter.net functions and flags defined in the package files dirac3.mac dgtrace3.mac, dgcon3.mac, dgeval3.mac, dgmatrix3.mac. */ acomm dgmatrix3.mac acomm(A,B) --> B . A + A . B acon dgmatrix3.mac acon1 dgmatrix3.mac Avsq dgmatrix3.mac butlast dgtrace3.mac cdouble dgmatrix3.mac Chi dgmatrix3.mac ClearIndexR dgeval3.mac clist_pair dgcon3.mac clist_rem dgcon3.mac comm dgmatrix3.mac comm (A,B) --> A . B - B . A comp_def dgeval3.mac assign symbols or values to a four vector used to define frame dependent components. See the examples in dgeval3.mac. creates a separate 4 element array for each 4-vector. comp_def1 dgeval3.mac Con dgcon3.mac if Con(e,mu,nu,...) detects any Eps factors, then econ( noncov(e),mu,nu,...) is returned. coneps2 dgmatrix3.mac conj dirac3.mac collect_terms (expr, fac) dirac3.mac convertKD dgmatrix3.mac Cross (j, A, B) j'th component of vector cross product of 3-vectors A and B defined as lists, dgmatrix3.mac CZ2 dgmatrix3.mac CZ4 dgmatrix3.mac D D(a,b) symbolic invariant dot product of two 4-vectors Dexpand, dgtrace3.mac, calls Dexpand1 (controlled by simp_Dexpand1) divout dirac3.mac divout (expr,a) divides each term of the sum expr by a div_tb (expr, q) dirac3.mac, divide the numerator and denominator of expr by q. (ie: divide top and bottom by q) do_con dgcon3.mac automatic contraction on repeated index symbols, called by simp_tr1 D_sub dgeval3.mac dummyp dirac3.mac econ dgeval3.mac econ11 dgeval3.mac Eps1_con dgcon3.mac (called by tr for post trace massaging ) eps3 dgmatrix3.mac eps4 dirac3.mac eps4L dirac3.mac Eps_facp dgcon3.mac, called by Con to detect any Eps factors Eps_post dgcon3.mac called by tr (if G568 is true) for post trace simplifications. Ep_to_m (expr,p,E,m) dirac3.mac replaces sqrt(E - p) * sqrt(E + p) by m Ep_to_mM(e,p,E,m,M) dirac3.mac applies to m1 = m2 = m3 = m4 = m (2 to 2 reaction) in center of momentum frame, effective system mass M = 2*E, replaces E by M/2, p^2 by M^2/4 - m^2 Esq_to_psq (expr,p,E,m) dirac3.mac ev_Ds dgtrace3.mac ev_Ds(expr) first calls Dexpand, then calls the equivalent of ev_invar on the result (doesn't care about invar_flag setting). ev_invar (expr) dgeval3.mac evaluates given expression, using the equations in the list invarR; used by scon and TR1 provided invar_flag is set to true. The default is invar_flag = true, set by dgeval3.mac. find_eps4_prod dgmatrix3.mac fr_ao2 dirac3.mac G5p dgtrace3.mac G5prep dgtrace3.mac Gam dgmatrix3.mac explicit dirac gamma matrices Gam[j], j = 0, 1,2,3 note square brackets Gcon dgcon3.mac called by scon11 for contraction of G(a,n1,b,c,n1,d) for example gmatch dgcon3.mac gmatch ( [ [n1,n2],[n3,n4]],n1) --> [1,n2] Gmcon(a4L,index) dgcon3.mac Gmcon([al,mu,nu,mu],mu) --> Gm(al,nu) gmet dirac3.mac defined explicit array of metric components gmet[i,j] i,j = 0,1,2,3 ; note brackets get_matches dgeval3.mac getpair dgcon3.mac getpair (aL,k) returns a list of lists: [ [aL[k],aL[k+1]], [aL[1],..,aL[k-1],aL[k+2],..,aL[N] ] ] getppos1 dgtrace3.mac finds first arg of form a+b getSpos1 dgtrace3.mac get_rind dgcon3.mac returns list of repeated indices found, taking into account only G,Gm,UI,LI, Eps, EpsL,KD ; doesn't check indexp property. Gexpand, dgtrace3.mac, calls Gexpand1 (controlled by simp_Gexpand1) Gtr dgtrace3.mac Gtr1 dgtrace3.mac hc dgmatrix3.mac I2 dgmatrix3.mac I4 dgmatrix3.mac indeq dgcon3.mac indexp dgtrace3.mac indexR dgeval3.mac indexRS dgeval3.mac indexL dgtrace3.mac index_rep dgcon3.mac index_rep(n1,n2,n1) --> true index_pos dgcon3.mac index_pos(a,n1,b,c,n1,d) --> [2,5] inlist dgeval3.mac inlist([a,b,c,d],a) --> true inlist([a,b,c,d],e) --> false ipm dgmatrix3.mac ipv dgeval3.mac invar dgeval3.mac command used to populate the list of rules invarR (see below) Use set_invarR function defined below, which allows for easy reset of invarR. invar_flag (dgeval3.mac) is set to true when dirac3 is loaded, which allows scon and TR1 to make use of the equations in the list invarR to replace symbolic products of four-momenta in an expression. invarR dgeval3.mac The list of symbolic rules invarR is populated by using the function invar( eq1,eq2,...). Symbolic D(pa,pb) stands for four vector product pa . pb For example invar (D(p1,p1) = m^2,...) This list is later used by scon, TR1, and ev_Ds. invarRS dgeval3.mac LIcon(a4L,index) dgcon3.mac LIcon([p,mu,q,mu], mu) --> D(p,q) LIGm_con(LA, GmA,index1) dgcon3.mac contraction of products of LI(p,n) with products of Gm(n1,n2), used by scon11 listToProd dgcon3.mac listToProd ([LI(p,n1),Gm(n1,n2)]) --> Gm(n1,n2)*LI(p,n1) listToProd([]) --> 1 lists_to_prod(L) := listToProd(map('listToProd,L))$ lists_to_prod( [[a,b,c],[d,e,f]] ) --> a*b*c*d*e*f lists_to_prod( [[a,b,c],[],[d,e,f]] ) --> a*b*c*d*e*f massL dgtrace3.mac a list of chosen mass symbols. the default is [m,M] add mass symbols using Mmass(m1,m2,...) massp dgtrace3.mac If ma is a declared mass symbol, then massp(ma) --> true mbar dgmatrix3.mac mcon dgmatrix3.mac MCross dgmatrix3.mac 3-vector cross product for 4 x 4 gamma matrices Gam[j], j = 1,2,3 mDfac dgcon3.mac mdivp dgmatrix3.mac mdouble dgmatrix3.mac mEpsfac dgcon3.mac " make Eps factors" mEpsfac([n1,n2,n3,n4,n5,n6,n7,n8]) --> Eps(n1,n2,n3,n4)*Eps(n5,n6,n7,n8) mEpsLfac dgcon3.mac mexptp dgcon3.mac mGmfac dgcon3.mac Mindex dgtrace3.mac mKDfac dgcon3.mac make KD( ) factors from list mKDfac turns the list [a,b,c,d] into the product: KD(a,b)*KD(c,d), etc. mLIfac dgcon3.mac "make LI factors" from list mLIfac([p,n1,q,n2]) --> LI(p,n1)*LI(q,n2) for example Mmass dgtrace3.mac Mmass(m1,m2,...) adds declared mass symbols to the list massL. mncexptp dgmatrix3.mac mnctimesp dgmatrix3.mac mplusp dgtrace3.mac momRS dgeval3.mac more_index dgtrace3.mac returns true if UI or Gm is factor in expression, otherwise false. move dgeval3.mac mp_split dgmatrix3.mac mrindL dgcon3.mac mrindL(alist) returns as a list those elements of alist which satisfy indexp -> true Mscalar dgtrace3.mac mtimesp dgtrace3.mac m_tr dgmatrix3.mac mUIfac dgcon3.mac "make UI factors" from list mUIfac([p,n1,q,n2]) --> UI(p,n1)*UI(q,n2) nc_tr dgeval3.mac example: nc_tr(mu,p,q,mu) should give the same result as noncov (tr (mu,p,q,mu)), but use of noncov is term by term and nc_tr function organizes the calculation all by itself in a more efficient manner. NDfac (e), dgcon3.mac, removes numerical factors and divisors Nlast dirac3.mac noncov1 dgeval3.mac called by noncov. noncov dgeval3.mac sums over all repeated dummy indices (N1,N2,...) in expression, replaces Eps(n1,n2,n3,n4) with eps4[n1,n2,n3,n4], replaces Gm(n1,n2) with gmet[n1,n2], replaces D(p,q) with explicit 4-vector product in terms of array components p[mu], q[nu], replaces UI(p,mu) with p[mu], replaces LI(p,mu) with +/- p[mu] depending on value of mu, note that mu = 0,1,2,3. noncov_ratio returns noncov(numerator) / noncov(denominator) dgeval3.mac nu_loc (UIargs,Gmargs,Gargs,Epsargs,EpsLargs,KDargs,LIargs, mu) dgcon3.mac where are instances of a repeated index symbol mu? Looks for instances of a purported repeated index symbol mu. returns list [l1,l2], with l=0 for not found, 1 for UIargs, 2 for Gmargs, 3 for Gargs, 4 for Epsargs. example: [1,2] ==> one mu in UIargs and one mu in Gmargs. called by scon11 and scon2 numtrue dgcon3.mac opList dgcon3.mac P(sv) or P(sv,Sp) explicit spin projection matrix dgmatrix3.mac psq_to_Esq (expr,p,E,m) dirac3.mac pair dgtrace3.mac pair_inlist dgeval3.mac pair_separate(aL,index) dgcon3.mac pair_separate([[al,mu],[be,ga],[mu,nu]], mu) --> [[mu,nu,al,mu],[be,ga]] pfactor dirac3.mac pos(aL,x) dgcon3.mac returns list position of the first x in aL or else 0 prodToList dgcon3.mac ignores atoms prodToList2 dgeval3.mac includes atoms pullfac dirac3.mac pullpsL dgcon3.mac reduce dgtrace3.mac remL1 dgtrace3.mac remL1(aL,n) returns the list aL with element n removed. remL2 dgeval3.mac remL2(aL,n1,n2) removes list elements n1 and n2 and returns remaining list rootcrunch dgmatrix3.mac rpl dgcon3.mac rpl(aL,kk,xx) returns a list with element kk of list aL replaced by xx RZ4 dgmatrix3.mac S(sv) or S(sv,Sp) symbolic spin projection matrix dgmatrix3.mac Sargp dgtrace3.mac sbar dgmatrix3.mac scalarL dgtrace3.mac Mscalar declares symbols to be scalars and adds them to the list scalarL. unscalar removes from list. scalar_part dgcon3.mac called by Eps_post, UIGm_con, Eps1_con, simp_scon1, get_rind, scon11 (all dgcon3.mac code ) scon11 dgcon3.mac one term and one contraction index scon1 and simp_scon1 dgcon3.mac performs expansions and calls scon11 finally scon dgcon3.mac multiple terms and multiple contraction index symbols calls get_rind and then scon1 (recursive), controlled by simp_scon1, which finally calls scon11 scon2 dgcon3.mac post trace contraction on products of LI, UI, Gm set_invarR dgeval3.mac Use this to define the list invarR used by tr and nc_tr. Sig dgmatrix3.mac 2 x 2 Pauli matrices SIG dgmatrix3.mac 4 x 4 matrices with same algebra as Pauli matrices Sig_comm dgmatrix3.mac simp_Dexpand1, dgtrace3.mac, controls calls to Dexpand1, called by Dexpand simp_Gexpand1, dgtrace3.mac, controls calls to Gexpand1, called by Gexpand. simpGL dgcon3.mac simp_tr1 dgtrace3.mac , simp_tr1 controls calls to tr1, called by TR1 simp_VP1 dgeval3.mac controls call to VP1, called by VP. /* implementation of Feynman slash matrix */ sL1 dgmatrix3.mac sL dgmatrix3.mac calls sL1 -------------------------------- strip_atoms dgmatrix3.mac uses listToProd, prodToList strip_non_atoms dgmatrix3.mac uses strip_ops2 strip_ops dgcon3.mac strip_ops2 dgcon3.mac -------------------------------- strip_ops ignores atoms (%i73) strip_ops(LI(n1,n2)*Gm(n3,n4),LI); (%o73) [[LI(n1,n2)],Gm(n3,n4)] (%i74) strip_ops(m^2*LI(n1,n2)*Gm(n3,n4),LI); (%o74) [[LI(n1,n2)],Gm(n3,n4)] remove scalar part before calling strip_ops: (%i78) strip_ops(-m^2*LI(n1,n2)*Gm(n3,n4),LI); (%o78) [[],m^2*LI(n1,n2)*Gm(n3,n4)] strip_ops2 keeps atoms (%i75) strip_ops2(LI(n1,n2)*Gm(n3,n4),LI); (%o75) [[LI(n1,n2)],Gm(n3,n4)] (%i77) strip_ops2(m^2*LI(n1,n2)*Gm(n3,n4),LI); (%o77) [[LI(n1,n2)],m^2*Gm(n3,n4)] remove scalar part before calling strip_ops2: (%i79) strip_ops2(-m^2*LI(n1,n2)*Gm(n3,n4),LI); (%o79) [[],%aadumb*m^2*LI(n1,n2)*Gm(n3,n4)] %aadumb comes from prodToList2 in dgeval3. ---------------------------------- str_to_int dirac3.mac stu_flag dgeval3.mac default is false. noncov then doesn't replace s by s_th, etc. sub_stu(expr) dgeval3.mac, replaces t by t_th , s by s_th, u by u_th in expr sum_eps1 dgeval3.mac sum_eps dgeval3.mac sumToList dgtrace3.mac takeparts dirac3.mac take_parts(expr,n1,n2) returns the sum of the parts of expr from part(expr,n1) thru part(expr,n2). to_ao2 dirac3.mac to_half_angle dirac3.mac tr dgtrace3.mac, calls TR1 tr1 is controlled by simp_tr1 in dgtrace3.mac TR1, dgtrace3.mac, calls tr1 and is called by both tr and nc_tr. trigcrunch dgmatrix3.mac ts dirac3.mac UIGm_con dgcon3.mac (called by tr for post trace contractions, calls scon2) UImatch dgcon3.mac if L is a list of UI(pj,ni) elements, then UImatch(L,n1) returns [position,p-value] uncomp_def dgeval3.mac unindex dgtrace3.mac unscalar dgtrace3.mac unsub_stu dgeval3.mac UU dgmatrix3.mac uv_simp dirac3.mac uv_simp1 dirac3.mac vecp dgcon3.mac VP, VP1, simp_VP1 dgeval3.mac VP(pa,pb) is equivalent to noncov(D(pa,pb)) if you first use declare(c1,scalar), then VP(c1*pa,pb) --> c1*VP(pa,pb) vprod vector product of two 3-vectors defined as lists dgmatrix3 VV dgmatrix3.mac Z2 dgmatrix3.mac Z4 dgmatrix3.mac