\documentclass[12pt]{article}

\usepackage{comment}

\usepackage[noend]{algpseudocode}
\usepackage{algorithm}
\usepackage{float}
\usepackage{graphicx}
\usepackage[margin=.75in]{geometry}
\usepackage{amsmath,amsthm,amssymb}
\usepackage{dsfont}
\usepackage{amsthm}
\usepackage{mathtools,amssymb}
\usepackage{wrapfig,caption,subcaption}
\allowdisplaybreaks

\newtheorem*{definition}{Definition}
\newtheorem*{question}{Question}
\newtheorem{theorem}{Theorem}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{conjecture}[theorem]{Conjecture}

\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Rgz}{\mathbb{R}_{\ge 0}}

\newcommand{\ip}[2]{\left\langle{#1},{#2}\right\rangle}
\newcommand{\norm}[1]{\left\lVert{#1}\right\rVert}
\newcommand{\sizeof}[1]{\left\lvert{#1}\right\rvert}

\newcommand{\woloss}{without loss of generality }

\DeclareMathOperator*{\argmin}{arg\,min}
\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator*{\cone}{cone}
\DeclareMathOperator*{\hull}{hull}
\DeclareMathOperator*{\indif}{indif}

\newcommand{\1}[1]{\mathds{1}[{#1}]}
\renewcommand{\P}[1]{\mathds{P}\left[{#1}\right]}
\newcommand{\E}[1]{\mathds{E}\left[{#1}\right]}
\newcommand{\Var}[1]{\mathrm{Var}[{#1}]}

\newcommand{\unit}{\mathds{1}}
\newcommand{\lo}{\succ}

% \renewcommand{\thesubsection}{\thesection.\alph{subsection}}
% \renewcommand\thesubsection{\ \ (\alph{subsection})}

\begin{document}

% \renewcommand{\qedsymbol}{\filledbox}

\title{
  Dim Prefs
}
\author{
  Clay Thomas \\
  claytont@princeton.edu
}
\maketitle

\section{Lemmas}
  In this section, we set up the tools needed to reason about
  $d$-dimensional preferences.

  \subsection{Lemmas based on the structure of $X$}
    These first few lemmas relate geometric properties of $X$ to
    limitations on the structure of $>_a$ for a specific, fixed $a$.

    The most simple way $X$ gives structure to preferences is if
    one outcome is better in all attributes.
    \begin{definition}
      Let $x,y\in X\subseteq \Rgz^d$.
      We say $x$ \emph{dominates} $y$, denoted $x\gg y$,
      if $x[k] > y[k]$ for each $k=1,\ldots,d$.
    \end{definition}
    \begin{proposition}
      If $x \gg y$, then $x >_a y$ for any nonzero $a\in \Rgz^d$.
    \end{proposition}

    When comparing different outcomes, a useful tool is
    the familiar geometric notion of a convex hull.
    Intuitively, if a preference weight does not like any of a set of options,
    it will not like any outcome in the hull of those options either.
    Thus, a point ``dominated by the hull'' of a set of options
    cannot be preferred to all those options.
    \begin{definition}
      For points $x_1,\ldots,x_n \in \R^d$, let $\hull(x_1,\ldots,x_n)
      = \{u_1x_1 + \ldots + u_nx_n | 0\le u_i\le 1, \sum_{i=1}^n u_i = 1\}$
      denote the convex hull of $x_1,\ldots,x_n$.
    \end{definition}
    \begin{lemma}\label{lem:agreementHull}
      Let $z,x_1,\ldots,x_k \in \Rgz^d$ and $a\in \Rgz^d \setminus \{0\}$.
      If $z >_a x_i$ for $i=1,\ldots,k$, then $z >_a w$
      for any $w\in \hull(x_1,\ldots,x_k)$.
    \end{lemma}
    \begin{proof}
      We have $\ip{a}{z} > \ip{a}{x_i}$ for each $i=1,\ldots,k$.
      If $w = u_1x_1+ \ldots + u_nx_n$ and $\sum_i u_i =1$, then
      $\ip{a}{w} = u_1\ip{a}{x_1}+\ldots+u_n\ip{a}{x_n}
      < u_1\ip{a}{z} + \ldots + u_n\ip{a}{z} = \ip{a}{z}$.
    \end{proof}

    \begin{proposition}\label{prop:domHull}
      Let $U, V \subseteq \Rgz^d$ be finite sets of points.
      Suppose that there exists $u\in \hull U$ and $v\in \hull V$
      such that $u \ll v$.
      Then no $a$ satisfies $u_i >_a v_i$ for each $i=1,\ldots, k$.
      % Suppose that there exists $w\in \hull(x_1,\ldots,x_k)$
      %     such that $z \gg w$.
      %     Then no $a$ satisfies $x_i >_a z$ for each $i=1,\ldots, k$.
    \end{proposition}
    \begin{proof}
      For contradiction, suppose such an $a$ exists.
      First, note $u_i >_a v \in \hull V$,
      then see that $\hull U \ni u >_a v$ as well.
      But $u\ll v$, so this is a contradiction.
    \end{proof}

    The converse of the last theorem also holds:
    \begin{proposition}
      Suppose that no $a\in \R_{>0}^d$ satisfies $u_i \ge_a v_j$ for each
      $u_i \in U$ and $v_j\in V$.
      Then there exist $u\in\hull(U)$ and $v\in\hull(V)$ with $u\ll v$.
      NOTE: SHOULD USE THE ``SEMISTRICT`` DEFINITION OF <<
    \end{proposition}
    \begin{proof}
      If no $a$ has this property, then in particular the following linear
      program is infeasible:
      \begin{alignat*}{2}
        \text{min: } &
        \sum_{k=0}^d 0\cdot a_k \\
        \text{s.t. } &
        \begin{aligned}[t]
          \sum_{k=1}^d a_k (u^i_k - v^j_k)
            & \ge 0
            \quad \forall i\in U, j\in V
          \\ a_k & \ge 1 \quad \forall k
        \end{aligned}
      \end{alignat*}
      The dual of this linear program is
      \begin{alignat*}{2}
        \text{max: } &
          \sum_{i\in U, j\in V} 0\cdot b_{ij} + 1\cdot c_k \\
        \text{s.t. } &
        \begin{aligned}[t]
          \sum_{i\in U, j\in V} b_{ij}(u^i_k - v^j_k) + c_k
            & \le 0
            \quad \forall k
          \\ b_{ij} & \ge 0 \quad \forall i,j
          \\ c_k & \ge 0 \quad \forall i,j
        \end{aligned}
      \end{alignat*}
      This dual program is always feasible (with the all zeros solution)
      so by strong duality it must be unbounded.
      Take some solution and some $k$ with $c_k > 1$.
      At this solution, $b_{ij}$ are not all zero.
      Thus, take
      $\sum_{i,j} b_{ij}=B$, and consider:
      \[ \sum_{i\in U} \left(\sum_{j\in V}b_{ij}/B \right) u^i_k
        \le - \frac {c_k} B + \sum_{j\in V} \left(\sum_{i\in U}b_{ij}/B \right) v^j_k
        < \sum_{j\in V} \left(\sum_{i\in U}b_{ij} / B\right) v^j_k
      \]
      NOTE: THIS CANNOT BE CORRECT BECAUSE IT IMPLIES EG THAT ALL
      POINTS ARE MORE THAN 1 APART
    \end{proof}

    This motivates the following definition:
    \begin{definition}
      A set of points dominates, denoted $U \ll V$,
      when DEFINITION
    \end{definition}
\end{document}


%
% 281
%
\chapter{The Hypergeometric Function}

\Section{14}{1}{The hypergeometric series.}

We have already \hardsubsectionref{2}{3}{8}) considered the hypergeometric series*

1 + - ., ( + l) ( + l) a(a + l)(a+2)6(6+l)(6 + 2) 3 l.c 1.2.c(c + l)
"* 1.2.3.c(c + l)(c + 2) "

from the point of view of its convergence. It follows from \hardsubsectionref{2}{3}{8} and \hardsectionref{5}{3} that the series defines a function which is analytic when i 2 j
< 1.

It will appear later \hardsubsectionref{14}{5}{3}) that this function has a branch point
at 2 = 1 and that if a cutf (i.e. an impassable barrier) is made from
+ 1 to + along the real axis, the function is analytic and one-valued
throughout the cut plane. The function will be denoted by F a, b;c;z).

Many important functions employed in Analysis can be expressed by
means of hypergeometric functions. Thus|

(1 +2)" = F(-n, :;-z),

log l + z) = zF(l, l;2;-z),

e'=\ im F l,0;l;zl0).

Example. Shew that d

F a, b; c; z) = ~F a + \, 6 + 1; c + 1; 2).

1411. The valuel of F(a, b; c; I) when E(c-a-b)>0.

The reader will easily verify, by considering the coefficients of
.2;'* in the

* The name was given bj- Wallis in 1655 to the series whose Kth term
is a + b a + 2b ... a + n-l)b . Euler used the term hypergeometric in
this sense, the modern use of the term being apparently due to Kummer,
Journal fiir Math. xv. (1S36).

t The plane of the variable z is said to be cut along a curve when it
is convenient to consider only such variations in z which do not
involve a passage across the curve in question; so that the cut may
be regarded as an impassable barrier.

X It will be a good exercise for the reader to construct a rigorous
proof of the third of these results.

§ This analysis is due to Gauss. A method more easy to i-emember but
more difficult to justify is given in \hardsectionref{14}{6} example 2.

%
% 282
%

various series, that if \$ ir < 1, then c c-l- 2c-a-b-l)x]F (a, b : c
; x) + (c - a) c - b) xF (a, b; c + I; x)

= c(c-l) l-x)F(a,b;c-l;x)

= C(C -l)jl+ (Un-Un-i)x'>'l,

where Un is the coefficient of " in i''(a, 6; c - 1; x).

Now make x->l. By \hardsubsectionref{3}{7}{1}, the right-hand side tends to zero if

1+2 (un - tin-i) converges to zero, i.e. if ?i,j- >0, which is the
case when =i

R c- a - 6) > 0.

Also, by \hardsubsectionref{2}{3}{8} and \hardsubsectionref{3}{7}{1}, the left-hand side tends to

c(a+b-c)F a,b;c;l) + c-a)(c- b) F(a, b;c+l;l) under the same condition
; and therefore

Repeating this process, we see that

F(a, b: c;l) = i Yl ) -- -, ( F(a, b:c + 7n; 1)

  ' '\ n=o c + n) c-a-b + n)\ ' ' '

= ] lira n ) ., f [ lim F(a, b;c + m; 1),

if these two limits exist.

But ( 12'13) the former limit is tt r-Fr, rz, if c is not a negative

 T c - a) 1 (c- 6) °

integer; and, if Un(ci, b, c) be the coefficient oi x in F (a, b; c;
x), and

m > I c I, we have

00

\ F a, b] c + m; l) - l\ \ 2 \ un(a, b, c + m)\

n = l

00

  X Un (ja,, ib\, m - \ c )

n=l

' Q,b I "

<, 2 Mn (I a i -h 1, I 6 I + 1, 7?l -f- 1 - I C I).

m-\ c\ n=o

Now the last series converges, when ??i > ic| 4- a -f j l - 1, and is
a positive decreasing function of m; therefore, since [m - '\ c\ \ }~
->0, we have

lim F(a, b: c + m; 1)= 1;

and therefore, finally,
$$
TODO
$$
%
% 283
%

\Section{14}{2}{The differential equation satisfied by F (a, b; c: z).}

The reader will verify without difficulty, by the methods of § lO'S,
that the hypergeometric series is an integral valid near = of the
hypergeometric

equation*

   ~ d? + (c - (a + + 1) - - \&' =;

from \hardsectionref{10}{3}, it is apparent that every point is an 'ordinary point' of
this equation, with the exception of 0, 1, x, and that these are '
regular points.'

Example. Shew that an integral of the equation

i

z< F a- a, 6 + a; a- + 1; z).

\Section{14}{3}{Solutions of Riemann's P-equation by hypergeometric functions.}

In \hardsubsectionref{10}{7}{2} it was observed that Riemann's differential equation f

dru j] -a -a' 1- -/3' l-y-y\ du dz- \ z- a z-b z - c ) dz

\ aa' (a-b)(a-c) jB' h - c) b - a ) \ 77 (c-a)(c-6) z- a z - b z - c

u

 z - a) z - b) z - c)

= 0.

by a suitable change of variables, could be reduced to a
hypergeometric equation; and, carrying out the change, we see that a
solution of Riemann's equation is

TODO

provided that a - a' is not a negative integer; for simplicity, we
shall, throughout thi section, suppose that no one of the exponent
differences a - a', /3 -, 7 - 7' is zero or an integer, as \hardsubsectionref{10}{3}{2})
in this exceptional case the general solution of the differential
equation may involve logarithmic terms; the formulae in the
exceptional case will be found in a memoir :J: by Lindelof, to which
the reader is referred.

Now if a be interchanged with a', or 7 with 7', in this expression, it
must still satisfy Riemann's equation, since the latter is unaffected
by this change.

* This equation was given by Gauss.

t The constants are subject to the condition a + a' + + ' + y + y' =
l.

J Acta Soc. Sclent. Fennicae, xix. (1893). See also Klein's
lithographed Lectures, Veher die hypergeometrische Funktion (Leipzig,
1894).

%
% 284
%

We thus obtain altogether four expressions, namely,

'z-aX /z-c\ y f .,, - .,,,\ c-h) z-a)\

M, =

(z-ay /z-c\ y p, ry, -, > c-b) z-a)]

 ==(.- i) U- ft) J | + /3 + 7', o + +t; l+°-'''; (o-a)(.-6) j-

which are all solutions of the differential equation.

Moreover, the differential equation is unaltered if the triads (a, a',
a), (yS, y8', h), (y, y', c) are interchanged in any manner. If
therefore we make such changes in the above solutions, they will still
be solutions of the differential equation.

There are five such changes possible, for we may write

 b, c, a\, c, a, b], a, c, b], [c, b, a], [b, a, c]

in turn in place of [a, b, c], with corresponding changes of a, a, /S,
(3', 7, 7'.

We thus obtain 4 x = 20 new expressions, which with the original four
make altogether twenty-four particular solutions of Riemann's
equation, in terms of hypergeometric series.

The twenty new solutions may be written down as follows :

u. =

z-by fz-aY (,,, a-c)(z-b)\ iP'j/8 + 7 + a, /3 + 7'+a; l + yS-/3'; )
, (

z-b\ \ ' [z-ay t q,, o', ', . 1, /D' o. (a-c)( -\&)]

Ua =

 s=('- ) ('- Y Fy+y + oc, '+y'+a-l + /3'-/3-,. .

\ z - cj \ z - cj [ " a-b) z- c)

(z-b fz - a-y \ (, \,,, (a - c)(z - b)

\ z - cl \ z - c \ (a -b) z - c)

i /3+7+a, /3+7+a; l + /3'-/3; ~ '-\

\ Z-C' \ Z-C' y I ' r- I ) r- r- ' ( \ J - c)\

(z-c\ y (z-b\ \, o -., b-a) z- c)]

" "=U- ) U- J |7 +,7+a-+;l + y-7; \; \ |

U,,= l - )'( - r F\ y a + ',y c '; I + 7-7'; j H \ z-aj \ z-al [' ' "
' ' ' (l,-c)(z-a)\

   = (lllfy7l Yf f/'+o + ZS'. 7'+a+/3'; 1 + 7-7; P - \ z-aj \ z-a) ' "
' ' ' > (i,-c) z- a)

%
% 285
%

Z ~ Cj

a,.=

MlQ -

FL + y + ',a + y' + '; I + a - a; l' '\ \ ' ' ''\ \, [ b-a) z-c)

/ -cy'/2-a\ j ', /o', 1, ' a-b)(z-c))

.T b) U- 6J |t+/3 +,7+ +< : 1+7-7; \;( \ |,

\ z - a J \ z-a) [ ' (c-b)(z- a) '

- / i c - o)(z - a))

1 V - / \ z-aj ( ' " I r ' (c-6)( -a)J '

By writing 0, 1 - C,, B, 0, 6'- -5, a; for a, a', yg, S', y, y,

/ - AU - respectively, we obtain 24 solutions of the hypergeoraetric

equation satisfied by F A, B; G; x).

The existence of these 24 solutions was first shewn by Kuinmer*.

\Section{14}{4}{Relations betiueen particular solutions of the hyper geometric equation.}

It has just been shewn that 24 expressions involving hypergeometric
series are solutions of the hypergeometric equation; and, from the
general theory of linear differential equations of the second order,
it follows that, if any three have a common domain of existence, there
must be a linear relation with constant coefficients connecting those
three solutions.

If Ave simplify n-, u.,, ih, ih] u, u g-, u i, W22 in the manner
indicated at

* Journal fUr Math. xv. (1836), pp. 39-83, 127-172. They are obtained
in a different manner in Forsyth's Treatise on Differential Equations,
Chap. vi.

' 22 =,

\ z - aj \ z

%
% 286
%

the end of \hardsectionref{14}{3}, we obtain the following solutions of the
hypergeometric equation with elements A, B, G, x:

y, =F A,B;C-x),

y = (- xy- 'FiA -C+\,B-G+1;2-C;x),

y,=(l-xr-''- F C-B,C-A;G;xl

y = (\ ccY-'' l - xf- - 'Fil -B,l-A;2-G;x),

y,r = F A,B; A + B - G + 1; 1 - x),

y = xf- -''F G-B, G-A; G-A-B-hl; l-x),

y = (\ xY 'FiA, A-G+\;A-B + \; x-%

y = (- x)- F B,B-G + l]B-A + l; x-'). If 1 arg(l - a;) I < TT, it is
easy to see from \hardsubsectionref{2}{5}{3} that, when j .r | < 1, the relations
connecting y, y.2, y y must be y y-i, y2= rj, by considering the
form of the expansions near c; = of the series involved.

In this manner we can group the functions Wj, ... z/24 into six sets
of four*, viz. u-i, v-i, Mi3, Wis; Un, Hi, u, iiis; ii, u, M21, u
', Wg, u, U22, M24 j '"9? Wji, t<i7> ' 19 j Wjo, U12, u-18, '' ho,
such that members of the same set are constant multiples of one
another throughout a suitably chosen domain.

In particular, we observe that Ui, u, u s, u are constant multiples
of a function which (by §§ 5*4, 2"o3) can be expanded in the form

 z-aY\ l+ i en(2-a)4

when \ z - a\ is sufficiently small; when arg z - a) is so restricted
that (z - a)* is one-valued, this solution of Riemann's equation is
usually written P'"*. And P'"'; P' ', P' '; P* ', P* * are defined in
a similar manner when

z - a

\ z - b\, \ z - c\ respectively are sufficiently small.

To obtain the relations which connect three members of separate sets
of solutions is much more difficult. The relations have been obtained
by elaborate transformations of the double circuit integrals which
will be obtained later in \hardsubsectionref{14}{6}{1}; but a more simple and singularly
elegant method has recently been discovered by Barnes; of his
investigation we shall give a brief account.

\Section{14}{5}{Barnes contour integrals for the hypergeometric function.}

Consider r-. ~ -- p/, . - - '(-zyds,

273-1 j\ xj r(c + s)

where |arg(- -z)] <7r, and the path of integration is curved (if
necessary) to ensure that the poles of r(a + 5)r(6 + 6'), viz. s = - a
- n, -h-n n = 0, 1, 2, . . .),

* The special formula

FiA,l;C;.) F( C-A,l;C; ),

which is derivable from the relation counectiug Mj with i3, was
discovered in 1730 by Stirling, Methodus Differential is, prop. vii.

t Piuc. London Math. Soc. (2), vi. (1908), pp. 141-177. References to
previous work on similar topics by Pincherle, Mellin and Barnes are
there given.

%
% 287
%

lie on the left of the path and the poles of r(- 5), viz. s = 0, 1, 2,
..., lie on the right of the path *.

From \hardsectionref{13}{6} it follows that the integrand is

Oils j +''-c-i exp - arg - z) . I (s) - 7r\ I s)\ \ ]

as s- ►CO on the contour, and hence it is easily seen (| 5"32) that
the integrand is an analytic function of z throughout the domain
defined by the inequality I arg 2\ TT - S, where B is any positive
number.

Now, taking note of the relation F (- 5) F (1 + s) = - tt cosec s-rr,
consider

T(a+s)r(b+s) iri-zy

If IttiJ c

ds,

27rij(7 F(c + s) F(l +s) sinsTT

where C is the semicircle of radius iV + - on the right of the
imaginary axis

with centre at the origin, and N is an integer.

Now, by \hardsectionref{13}{6}, we have

r(a+ )F(6 + ) -n-i-zy . a+,\,\,) (- y T(c + s)r l+s) sinsTT ' sin
stt

as N-> 00, the constant implied in the symbol being independent of
arg s when s is on the semicircle; and, if 6 = f j\ \ + j e''* and j
| < 1, we have

(- zy cosec sir = exp j ( iV + .j j cos 6 log | | - ( lY + j sin arg
(- z)

-(iV + )7r|sm ||]

exp I i\ \ + . ) cos 6' log I I - (iV + ] 8 1 sin ( 1 11

exp|2- iV +. )logj

exp|-2- 8(i\ r + i)|

=

  I 6* k 7 TT,

1 I zii 1

Hence if log | | is negative (i.e. \ z\ < 1), the integrand tends to
zero sufficiently rapidly (for all values of 6 under consideration) to
ensure that

/.

'0 as iV- oo

Now

J -ooi [J ~xi J C J (iV+i) i)

by Cauchy's theorem, is equal to minus 2'Tri times the sum of the
residues of the integrand at the points s = 0, 1,2, ... N. Make N->cc
, and the last

* It is assumed that a and b are such that the contour can be drawn,
i.e. that a and b are not negative integers (in which case the
hypergeometric series is merely a polynomial).

%
% 288
%

three integrals tend to zero when | arg (- ) | tt - S, and \ z \ < 1,
and so, in these circumstances,

the general term in this summation being the residue of the integrand
at

S = 71.

Thus, an analytic function namely the integral under consideration)
exists throughout the domain defined by the inequality j arg | < tt,
and, when \ z\ < 1, this analytic function may he represented by the
sei'ies

V

r(a + n)r(b + n) r c + n) .n !

The symbol F(a, h; c; z) will, in future, be used to denote this
function divided by r( .)r(6)/r(c).

\Subsection{14}{5}{1}{The continuation of the hyper geometric series.}

To obtain a representation of the function F (a, b; c; z) in the form
of series convergent when j 2 | > 1, we shall employ the integral
obtained in \hardsectionref{14}{5}. If -D be the semicircle of radius p on the left of
the imaginary axis with centre at the origin, it may be shewn* by the
methods of § 14'o that

V a + s)V h + s)T -s)

Jd r c + s)

as p- x, provided that j arg - z) \ < tt, \ z \ > 1 and p-><xi in
such a way that the lower bound of the distance of D from poles of the
integi and is a positive number (not zero).

Hence it can be proved (as in the corresponding work of \hardsectionref{14}{5}) that,
when I arg -z)\ < 7r and \ z', > 1,

1 r r a + s)r(b + s)T -s)

\ V r(a+7i)r(l -c + a + n) sin ( c- a - n) tt /\ x- -h ~ rZo r (1 + w)
r (1 - 6 + ft + n) cos n-rr sin (b - ft - n) it

  T(b + n)r l-c + b + n) sin (c - 6 - ?i) tt f \

n=o r (1 + n) r (1 - ft + 6 + n) cos nir sin (ft - 6 - w) tt

the expressions in these summations being the residues of the
integrand at the points s = - a- n, s = - b - n respectively.

It then follows at once on simplifying these series that the analytic

* In considering the asymptotic expansion of the integrand when | s [
is large on the contour or on D, it is simplest to transform T (a +
s), V (b + s), T c + s) by the relation of \hardsubsectionref{12}{1}{4}.

%
% 289
%

continuation of the series, by which the hypergeometric function was
originally defined, is given by the equation

r(c) ""' '- ' r(a-c) -(- r' - ( >i- +;i- + )

1 0 - c) where arg (- z)\ < tt.

It is readily seen that each of the three terms in this equation is a
solution of the hypergeometric equation (see \hardsectionref{14}{4}).

This result has to be modified when a - 6 is an integer or zero, as
some of the poles of r a + s)r h + s) are double poles, and the
right-hand side then may involve logarithmic terms, in accordance with
1 43.

Corollary. Putting h = c, we see that, if | arg - z)\ < n,

r (a) z)-" = -. f "' r a+s) r ( -s) ( - zyds, 'ZniJ \ xt

where (1 - )~<'- -l as 2-*.0, and so the value of [ arg(l - z) \ which
is less than tt always has to be taken in this equation, in virtue of
the cut (sec i:; 14'1) from to -f-oo caused by the inequality | arg( -
z) \ < n.

14*52. Barnes' lemma that, if the 'path of integration is curved so
that the poles of T y - s)T b - s) lie on the right uf the path and
the poles of T (a + s) r (/3 + s) lie on the left*, then

Write / for the expression on the left.

If C be defined to be the semicircle of radius p on the right of the
imaginary axis with centre at the origin, and if p-s-oo in such a way
that the lower bound of the distance of C from the poles of r (y - s)
r (5 - s) is positive (not zero), it is readily seen that

T a + s)T \& + s)T y-s)T b-s) = - ''' '

= 0[..' - +>+ - exp -2 1/( )l J, as ] s |- -oo on the imaginary axis
or on C.

Hence the original integral converges; and / - -Oasp-a-oc, when (a +
/3-|-y-|-S- 1)<0.

Thus, as in \hardsectionref{14}{5}, the integral involved in 7 is - 2ni times the sum
of the residues of the integrand at the poles oiT y - s)T b - s);
evaluating these residues we gett

/= i r( a + y+%)rO + y + ? ) TT I V a + b + n)T + b + n)

a=oV n + ) T + y-8 + 7l) sin(S-y)7r,,=o T (?i+l) r (1 -f-S-y + w)
sin(y-S)7r*

* It is supposed that a, /3, y, 5 are such that no pole of the first
set coincides with any pole of the second set.

t These two series converge \hardsubsectionref{2}{3}{8}).

W. M. A. 19

%
% 290
%

And so, using the result of 12"14 freely, by \hardsubsectionref{14}{1}{1} :

\ 7rr(l-a-/3-y -5) r T (a + d) T (3 + 5) r(a + y ) rO + y) )

sin(y-8)7r |r(l-a-y)r(l-/3-y) T (1 - a -8)~r (1 - -8)J

r(a+y)r( + y)r(a + g)r( + a) f r, ro,

- r(a+/J + y + 8)sm(a + + y + 5).sin(y-8). " ( + ) ' " ('

-sin (a + S) 77 sin 04-S)7r|.

But 2sin(fi+y)7rsiu(/3 + y)7r-2sin(a + S)7rsin (3 + S)7r

= cos (a - /3) TT - cos (a + /3 + 2y) tt - cos (a - jS) tt + cos (a +
+ 28) tt

= 2sin(y-8)7r sin(a+/3 + y + S)7r.

Therefore Vja + y)n ym-\ + ) V )

 (a + + y + S)

which is the required result; it has, however, only been prt)ved when

 (o + /3 + y + 8-l)<0;

hut, )y the theory of analytic continuation, it is true throughout the
domain through which both sides of the equation are analytic functions
of, say, a: and hence it is true for all values of a, /ii, y, 8 for
which none of the poles of r (a + s) r (/3 + s), qua function of s,
coincide with any of the poles of r (y - s) r (8 - s).

Corollary. Writing s + k., a - k, \$-k, y + k, 8 + k in place of s, a,
/3, y, 8, we see that the result is still true when the limits of
integration are -;, + cx) i, where k is any real constant.

14 "53. The connexion between hypergeometrie functions of z and of \
-z. We hav§ seen that, if | arg ( - s) | < tt,

r(c) ' ' ' 2ni j \ x,- T c + s) " '

= . \ \ r-.\ T a t)Y h-irt)T s-t)V c-a-h-t)dt\

'' TTi J \ x i l TTl J ~k-x i )

.T c-a)T c-b) ' by Barnes' leinma.

If k be so chosen that the lower bound of the distance between the s
contour and the t contour is positive (not zero), it may be shewn that
the order of the integrations* may be interchanged.

Carrying out the interchange, we see that if arg (1 -z) be given its
principal value,

T(C'-a)T c-h)T a)r b)F a, b; c; 2)/r (c)

= s- / r a + t)r b+t)r c-a-b~t) -. r s-t)ri-s)(~zYds dt

 T lJ-k-Jii 'ZtvI J -jci

1 f-k+oci

= r-. I r a + t)r b+t)r c~a-b-t)r -t) i-zy dt.

2ni J -A-K/

* Methods similar to those of \hardsubsectionref{4}{5}{1} may be used, or it may be proved
without much difficulty that conditions established by Bromwich,
Infinite Series, % 177, are satisfied.

%
% 291
%

Now, when I arg (1 -k) \ < Stt and | I -z\ < 1, this last integral may
be evaluated by the methods of Barnes' lemma \hardsubsectionref{14}{5}{2}); and so we
deduce that

r c-a)r c-b)T a)rib)F a,b;c;z)

= r c)r a)r b)T c-a-b) F a, b; a + b-c + l; l-z)

+ r c)r c - a) r (c-b) r a + b - c) I -zy-'"-" F c- a, c-b; c-a-b + l;
z),

a result which shews the nature of the singularity of F a, b; c; z)
at z=.

This result has to be modified if c - a - 6 is an integer or zero, as
then

Y a-- t) V b->r t) T c - a -b - t)T -t)

has double poles, and logarithmic terms may appear. With this
exception, the result is valid when | arg -z)\ < tt, | arg (1 - 2); <
tt.

Taking | s | < 1, we may make 2 tend to a real value, and we see that
the result still holds for real values of 2 such that < 2 < 1.

\Section{14}{6}{Solution of Riemann's equation by a contour integral.}

We next proceed to establish a result relating to the expression of
the liypergeometric function by means of contour integrals.

Let the dependent variable u in Riemann's equation \hardsectionref{10}{7}) be
replaced by a new dependent variable defined by the relation

u = (z - aY z - bf (z - c)y I.

The differential equation satisfied by / is easily found to be

d f 1 + a a' l+ -§' 1-f - 7) dl dz- \ z - a z - h z - c ] dz

( g + /3 + 7) (g + + ry + 1) + Sa (g + /?' + 7' - 1)1 z - a) z - 0) z
- c)

which can be written in the form

Q(z) -[ X-2)Q' z)+R z)]f

+ li ( - 2) (X - 1 ) (/' (z) - (X-DR (z)] 1 = 0,

where / \=l-ot- -j = a' + ' + y',

iQ(z) z-a)(z-h) z-c),

(R(z) = X a' +/3 + ry) z-b) z-c).

It must be observed that the function / is not analytic at x, and
consequently the above differential equation in / is not a case of the
generalised hypergeometric equation.

We shall noiu sheiu that this differential equation can be satisfied
by an integral of the form

1=1 t- ay'+ +y- (t - 6)-+ '+y-i (t - c)-+ -y -1 z - )- - -y dt, J c

jirovlded that C, the contour of integration, is suitably cJiosen.

19-2

%
% 292
%

For, if we substitute this value of / in the differential equation,
the con- dition* that the equation should be satisfied becomes

j (t- ay+ +y-' t - by+ '+y-' t - cY+p+y'-' z - t)-''- -y--Kdt = 0,

J c where

ir = (\ - 2) |q (z) + t- z) Q' (z) + l(t- zj Q" z)

+ (t-z) R(z) + (t-z)R'(z)]

= ( 2) Q (t) -it- zy] -it-z) [R (t) -a- zy s ( ' + /3 + 7)1

= - (1 + a + /3 + 7) ( - a) ( - 6) (i - c)

+ S (a + /9 + 7) ( - ) ( - c) t - z).

f dV It follows that the condition to be satisfied reduces to -7- dt =
0, where

J c dt

v=(t- ay+ +y (t - by+ '+y (t - cy+ +y (t - )-(i+-+p+v .

The integral / is therefore a solution of the differential equation,
when C is such that V resumes its initial value after t has described
C.

Now

V= t- ay'+ +y-' (t - by+ '+y-' (t - cy+ +y-' [z - t)-''- -y U,

where U = (t- a) t -b) t- c) (z - ty\

Now Z7 is a one-valued function of t; hence, if C be a closed
contour, it must be such that the integrand in the integral / resumes
its original value after t has described the contour.

Hence finally any integral of the type

(z-ay(z-by(z - c)y \ (t-ay+y+''-\ t-b)y+''+ '-' t-cy+ y'-' z-ty''~ -y
dt,

JC

where C is either a closed contour in the t-plane such that the
integrand resumes its initial value after t has described it, or else
is a simple curve such that V lias the same value at its termini, is a
solution of the differential equation of the general hypergeometric
function.

The reader is referred to the memoirs of Pochhammer, Math. An)i. xxxv.
(1890), pp. 495-526, and Hob.son, Phil. Trans. 187 a (1896), pp.
443-531, for an account of the methods by which integrals of this type
are transformed so as to give rise to the relations of \hardsubsectionref{14}{5}{1} and
14-53.

Example 1. To deduce a real definite integral which, in certain
circumstances, represents the hypergeometric series.

 The iliEferentiations imder the sign of integration are legitimate
\hardsectionref{4}{2}) if the path C does not depend on z a3d does not pass through
the points a, b, c, z; if C be an infinite contour or if C passes
through the points a, b, c or z, further conditions are necessary.

%
% 293
%

The hypergeometric series F a, b; c; z) is, as already shewn, a
solution of the differential equation defined by the scheme

r 00 1 \

P a zy

\ \ -c b c- a- b ] If in the integral

which is a constant multiple of that just obtained, we make 6 -x
(without paying attention to the validity of this process), we are led
to consider

/ t'''' t-\ y- - t-zydt.

Now the limiting form of V in question is

and this tends to zero at t= 1 and = cc, provided R (c) > R(b)>0.

We accordingly consider / t"~'= t - Vf-''-' t-z)~" dt, where z is not*
positive and greater tlum 1.

In this integral, write t = u~; the integral becomes

/ ? ''-' (1-jt)' -''-' (l-M2)- 0??<. .'

We are therefore led to expect that this integral may be a solution of
the differential equation for the hypergeometric series.

The reader will easily see that if R (c) > R b)> 0, and if arg u = arg
(1 - m) =0, while the branch of l-uz is specified by the fact that
(1-m2)- 1 as m- 0, the integral just found is

T b)r c-b)

  (, \&; c;z .

This can be proved by expandingf (1 - s)-a in ascending powers of z
when | 3 | <1 and using § 12 "41.

Example 2. Deduce the result of \hardsubsectionref{14}{1}{1} from the preceding example.

\Subsection{14}{6}{1}{Determination of an integral which represents TODO}

We shall now shew how an integral which represents the particular
solution i ' \hardsectionref{14}{3}) of the hypergeometric difterential equation can
be found.

We have seen \hardsectionref{14}{6}) that the integral

l= z- df [z~bf z - cy ( t-a)P+y+- '-\ t-b)y+<'+P'- (t-c)'' +
+y'-Ht-z)-<'~ -ydt

satisfies the difl:erential equation of the hypergeometric function,
provided C is a closed contour such that the integrand resumes its
initial value after t has described C. Now the singularities of this
integrand in the plane are the points a, b, c, z; and after describing
the double circuit contour \hardsubsectionref{12}{4}{3}) symbolised by (6 +, c-h, 6 -, c
- ) the integi-and returns to its original value.

* This ensures that the point t - ljz is not on the path of
integration, t The justification of this process by \hardsectionref{4}{7} is left to
the reader.

%
% 294
%

Now, if z lie iu a circle whose centre is, the circle not containing
either of the points h and c, we can choose the path of integration so
that t is outside this circle, and so \ z - a\ < i\ t - a\ for all
points t on the path.

Now choose arg(2 - a) to be numericall ' less than it and arg(i - 6),
ai*g(2-c) so that they reduce to* arg(a - 6), arg(a-c) when z- a\ fix
arg( - a), arg (< - 6), arg (< - c) at the point iV at which the path
of integration starts and ends; also choose arg t - z) to reduce to
arg t - a) when z- a.

Then (z-bf = (a-bf |l +/3 (j ' ) + ...j-,

(.-c)V=( -o)' l+ (i ?) + ...l, and since we can expand (t-z)~' ~°~'
into an absolutely and uuifornily convergent series

we may expand the integral into a series which converges absolutely.

Multiplying up the absolutely convergent series, we get a series of
integer powers of z - a multiplied by (s - a) . Consequently we must
have

We can define P '''\ P \ P '\ F y\ P ' by double circuit integrals in
a similar manner.

\Section{14}{7}{Relations between contiguous hypergeometric functions.}

Let P z) be a solution of Riemann's equation with argument z,
singularities a, h, c, and exponents a, a', /3, j3', y, 7'. Further
let P(z) be a constant multiple of one of the six functions P *,
TODO.
Let TODO denote the function
which is obtained by replacing two of the exponents, I and m, in P 2)
hy I + 1 and m - 1 respectively. Such functions P;+i, i\ i (z) are
said to be contiguous to P (z). There are 6 x 5 = -30 contiguous
functions, since I and m may be any two of the six exponents.

It was first shewn by Riemannf that the function P(z) and any tivo of
its contiguous functions are connected by a linear relation, the
coeffi,cients in which are polynomials in z.

There will clearly be 5 x 30 x 29 = 435 of these relations. To shew
how to obtain them, we shall take P z in the form

F z) = z- ay (z - hY (z - c)y f t- ay+y+' '- (t - 6)v+' + -

J c

(t - cY+ +y'-' (z - ty- -y dt,

where C is a double circuit contour of the type considered in \hardsubsectionref{14}{6}{1}.

* The values of arg (a-b), arg (a - c) being fixed.

t Abh. der k. Ges. der Wiss. zu Gottingen, 1857; Gauss had previously
obtained 15 rehitions between contiguous hypergeometric functions.

%
% 295
%

First, since the integral round G of the differential of any function
which resumes its initial value after i has described C is zero, we
have

= [ I- (t - ay+ +y (t - by ' y-Ht - cY+ +y'-' t - zy- - -y] dt. J c dt

On performing the differentiation by differentiating each factor in
turn,

we get

(a' + + y)P + (a + ' + y-l) Pa-+,, '-, + (a + (3 + y'-l) Pa'+i,y-i

\ (a + /3 + 7) p

Considerations of symmetry shew that the right-hand side of this
equation can be replaced by

These, together with the analogous formulae obtained by cyclical
inter- change* of (a, a, a) with (6, /3, ') and (c, 7, 7'), are six
linear relations connecting the hypergeometric function P with the
twelve contiguous functions

Pa+], '-l, -I p+i y'-i, -/y+i,a\ l, -ta-],v'-l5 -Lfi+i a'-l, y~\, '~\
i -I a.'+l, '- 1) -I a'4-],Y'\ i, i '4.),-y'\ i, -t j3'+l, a'-l > ''
y'+I, a'- 1 ) -*7'+l, '- 1-

Next, writing t - a = (t- h) + (6 - ), and usingf Pa'\ i to denote the
result of writing a' - 1 for a' in P, we have

P = P..\ :,,.+:- (6- )P.-:.

S-imilarly P = P \ i,y'+i + (c - a) Pa'-i-

Eliminating Pa-i from these equations, we have

 c-h)P + (a - c) Pa-\ :, vi + (b- a) Pa'-.,y-,, = 0. This and the
analogous formulae are three more linear relations con- necting P with
the last six of the twelve contiguous functions written above.

Next, writing ( - ) = ( - a) - ( - a), we readily find the relation

P = P +:, v'-i - ( - )" ' ( - f y ( - 0

Jc which gives the equations

( \ a)-i P - ( - 6)- P +,, Y--: = ( - h)- [P- z- c)- Py+, a'-i

= Kz - c)-' [P- z- a)-' Pa+i, \ i .

* The interchange is to be made only in the integrands; the contour C
is to remain unaltered.

t Pa'-l is not a function of Riemann's type since the sum of its
exponents at a, h, c is not unity.

%
% 296
%

These are two more linear equations between P and the above twelve
contiguous functions. *

We have therefore now altogether found eleven linear relations between
P and these twelve functions, the coefficients in these relations
being rational functions of 2. Hence each of these functions can be
expressed linearly in terms of P and some selected one of them; that
is, between P and any two of the above functions there exists a linear
relation. The coefficients in this relation will be rational functions
of z, and therefore will become polynomials in z when the relation is
multiplied throughout by the least common multiple of their
denominators.

The theorem is therefore proved, so far as the above twelve contiguous
functions are concerned. It can, without difficulty, be extended so as
to be established for the rest of the thirty contiguous functions.

Corollary. If functions be derived from P by replacing the exponents
a, a, /3, /3', y, y

by a+p, a' + g, /3 + r, jS'+s, y + t, y' + x, where p, q, r, s, f, u
are integers satisfying the

relation

p- -q + r + s + t + u=0,

then between P and any two such functions there exists a linear
relation, the coefficients in which are polynomials in z.

This result can be obtained by connecting P with the two functions by
a chain of intermediate contiguous functions, writing down the linear
relations which connect them with P and the two functions, and from
these relations eliminating the intermediate contiguous functions.

Many theorems which will be established subsequently, e.g. the
recurrence-formulae for the Legendre functions \hardsubsectionref{15}{2}{1}), are really
cases of the theorem of this article.

REFERENCES. C. F. Gauss, Ges. Werke, in. pp. 12.3-163, 207-229. E. E.
KuMMER, Journal fur Math. xv. (1836), pp. 39-83, 127-172. G. F. B.
Riemann, Ges. Math. Werke, pp. 67-84. E. Papperitz, Math. Ann. xxv.
(1885), pp. 212-221. S. PiNCHERLE, Rend. Accad. Lincei (4), iv.
(1888), pp. 694-700, 792-799. E. Y. Barxes, Proc. London Math. Soc.
(2), vi. (1908), pp. 141-177. Hj. Mellin, Acta Soc. Fennicae, xx.
(1895), No. 12.

Miscellaneous Examples.

1. Shew that

F a, h + \; c; z)-F a, b; c; z) = - F a + l, h + l; c + l; z).

2. Shew that if o is a negative integer while /3 and y are not
integers, then the ratio F(a, IB; a + /3 + l -y; \ - .v)-7-F a,; y;
A') is independent of x, and find its value.

%
% 297
%

dP d P

3. If P iz) be a hypergeometrie function, express its derivates -,-
and -- linearly in

dP

terms of P and contiguous functions, and hence find the linear
relation between P, -j-,

d'-P and -TV, i.e. verify that P satisfies the hypergeometrie
difterential equation.

4. Shew that i j, j; 1; 4 (1 -z)) satisfies the hypergeometrie
equation satisfied by jP(|, I; 1; z). Shew that, in the left-hand
half of the lemniscate \ z z) | = j, these two functions are equal;
and in the right-hand half of the lemniscate, the former function is
equal to F \, |; 1; 1 -2).

5. \ i Fu, =F a +,h; c; .r), / \ =i (a - 1, h; c; x), determine the
15 linear relations with polynomial coefficients which connect F a, h;
c; x) with pairs of the six functions Fa, Fa-, F,,, F,\, F,, F,\ .
\addexamplecitation{Gauss.}

6. Shew that the hypergeometrie equation

x(x-l/J - y-(a+ + l)x ' + a i/ =

is satisfied by the two integrals (suppo.sed convergent)

[\ \ -\ l-z)y- -' l-xz)-''dz J

and ['/-i(l-2)"-i' l-(l- )2 ~"rf2.

.' "

7. Shew that, for values of x between and 1, the solution of the
equation

is AF a,i; i; \ --Ixy-l + B l-2x) F h a + l), h fi + l); |; l-2xy-,

where A, B are arbitrary constants and TODO represents the
hypergeometric series.

\addexamplecitation{Math. Trip. 1896.}

8. Shew that

Jim|F(,/3,y,..)- J (-),;r(y-a)r(y- )r( )r( ) ' J

\ r(y-a- )r(y ) (y-a) (y- )

where h is the integer such that k R (a + - y)<k- .

(This specifies the manner in which the hj'pergeometric function
becomes infinite when .r- -l -0 provided that o-f |3-y is not an
integer.) \addexamplecitation{Hardy.}

9. Shew that, when i? (y - a - /S) < 0, then

-/3-y

- -l

T y)n'' -y

 "( 4- -y)r(a)r( )

as '/i -x; where S denotes the sum of the first n terms of the series
for F a, /3; y; 1).

(M. J. M. Hill, Proc. London Math. Soe. (2), v.)

%
% 298
%

10. Shew that, ii i/i, y-i be indeijeiident sokitions of

 2- 1- -.

then the oreneral sohition of

is z = Ay - Byiy.i- Cyi', where J, B, C are constants.

\addexamplecitation{Appell, Comptes Rendus, xci.}

11. Deduce from example 10 that, if + ft + | = c,

 F(a h- r- r)\ \ = \ rW\ r(2c-l) - T 2a + 7>) F ia + b+n)T 2b+7i),,

'' ' '' r 2a)T 2b)T a + b)n=o nl T c + n)T 2c- 1+n) *' '

\addexamplecitation{Clausen, Journal fiir Math, iii.}

12. Shew that, if | | <i and j x \ -s) j <|,

F 2a, 2/3; a+/3 + *; x = F a, /3; a+ + l; 4.r(l-.r) . \addexamplecitation{Kummer.}

13. Deduce from example 12 that

14. Shew that, if co = e ' ' and i (a) < 1,

i (a,3a-l; 2a; " - ) = 3 '' '* exp [K Sa - 1) | |,

i (,3a-l; 2a; -co) =3 - exp W (1 -3a) M | .

\addexamplecitation{Watson, Quarterly Journal, xhi.}

15. Shew that

V 2 ) 2 -rj> -r\ j ..y V9; r(|)r('/i + f)

(Heymann, Zeitschrift fur Math, und Phys. XLiv.)

16. If il-xY+ -y F 2a,2;2y; x) = + Bx + C:'f- + Dx +..., shew that

i (a, /3; y+; ) i (y-a, y-/3; y+l; x)

y+l (7+l)(7 + i-) (y+*)(y + f)(7+|)

(Cayley, PAz7. Mag. (4), xvi. (1858), pp. 356-357. See also Orr, Camb.
Phil. Trans, xvii. (1899), pp. 1-15.)

17. If the function F a, ji, /3', y; .*;, y) be defined by the
equation

i (a,,/3', y; x,y) = \ - \ \ i' -\ \ ~xc)y-''-\ \ - ux)-\ l-uy)- '
du,

r (a) r (y - a) j

then shew that between F and any three of its eight contiguous
functions

i (a±l), F ii± ), F ii'±l), F y±\ \

there exists a homogeneous linear equation, whose coefficients are
polynomials in x and y.

\addexamplecitation{Le Vavasseur.}

%
% 299
%

18. If y - a - iS < 0, shew that, a.s x - 1-0,

and that, if -0-/3 = 0, the corresponding approximate formula is

\addexamplecitation{Math. Trip. 1893.}

19. Shew that, when \ x\ < 1,

/(2 +,0 +,a:-,0-) 1 1 fl

= \,r/' sin OTT sin (y - a) TT . ' - " - "V (a, /3; y; ),

where c denotes a point on the straight line joining the points 0, x,
the initial arguments of v - x and of v are the same as that of .>;,
and arg (1 - j/) -*-0 as v- 0.

\addexamplecitation{Pochhammer.}

20. If, when \ arg (1 -x)\ < 2n,

K x)=-r T -s)Ti; + s)\ \ ' xYds,

LTTl J \ y,,

and, when | arg.*; | < 27r,

l-lZl J \ K,-

by changing the variable s in the integral or otherwise, obtain the
following relations : K (.r) = A" (1 - ), if I arg (1 - :f) I <

K l-x) = K'(x), if|argj;|<7r.

K x) = l - .r)-4 A' ( -, if i arg (1 - .r) \ < n.

K l-x) x-h K f"--, if I arg.r | <7r.

K' x) = x 2 / ' (Ijx), if I arg.r |'< tt.

A" (1 - a;) = (1 - X) - i A" ( \ J\ - \ "), if j arg (1 - .x-) I < -
\addexamplecitation{Barnes.}

21. With the notation of the preceding example, obtain the following
results :

11=0 [ 'I- )

2 K' x)= - l f lt- j'- - log -4log 2 + 4 (1 - 1 + -- .

when \ x\ < l, | arg .i? | < tt; and

iT ( ) = + i ( - ) - 5 a: (l/.r) + ( - ) - 2 ' (1/:??),

when j arg - x)\ < ir, the ambiguous sign being the same as the .sign
of / (x).

\addexamplecitation{Barnes.}

%
% 300
%

22. Hypergeometric series in two variables are defined by the
equations F, a;, ';y; .r, y) = 2 "Xn f" '"J/'S

F, (a; /3, '; y, y;,r, y) = 2 '-, x y .

-ts a,a,,; y; x, y)= 2, --,-\ x 'y"

 n( n Pm Pn,( ??l . n i y i,1

FUa,;y,y';.,y) .XpV ' '"'" '' where a, = a(a + l). ..(a + m - 1), and
2 means 2 2 .

?n, n m=0 =0

Obtain the differential equations

c"F. d'F ?Ft ?F

-(l-)8 +y(l-)5j;5 + r-( +e+l)- 5;j'-* -. /-,=0,

d F d F dF;

.il-o:)- +y Hy- a + + l)x]j -a F, = 0,

and four similar equations, derived from these by interchanging x with
y and a, /3, y with a', 3', y when a', ', y occur in the corresponding
series.

\addexamplecitation{Appell, Comptes Rendus, xc.} 23. If a is negative, and if

a= -V + a,

where v is an integer and a is positive, shew that

r (x) r (a)

u D (-)"( -l)(a-2) ... (a-%), where = - - - - ' - - " ' G( -n),

" i (*/ = - . \addexamplecitation{Hermite, Joiirnal mr Math, xcii.}

x+n \ 1 . /

24. When a < 1, shew that

T x)T a-x) I \ l Rn

T a) n=\ X + n n=\ X - a - n''

where (-) a(a + l) ... (a + .-l)

7i !

25. When a > 1, and v and a are respectively the integral and
fractional parts of a, shew that

T x)T a-x) G x)p.,\ - (?( ')p, r(a) =i .r + ?i =i . r-a - n

-G x) + + ...+ f'-'X '\ \ X - a X-a-\ .r-a-i + lj'

%
% 301
%

where (?( )=(l-? (l -- ) ... (l \ . \ )

V a/ V a+l/ \ a + v - lj

ajjj \ (-)"a(a+l)... (a + -l)

It,;

\addexamplecitation{Hermite, Journal fiir Math, xcil.} 26. If

/ (T, \ r - '(jZ + + n-l) ., x x+l)(7/ + v + n-l)( + v + n)

./ (.r, y, .)- 1 - C, - - -,) + C.3 3,( + 1) ( +,)( ., + i) - ...,

where n is a positive integer and C'i, C2, ... are binomial
coefficients, shew that

f (T y, r(y)rCy- -H/ )r(.r-n;)r(y+?0

./H .y. ) Y y-x)T y + n)V :6)V x-irV n)'

(Saalschiitz, Zeitschrift fur Math. xxxv.; a number of similar
results are given by Dougall, Proc. Edinburgh Math. Soc. xxv.)

shew that, when liib + e -,a - ) > 0, then

i (a,a-5+l, -c + l'; S, e; l)=2- ..A P W " " - ' ' ' ' ' r(8-
a)r(f-ia)r( + ia)r(S + e-a-l)

(A. C. Dixon, P/'oc. London Math. Soc. xxxv.)

28. Shew that, if R (a) < .if, then

; f a(a+l)... (a-l-n- l)l,.,,, . r(l-3a)

(Morley, Proc. London Math. Soc. xxxiv.) 2!). If

[' / '....-I (1 \ .,.)>-iy-i (1 \ )A-. (1 -a,yy--J->'dxdi/ = B(i,J,
X-, m), J i> J i>

shew, by integrating with respect to jc, and also with respect to i
that B i,j, /, m) is a symmetric function of i+J,j + i\ / + + in,
/n+i.

Deduce that

F a,ld,y; fi, f; l) r (8) F ( ) T (6 + 6 - a -/3-y)

is a symmetric function of 8, f, S + e - a - /i, 8 + e - - y, 8 + e -
y - a.

(A. ('. Dixon, Proc. London Math. Soc. (2), II. (1905), jjp. 8-16. For
a proof of a special case by Barnes' methods, see Barnes, Quarterly
Journal, XLI. (1910), pp. 136-140.)

30. If

x ~ il-x f'"- d" I

/ = i (-, a +;.; y, .r) = - - y- - W ( x) \

shew that, when n is a large positive integer, and 0< .r < 1,

  =, - (sin, )i-V(cos0)V- -icos (2u + a)( -i,r(2y-l) + o( 1 ),

where .r = sin2 .

(This result is contained in the great memoir by Darboux, "Sur
I'approxi- mation des fonctions de trfes grands nombres," Journal de
Math. (3), iv. (1878), pp. 5-56, 377-416. For a systematic development
of hyper- geometric functions in which one (or more) of the constants
is large, see Camh. Phil. Trans, xxii. (1918), pp. 277-308.)


\section{Factorization in Polynomial Rings}
\begin{theorem}\label{ufd_poly}
    Let $R$ be a UFD, then $R[X]$ is also a UFD.
\end{theorem}
\begin{remark}
    One can apply this recursively to show that the polynomial ring in $n$ variables over a UFD is a UFD.
\end{remark}
In particular, $\mathbb Z[X]$ is a UFD and $\mathbb C[X_1,\ldots,X_n]$ is a UFD.\\
In this section, we shall always assume that $R$ is a UFD.
It is an integral domain, so it has a field of fraction $F$, so $R[X]\subset F[X]$ which is a UFD since it is a ED.
\begin{definition}
    The content of a polynomial $f(X)=a_0+a_1X+\cdots+a_nX^n$ for $a_i\in R$ is $c(f)=\gcd(a_0,\ldots,a_n)$.
    We say $f$ is primitive if $c(f)$ is a unit, i.e. the coefficients are coprime.
\end{definition}
\begin{lemma}\label{poly_content}
    1. Any prime element in $R$ is also prime in $R[X]$.\\
    2. If $f,g\in R[X]$ are primitive polynomials, then $fg$ is also primitive.\\
    3. If $f,g\in R[X]$, then $c(fg)=c(f)c(g)$ up to associates.
\end{lemma}
\begin{proof}
    1. Given a prime $p\in R$, so $R/(p)$ is an integral domain.
    For $a\in R$, let $\tilde{a}\in R/(p)$ be its image under the quotient map.
    Define $\theta:R[X]\to R/(p)[X]$ by
    $$a_0+a_1X+\cdots+a_nX^n\mapsto \tilde{a}_0+\tilde{a}_1X+\cdots+\tilde{a}_nX^n$$
    which is a homomorphism.
    So for $p|fg$ where $f,g\in R[X]$, we have $\theta(fg)=0$, so $\theta(f)\theta(g)=0$.
    But $R/(p)[X]$ is an integral domain since $R/(p)$ is.
    Hence WLOG $\theta(f)=0$, so $p|f$.\\
    2. If $f,g$ are primitive but $fg$ is not, then there is some irreducible $p\in R$ that divides $fg$.
    Since $R$ is a UFD, $p$ is prime in $R$, hence is prime in $R[X]$ by 1, hence $p|f$ or $p|g$, contradiction to their primitivity.\\
    3. Write $f=c(f)f_0$, so $f_0$ is primitive.
    Do the same to $g$ gives $g=c(g)g_0$ for a primitive $g_0$, so $fg=c(f)c(g)(f_0g_0)$.
    But $f_0g_0$ is primitive by 2, so $c(fg)=c(f)c(g)$ up to associates.
\end{proof}
\begin{remark}
    Take a polynomial $f$ in $F[X]$, then we can write $f=ab^{-1}f_0$ where $f_0\in R[X]$ where $a,b\in R,b\neq 0$ and $f_0$ is primitive.
    We can just take $b$ to be a common multiple of the denominators (since $F$ is the field of fractions of $R$) and the rest follows.
\end{remark}
\begin{lemma}\label{primitive_div_fof}
    Let $f,g$ be polynomials in $R[X]$ and $g$ is primitive, then if $g|f$ in $F[X]$, then $g|f$ in $R[X]$.
\end{lemma}
\begin{proof}
    If $g|f$ in $F[X]$, then $f=gh$ with $h\in F[X]$.
    Write $h=ab^{-1}h_0$ for $a,b\in R,b\neq 0$ and $h_0\in R[X]$ is primitive.
    So $bf=agh_0$, then by taking content $bc(f)=a$, so $h=c(f)h_0\in R[X]$ which is what we wanted.
\end{proof}
\begin{lemma}[Gauss's Lemma]\label{gauss_poly}
    Let $R$ be a UFD with field of fraction $F$.
    Suppose $f\in R[X]$ be primitive and irreducible in $R[X]$, then $f$ is irreducible in $F[X]$.
\end{lemma}
\begin{proof}
    Assume that $\deg f>0$ since otherwise $f$ has to be a constant.
    Then in this case $f$ is not a unit in $F[X]$.
    Suppose we can write $f=gh$ for $g,h\in F[X]$ with $\deg g,\deg h>0$.
    Replacing $g,h$ by $\lambda g$ and $\lambda^{-1}h$ for some $\lambda\in F^\times$, we can assume WLOG that $g\in R[X]$ and is primitive.
    So by the Lemma \ref{primitive_div_fof}, $g|f$ in $R[X]$, so $h\in R[X]$, contradiction.
\end{proof}
\begin{lemma}\label{prime_fof}
    Let $g\in R[X]$ be primitive and is prime in $F[X]$, then $g$ is prime in $R[X]$.
\end{lemma}
\begin{proof}
    Suppose $f_1,f_2\in R[X]$ and $g|f_1f_2$, then $g|f_1$ or $g|f_2$ in $R[X]$, but by Lemma \ref{primitive_div_fof} $g|f_1$ or $g|f_2$.
\end{proof}
\begin{proof}[Proof of Theorem \ref{ufd_poly}]
    Let $f\in R[X]$, write $f=c(f)f_0$ where $f_0$ is primitive.
    Since $R$ is a UFD, we can write $c(f)$ as a product of irreducibles.
    Also, $f_0$ can also be written as a product of irreducibles by induction on its degree.
    So it suffices to show that every irreducible in $R[X]$ is prime.
    Take $f\in R[X]$ irreducible, then either $f$ is constant or $f$ must be primitive.\\
    For a constant $f$, then $f$ is prime in $R$, so it is prime in $R[X]$ by the first part of Lemma \ref{poly_content}.\\
    For a primitive $f$, combining Lemma \ref{gauss_poly} and Lemma \ref{prime_fof} gives the result.
\end{proof}
\begin{theorem}[Eisenstein's Criterion]
    Let $R$ be a UFD and $f=a_0+\cdots+a_nX^n\in R[X]$ is primitive.
    Suppose $p\in R$ is irreducible and $p\nmid a_n$ but $p|a_i,0\le i\le n-1$ and $p^2\nmid a_0$, then $f$ is irreducible.
\end{theorem}
\begin{proof}
    Suppose $f=gh$ where $g,h\in R[X]$ are not unit.
    Since $f$ is primitive, $g,h$ both have positive degree.
    Write $g(X)=r_0+\cdots+r_kX^k$ and $h(X)=s_0+\cdots+s_lX^l$ where $k+l=n$.
    Now $a_n=r_ks_l$, so $p\nmid r_k,p\nmid s_l$.
    Also $a_0=r_0s_0$, so exactly one of $r_0,s_0$ is divisible by $p$ since $R$ is a UFD.
    Assume WLOG $p|r_0$.
    Choose $j$ such that $p|r_0,\cdots,p|r_{j-1}$ but $p\nmid r_j$.
    Note that we can choose this since $p\nmid r_k$, in particular $j\le k<n$.
    But
    $$a_j=r_0s_j+r_1s_{j-1}+\cdots+r_js_0\in r_js_0+(p)$$
    So $a_j$ is not divisible by $p$ since $R$ is a UFD, so $p\nmid a_j$, contradiction.
\end{proof}
\begin{example}
    Consider $f(X)=X^3+2X+5\in\mathbb Z[X]$.
    If $f$ is reducible, then it must has a root, which is impossible since the only possibilities of root are $\pm 1,\pm 5$.
    By Guass's Lemma, this is also irreducible in $\mathbb Q$.
    Hence $\mathbb Q[X]/(f)$ is a field since $\mathbb Q[X]$ is a PID and $f$ is irreducible.
\end{example}
\begin{example}
    1. Let $p$ be a prime number, then the polynomial $X^n-p$ is irreducible by Eisenstein's criterion, hence it is also irreducible in $\mathbb Q[X]$, so again $\mathbb Q[X]/(X^n-p)$ is a field.\\
    2. Let $f(X)=X^p+\cdots+X+1\in\mathbb Z[X]$ where $p$ is prime.
    Although we cannot apply Eisenstein's criterion directly, we can do a substitution.
    \begin{align*}
        f(X+1)&=(X+1)^p+\cdots+(X+1)+1=\frac{(X+1)^p-1}{(X+1)-1}\\
        &=X^p+\binom{p}{1}X^{p-1}+\cdots+\binom{p}{p-2}X+\binom{p}{p-1}
    \end{align*}
    where we can apply Eisenstein's criterion to see that $f(X+1)$ is irreducible, hence $f(X)$ is also irreducible.
\end{example}


\section{Invariant Measures}
\begin{definition}
    A measure is a tuple $(\lambda_i)_{i\in I}$ with $\lambda_i\ge 0$ for all $i\in I$.\\
    A measure $\lambda$ is invariant (or stationary/equilibrium) if $\lambda P=\lambda$.
\end{definition}
\begin{theorem}
    Let $(X_n)_{n\ge 0}\sim\operatorname{Markov}(\lambda,P)$.
    Suppose $\lambda$ is invariant.
    Then $(X_{n+m})_{n\ge 0}$ is also $\operatorname{Markov}(\lambda,P)$.
\end{theorem}
\begin{proof}
    Quite obvious, but let's check.
    For any $i$ we have, by definition,
    $$\mathbb P[X_m=i]=(\lambda P^m)_i=\lambda_i$$
    So the initial distribution of $(X_{n+m})_{n\ge 0}$ is $\lambda$.
    Also, conditional on $X_{n+m}=i$, by the Markokv property of $(X_n)$, $X_{n+m+1}$ is independent of $X_m,\ldots,X_{n+m}$ and it has distribution $(p_{ij})_{j\in I}$.
\end{proof}
\begin{theorem}\label{power_inv}
    Suppose $I$ is finite.
    If there is some $i\in I$ such that $p_{ij}^{(n)}\to\pi_j$ as $n\to\infty$ for any $j\in I$, then $(\pi_j)$ is an invariant distribution.
\end{theorem}
\begin{proof}
    It is obviously a distribution as
    $$\sum_{j\in I}\pi_j=\sum_{j\in I}\lim_{n\to\infty}p_{ij}^{(n)}=\lim_{n\to\infty}\sum_{j\in I}p_{ij}^{(n)}=1$$
    since $I$ is finite.
    To see it is invariant,
    \begin{align*}
        \pi_j&=\lim_{n\to\infty}p_{ij}^{(n)}=\lim_{n\to\infty}p_{ij}^{(n+1)}=\lim_{n\to\infty}\sum_{k\in I}p_{ik}^{(n)}p_{kj}=\sum_{k\in I}p_{kj}\lim_{n\to\infty}p_{ik}^{(n)}\\
        &=\sum_{k\in I}p_{kj}\pi_k=(\pi P)_j
    \end{align*}
    again because $I$ is finite.
\end{proof}
\begin{remark}
    The theorem fails in general for infinite $I$.
    Take for example the simple symmetric random walk on $\mathbb Z^d$.
    We have $p_{ij}^{(n)}\to 0$ as $n\to\infty$ for any $i,j\in\mathbb Z^d$ but $(0,0,0,\ldots)$ is not a distribution (even though it is invariant).
\end{remark}
\begin{example}
    Take
    $$P=\begin{pmatrix}
        1-\alpha&\alpha\\
        \beta&1-\beta
    \end{pmatrix}$$
    We already know that
    $$p_{11}^{(n)}=\begin{cases}
        \beta/(\alpha+\beta)+\alpha(1-\alpha-\beta)^n/(\alpha+\beta)\text{, if $\alpha+\beta>0$}\\
        1\text{, otherwise}
    \end{cases}$$
    So if $\alpha+\beta\notin\{0,1\}$, we have $p_{11}^{(n)}\to\beta/(\alpha+\beta)$, similarly
    $$P^n\to\frac{1}{\alpha+\beta}\begin{pmatrix}
        \beta&\alpha\\
        \beta&\alpha
    \end{pmatrix},n\to\infty$$
    Hence $(\beta/(\alpha+\beta),\alpha/(\alpha+\beta))$ is an invariant distribution.
\end{example}
Usually we cannot easily compute the entries of $P^n$ and take the limit to find an invariant distribution.
However, there is an obvious other way to get one.
\begin{example}
    Consider
    $$P=\begin{pmatrix}
        0&1&0\\
        0&1/2&1/2\\
        1/2&0&1/2
    \end{pmatrix}$$
    So if we want $\pi P=\pi$, it gives the set of linear equations
    $$\begin{cases}
        \pi_1=\pi_3/2\\
        \pi_2=\pi_1+\pi_2/2\\
        \pi_3=\pi_2/2+\pi_3/2
    \end{cases}$$
    which we can solve to get $\pi_1=1/5,\pi_2=\pi_3=2/5$ which is indeed an invariant distribution.
\end{example}
\begin{definition}
    For each state $k\in I$, let $\gamma_i^k$ be the expected time spent in the state $i$ between two visits to $k$, so
    $$\gamma_i^k=\mathbb E_k\sum_{n=0}^{T_k-1}1_{X_n=i}=\mathbb E_k\sum_{n=1}^{T_k}1_{X_n=i}$$
\end{definition}
\begin{theorem}
    Let $P$ be irreducible and recurrent, then:\\
    (a) $\gamma_k^k=1$.\\
    (b) $\gamma^k=(\gamma_i^k)_{i\in I}$ is an invariant measure.\\
    (c) $0<\gamma_i^k<\infty$ for all $i\in I$.
\end{theorem}
\begin{proof}
    (a) is obvious.
    For (b), since $P$ is recurrent, we know $\mathbb P_k[T_k<\infty]=1$, so for $j\neq k$,
    \begin{align*}
        \gamma_j^k&=\mathbb E_k\sum_{n=1}^{T_k}1_{X_n=j}=\mathbb E_k\sum_{n=1}^\infty 1_{X_n=j,n\le T_k}\\
        &=\sum_{n=1}^\infty\mathbb P_k[X_n=j,n\le T_k]\\
        &=\sum_{j\in I}\sum_{n=1}^\infty\mathbb P_k[X_{n-1}=i,X_n=j,n\le T_k]\\
        &=\sum_{j\in I}\sum_{n=1}^\infty\mathbb P_k[X_{n-1}=i,n\le T_k]\mathbb P[X_n=j|X_{n-1}=i]\\
        &=\sum_{j\in I}p_{ij}\sum_{n=1}^\infty\mathbb P_k[X_{n-1}=i,n\le T_k]\\
        &=\sum_{j\in I}p_{ij}\sum_{n=1}^\infty\mathbb E_k[1_{X_{n-1}=i,n\le T_k}]\\
        &=\sum_{j\in I}p_{ij}\mathbb E_k\sum_{n=0}^{T_k-1}1_{X_n=i}\\
        &=\sum_{i\in I}p_{ij}\gamma_i^k=(\gamma^kP)_j
    \end{align*}
    For (c), as $P$ is irreducible, there is $n,m\ge 0$ such that $p_{ik}^{(n)}>0,p_{ki}^{(m)}>0$.
    So by (b) and (a),
    $$\gamma_i^k\ge\gamma_k^kp_{ki}^{(m)}=p_{ki}^{(m)}>0,1=\gamma_k^k\ge\gamma_i^kp_{ik}^{(n)}\implies \gamma_i^k\le\frac{1}{p_{ik}^{(n)}}<\infty$$
    As desired.
\end{proof}
This theorem has a partial inverse.
\begin{theorem}\label{inv_measure_exp}
    Let $P$ be irreducible and $\lambda$ be an invariant measure with $\lambda_k=1$ for some $k$.
    Then $\lambda_i\ge\gamma_i^k$ for every $i$.\\
    If in addition $P$ is recurrent, then $\lambda=\gamma^k$.
\end{theorem}
\begin{proof}
    Since $\lambda$ is invariant, for $j\neq k$,
    \begin{align*}
        \lambda_j&=\sum_{i_1\in I}\lambda_{i_1}p_{i_1j}\\
        &=\sum_{i_1\neq k}\lambda_{i_1}p_{i_1j}+p_{kj}\\
        &=\sum_{i_1\neq k}\left( \sum_{i_2\neq k}\lambda_{i_2}p_{i_2i_1}+p_{ki_1} \right)p_{i_1j} +p_{kj}\\
        &=\cdots\\
        &=\sum_{i_1,\ldots,i_n\neq k}\lambda_{i_n}p_{i_ni_{n-1}}\cdots p_{i_1j}\\
        &\quad+\left( p_{kj}+\sum_{i_1\neq k}p_{ji_1}p_{i_1k}+\cdots\sum_{i_1,\ldots,i_{n-1}\neq k}p_{ki_{n-1}}\cdots p_{i_2i_1}p_{i_1j} \right)\\
        &\ge p_{kj}+\sum_{i_1\neq k}p_{ji_1}p_{i_1k}+\cdots\sum_{i_1,\ldots,i_{n-1}\neq k}p_{ki_{n-1}}\cdots p_{i_2i_1}p_{i_1j}\\
        &=\mathbb P_k[X_1=j,T_k\ge 1]+\mathbb P_k[X_2=j,T_k\ge 2]+\cdots+\mathbb P_k[X_n=j,T_k\ge n]\\
        &=\mathbb E_k\left[ \sum_{m=1}^{\min\{n,T_k\}}1_{X_m=j} \right]\\
        &=\mathbb E_k\left[ \sum_{m=0}^{\min\{n,T_k-1\}}1_{X_m=j} \right]\\
        &\to \gamma_j^k,n\to\infty
    \end{align*}
    which proves the first part of the theorem.
    Now define $\mu=\lambda-\gamma^k$ which is obviously also an invariant measure.
    As $P$ is irreducible, for any $i$, there is some $n$ such that $p_{ik}^{(n)}>0$, therefore
    $$0=\mu_k=\sum_{j=I}\mu_jp_{jk}^{(n)}\ge\mu_ip_{ik}^{(n)}\implies \mu_i=0$$
    Hence $\mu=0$ which shows the second part.
\end{proof}
\begin{example}
    1. The simple symmetric random walk on $\mathbb Z$ is clearly irreducible and recurrent.
    The measure $\pi_i=1$ for all $i\in\mathbb Z$ is invariant.
    By the theorem, every invariant measure are of the form $\pi_i=a$ for all $i\in\mathbb Z$ for some fixed $a$.
    Consequently, there is no invariant distribution on this Markov chain.\\
    2. (non-example) The simple symmetric random walk on $\mathbb Z^3$ has an invariant measure, but is not recurrent.
\end{example}
Note that a recurrent $i\in I$ does not necessarily have finite expected return time $m_i=\mathbb E_i[T_i]$.
\begin{definition}
    A recurrent state $i\in I$ is positive recurrent if $m_i<\infty$, and is null recurrent otherwise.
\end{definition}
\begin{theorem}
    Let $P$ be irreducible, then the following are equivalent:\\
    (a) Every state is positive recurrent.\\
    (b) Some state is positive recurrent.\\
    (c) $P$ admits an invariant distribution $\pi$.\\
    Moreover, when (c) holds, then $m_i=1/\pi_i$.
\end{theorem}
\begin{proof}
    (a) clearly implies (b).
    Assuming (b) and choose positive recurrent $i\in I$.
    Now $\gamma^i$ is an invariant measure and
    $$\sum_{j\in I}\gamma_j^i=m_i<\infty$$
    Therefore $\pi_j=\gamma_j^i/m_i$ defines an invariant distribution.\\
    Assuming (c), then $\forall k\in I$, $\pi_k=\sum_{i\in I}\pi_ip_{ik}^{(n)}>0$ for some $n$ as $P$ is irreducible.
    Fix any $k$ and set $\lambda_i=\pi_i/\pi_k$, then $\lambda$ is an invariant measure with $\lambda_k=1$, therefore $\lambda\ge\gamma^k$ by Theorem \ref{inv_measure_exp}.
    So
    $$m_k=\sum_{i\in I}\gamma_i^k\le\sum_{i\in I}\frac{\pi_i}{\pi_k}=\frac{1}{\pi_k}<\infty$$
    which means $k$ is positive recurrent.
    Also, this means that if (c) holds, then $P$ has to be recurrent and the inequality has to be equality, that is $m_k=1/\pi_k$.
\end{proof}
\begin{example}
    There exists Markov chains with more than one linearly independent invariant measures.
    Consider the general random walk on $\mathbb Z$ with $p_{i,i+1}=p,p_{i,i-1}=q=1-p$ where $p\notin \{0,1/2,1\}$.
    Then the constant and $\pi_i=(p/q)^i$ are both invariant measures but they are linearly independent.
\end{example}


\chapter{Integer Partitions}
\label{chap-partitions}

An (integer) partition $p = p(1) \cdots p(n)$ is a weakly decreasing sequence of positive integers, which are called the \emph{parts} of $p$. The \emph{size} of a partition, denoted $\size{p}$, is the sum of its parts. For convenience, we say that for $i > n$ the $i\th$ part of $p$ is $0$ and write $p(i) = 0$. We say that a partition $p = p(1) \cdots p(m)$ is contained in another partition $q = q(1) \cdots q(n)$ if $p(i) \le q(i)$ for all $i$. This partial order on partitions is simply the one of Young's lattice, namely containment of Ferrers diagrams. The \emph{Ferrers diagram} of a partition $p = p(1) \cdots p(m)$ is a visual representation of $p$ consisting of an arrangement of $p(1)$ cells in the first (topmost) row, $p(2)$ cells in the second row, and so on. An example of partition containment displayed through Ferrers diagrams is presented in Figure~\ref{fig-ptn-ferrers}.

\begin{figure}[ht]
\captionsetup{justification=centering}
	\begin{tikzpicture}[scale={1/3}]
		\ferrers{3,1}
		\node at (5.5,-1) {$\le$};

		\begin{scope}[shift={(6,1)}]
			\ferrers{4,2,1,1}
			\ferrersfilled{3,1}
		\end{scope}

		\begin{scope}[shift={(5.5,-4)}]
			\node at (-3,0) {$31$};
			\node at ( 0,0) {$\le$};
			\node at (3.5,0) {$4211$};
		\end{scope}
	\end{tikzpicture}
\caption{An example partition containment presented by way of Ferrers diagrams.}
\label{fig-ptn-ferrers}
\end{figure}

The \emph{conjugate} of a partition $p$ is the partition whose Ferrers diagram is the reflection of the Ferrers diagram of $p$ reflected along the anti-diagonal $y = -x$. An example of a partition and its conjugate is displayed in Figure~\ref{fig-ptn-conjugate}.
\begin{figure}[ht]
\captionsetup{justification=centering,margin=1in}
	\begin{tikzpicture}[scale={1/3}]
		\ferrers{6,3,3,2,1}
		\draw[dashed, gray] (1,0) -- ++(3.5,-3.5);

		\begin{scope}[shift={(9,0.5)}]
			\ferrers{5,4,3,1,1,1}
			\draw[dashed, gray] (1,0) -- ++(3.5,-3.5);
		\end{scope}
	\end{tikzpicture}
\caption{The Ferrers diagram of a partition and its conjugate, both displayed with the anti-diagonal.}
\label{fig-ptn-conjugate}
\end{figure}

Given a finite set of partitions $S$, the unique smallest partition that contains each partition in $S$ is the partition whose $i\th$ part is equal to the largest $i\th$ part among all members of $S$.
\begin{observation}
\label{obs-ptn-join}
	If $S$ is a finite set of partitions, then the smallest partition $p$ that is $S$-universal has $i\th$ part given by
	\[
		p(i)
		=
		\max\{q(i) \st q \in S\}.
	\]
\end{observation}
Thus, to construct the smallest $m$-universal partition for the set of all partitions, one must only observe that the largest $i\th$ part among all partitions of size $m$ is $\floor{m/i}$, meaning the unique smallest $m$-universal partition has $i\th$ part equal to $\floor{m/i}$ for all $i$.

\begin{theorem}
\label{thm-ptn-universal}
	The unique smallest $m$-universal partition has size
	\[
		\phi(m)
		=
		\floor{m/1} + \floor{m/2} + \cdots + \floor{m/m}
		\footnote{The sequence $\phi$ appears as sequence \OEISlink{A006218} in the OEIS~\cite{sloane:the-on-line-enc:}}.
	\]
\end{theorem}
Figure~\ref{fig-ptn-universal} displays the $24$-universal partition of size $\phi(24) = 84$. In~\cite{dirichlet:uber-die:}, Dirichlet shows that $\phi(m) = m(\log(m) + 2\gamma-1) + \Delta(m)$, where $\gamma \approx 0.5772$ is the Euler--Mascheroni constant and $\Delta(m) = \oO{\sqrt{m}}$, and thus $\phi(m) \sim m \log m$. The asymptotics of $\Delta(m)$ are the subject of the \emph{Dirichlet Divisor Problem}, which aims to find the smallest value $\theta$ so that $\Delta(m) = \oO{m^\theta}$. The best known bound is due to Huxley~\cite{huxley:exponential-sums-and:}, who showed that $\inf \theta \le 131/416 \approx 0.3149$.

\begin{figure}[ht]
\captionsetup{justification=centering}
	\begin{tikzpicture}[scale={24/120}]
		\ferrers{24,12,8,6,4,4,3,3,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1}
	\end{tikzpicture}
\caption{The unique $24$-universal partition of size $\phi(24) = 84$.}
\label{fig-ptn-universal}
\end{figure}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Proper Classes of Partitions}
\label{sec-ptn-classes}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

In this section, we show that any proper class of partitions admits universal partitions of linear size. For reference, some known or computed values of minimum sizes for universal partitions for various classes are presented in Appendix~\ref{appendix-partitions}.

We require one more definition to discuss proper classes of partitions. We say that an \emph{potentially infinite partition} $p$ is an infinite weakly decreasing sequence over the infinite ordered alphabet $\{0 < 1 < \cdots < \omega\}$, where $\omega$ represents an infinite part. If $p(n) = \ell > 0$ for each $n > N$, then we abbreviate $p$ as $p(1) \cdots p(N) \ell^\omega$, where $\ell^\omega$ representing an infinite number of parts equal to $\ell$. If $p(n) = 0$ for each $n > N$, then we abbreviate $p$ as $p(1) \cdots p(N)$. Infinite partitions give way to infinite Ferrers diagrams, and we say that the \emph{age} of a potentially infinite partition $p$, denoted $\Age(p)$, is the set of finite partitions whose Ferrers diagrams embed into the Ferrers diagram of $p$ (the term \emph{age} dates to Fra{\"i}ss{\'e}~\cite{fraisse:sur-lextension-:}). An example of containment of a finite Ferrers diagram into an infinite one, together with the corresponding set containment, is presented in Figure~\ref{fig-ptn-age}.

\begin{figure}[ht]
\captionsetup{justification=centering}
	\begin{tikzpicture}[scale={1/3}]
		\ferrers{4,2,1,1}

		\node at (6.5,-2) {$\le$};
		\begin{scope}[shift={(7.5,0.5)}]
			\foreach \d in {0.25, 0.50, 0.75} {
				\filldraw[black] ({6+\d},-0.5) circle [radius=0.05cm];
				\filldraw[black] ({6+\d},-1.5) circle [radius=0.05cm];
				\filldraw[black] (1.5,-{6+\d}) circle [radius=0.05cm];
				% \filldraw[black] (2.5,-{6+\d}) circle [radius=0.05cm];
			}
			\ferrers{5,5,4,1,1}
			\ferrersfilled{4,2,1,1}
		\end{scope}

		\begin{scope}[shift={(6.5,-6.5)}]
			\node at (-3.5,0) {$4211$};
			\node at ( 0  ,0) {$\in$};
			\node at ( 5  ,0) {$\Age(\omega \omega 4 1^\omega)$};
		\end{scope}
	\end{tikzpicture}
\caption{An example of containment of a finite Ferrers digram into an infinite one.}
\label{fig-ptn-age}
\end{figure}

We show that every proper class of partitions admits linear-size universal partitions in two parts. First, we show that every proper class of partitions is contained in an age of the form $\Age(\omega^k \ell^\omega)$ in Proposition~\ref{prop-ptn-age-containment}, and then that every such age admits linear-size universal partitions in Theorem~\ref{thm-ptn-universal-proper}.
\begin{proposition}
\label{prop-ptn-age-containment}
	For any proper partition class $\P$, there are nonnegative integers $k, \ell$ such that $\P \subseteq \Age(\omega^k \ell^\omega)$.
\end{proposition}
\begin{proof}
	Let $\ell$ be the largest integer such that $\P$ contains the partition $\ell^n$ for all $n$ and let $k$ be the largest integer such that $\P$ contains $(\ell+1)^k$. We claim that $\P \subseteq \Age(\omega^k \ell^\omega)$. For any partition $p \in \P$, we must have $p(n) \le \ell$ for each $n > k$, as otherwise $p$ contains $(\ell+1)^n$, and as $\P$ is closed downward, we would have $(\ell+1)^n \in \P$, a contradiction. The condition that $p(n) \le \ell$ for each $n > k$ is precisely the condition that defines containment in $\Age(\omega^k \ell^\omega)$, and thus $p \in \Age(\omega^k \ell^\omega)$, completing the proof.
\end{proof}

\begin{theorem}
\label{thm-ptn-universal-proper}
	Let $\P = \Age(\omega^k \ell^\omega)$ be a class of partitions. Then for $m \ge k\ell$, the smallest $\P_m$-universal partitions have size
	\[
		\u_{\P}(m)
		=
		\sum_{i=1}^{k} \floor{\frac{m}{i}} + \sum_{i=1}^{\ell} \floor{\frac{m}{i}} - k\ell
	\]
	and thus $\u_{\P}(m) = \oTheta{m}$.
\end{theorem}

Before proving Theorem~\ref{thm-ptn-universal-proper}, observe that if $P \subseteq Q$ are sets of partitions and $q$ is a $Q$-universal partition, then $q$ is $P$-universal as well, as $q$ necessarily contains each partition in $P$. Thus, by proving that each age of the form $\Age(\omega^k \ell^\omega)$ admits universal partitions of linear size, Proposition~\ref{prop-ptn-age-containment} implies that every proper partition class does as well.

\newenvironment{proof-of-thm-ptn-universal-proper}{%
	\medskip\noindent {\it Proof of Theorem~\ref{thm-ptn-universal-proper}.\/}%
}{%
	\qed\bigskip%
}
\begin{proof-of-thm-ptn-universal-proper}
	By Observation~\ref{obs-ptn-join}, the unique smallest $\P_m$-universal partition $P$ has its $i\th$ part equal to the largest $i\th$ part among all partitions in $\P_m$. The only restriction on partitions in $\P$ is that their $i\th$ part is at most $\ell$ for $i > k$, so we have
	\[
		P(i)
		=
		\begin{cases}
			\floor{\dfrac{m}{i}}                          & \text{if $1 \le i \le k$,} \\
			\min\left\{\floor{\dfrac{m}{i}}, \ell\right\} & \text{if $k  <  i \le m$.}
		\end{cases}
	\]
	As $\floor{\dfrac{m}{i}} \ge \ell$ if and only if $\floor{\dfrac{m}{\ell}} \ge i$, this may be simplified to
	\[
		P(i)
		=
		\begin{cases}
			\floor{\dfrac{m}{i}} & \text{if $1 \le i \le k$,} \\
			\ell                 & \text{if $k  <  i \le \floor{\dfrac{m}{\ell}}$,} \\
			\floor{\dfrac{m}{i}} & \text{if $\floor{\dfrac{m}{\ell}} < i \le m$.}
		\end{cases}
	\]
	Thus, for $m \ge k\ell$, the size of $P$ is
	\[
		\size{P}
		=
		\underbrace{\floor{\dfrac{m}{1}} + \floor{\dfrac{m}{2}} + \cdots + \floor{\dfrac{m}{k}} + \ell + \ell + \cdots + \ell}_{\text{$\floor{\dfrac{m}{\ell}}$ terms}} + \floor{\dfrac{m}{\floor{\tfrac{m}{\ell}}+1}} + \cdots + \floor{\dfrac{m}{m}}.
	\]

	The sum of the parts $P(k+1), \cdots, P(m)$ is equal to $\sum_{i = 1}^{\ell} \floor{\frac{m}{i}} - k\ell$, as these correspond to the first $\ell$ parts of the conjugate of $P$, which are $\floor{\dfrac{m}{i}}$ for $1 \le i \le \ell$, and we need to subtract those cells that overlap with the first $k$ parts of $P$. As $m \ge k\ell$, we have both $\floor{\frac{m}{k}} \ge \ell$ and $\floor{\frac{m}{\ell}} \ge k$, and thus
	\[
		\size{P}
		=
		\sum_{i=1}^{k} \floor{\frac{m}{i}} + \sum_{i=1}^{\ell} \floor{\frac{m}{i}} - k\ell.
	\]
	For all $n$ and $j$, the inequality
	\[
		\log(j+1)n-j
		\le
		\sum_{i = 1}^{j} \floor{\frac{n}{j}}
		\le
		\left(\log(j)+1\right)n,
	\]
	holds, and thus $\size{P} = \oTheta{m}$, as desired.
\end{proof-of-thm-ptn-universal-proper}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Concluding Remarks}
\label{sec-ptn-conclusion}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Observation~\ref{obs-ptn-join} establishes that the smallest $m$-universal partition is unique, and Theorem~\ref{thm-ptn-universal} establishes its precise size for all $m$. For any proper class of partitions $\P$, there are proper $m$-universal partitions for $\P$ for all $m$ if and only if $\P$ satisfies the joint-embedding property, which is equivalent to $\P$ being the age of some potentially infinite partition $u$, as the following result of Fra{\"i}ss{\'e} (which we have specialized to our context here) shows:
\begin{theorem}[Fra{\"i}ss{\'e}~\cite{fraisse:sur-lextension-:}; see also Hodges~{\cite[Section 7.1]{hodges:model-theory:}}]
	The following are equivalent for a class $\P$ of integer partitions or compositions:
	\begin{enumerate}
		\item $\P$ cannot be expressed as the union of two proper subclasses,
		\item $\P$ satisfies the \emph{joint embedding property}, meaning that for every $a, b \in \P$ there is some $c \in \P$ such that $a, b \le c$, and
		\item $\P = \Age(u)$ for some word $u \in (\mathbb{P} \cup \{n^\omega \st n \in \mathbb{P}\} \cup \{\omega, \omega^\omega\})^\ast$.
	\end{enumerate}
\end{theorem}


\section{Algorithms}

\subsection{Bounding conditions}

{\color{blue}{

\begin{enumerate}
	\item Reward for both quality and quantity, and both should be necessary
	\item Reward for writing reviewers, judged on quality
\end{enumerate}

\subsection{Staking aspects}

\begin{verbatim}
S(n) ... stake of user n
V(n) ... "how well" they voted
N=sum over n such that n voted right (that will be rewards) ... all users
M ... total reward
x ... fraction of non-stakedependent rewards
R(n) = (x * M) * f(v) + ((1-x) * M) g(n,S(n))
	where f(v) says how good they voted, sum over f(v) is 1
	and where g(n,s) depends on the stake  where n-sum over g(n,s) is 1
\end{verbatim}

}}%% end color

\subsection{Examples}
{\color{red}{
TODO: explain the below in detail and put it in context\\
TODO: make it prettier
}}

\begin{lstlisting}[language=Python]

import operator
import math

VARIANCE_HALF = 0.01

## utility functions
def to_rating_dict(L):
    return {key: float(len(L)-i)/len(L) for i, key in enumerate(L)}

def is_in_interval(x, a, b):
    return a<x and x<=b

def mean(L):
    return sum(L) / float(len(L))

def variance(L):
    L2 = map(lambda x: x*x, L)
    return mean(L2)

def model(v):
    return 1 / (1 + v / VARIANCE_HALF)

## example ranking data (of fruits)
FRUITS = {'apple', 'peach', 'banana', 'cherry', 'orange', 'pear', 'kiwi'}
GRADES = ['A+', 'A', 'B+', 'B', 'C+', 'C', 'D+', 'D', 'E+', 'E', 'F']
USERS = {'Alice', 'Bob', 'Carl'}

rankings = {
    'Alice':
    {
        'B+': ['cherry', 'orange'],
        'D': ['banana', 'apple', 'kiwi']
    },

    'Bob':
    {
        'B+': ['orange'],
        'D+': ['kiwi', 'pear'],
        'D': ['apple', 'banana']
    },

    'Carl': {
        'A+': ['pear', 'apple'],
        'A': ['cherry'],
        'C+': ['peach'],
        'C': ['orange', 'kiwi'],
        'F': ['banana']
    }
}

## collect data
grade_bases = to_rating_dict(GRADES)

fruit_user_ratings = {fruit: {} for fruit in FRUITS}
user_fruit_ratings = {user : {} for user  in USERS }

for user in USERS:
    print('\nuser: {} '.format(user) + 40*'-')
    user_ranking = rankings[user]
    for grade in GRADES:
        if grade in user_ranking.keys():
            gb = grade_bases[grade]
            l = user_ranking[grade]
            r = to_rating_dict(l)
            for fruit, step_rating in r.items():
                fr = gb-(1-step_rating)/len(GRADES)
                fruit_user_ratings[fruit][user] = fr
                user_fruit_ratings[user][fruit] = fr

## compute bracketed means
fruit_user_ratings_means = {fruit: mean(rating_dict.values()) for fruit, rating_dict in fruit_user_ratings.items()}
fruit_user_ratings_means_sorted = sorted(fruit_user_ratings_means.items(), key=operator.itemgetter(1))

## voting "game"
diff_abs = {u: {} for u in USERS}

for user in USERS:
    for fruit in FRUITS:
        if fruit in user_fruit_ratings[user].keys():
            diff_abs[user][fruit] = abs(fruit_user_ratings_means[fruit]-user_fruit_ratings[user][fruit])

user_absch = {u: model(variance(udiffs.values())) for u, udiffs in diff_abs.items()}
user_absch_normed = {u: v / sum(user_absch.values()) for u, v in user_absch.items()}

print(user_absch_normed)

### compute coarse ratings for fruits
for f, r in fruit_user_ratings_means.items():
    for i in range(len(GRADES)):
        i_grade = GRADES[i]
        b = grade_bases[i_grade]
        a = grade_bases[GRADES[i+1]] if i<len(GRADES)-1 else 0
        if is_in_interval(r, a, b):
            print('{} is ranked {}'.format(f, grade_i))

\end{lstlisting}

\subsection{Implementation considerations in the age of dApps}

{\color{blue}{

\subsubsection{On-chain requirements}
\begin{enumerate}
	\item User accounts with a tine by of on-chain data relating to past actions and current users rankings
	\item Readout of users ranking, computation of some numbers
	\item The result must definitely be on-chain, and if the write-back to the user accounts is doable that would be great as well
	\item TODO: Storage requirements/considerations for the rating system implementation
\end{enumerate}

\subsection{Reward for storage discussions/algorithms}

}}%% end color


\section{Task A}
\label{sec:task-a}

According to equation \eqref{eq:free-energy} in \cite{Bonet2008}, the free energy
for compressible Neo-Hookean material is defined as follows:
\begin{equation} \tag{6.27}
  \label{eq:free-energy}
  \Psi = \frac{\mu}{2} \left( I_{C_{e}} - 3 \right) - \mu \ln J_{e} +
  \frac{\lambda}{2} \left( \ln J_{e} \right)^{2}
\end{equation}
with \(I_{C_{e}} = \utilde{I} : \utilde{C}_{e} \) and the elastic Lame constants
\(\mu = G = 0.5 E / (1+\nu)\), \(\lambda = E \nu / (1 - 2\nu) / (1+\nu)\).

Yield function of von Mises type:
\begin{equation}
  \label{eq:yield_func}
  \phi = \sqrt{\frac{3}{2}} \left| \utilde{\overline{M}}_{dev} \right|-
    \left( \tau_{y} - H \overline{\varepsilon}_{p} \right)
\end{equation}
with \(\overline{\varepsilon}_{p} = \int_{0}^{t} \dot{\gamma} \, dt\).

Mandel stress is defined as
\begin{equation}
  \label{eq:mandel}
  \utilde{\overline{M}} = \utilde{C}_{e} \cdot \widetilde{\utilde{S}}
\end{equation}
with intermediate 2nd Piola-Kirchhoff stress defined as a pull-back of the
Kirchhoff stress to the intermediate configuration as follows:
\begin{equation}
  \label{eq:PK2int}
  \widetilde{\utilde{S}} = \utilde{F}_{e}^{-1} \cdot \utilde{\tau} \cdot
  \utilde{F}_{e}^{-T} = 2 \frac{\partial \Psi}{\partial \utilde{C}_{e}}
\end{equation}
and intermediate elastic deformation tensor
\begin{equation}
  \label{eq:Cint}
  \utilde{C}_{e} = \utilde{F}_{p}^{-T} \cdot \utilde{C} \cdot \utilde{F}_{p}^{-1}
\end{equation}
and plastic part of the deformation gradient
\begin{equation}
  \label{eq:F}
  \utilde{F} = \utilde{F}_{e} \cdot \utilde{F}_{p}
\end{equation}

Let us derive expression for \(\widetilde{\utilde{S}}\):
\begin{equation}
  \label{eq:PK2intDeriv}
  \widetilde{\utilde{S}} = 2 \frac{\partial \Psi}{\partial \utilde{C}_{e}} =
  2 \frac{\partial \Psi}{\partial I_{C_{e}}} \cdot
  \frac{\partial I_{C_{e}}}{\partial \utilde{C}_{e}} +
  2 \frac{\partial \Psi}{\partial J_{e}} \cdot
  \frac{\partial J_{e}}{\partial \utilde{C}_{e}}
\end{equation}
\begin{align}
  \frac{\partial \Psi}{\partial I_{C_{e}}} &= \frac{\mu}{2} \\
  \frac{\partial I_{C_{e}}}{\partial \utilde{C}_{e}} &= \utilde{I} \\
  \frac{\partial \Psi}{\partial J_{e}} &= - \frac{\mu}{J_{e}} +
                                         \frac{\lambda}{J_{e}} \ln J_{e} \\
  \frac{\partial J_{e}}{\partial \utilde{C}_{e}} &= \frac{J_{e}}{2} \utilde{C}_{e}^{-1}
\end{align}
Therefore,
\begin{equation}
  \label{eq:PK2intFinal}
  \widetilde{\utilde{S}} = \mu \utilde{I} + \left( \lambda \ln J_{e} -
    \mu \right) \utilde{C}_{e}^{-1}
\end{equation}
At this point we can assess the yield function.
The Kuhn-Tucker conditions are
\begin{equation}
  \label{eq:kuhn-tucker}
  \phi \leq 0, \quad \dot{\gamma} \geq 0, \quad \dot{\gamma} \phi = 0
\end{equation}
The evolution equation is of associative type:
\begin{equation}
  \label{eq:evolution}
  \overline{\utilde{L}}_{p} = \dot{\gamma}
  \frac{\partial \phi}{\partial \overline{\utilde{M}}} =
  \dot{\gamma} \sqrt{\frac{3}{2}}
  \frac{\overline{\utilde{M}}_{dev}}{\left| \overline{\utilde{M}}_{dev} \right|} =
  \dot{\gamma} \utilde{\nu}
\end{equation}
Apply backward Euler integration:
\begin{align}
  \frac{\prescript{n+1}{}{\utilde{F}_{p} -\prescript{n}{}{\utilde{F}_{p}}}}{\Delta t}
  \prescript{n+1}{}{\utilde{F}}_{p}^{-1} &= \frac{\Delta \gamma}{\Delta t}
                                           \prescript{n+1}{}{\utilde{\nu}} \\
  \utilde{I} - \prescript{n}{}{\utilde{F}}_{p} \cdot
  \prescript{n+1}{}{\utilde{F}}_{p}^{-1} &\approx
  \Delta \gamma \prescript{n+1}{}{\utilde{\nu}}
\end{align}
Apply semi-explicit simplification
\(\prescript{n+1}{}{\utilde{\nu}} \approx \prescript{n}{}{\utilde{\nu}}\):
\begin{align}
  \utilde{I} - \prescript{n}{}{\utilde{F}}_{p} \cdot
  \prescript{n+1}{}{\utilde{F}}_{p}^{-1} &\approx
  \Delta \gamma \prescript{n}{}{\utilde{\nu}} \\
  \prescript{n+1}{}{\utilde{F}}_{p}^{-1} &\approx
  \prescript{n}{}{\utilde{F}}_{p}^{-1} \left( \utilde{I} -
  \Delta \gamma \prescript{n}{}{\utilde{\nu}} \right)
\end{align}
Solve the simplified local constitutive problem:
\begin{equation}
  \label{eq:local}
  \phi \left( \Delta \gamma \right) = \sqrt{\frac{3}{2}}
  \left| \overline{\utilde{M}}_{dev} \right| - \left[ \tau_{y} -
    H \left( \prescript{n}{}{\overline{\varepsilon}_{p}} + \Delta \gamma\right) \right]
\end{equation}
with
\begin{equation}
  \label{eq:Mexplicit}
  \overline{\utilde{M}} = \utilde{C}_{e} \cdot \widetilde{\utilde{S}} =
  \utilde{C}_{e} \left( \utilde{F}_{p}^{-1} \left( \Delta \gamma \right),
    \utilde{C} \right) \cdot
  \widetilde{\utilde{S}} \left( \utilde{C}_{e}
    \left( \utilde{F}_{p}^{-1} \left( \Delta \gamma \right), \utilde{C} \right)
  \right)
\end{equation}
using Newton--Raphson method:
\begin{align}
  \phi \left( \Delta \gamma_{n+1} \right) &\approx
                                            \phi \left( \Delta \gamma_{n} \right) +
                                            \frac{d \, \phi \left(
                                            \Delta \gamma_{n} \right)}{d \,
                                            \Delta \gamma} \blacktriangle \gamma
                                            = 0 \\
  \blacktriangle \gamma &= - \left[ \frac{d \, \phi \left(
                          \Delta \gamma_{n} \right)}{d \, \Delta \gamma}
                          \right]^{-1} \cdot \phi \left( \Delta \gamma_{n} \right)\\
  \Delta \gamma_{n+1} &= \Delta \gamma_{n} + \blacktriangle \gamma
\end{align}
where the derivative of the yield function can be expanded to
\begin{equation}
  \label{eq:yield-deriv}
  \frac{d \phi}{d \gamma} = \frac{\partial \phi}{\partial \overline{\utilde{M}}} :
  \frac{\partial \overline{\utilde{M}}}{\partial \utilde{C}_{e}} :
  \frac{\partial \utilde{C}_{e}}{\partial \utilde{F}_{p}^{-1}} :
  \frac{d \utilde{F}_{p}^{-1}}{d \Delta \gamma} +
  \frac{\partial \phi}{\partial \Delta \gamma}
\end{equation}
with \(\dfrac{\partial \phi}{\partial \Delta \gamma} = - H\) and the rest of
the derivatives given by equations (34)--(37) of \cite{Ekh2016}, in which
\begin{equation}
  \label{eq:dSdCe}
  \frac{\partial \widetilde{\utilde{S}}}{\partial \utilde{C}_{e}} =
  \frac{\lambda}{2} \utilde{C}_{e}^{-1} \otimes \utilde{C}_{e}^{-1} +
  \left( \mu - \lambda \ln J_{e} \right) \utilde{C}_{e}^{-1} \overline{\otimes}
  \utilde{C}_{e}^{-1}
\end{equation}
Finally, compute the 2nd Piola-Kirchhoff stress
\begin{equation}
  \label{eq:PK2final}
  \utilde{S} = \utilde{F}_{p}^{-1} \cdot \widetilde{\utilde{S}} \cdot
  \utilde{F}_{p}^{-T}
\end{equation}
and the material stiffness
\begin{equation}
  \label{eq:mat-stiff}
  \uutilde{C} = 2 \frac{d \utilde{S}}{d \utilde{C}}
\end{equation}
\textit{Note: if computed numerically, \(\uutilde{C}\) must be symmetrised to get
correct element stiffness.}

The material model was implemented in Matlab and can be found in
\texttt{neo\_hooke\_plast.m} (see section \ref{app:matlab-code}).

Figure~\ref{fig:sigma12-eps12} shows the test of the constitutive driver,
where component of Cauchy stress plotted against
engineering strain for the situation of uniaxial strain control
\(\utilde{F} = F_{12} \ubar{\bm{e}}_{1} \otimes \ubar{\bm{E}}_{2}\).
\begin{figure}[th]
  \centering
  \begin{tikzpicture}
    \begin{axis}[
      width = 0.95\textwidth,
      height=\axisdefaultheight,
      tick label style={/pgf/number format/fixed},
      try min ticks=6,
      minor tick num=1,
      grid=both,
      xmin=0, xmax=0.2,
      xlabel = {\( \varepsilon_{12}\), [-]},
      ylabel = {\( \sigma_{12} \), [MPa]},
      ]
      \addplot table[skip first n=1] {data/sigma12_eps12.dat};
    \end{axis}
  \end{tikzpicture}
  \caption{Cauchy stress component \(\sigma_{12}\) versus strain
    \(\varepsilon_{12} = F_{12} \).}
  \label{fig:sigma12-eps12}
\end{figure}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "../main"
%%% End:


%!TEX root = ../Tibt.tex

\exercise{4.2}

\subsection*{(a)}

The linear discriminant functions are:

\begin{eqnarray*}
    \hat{\delta}_k(x) & = & x^T \hat{\Sigma}^{-1} \hat{\mu}_k - \frac{1}{2}\, \hat{\mu}_k ^T \hat{\Sigma}^{-1}  \hat{\mu}_k + \log\, \hat{\pi}_k \\
    \hat{\pi}_k & = & N_k / N
\end{eqnarray*}
So (a) follows directly from $\hat{\delta}_2(x) > \hat{\delta}_1(x)$.

\subsection*{(b), (c), (d)}
Let's denote $\mathbf{e}_{(1)}$ and $\mathbf{e}_{(2)}$ the one-hot variables associated
to the labels $g$. The coefficients $\hat{\beta}$ of the OLS regression with the bias
term included can be obtained by regressing $\mathbf{y}$ against the demeaned
version of the original predictors:
\begin{eqnarray*}
    \hat{\beta} & = & \left(\mathbf{X}_{dm}^T \mathbf{X}_{dm}\right)^{-1} \,
    \mathbf{X}_{dm}^T \mathbf{y} \\
    \mathbf{X}_{dm} & \equiv &  \mathbf{X} - \mathbf{e} \, \hat{\mu}^T \\
    & = & \mathbf{X} - (\mathbf{e}_{(1)} + \mathbf{e}_{(2)}) \, \hat{\mu}^T \\
    \hat{\mu} & \equiv & \frac{1}{N} \mathbf{X}^T \mathbf{e}
\end{eqnarray*}
Notice that $\hat{\mu}$ is the vector of predictor means, regardless of the class.
On the other hand, the LDA covariance matrix is obtained as:
\begin{eqnarray*}
    \hat{\Sigma} & = & \frac{1}{N - 2} \mathbf{X}_{r}^T \mathbf{X}_r
\end{eqnarray*}
where $\mathbf{X}_{r}$ are the values of predictors centered around the class
averages:
\begin{eqnarray*}
    \mathbf{X}_{r} & = &  \mathbf{X} - \mathbf{e}_{(1)}\,\hat{\mu}_1^T - \mathbf{e}_{(2)}\,\hat{\mu}_2^T \\
    \hat{\mu}_1 & \equiv & \frac{1}{N_1} \mathbf{X}^T \mathbf{e}_{(1)}\\
    \hat{\mu}_2 & \equiv & \frac{1}{N_2} \mathbf{X}^T \mathbf{e}_{(2)}
\end{eqnarray*}
We have therefore:
\begin{equation*}
\mathbf{X}_{dm} = \mathbf{X}_r + \mathbf{e}_{(1)} \left(\hat{\mu}_1 - \hat{\mu}\right)^T
 + \mathbf{e}_{(2)} \left(\hat{\mu}_2 - \hat{\mu}\right)^T
\end{equation*}
By construction, the residuals $\mathbf{X}_r$ are orthogonal to $\mathbf{e}_{(1)}$,
$\mathbf{e}_{(2)}$:
\begin{equation*}
\mathbf{X}_r^T \,\mathbf{e}_{(1)} = \mathbf{X}_r^T \,\mathbf{e}_{(2)} = 0
\end{equation*}
Also:
\begin{eqnarray*}
    \mathbf{e}_{(k)}^T\, \mathbf{e}_{(k)} & = & N_k \\
    \mathbf{e}_{(1)}^T \mathbf{e}_{(2)} & = & 0 \\
    \hat{\mu} & = & \frac{N_1}{N} \hat{\mu}_1 + \frac{N_2}{N} \hat{\mu}_2
\end{eqnarray*}
Hence:
\begin{eqnarray*}
    \mathbf{X}_{dm}^T \mathbf{X}_{dm} & = & \mathbf{X}_r^T \mathbf{X}_r +
    N_1\,(\hat{\mu}_1 - \hat{\mu}) (\hat{\mu}_1 - \hat{\mu})^T + N_2\,(\hat{\mu}_2 - \hat{\mu}) (\hat{\mu}_2 - \hat{\mu})^T  \\
    & = & (N - 2)\, \hat{\Sigma} + N_1 \, \left(\frac{N_2}{N} \hat{\mu}_1 - \frac{N_2}{N} \hat{\mu}_2\right) \left(\ldots\right) + N_2 \, \left(\frac{N_1}{N} \hat{\mu}_2 - \frac{N_1}{N} \hat{\mu}_1\right) \left(\ldots\right) \\
    & = & (N - 2)\, \hat{\Sigma} + \frac{N_1\,N_2}{N^2} (N_1 + N_2)
        \left(\hat{\mu}_1 - \hat{\mu}_2\right)\left(\hat{\mu}_1 - \hat{\mu}_2\right)^T \\
    & = & (N - 2)\, \hat{\Sigma} + \frac{N_1\,N_2}{N}
    \left(\hat{\mu}_2 - \hat{\mu}_1\right)\left(\hat{\mu}_2 - \hat{\mu}_1\right)^T
\end{eqnarray*}
Consider the general target encoding:
\begin{equation*}
\mathbf{y} = y_1\, \mathbf{e}_{(1)} + y_2\, \mathbf{e}_{(2)}
\end{equation*}
We have:
\begin{eqnarray*}
\mathbf{X}_{dm}^T \mathbf{y} & = & N_1\, y_1\, (\hat{\mu}_1 - \hat{\mu}) + N_2\, y_2\, (\hat{\mu}_2 - \hat{\mu}) \\
& = & \frac{N_1}{N}\, y_1\, (N\,\hat{\mu}_1 - N_1 \hat{\mu}_1  - N_2 \hat{\mu}_2) + \frac{N_2}{N}\, y_2\, (N\,\hat{\mu}_2 - N_1 \hat{\mu}_1  - N_2 \hat{\mu}_2) \\
& = & \frac{N_1 \, N_2}{N} \left(y_2 - y_1\right) \left(\hat{\mu}_2 - \hat{\mu}_1\right)
\end{eqnarray*}
Therefore:
\begin{eqnarray*}
    \hat{\beta} & = & \left((N - 2)\, \hat{\Sigma} + \frac{N_1\,N_2}{N}
    \left(\hat{\mu}_1 - \hat{\mu}_2\right)\left(\hat{\mu}_1 - \hat{\mu}_2\right)^T\right)^{-1} \frac{N_1 \, N_2}{N} \left(y_2 - y_1\right) \left(\hat{\mu}_2 - \hat{\mu}_1\right) \\
    & = &  \left((N - 2)\, \hat{\Sigma} + \frac{N_1\,N_2}{N}
    \hat{\Sigma}_B\right) ^{-1} \frac{N_1 \, N_2}{N} \left(y_2 - y_1\right) \left(\hat{\mu}_2 - \hat{\mu}_1\right)     \\
    \hat{\Sigma}_B & \equiv &  \left(\hat{\mu}_1 - \hat{\mu}_2\right)\left(\hat{\mu}_1 - \hat{\mu}_2\right)^T
\end{eqnarray*}
This proves (d) and, in particular, substituting $y_1 = - N / N_1$, $y_2 = N/N_2$
yields the equation in the text. (c) is a direct consequence of this result.

\subsection*{(e)}

After predictor demeaning:
\begin{equation*}
\hat{f} = \hat{\beta}_0 + \hat{\beta}^T x_{dm}
\end{equation*}
the OLS value $\hat{\beta}_0$ is the sample average of the response, which
is zero with the encoding indicated in the text. Therefore:
\begin{eqnarray*}
\hat{f} & = & \hat{\beta}^T \hat{\Sigma}^{-1}\left(x - \hat{\mu}\right) \\
   & \propto & \left(\hat{\mu}_2 - \hat{\mu}_1\right)^T \hat{\Sigma}^{-1}\left(x - \frac{N_1}{N} \hat{\mu}_1 - \frac{N_2}{N} \hat{\mu}_2\right) \\
   & = & x^T \hat{\Sigma}^{-1} \left(\hat{\mu}_2 - \hat{\mu}_1 \right) -
     \frac{N_2}{N} \hat{\mu}_2^T \hat{\Sigma}^{-1} \hat{\mu}_2 +
     \frac{N_1}{N} \hat{\mu}_1^T \hat{\Sigma}^{-1} \hat{\mu}_1 +
     \frac{N_2 - N_1}{N} \hat{\mu}_1 ^T \hat{\Sigma}^{-1} \hat{\mu}_2
\end{eqnarray*}
This expression coincides with the one for LDA only when $N_1 = N_2$.