%    Title:  Physics Math
%     File:  dnwphysics.sty
%   Author:  David N. Williams
% Compiler:  Tex Live 2013
%            http://www.tug.org/texlive/
%  License:  LPPL
%  Started:  October 28, 2007
%  Revised:  October 29-30, 2007
%            November 2,4,5,7-12,14,19,29,30, 2007
%            December 1,13,29, 2007
%            January 3-6, 23, 2008
%            February 15,16,18,19,21-25,29, 2008
%            March 1-7,10,12,16-18,21,22, 2008
%            December 6,14-17,20,21,23, 2008
%            January 21, 2009
%            November 20,21 2011
%            December 17,18,24, 2011
%            January 23, 2012
%            June 7, 2012    removed document structure macros
%            August 7,11, 2012  cleaned for MathJax
%            September 6, 2012
%            September 14,15,17,18,23-25, 2012
%            October 2,13, 2012
%            January 22,31, 2013
%            February 3,24, 2013
%            March 18, 2013
%            April 29, 2014
%            May 1, 2014
%            June 11,16, 2014
%
% Copyright 2007, 2008, 2011-14 David N. Williams

% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version
% 1.3 of this license or (at your option) any later version. The
% latest version of this license is (probably) in
%
%   http://www.latex-project.org/lppl.txt
%
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
% 
% The Current Maintainer of this work is David N. Williams.
%
% This work consists of the file dnwphysics.sty.
%
% This latex package contains macros that the author has found
% useful for physics and mathematical physics.  In the interest
% of clarity about dependences in the document which loads it,
% it does not load anything, but emits an error if a package it
% needs is not loaded.
%
% All references to The LaTeX Companion are from the 1994 second
% printing.

\ProvidesPackage{physicsmath}[2013/02/03 DNW's physics math macros]

\@ifpackageloaded{amsmath}{}{%
  \PackageError{physicsmath}
    {amsmath package needed}
    {Insert \textbackslash usepackage[<options>]\{amsmath\}}
}
\@ifpackageloaded{amssymb}{}{%
  \PackageError{physicsmath}
    {amssymb package needed}
    {Insert \textbackslash usepackage[<options>]\{amssymb\}}
}
\@ifpackageloaded{xspace}{}{%
  \PackageError{physicsmath}
    {xspace package needed}
    {Insert \textbackslash usepackage[<options>]\{xspace\}}
}
\@ifpackageloaded{nicefrac}{}{%
  \PackageError{physicsmath}
    {nicefrac package needed}
    {Insert \textbackslash usepackage[<options>]\{nicefrac\}}
}
\@ifpackageloaded{relsize}{}{%
  \PackageError{physicsmath}
    {relsize package needed}
    {Insert \textbackslash usepackage[<options>]\{relsize\}}
}

%%% Text definitions

\hyphenation{Lor-entz iso-trop-ic non-zero}
\hyphenation{Schwarz-schild}
\hyphenation{in-stan-ton}
\hyphenation{in-stan-ton pa-ram-e-trized}

\newcommand{\poin}{Poincar\'e\xspace}
\newcommand{\garding}{G\aa{}rding\xspace}

%%% Math definitions

\newcommand{\rhs}{r.h.s.\ }
\newcommand{\lhs}{l.h.s.\ }
\newcommand{\mquad}{\mkern-18mu}
\newcommand{\mqquad}{\mkern-36mu}

% Note that \mathcal requires neither amsfonts nor amssymb.

% To avoid having to load amsfonts or amssymb just for a few
% \mathbb's, use this:
\DeclareSymbolFont{AMSb}{U}{msb}{m}{n}
% This works with the above or with amssymb:
\DeclareMathSymbol{\bbC}{\mathalpha}{AMSb}{"43}
\DeclareMathSymbol{\bbL}{\mathalpha}{AMSb}{"4C}
\DeclareMathSymbol{\bbP}{\mathalpha}{AMSb}{"50}
\DeclareMathSymbol{\bbR}{\mathalpha}{AMSb}{"52}
\DeclareMathSymbol{\bbT}{\mathalpha}{AMSb}{"54}
\DeclareMathSymbol{\bbY}{\mathalpha}{AMSb}{"59}
%
% Or use this (see The Latex Companion):
%\@ifpackageloaded{amssymb}{}{%
%  \PackageError{physicsmath}
%    {amssymb package needed}
%    {Insert \textbackslash usepackage[<options>]\{amssymb\}}
%}
%\newcommand{\bbC}{\ensuremath{\mathbb C}}
%\newcommand{\bbL}{\ensuremath{\mathbb L}}
%\newcommand{\bbR}{\ensuremath{\mathbb R}}
%
% Or use something like this for mathpazo (see precession):
%\@ifpackageloaded{mathpazo}{}{%
%  \PackageError{physicsmath}
%    {mathpazo package needed}
%    {Insert \textbackslash usepackage[<options>]\{mathpazo\}}
%}
%\newcommand{\bbL}{\ensuremath{\mathbb{L}}}

% Greek letters
\newcommand{\alp}{\alpha}
\newcommand{\bet}{\beta}
\newcommand{\del}{\delta}
\newcommand{\Del}{\Delta}
\newcommand{\eps}{\epsilon}
\newcommand{\Gam}{\Gamma}
\newcommand{\gam}{\gamma}
\newcommand{\kap}{\kappa}
\newcommand{\Lam}{\Lambda}
\newcommand{\lam}{\lambda}
\newcommand{\ome}{\omega}
\newcommand{\Ome}{\Omega}
\newcommand{\sig}{\sigma}
\newcommand{\Sig}{\Sigma}

% basic math
\newcommand{\col}{\,\text{:}\,}  % better spacing for ":" in math
\newcommand{\setcol}{\text{:}\hspace{0.5em}} % better spacing for sets
\newcommand{\by}{\!\times\!}
\newcommand{\oby}{\!\otimes\!}
\newcommand{\half}{\frac{1}{2}}
\newcommand{\thalf}{{\tfrac{1}{2}}}
\newcommand{\tfourth}{{\tfrac{1}{4}}}
\newcommand{\fourth}{{\frac{1}{4}}}
\newcommand{\threehalf}{{\frac{3}{2}}}
\newcommand{\nhalf}{\nicefrac{1}{2}}  % \usepackage{nicefrac}
\newcommand{\shalf}{\nhalf}  % choose spin 1/2 style here
\newcommand{\nthreehalf}{{\nicefrac{3}{2}}}  % \usepackage{nicefrac}
\newcommand{\tsoroottwo}{\textstyle{\frac{1}{\sqrt 2}}}
\newcommand{\ipart}[2]{\left[\frac{#1}{#2}\right]}
\newcommand{\pcen}{\text{/cent}}
\newcommand{\vareps}{\ensuremath{\varepsilon}\xspace}
\newcommand{\abs}[1]{\ensuremath{\left|{#1}\right|}\xspace}
\newcommand{\norm}[1]{\ensuremath{\|#1\|}\xspace}
\newcommand{\bnorm}[1]{\ensuremath{\left\|#1\right\|}\xspace}
\newcommand{\class}[1]{\ensuremath{\left\{#1\right\}}\xspace}
%\newcommand{\imp}{\Rightarrow}
\newcommand{\imp}{\Longrightarrow}
\newcommand{\corr}{\leftrightarrow}
\newcommand{\Corr}{\longleftrightarrow}
\newcommand{\onetoone}{1\text{-}1\xspace}

% tightened plus and minus
\newcommand{\pt}{\!+\!}
\newcommand{\mt}{\!-\!}
\newcommand{\pone}{\!+\!1}
\newcommand{\mone}{\!-\!1}
\newcommand{\pj}{\!+\!j}
\newcommand{\mj}{\!-\!j}
\newcommand{\mJ}{\!-\!J}
\newcommand{\pjp}{\!+\!j'}
\newcommand{\mjp}{\!-\!j'}
\newcommand{\mJpone}{\!-\!J\!+\!1}
\newcommand{\twojpone}{\ensuremath{2j\pone}\xspace}
\newcommand{\twoJpone}{\ensuremath{2J\pone}\xspace}
\newcommand{\twojppone}{\ensuremath{2j'\pone}\xspace}
\newcommand{\twojmone}{\ensuremath{2j\mone}\xspace}
\newcommand{\twotwojpone}{\ensuremath{2(\twojpone)}\xspace}
\newcommand{\twotwojppone}{\ensuremath{2(\twojppone)}\xspace}
\newcommand{\jmhalf}{j\!-\!\half}
\newcommand{\Jmhalf}{J\!-\!\half}
\newcommand{\jmthalf}{j\!-\!\thalf}
\newcommand{\jmone}{j\mone}
\newcommand{\Jmone}{J\mone}
\newcommand{\Smone}{S\mone}
\newcommand{\twospone}{\ensuremath{2s\pone}\xspace}
\newcommand{\twoSpone}{\ensuremath{2S\pone}\xspace}
\newcommand{\twotwoSpone}{\ensuremath{2(\twoSpone)}\xspace}
\newcommand{\jppj}{j'\!\pj}
\newcommand{\jpmj}{j'\!\mj}
\newcommand{\jonepjtwo}{j_1\!+\!j_2}
\newcommand{\jonemjtwo}{j_1\!-\!j_2}
\newcommand{\monetwoj}{(-1)^{2j}}
%
\newcommand{\npone}{\ensuremath{n\pone}\xspace}
\newcommand{\nmone}{\ensuremath{n\mone}\xspace}
\newcommand{\Nmone}{\ensuremath{N\mone}\xspace}

% plus or minus
% Sometimes we need the names \pm and \mp for (\mu) and \mu',
% but we also need plus-or-minus and minus-or-plus:
%
\let\porm=\pm
\let\morp=\mp
%
%\newcommand{\pmone}{\ensuremath{\pm1}\xspace}
\newcommand{\pmone}{\ensuremath{\porm1}\xspace}
\newcommand{\pmonetwoj}{(\porm1)^{2j}}

% operators
\renewcommand{\dim}{\operatorname{dim}} % needs amsmath
\newcommand{\rank}{\operatorname{Rank}}
\renewcommand{\ker}{\operatorname{Ker}}
%\renewcommand{\Re}{\operatorname{\frak{Re}}}
%\renewcommand{\Im}{\operatorname{\frak{Im}}}
\renewcommand{\Re}{\operatorname{Re}}
\renewcommand{\Im}{\operatorname{Im}}
\newcommand{\ad}{\operatorname{ad}}
\newcommand{\supp}{\operatorname{supp}}
\newcommand{\sech}{\operatorname{sech}}
\newcommand{\tsum}{{\textstyle\sum}} % smaller, side limits
\newcommand{\fourier}{\mathcal F}
%\newcommand{\tr}{\mathop{\mathrm{Tr}}}  % does not need amsmath
\newcommand{\tr}{\operatorname{Tr}} % needs amsmath
\newcommand{\sgn}{\operatorname{sgn}}

% derivatives
% We do not make D's upright -- they're like ordinary linear ops.
\newcommand{\oder}[2]{\frac{\text{d}#1}{\text{d}#2}}
\newcommand{\onder}[3]{\frac{\text{d}^{#1}{#2}}{\text{d}{#3}^{#1}}}
\newcommand{\toder}[2]{\text{d}#1/\text{d}#2}
\newcommand{\oderbot}[1]{\frac{\text{d}\hphantom{#1}}{\text{d}#1}}
\newcommand{\onderbot}[2]{\frac{\text{d}^{#1}\hphantom{#2}}{\text{d}{#2}^{#1}}}
\newcommand{\oderiibot}[1]{\frac{\text{d}^2\hphantom{#1}}{\text{d}#1^2}}
\newcommand{\pder}[2]{\dfrac{\partial#1}{\partial#2}}
\newcommand{\ptwoder}[3]{\frac{\partial^2#1}{\partial#2\partial#3}}
\newcommand{\pderbot}[1]{\frac{\partial\hphantom{#1}}{\partial#1}}
\newcommand{\pnderbot}[2]{\frac{\partial^{#1}\hphantom{#2}}
  {\partial{#2}^{#1}}}
\newcommand{\pthreederbot}[1]
  {\frac{\partial^3\hphantom{#1}}{\partial#1^3}}
\newcommand{\pderf}[3]{\left.\dfrac{\partial#1}{\partial#2}\right|_{#3}}
%
\newcommand{\vder}[2]{\frac{\delta#1}{\delta#2}}
\newcommand{\vderbot}[1]{\frac{\del\hphantom{#1}}{\del#1}}
\newcommand{\vtwoder}[3]{\frac{\del^2{#1}}{\del#2\del#3}}
%\newcommand{\grad}{\raisebox{.25ex}{$\boldsymbol\bigtriangledown$}}
\newcommand{\grad}{\boldsymbol\nabla}
\newcommand{\laplac}{\operatorname{\triangle}}
\newcommand{\dalem}{\operatorname{\Box}}  % needs amssymb

% differentials
\newcommand{\differential}[1]{\ensuremath{\text{d}#1}\xspace}
% Morten Høgholm, posted by Karl Ove Hufthammer, "Re: About the
% differential operator `d'", comp.text.tex, November 20,21, 2011.
\newcommand\diff{\mathop{}\mskip-\thinmuskip\mathrm{d}}

% measures
\newcommand{\dx}{\differential{x}}
\newcommand{\dy}{\differential{y}}
\newcommand{\dk}{\differential{k}}
\newcommand{\donep}{\differential{p}} % \dp already defined
\newcommand{\dt}{\differential{t}}
\newcommand{\dlam}{\differential{\lambda}}
\newcommand{\dphi}{\differential{\phi}}
\newcommand{\dtau}{\differential{\tau}}
\newcommand{\dns}{\differential{^ns}}
\newcommand{\diiix}{\differential{^3x}}
\newcommand{\divx}{\differential{^4x}}
\newcommand{\divy}{\differential{^4y}}
\newcommand{\diiip}{\differential{^3p}}
\newcommand{\diiiP}{\differential{^3P}}
\newcommand{\divp}{\differential{^4p}}
\newcommand{\divP}{\differential{^4P}}
\newcommand{\diiik}{\differential{^3k}}
\newcommand{\divk}{\differential{^4k}}
\newcommand{\dMsq}{\differential{M^2}}
\newcommand{\dmsq}{\differential{m^2}}
%
\newcommand{\dpm}{\ensuremath{\frac{\diiip}{2\omega_m}}\xspace}
\newcommand{\tdpm}{\ensuremath{\diiip/2\omega_m}\xspace}
\newcommand{\dpM}{\ensuremath{\frac{\diiip}{2\omega_M}}\xspace}
\newcommand{\dkm}{\ensuremath{\frac{\diiik}{2\omega_m}}\xspace}
\newcommand{\dkM}{\ensuremath{\frac{\diiik}{2\omega_M}}\xspace}
\newcommand{\tdpM}{\ensuremath{\diiip/2\omega_M}\xspace}
\newcommand{\dpome}{\ensuremath{\frac{\diiip}{2\omega}}\xspace}
\newcommand{\tdpome}{\ensuremath{\diiip/2\omega}\xspace}
\newcommand{\dkcome}{\ensuremath{\frac{\diiik}{2\omega/c}}\xspace}
\newcommand{\dkokz}{\ensuremath{\frac{\diiik}{2k^0}}\xspace}
%
\newcommand{\dEp}{\differential{E(p)}}
\newcommand{\dbEk}{\differential{\!\left\lt E\right\gt}}
\newcommand{\dbEpk}{\differential{\!\left\lt E(p)\right\gt}}
%
\newcommand{\dOme}{\differential{\Omega}}
\newcommand{\dOmee}{\differential{\Omega(\vect e)}}

% integrals
\newcommand{\integral}[1]{\int\!\!\differential{#1}\;}
\newcommand{\iintegral}[2]{\iint\!\!\differential{#1}\,\differential{#2}\;}
\newcommand{\intx}{\integral{x}}
\newcommand{\inty}{\integral{y}}
\newcommand{\intk}{\integral{k}}
\newcommand{\intp}{\integral{p}}
\newcommand{\intpomeg}{\int\!{\dpomeg}\,}
\newcommand{\fpintpomeg}{\frac{1}{(2\pi)^\frac{3}{2}}\intpomeg}
\newcommand{\intphi}{\int\!{\dphi}\,}
\newcommand{\fnkint}{\frac{1}{(2\pi)^\frac{n}{2}}\intk}
\newcommand{\iintxy}{\iintegral{x}{y}}
%
\newcommand{\intEp}{\integral{E(p)}}
\newcommand{\intmsq}{\integral{m^2}}
\newcommand{\intpm}{\int\!\dpm\;}
\newcommand{\intiiip}{\int\!\diiip\;}
\newcommand{\intiiiP}{\int\!\diiiP\;}
\newcommand{\intivp}{\int\!\divp\;}
\newcommand{\intivP}{\int\!\divP\;}
%
\newcommand{\intpome}{\int\!\dpome\,}

% vectors
\let\oldcdot=\cdot
\renewcommand{\cdot}{\!\oldcdot\!}
%\newcommand{\vect}[1]{\mathbf{#1}}
\newcommand{\vect}[1]{\boldsymbol{#1}}%
\newcommand{\dotp}[2]{\ensuremath{#1\cdot#2}\xspace}
\newcommand{\ddotp}[2]{#1\colon\!#2}
\newcommand{\odotp}[2]{\ensuremath{#1\oldcdot#2}\xspace}
\newcommand{\diverg}[1]{\dotp{\partial}{#1}}

% matrix operations
\newcommand{\tran}{^\mathrm{T}{}}
%\newcommand{\tran}{^\mathrm{Tr}{}}%
\newcommand{\inv}{^{-1}{}}
\newcommand{\cc}{^{\textstyle*}{}}
\newcommand{\hc}{^*{}}
%\newcommand{\hc}{^\dagger{}}%  % \dag is TeX

% inner products
\newcommand{\ip}[2]{\ensuremath{\left({#1},\,{#2}\right)}\xspace}

% expectation values
\newcommand{\ev}[1]{\langle\,#1\,\rangle}

% Dirac bras and kets
\newcommand{\Bra}[1]{\ensuremath{\left\langle{#1}\right|}\xspace}
\newcommand{\Ket}[1]{\ensuremath{\left|#1\right\rangle}\xspace}
% see transme
%\newcommand{\Bra}[1]{\left\langle{#1},\right.}
%\newcommand{\Ket}[1]{\left.{#1}\,\right\rangle}
\newcommand{\BraKet}[2]{\ensuremath{\left\langle{#1\vphantom{#2}}\right.%
  \negmedspace\left|{#2\vphantom{#1}}\right\rangle}\xspace}
\newcommand{\BraOKet}[3]{\ensuremath{\left\langle{#1\vphantom{{#2}{#3}}}%
  \right|#2\left|{#3\vphantom{{#1}{#2}}}\right\rangle}\xspace}
\newcommand{\KetBra}[2]{\ensuremath{\left|#1\vphantom{#2}\right\rangle%
  \left\langle{#2\vphantom{#1}}\right|}\xspace}
%
\newcommand{\BraSKet}[2]{\BraOKet{#1}{\vphantom{S^\dagger}S}{#2}}
%
\newcommand{\bra}{\left\langle}
\newcommand{\ket}{\right\rangle}
%
\newcommand{\bk}[2]{\ensuremath{\langle{#1},\,{#2}\rangle}\xspace}
\newcommand{\BK}[2]{\ensuremath{\big\langle{#1},\,{#2}\big\rangle}\xspace}

% commutators
\newcommand{\comm}[2]{\ensuremath{\left[\,#1,\,#2\,\right]}\xspace}
\newcommand{\acomm}[2]{\ensuremath{\left\{\,#1,\,#2\,\right\}}\xspace}
\newcommand{\ccr}{CCR\xspace}
\newcommand{\car}{CAR\xspace}
% for tensors
\newcommand{\scomb}[1]{\ensuremath{\left[{#1}\right]_+}\xspace}
\newcommand{\acomb}[1]{\ensuremath{\left[{#1}\right]_-}\xspace}

% spaces
\newcommand{\Rtwo}{\ensuremath{\bbR^2}\xspace}
\newcommand{\Rthree}{\ensuremath{\bbR^3}\xspace}
\newcommand{\Rthreel}{\ensuremath{\bbR^{3\ell}}\xspace}
\newcommand{\Rthreen}{\ensuremath{\bbR^{3n}}\xspace}
\newcommand{\Rfour}{\ensuremath{\bbR^4}\xspace}
\newcommand{\Rfourl}{\ensuremath{\bbR^{4\ell}}\xspace}
\newcommand{\Rd}{\ensuremath{\bbR^d}\xspace}
\newcommand{\Rn}{\ensuremath{\bbR^n}\xspace}
\newcommand{\Rnl}{\ensuremath{\bbR^{n\ell}}\xspace}
%
\newcommand{\Ctwo}{\ensuremath{\bbC^2}\xspace}
\newcommand{\Cfour}{\ensuremath{\bbC^4}\xspace}
\newcommand{\Cfourl}{\ensuremath{\bbC^{4\ell}}\xspace}
\newcommand{\Cn}{\ensuremath{\bbC^n}\xspace}
\newcommand{\Cnl}{\ensuremath{\bbC^{n\ell}}\xspace}
%
\newcommand{\Cinf}{\ensuremath{\text{C}^\infty}\xspace}
\newcommand{\Cbfinf}{$\text{C}^{\boldsymbol{\infty}}$\xspace}
%
\renewcommand{\S}{\ensuremath{\mathcal{S}}\xspace}
\newcommand{\SR}{\ensuremath{\S(\bbR)}\xspace}
\newcommand{\SRthree}{\ensuremath{\S(\Rthree)}\xspace}
\newcommand{\SRthreel}{\ensuremath{\S(\Rthreel)}\xspace}
\newcommand{\SRthreen}{\ensuremath{\S(\Rthreen)}\xspace}
\newcommand{\SRfour}{\ensuremath{\S(\Rfour)}\xspace}
\newcommand{\SRd}{\ensuremath{\S(\Rd)}\xspace}
\newcommand{\SRn}{\ensuremath{\S(\Rn)}\xspace}
\newcommand{\SRfourl}{\ensuremath{\S(\Rfourl)}\xspace}
%
\newcommand{\Sp}{\ensuremath{\mathcal{S'}}\xspace}
\newcommand{\SpRd}{\ensuremath{\Sp(\Rd)}\xspace}
%
\newcommand{\D}{\ensuremath{\mathcal{D}}\xspace}
\newcommand{\DR}{\ensuremath{\mathcal{D}(\bbR)}\xspace}
\newcommand{\DRtwo}{\ensuremath{\mathcal{D}(\Rtwo)}\xspace}
\newcommand{\DRthree}{\ensuremath{\mathcal{D}(\Rthree)}\xspace}
\newcommand{\DRthreel}{\ensuremath{\mathcal{D}(\Rthreel)}\xspace}
\newcommand{\DRthreen}{\ensuremath{\mathcal{D}(\Rthreen)}\xspace}
\newcommand{\DRfour}{\ensuremath{\mathcal{D}(\Rfour)}\xspace}
\newcommand{\DLone}{\ensuremath{D_{\Lone}}\xspace}
%
\newcommand{\OM}{\ensuremath{\mathcal O_\text{M}}\xspace}
\newcommand{\OMRn}{\ensuremath{\OM(\Rn)}\xspace}
%
\newcommand{\Lone}{\ensuremath{\text{L}^1}\xspace}
\newcommand{\Ltwo}{\ensuremath{\text{L}^2}\xspace}
\newcommand{\LtwoRthree}{\ensuremath{\text{L}_2(\Rthree)}\xspace}
\newcommand{\LtwoRfour}{\ensuremath{\text{L}_2(\Rfour)}\xspace}
%
\newcommand{\BRfour}{\ensuremath{\mathcal{B}(\Rfour)}\xspace}
\newcommand{\BR}{\ensuremath{\mathcal{B}(\R)}\xspace}
%
\newcommand{\F}{\ensuremath{\mathcal{F}}\xspace}

% group names
\newcommand{\Lfourr}{\ensuremath{\text{L}(4,\text{R})}\xspace}
\newcommand{\Lpu}{\ensuremath{\text{L}_{+}^{\uparrow}}\xspace}
\newcommand{\Lmu}{\ensuremath{\text{L}_{-}^{\uparrow}}\xspace}
\newcommand{\Lpd}{\ensuremath{\text{L}_{+}^{\downarrow}}\xspace}
\newcommand{\Lmd}{\ensuremath{\text{L}_{-}^{\downarrow}}\xspace}
\newcommand{\Lp}{\ensuremath{\text{L}_+}\xspace}
\newcommand{\Lu}{\ensuremath{\text{L}^{\uparrow}}\xspace}
%
\newcommand{\CL}{\ensuremath{\mathcal{L}}\xspace}  % complex
\newcommand{\CLp}{\ensuremath{\mathcal{L}_+}\xspace}
%
\newcommand{\Pp}{\ensuremath{\text{P}_{+}}\xspace}
\newcommand{\Ppu}{\ensuremath{\text{P}_{+}^{\uparrow}}\xspace}
%
\newcommand{\Sutwo}{\text{SU(2)}\xspace}
\newcommand{\Sutwoc}{\text{SU(2,\,C)}\xspace}
\newcommand{\Sltwoc}{\text{SL(2,\,C)}\xspace}
\newcommand{\iSltwoc}{\ensuremath{\text{iSL}(2,\text{C}) }\xspace}
\newcommand{\Sothree}{\ensuremath{\text{SO(3)}}\xspace}
\newcommand{\Opthree}{\ensuremath{\text{O}_+(3)}\xspace}
\newcommand{\Opthreec}{\ensuremath{\text{O}_+\text{(3,\,C)}}\xspace}
\newcommand{\Opnc}{\ensuremath{\text{O}_+\text{(n,\,C)}}\xspace}
\newcommand{\Soponethree}{\ensuremath{\text{SO}_{+}(1,3)}\xspace}
\newcommand{\Gnr}{\text{G(n,\,R)}\xspace}
\newcommand{\Gnc}{\text{G(n,\,C)}\xspace}
\newcommand{\Gncz}{\ensuremath{\text{G(n,\,C}\col Z)}\xspace}
\newcommand{\Gncxi}{\ensuremath{\text{G(n,\,C}\col\xi)}\xspace}
\newcommand{\Glnc}{\text{GL(n,\,C)}\xspace}
\newcommand{\Slnc}{\text{SL(n,\,C)}\xspace}
\newcommand{\Spnc}{\text{Sp(n,\,C)}\xspace}

% group representation matrices
\newcommand{\tD}{\text{D}}
\newcommand{\cD}{\mathcal{D}}
\newcommand{\Dhalf}{\ensuremath{\tD^{\half}}}
\newcommand{\Dj}{\ensuremath{\tD^j}}
\newcommand{\Djp}{\ensuremath{\tD^{j'}}}
\newcommand{\DjA}{\ensuremath{\Dj(A)}}
\newcommand{\DjpA}{\ensuremath{\Djp\!(A)}}
%
\newcommand{\tS}{\text{S}}
\newcommand{\SjA}{\ensuremath{\tS^j(A)}}
\newcommand{\SjpA}{\ensuremath{\tS^{j'}\!(A)}}
%
\newcommand{\fD}[2]{\ensuremath{\mathcal{D}^{#1,#2}}}  % "f" for "full"
%
\newcommand{\metk}{\Dj\!\!\left(\dfrac{k\cdot\sig}{m}\right)}
\newcommand{\mettwidk}{\Dj\!\!\left(\dfrac{k\cdot\sigtwid}{m}\right)}
\newcommand{\metkp}{\Djp\!\!\left(\dfrac{k'\cdot\sig}{m'}\right)}
\newcommand{\mettwidkp}{\Djp\!\!\left(\dfrac{k'\cdot\sigtwid}{m'}\right)}
%
\newcommand{\DSpboost}{\DS\!\left(\!\sqrt{p\cdot\sig/m}\right)}

% metric brackets
\newcommand{\brac}[1]{[\,#1\,]}  % works without $$
\newcommand{\cbrac}[1]{\{\,#1\,\}}
\newcommand{\bracj}{\brac{j}\xspace}
\newcommand{\cbracj}{\cbrac{j}\xspace}
\newcommand{\metj}[1]{\ensuremath{\bracj^{#1}}}
\newcommand{\cmetj}[1]{\ensuremath{\cbracj_{#1}}}

% Lorentz signature
\newcommand{\lorsig}{\ensuremath{({+}\,{-}\,{-}\,{-})}}
\newcommand{\grsig}{\ensuremath{({-}\,{+}\,{+}\,{+})}}

% tensors
%\newcommand{\alt}{\ensuremath{\epsilon}\xspace}
\newcommand{\alt}{\mathlarger{\eps}}

% spinors
\newcommand{\met}{\varepsilon}
\newcommand{\kdel}[2]{\delta_{#1}{}^{#2}}
\newcommand{\sqmetj}[1]{\ensuremath{[j]^{#1}}}
\newcommand{\cumetj}[1]{\ensuremath{\{j\}_{#1}}}
%
\newcommand{\kdotx}{k\oldcdot x} % use in exponentials
\newcommand{\kdotsig}{k\cdot\sig/m}
\newcommand{\kdotsigtwid}{k\cdot\sigtwid/m}
\newcommand{\kpdotsig}{k'\cdot\sig/m'}
\newcommand{\kpdotsigtwid}{k'\cdot\sigtwid/m'}
%
\newcommand{\alphadot}{{\Dot{\alpha}}}
\newcommand{\alpdot}{{\Dot{\alpha}}}
\newcommand{\betadot}{{\Dot{\beta}}}
\newcommand{\betdot}{{\Dot{\beta}}}

% Pauli matrices
\newcommand{\bsig}{\boldsymbol{\sigma}}
\newcommand{\bsigma}{\boldsymbol{\sigma}}
\newcommand{\vsig}[1]{\vect#1\cdot\boldsymbol{\sigma}}
\newcommand{\sigd}[1]{\ensuremath{\sigma_{#1}}}
\newcommand{\sigu}[1]{\ensuremath{\sigma^{#1}}}
\newcommand{\sigtd}[1]{\ensuremath{\widetilde\sigma_{#1}}}
\newcommand{\sigtu}[1]{\ensuremath{\widetilde\sigma^{#1}}}
\newcommand{\sigtran}{\sigma^{\mathrm{Tr}}}

% twiddles
\newcommand{\twid}[1]{\widetilde#1}
\newcommand{\ktwid}{\widetilde k}
\newcommand{\etatwid}{\widetilde\eta}
\newcommand{\rhotwid}{\widetilde\rho}
\newcommand{\sigtwid}{\widetilde\sig}

% Dirac spinors
\newcommand{\psibar}{\overline{\psi}}
\newcommand{\psibart}{\overline{\psi}{}^\text{\,T}{}}

% Dirac matrices
\newcommand{\gamfive}{\ensuremath{\gamma_5}\xspace}
\newcommand{\gamzero}{\ensuremath{\gamma_0}\xspace}

% Clebsch-Gordan coefficients
\newcommand{\cgspindu}[3]{\ensuremath{\brac{#1}{_{#2}}^{#3}}\xspace}
\newcommand{\cgspinud}[3]{\ensuremath{\brac{#1}{^{#2}}_{#3}}\xspace}
% see diracalg
\newcommand{\jthreelu}[3]{\brac{#1}_{#2}{}^{#3}}
\newcommand{\jthreeul}[3]{\brac{#1}^{#2}{}_{#3}}
\newcommand{\jthreemixu}[4]{\brac{#1}^{#2}{}_{#3}{}^{#4}}
\newcommand{\jthreemixl}[4]{\brac{#1}_{#2}{}^{#3}{}_{#4}}

% vacuum
\newcommand{\vac}{\ensuremath{\Omega}\xspace}
%\newcomand{\vev}[1]{\left\langle\vac,\,#1\vac\right\rangle}
\newcommand{\vev}[1]{\langle\vac,\,#1\,\vac\rangle}
%
\newcommand{\bravac}{\left\langle\vac,\right.}   % comma here avoids space
\newcommand{\braOvac}[1]{\left\langle#1\,\vac,\right.}
\newcommand{\vacket}{\left.\vac\right\rangle}

% Wick ordering
\newcommand{\wick}[1]{\ensuremath{\text{:}#1\text{:}}\xspace}

% lightcones
\newcommand{\Vp}{\ensuremath{\text{V}_+}\xspace}
\newcommand{\Vpbar}{\ensuremath{\overline{\text{V}}_+}\xspace}
\newcommand{\Vm}{\ensuremath{\text{V}_-}\xspace}
\newcommand{\Vmbar}{\ensuremath{\overline{\text{V}}_-}\xspace}
\newcommand{\Vpm}{\ensuremath{\text{V}_\pm}\xspace}

% mass shell
\newcommand{\Kl}{\ensuremath{\mathcal K_l}\xspace}
\newcommand{\Kthree}{\ensuremath{\mathcal K_3}\xspace}

% spaces of invariants
\newcommand{\Mthreeplus}{\ensuremath{\mathcal M_{3+}}\xspace}
\newcommand{\Ml}{\ensuremath{\mathcal M_l}\xspace}
\newcommand{\Mlp}{\ensuremath{\mathcal M_{l+}}\xspace}

% invariant saturation
\newcommand{\Ip}{\ensuremath{I_+}\xspace}
\newcommand{\Ipinv}{\ensuremath{I_+^{-1}}\xspace}

% squared differentials
\newcommand{\dssq}{\differential{s^2}}
\newcommand{\dtsq}{\differential{t^2}}
\newcommand{\drsq}{\differential{r^2}}
\newcommand{\dthesq}{\differential{\theta^2}}
\newcommand{\dphisq}{\differential{\phi^2}}
\newcommand{\dOmesq}{\differential{\Ome^2}}
%
\newcommand{\dspsq}{\differential{s'^2}}
\newcommand{\dtpsq}{\differential{t'^2}}
\newcommand{\drpsq}{\differential{r'^2}}
\newcommand{\dOmepsq}{\differential{\Ome'^2}}

% Christoffel symbols
\newcommand{\chrI}[3]{[\,#1\hspace{.125em}#2,\,#3\,]}
\newcommand{\chrII}[3]{{% localize \addtolength
  \addtolength{\arraycolsep}{-.4em}%
  \left\{\begin{array}{c}%
    #1\\[-.2ex]%
    #2\hspace{.125em}#3%
  \end{array}\right\}
}}%

% Lagrangian
\newcommand{\lagr}{\ensuremath{\mathcal{L}}\xspace}

%% the following are document specific
%\newcommand{\Gret}{\mathcal{G}_\text{ret}}
%% needs amssymb, or mathpazo, or ...
%\newcommand{\iLagr}{\mathbb{L}} % invariant Lagrangian
