%\filename{twosidedmacros.tex}
%\edited{last by stolfi on Sat Sep  5 12:26:23 1987}

\catcode`@=11\endlinechar=-1

% TeX macros for Chapter 2 of the thesis.

% Classical (i.e., one-sided) projective spaces

  \def\PP#1{{\bf P}_{#1}}  % Unoriented projective space

% Two-sided spaces

  \def\TT#1{{\bf T}_{#1}}   % Oriented projective (=two-sided) space

% Other spaces

  \def\AA#1{{\bf A}_{#1}}     % Affine space
  \def\EE#1{{\bf E}_{#1}}     % Euclidean space
  \def\VV#1{{\bf V}_{#1}}     % Vector (linear) space
  \def\CC#1{{\bf C}_{#1}}     % Cartesian space (same as \RR#1)

  \def\WW#1{{\cal W}_{#1}}  % States of #1-dimensional two-sided space

% Other mathematical shorthand:

  \def\RR#1{\reals^{#1}}   % #1-dimensional Cartesian (or linear) space
  \def\SS#1{\sphere_{#1}}  % #1-dimensional sphere
  \def\BB#1{\ball_{#1}}    % Topological #1-dimensional ball

% Roman capitals (for Pl\"ucker labels):

  \def\rI{{\rm I}}
  \def\rJ{{\rm J}}
  \def\rK{{\rm K}}
  \def\rL{{\rm L}}
  \def\rM{{\rm M}}
  \def\rN{{\rm N}}

% Points and lines

  \def\points{{\cal P}}
  \def\pospoints{{\cal P}^+}
  \def\negpoints{{\cal P}^-}
  
  \def\flats{{\cal F\/}}
  \def\lines{{\cal L\/}}
  \def\hyplanes{{\cal H\/}}

  \def\states{{\cal W}} % set of all states

% Points at infinity

  \def\infpt#1{{#1}\infty} % infinity of \PP2 in dir. \pm #1
  \def\tinfpt#1{{#1}\infty} % infinity on top side of \TT2 in dir. #1

  \def\binfpt#1{{#1}_\infty\bug} % infinity on bottom side (obsolete)

% Vacua and universes

  \def\vac{{\mi\Lambda}}
  \def\unv{{\mi\Upsilon}}
  \def\zer{{\bf 0}}

% Rank and co-rank functions

  \def\rank{\mathop{\rm rank}}     % rank (1+dim) of a flat
  \def\corank{\mathop{\rm corank}} % rank (n-dim) of a flat in n-space

% Orientation operators

  %  (+1)\ormul f=f, (-1)\ormul f=\neg f.
  %  This should be done with \mathpalette:
  \def\ormul{\hbox{\raise1pt\hbox{$\scriptstyle\circ$}}}
  
  \def\relor{\diamond}
  \def\posor{\diamond}

% Homogeneous coordinates and coefficients

  \def\genpt#1{[#1]}   % point with given coord vector
  \def\genflat#1{[#1]} % flat generated by primal simplex or basis or linspace

  \def\genhyp#1{\la #1 \ra}  % Hyperplane with given coefficients

% Standard frames

  \def\barfr{{\rm pfr}}
  \def\mixfr{{\rm mfr}}
  \def\afffr{{\rm afr}}

% Coordinate matrix of a flat

  \def\coordmat#1{\left[\matrix{#1\crcr}\right]}

% Coefficient matrix of a flat

  \def\coeffmat#1{
    \vcenter{\offinterlineskip
      \halign{\ctr{##}\cr
        \omit\topbracket\cr
        \noalign{\kern-1.5pt}
        $\displaystyle\;\matrix{#1\crcr}\;$\cr
        \noalign{\kern-1.5pt}
        \omit\botbracket\cr
      }
    }
  }

  \def\t@pbrackear{\vrule height0.3pt depth4.3pt width 0.6pt}
  \def\b@tbrackear{\vrule height4.3pt depth0.3pt width 0.6pt}
  \def\br@ckbar{\leaders\hrule height0.3pt depth0.3pt\hfil}
  \def\topbracket{\t@pbrackear\br@ckbar\t@pbrackear}
  \def\botbracket{\b@tbrackear\br@ckbar\b@tbrackear}

% Projective maps

  \def\genmap#1{[\![#1]\!]}     % map generated by a matrix

  \def\maps{{\cal M}}           % Set of all maps
  
  \def\map{}                    % a \map M means M(a)

  \def\Rot{{\rm R}} % 180 degree rotation around origin (in \TT2)

% Matrix of a projective map

  \def\zerule{\hrule height 0pt}
  
  \def\mapmatrix#1{
    \leftmapbracket\,
    \vcenter spread 2pt{
      \zerule\vss\hbox{$\displaystyle \matrix{#1}$}\vss\zerule
    }
    \,\rightmapbracket
  }

  \def\leftmapbracket{\left[\!\!\left[}
  \def\rightmapbracket{\right]\!\!\right]}

% Duality operations

  \def\du{\ast}   % Formal dual
  \def\oc{\perp}  % Polar complement
  \def\lc{\dashv}      % Left polar complement
  \def\rc{\vdash}      % Right polar complement

  \def\divby{\mathbin{\lceil}} % Relative right polar complement
  \def\divin{\mathbin{\rceil}} % Relative left polar complement

% Obsolete operators from kinetic framework:

  \def\op{\mathop{\rm opp}} % opposite of line or state
  \def\an{\mathop{\rm ant}} % antipode of line or point

% Short form state operators. Usage:
%  $\po s + \di s$ in normal math.

  \def\po#1{\dot #1} % position of a state (or germ)
  \def\ta#1{\bar #1} % tangent at a state
  \def\cu#1{\breve #1} % curvature of a state
  \def\ba#1{\vec #1} % base state of a germ
  \def\di#1{\hat #1} % orientation vector of a line or state

% Long form state operators

  \def\pos{\mathop{\rm pos}} % position of a state (or germ)
  \def\tan{\mathop{\rm tan}} % tangent at a state
  \def\curv{\mathop{\rm curv}} % curvature of a state
  \def\base{\mathop{\rm base}} % base state of a germ
  \def\dir{\mathop{\rm dir}} % orientation of a line or state

% Boundaries and envelopes

  \def\btr{\mathop{\partial}}
  \def\etr{\mathop{\eta}}

% Generated spaces

  \def\gensp#1{\mathopen{<}#1\mathclose{>}} % linspace generated by basis

% Domain, range, kernel, span:

  \def\spansp{\mathop{\it Span}}
  \def\nullsp{\mathop{\it Null}}
  \def\domain{\mathop{\it Dom}}
  \def\range{\mathop{\it Range}}

  \def\rzer{{\vec 0}}  % Origin of \RR{n}

% Interior, Closure, Boundary:

  \def\interior{\mathop{\it Int}}
  \def\boundary{\mathop{\it Bdry}}
  \def\closure{\mathop{\it Clos}}

% Bit functions

  \def\binv{\mathop{\rm binv}}  % binary value of a set
  \def\ones{\mathop{\rm bits}}  % positions of the "1" bits in an integer
   
% Integer functions

  \def\round{\mathop{\rm round}}
  \def\mod{\mathbin{\rm mod}}

% Enumeration of $k$-element subsets of $\naturals$

  % \mathchardef\combsymbol="2060 % roman backquote as binary op
  \mathchardef\combsymbol="003A % roman colon as ordinary atom
  \def\comb#1#2{{#1\combsymbol#2}}
  \def\index{{\rm \hash}}

% Matrix operations

  \def\tr{\mathop{\rm tr}} % transpose

  \def\inv#1{\mathchoice
      {\putover{$\scriptstyle\leftarrow$}{$\displaystyle #1$}}
      {\putover{$\scriptstyle\leftarrow$}{$\textstyle #1$}}
      {\putover{$\scriptscriptstyle\leftarrow$}{$\scriptstyle #1$}}
      {\putover{$\scriptscriptstyle\leftarrow$}{$\scriptscriptstyle #1$}}}

  \def\adjoint#1{{\bar #1}}  % Adjoint matrix
  
  \def\dotpr{\cdot}  % dot product
  \def\cross{\times} % cross product
  
  \def\homeo{\approx} % homeomorphic to

% Parallelism relations

  \def\para{\parallel}                                % Parallel
  \def\copara{\mathrel{\uparrow\mkern-5mu\uparrow}}   % Co-parallel
  \def\anpara{\mathrel{\uparrow\mkern-5mu\downarrow}} % Anti-parallel

% Basis points

  \def\e{{\bf e}}  % canonical point (origin or cardinal point)
  \def\u{{\bf u}}  % unit point

% Phantom "+" to get aligned formulas

  \def\+{\phantom{+}}

% Exponential operator (so that ^ can be used for superscriped indices)

  \def\^{\mathbin{\uparrow}}

% Handy abbreviations for greek letters

  \let\alf=\alpha
  \let\bet=\beta
  \let\gam=\gamma
  \let\del=\delta
  \let\eps=\epsilon
  \let\zet=\zeta
  \let\tht=\theta
  \let\kap=\kappa
  \let\lam=\lambda
  \let\sig=\sigma
  \let\ups=\upsilon

% Miscellanea and leftovers (are they still in use?)

  % The sides of an hyperplane:

  \def\lpside{\mathop{\rm LPos}}  % left-positive side
  \def\lnside{\mathop{\rm LNeg}}  % left-negative
  \def\rpside{\mathop{\rm RPos}}  % right-positive
  \def\rpside{\mathop{\rm RNeg}}  % right-negative
  
  % idem, for spaces of odd rank:

  \def\pside{\mathop{\rm Pos}}  % positive side
  \def\nside{\mathop{\rm Neg}}  % negative side
  
  \def\wrto#1{\hbox{\rm(w.r.t. ${#1}$)}}  

  \def\smallplus{\scriptpalette\centermath{+}}
  \def\centermath#1#2{\vcenter{\hbox{$ #1 #2 $}}}
  
  \def\ccw{\mathop{\rm ccw}}  % orientation of triangle
  \def\leftof{\mathbin{\smallplus\!|}} % point is to the left of line
  \def\fotfel{\mathbin{|\!\smallplus}} % line has point to its left
  \def\sign{\mathop{\rm sign}} % sign operator
  \def\simplexsign{\mathop{\rm sign}} % sign of simplex

\catcode`@=12\endlinechar=`\^^M
