E = sqrt(px^2 c^2 + py^2 c^2 + pz^2 c^2 + m^2 c^4) u1 = (E/c + m c, 0, pz, px + i py) u2 = (0, E/c + m c, px - i py, -pz) v1 = (pz, px + i py, E/c + m c, 0) v2 = (px - i py, -pz, 0, E/c + m c) I = ((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,0,1)) gmunu = ((1,0,0,0),(0,-1,0,0),(0,0,-1,0),(0,0,0,-1)) gamma0 = ((1,0,0,0),(0,1,0,0),(0,0,-1,0),(0,0,0,-1)) gamma1 = ((0,0,0,1),(0,0,1,0),(0,-1,0,0),(-1,0,0,0)) gamma2 = ((0,0,0,-i),(0,0,i,0),(0,i,0,0),(-i,0,0,0)) gamma3 = ((0,0,1,0),(0,0,0,-1),(-1,0,0,0),(0,1,0,0)) gamma = (gamma0,gamma1,gamma2,gamma3) p = (E/c, px, py, pz) pslash = dot(p,gmunu,gamma) "Verify spinor formulas" check(dot(pslash,u1) == m c u1) check(dot(pslash,u2) == m c u2) check(dot(pslash,v1) == -m c v1) check(dot(pslash,v2) == -m c v2) "ok" "Verify completeness" adjoint(u) = dot(conj(u),gamma0) check(outer(u1,adjoint(u1)) + outer(u2,adjoint(u2)) == (E/c + m c) (pslash + m c I)) check(outer(v1,adjoint(v1)) + outer(v2,adjoint(v2)) == (E/c + m c) (pslash - m c I)) "ok"
Run