TITLE: If Garry takes 3 pieces at random from the bag with the white chess pieces, what is the probability that he draws 2 pawns and a knight (in any order)?
QUESTION [1 upvotes]: I stumbled upon this problem:
Garry keeps his white and black chess pieces in separate bags. For each color, there  are 8 pawns, 2 rooks, 2 bishops, 2 knights, 1 queen, and 1 king. If Garry takes 3  pieces at random from the bag with the white pieces, what is the probability that he  draws 2 pawns and a knight (in any order)?
I got 1/10.  Can anyone tell me if I'm right?
So, I just did pawn pawn knight, which is 8/16 x 7/15 x 2/14 = 1/30.  There are 3 unique combinations, so I multiplied by 3 and got 1/10.
Much appreciation <3

REPLY [1 votes]: Yes.  Initially there are 16 pieces in the bag, 8 of which are pawns.  The probability the first piece drawn is a pawn is 8/16= 1/2.  There are then 15 pieces in the bag, 7 of which are pawns.  The probability the second piece drawn is a pawn is 7/15. There are then 14 pieces iplpn the bag, 2 of which are knights.  The probability the third piece drawn is a knight is 2/14= 1/7.  The probability the three pieces drawn are "pawn, pawn, knight", in that order, is (1/2)(7/15)(1/7)= 1/30.
It is easy to see that "two pawns and one knight" in any order, "pawn, pawn, knight", "pawn, knight, pawn", or "knight, pawn, pawn", are exactly the same: the   same fractions are multiplied in different orders.  So the probability of "pawn, pawn, knight", in any order, is 3(1/30)= 1/10.
That's what you did, right?


TITLE: Every space is "almost" Baire?
QUESTION [6 upvotes]: There is this theorem called the Banach category theorem which states that in every topological space any union of open sets of first category is of first category.
Now doesn't this imply that every topological space X (let's say which is not of first category) is the union of a set of first category (the union of all open sets of first category of X) and a subspace which is Baire (the union of all open sets of second category)?
Doesn't this mean that every space is "almost" Baire if we understand sets of first category as negligible?
A side question: Is there an easy example of a Baire space which is not a completely metrizable space?

REPLY [2 votes]: I thought a more complete treatment of these beautiful and perhaps surprising results (Thms. 2 and 3) might be welcome.
I have not provided proofs of Prop. 1 - 3, as they are standard exercises. (I will be glad to supply proofs upon request.)
First, some definitions:
Suppose $X$ is a topological space and $E \subset X$.
$E^c := $the complement of $E$.
int$(E) := \overline {E^c}^c$.
bd$(E) := \overline E \cap \overline {E^c}$.
$E$ is dense if $\overline E = X$.
$E$ is nowhere dense (nwd) if int($\overline E$) is empty.
$E$ is meager (aka 'first category') if it is a countable union of nwd sets.
$X$ is Baire provided that if $\{O_i\}$ is any collection of dense open subsets of $X$, then $\cap O_i$ is dense.
Prop. 1. If $E$ is open or closed, then bd($E$) is nwd.
Prop. 2. The following are equivalent:
(a) $E$ is nwd.
(b) If $O$ is open and non-empty, there exists an open non-empty set $P \subset O$ disjoint from $E$.
(c) If $O$ is open and $O \cap E$ is non-empty, there exists an open non-empty set $P \subset O$ disjoint from $E$.
Prop. 3. Suppose $A \subset B \subset X$.
(a) If $B$ is meager in $X$, then $A$ is meager in $X$.
(b) If $A$ is meager in $B$, then $A$ is meager in $X$.
Prop. 4. The following are equivalent:
(a) $X$ is Baire.
(b) If $O$ is open and non-empty, then $O$ is not meager.
Proof: This is a standard result.
For a fairly sketchy proof,
see this article. $\Box$
Prop. 5. Any open subset of a Baire space is Baire in the induced topology.
Proof: Suppose $X$ is Baire, $O$ is open in $X, P$ is open in $O$, and $P$ is non-empty.
Then $P$ is open in $X$, so by Prop. 4(b), $P$ is not meager in $X$.
Therefore by Prop. 3(b), $P$ is not meager in $O$. Again by Prop. 4(b), $O$ is Baire. $\Box$
Thm. 1 (Banach Category Theorem). The union of any family of open meager subsets of $X$ is meager.
Proof: (I follow Oxtoby here, with some minor modifications and more details.)
Let $M_0$ be such a family. $M := \cup M_0.$
Suppose $G_0 = \{U_\alpha \ | \ \alpha \in A\}$ is a maximal family of disjoint open non-empty sets
with the property that each is contained in some member of $M_0. \ G := \cup G_0.$
We claim that $H := M \cap G^c$ is nwd. Otherwise, there exists $O$ open and non-empty
with $O \subset \overline H \subset \overline M \cap G^c.
\ P := O \cap M \subset G^c$, so $P$ is open and disjoint from all members of $G_0$.
Since $\emptyset \neq O \subset \overline M, P$ is a non-empty subset of $M$.
Therefore, there exists $S \in M_0$ with $T := P \cap S \neq \emptyset$.
Then $T \cup G_0$ has the required properties and is a larger family than $G_0$ (#), establishing our claim.
For any $U_\alpha \in G_0$, we note that $U_\alpha$, being a subset of some set in $M_0$ is meager by Prop. 3(a).
Suppose $U_\alpha = \cup N_{\alpha i}$ is a countable union of nwd sets. $N_i := \cup_ {\alpha \in A} N_{\alpha i}.$
We claim that $N_i$ is nwd. Suppose $O$ is open and $O \cap N_i \neq \emptyset$.
Then there exists $\alpha$ such that $O \cap N_{\alpha i} \neq \emptyset. \ P := O \cap U_\alpha \ $.
Since $U_\alpha$ is open, so is $P$. Observe that $O \cap N_{\alpha i} \subset O \cap U_\alpha = P$, whence $P \neq \emptyset$.
Since $N_{\alpha i}$ is nwd., by Prop. 2(b),
there exists $Q$ open with $\emptyset \neq Q \subset P$ and $Q \cap N_{\alpha i} = \emptyset$.
Since $Q \subset P \subset U_a$ and the $U_a$'s are disjoint, $Q \cap U_\beta = \emptyset$ for $\beta \neq \alpha$,
whence $Q \cap N_{\beta i} = \emptyset \ $.
It follows that $Q \cap N_i = \emptyset \ $.
Clearly $Q \subset P \subset O$, so Prop. 2(c) is satisfied by $O, Q,$ and $N_i$, establishing our claim.
Since $G = \cup G_0 = \cup N_i$, it is meager. Now $G \subset M$, so $M = (M \cap G^c) \cup G$.
Thus $M$, being the union of a nwd subset and a meager one, is also meager. $\Box$
Thm. 2. $X$ contains an open meager subset whose complement is Baire in the induced topology.
Proof: Let $M_0$ consist of all open meager subsets of X. $\ M := \cup M_0.$
By Thm. 1, $M$ is meager. We will show that $B := M^c$ is Baire in the topology induced on $B$ by $X$.
By Prop. 4(b), to prove this it suffices to show that if $O$ is open and non-empty in $B$, then $O$ is not meager in $B$.
Suppose such an $O$ is meager in $B$. By Prop. 3(b), $O$ is meager in $X$.
Now $O = P \cap B$, where $P$ is open in $X. \ P \cap M$, being a subset of $M$, is meager in $X$ by Prop. 3(a).
Therefore, $P = (P \cap B) \cup (P \cap M) = O \cup (P \cap M)$ is open and meager in X, whence $P \in M_0$.
It follows that $P \subset M$, whence $O \subset M$. Since $O \subset B$, we must have $O = \emptyset$ (#). $\Box$
Thm. 3. $X$ contains a closed meager subset whose complement is Baire in the induced topology.
Proof: Let $M$ and $B$ be as in the proof of Thm. 2. $F := \overline M = M \cup \textrm {bd}(M).
\ M$ is open and meager, and by Prop. 1, bd($M$) is nwd. Therefore, $F$ is meager.
$O := F^c \subset M^c = B. \ O$ is open in $X$, therefore in $B$.
In the proof of Thm. 2 we showed that $B$ is Baire. By Prop. 5, $O$ is Baire. $\Box$


TITLE: Proof of Binomial Coefficients Comparison Inequality
QUESTION [0 upvotes]: Please help to prove the inequality
$$ \binom{a}{b}\leq\binom{a+j}{b+i}$$
For
$i\leq j$
Using the basic identity $\binom{n}{k}=\frac{n!}{k!(n-k)!}$ I have proceeded to
$$
1 \leq \frac{(a+j)\cdots(a+1)}{((b+i)\cdots(b+1)) \cdot ((a-b+j-i)\cdots(a-b+1)) }
 $$
Here I am stuck...

REPLY [1 votes]: First, let $i = j$
$$\binom {a}{b} \leq \binom {a+i}{b+i}$$
$$\frac{a!}{b!(a-b)!} \leq \frac{(a+1)!}{(b+1)!((a-b)!} $$
$$\frac{a!}{b!} \leq \frac{(a+1)!}{(b+1)!} $$
This holds true.
Now, since $i \leq j$ it is sufficient to prove
$$\binom {a+i}{b+i} \leq \binom {a+i+1}{b+i}$$
$$\frac{(a+i)!}{(b+i)!(a-b)!}  \leq \frac{(a+i+1)!}{(b+i)!(a-b +1)!} $$
$$\frac{(a+i)!}{(b+i)!(a-b)!}  \leq \frac{(a+i+1)(a+i)!}{(b+i)!(a-b+1)(a-b)!} $$
$$1  \leq \frac{(a+i+1)}{(a-b+1)} $$
$$a-b+1 \leq a+i+1 $$
$$-b \leq i $$
which also holds true since $b, i \geq 0$ by defintion.
We can now conclude
$$\binom {a}{b} \leq \binom {a+i}{b+i}  \leq \binom {a+i+1}{b+i} \leq \dots \leq \binom {a+i+n}{b+i}$$
for every $n \in \mathbb{N}$


TITLE: How to transform a Laplacian operator from (x,y) coordinate system to polar system?
QUESTION [8 upvotes]: for any functions in $C_2^2$, we have a $-D^2$ operator $-D^2u=-(u_{xx}+u_{yy})$
However now i need to transform this operator from $(x,y)$ to $(r,\theta)$ for some sphere boundary condition, how am I suppose to do? As we know that $x=r\cos\theta,y=r\sin\theta$.
the form should be something near $-(u_{\theta\theta}+u_{rr})$

REPLY [8 votes]: here is another calculation: $\Delta f=*d*df$.
$df=\partial_r f\, dr + \partial_\theta f\,d\theta$. We have  $*dr=r\,d\theta$ and  $*d\theta=-dr/r$, so $*df=(\partial_r f)\, r\,d\theta - (\partial_\theta f)\,dr/r$, hence $d*df=\partial_r(r(\partial_r f))\,dr\wedge d\theta + (\partial_\theta(\partial_\theta f)/r)\,dr\wedge d\theta$, and finally $*d*df=\partial_r(r(\partial_r f))/r + \partial_\theta(\partial_\theta f)/r^2$.
edit:(on request) I think I won't explain what a differential form is. $*$ denotes the Hodge operator, which is here simply the rotation by $90$ degrees (for $1$-forms) and which maps the area form ($dx\wedge dy = r dr\wedge d\theta$) to $1$. This is probably familiar to anybody who knows what a differential form is, so the answer is not very useful (besides saying - learn differential forms if you don't know them yet:)


TITLE: Sum of $\binom{n}{1} + \binom{n+1}2 + \binom{n+2}3 + \cdots$
QUESTION [0 upvotes]: Is there any formular to this sum? $$ \binom{n}{1}  + \binom{n+1}2 + \binom{n+2}3 + \cdots + \binom{n+m-1}m$$
This is a sum of left aligned pascal’s triangle.
For example, that is the sum of below numbers.(n=5, m=4)
[[ 1  1  1  1  1]
 [ 1  2  3  4  5]
 [ 1  3  6 10 15]
 [ 1  4 10 20 35]]

It looks like the sum is
$$ \binom{m}1\binom{n}1 + \binom{m}2\binom{n}2 + \binom{m}3\binom{n}3 + \cdots + \binom{m}n\binom{n}n, \;\text{where } m>n$$
But I can't get a shorter form.

REPLY [0 votes]: We have
$\binom {n-1}k = \binom{n}{k}-\binom{n-1}{k-1}$
So
$\binom {n}1 = \binom{n+1}{1}-\binom{n}{0} $
$\binom {n+1}2 = \binom{n+2}{2}-\binom{n+1}{1} $
...
$\binom {n+m-1}{m} = \binom{n+m}{m+1}-\binom{n+m-1}{m} $
Summarize above equations:
$\binom {n}1 + \binom {n+1}2 + ... + \binom {n+m-1}{m} = \binom{n+m}{m+1} -\binom{n+m-1}{m} + \binom{n+m-1}{m} - \binom{n+m-2}{m-1} + ... + \binom{n+1}{1}-\binom{n}{0}$
$=\binom{n+m}{m+1} - \binom{n}{0}$


TITLE: Derive the equations needed to compute the shortest distance from a point a set.
QUESTION [0 upvotes]: Derive the equations needed to compute the shortest distance from a point, $P$, to the set $O = \left\{\mathbf{x}\in\mathbb{R}^3\mid\mathbf{a}^T \mathbf{x} = b\right\}$ where $\mathbf{a}$ is a 3-vector and $b$ is a scalar.
Also, compute the shortest distance from a point, $P$, to the set if the set, $O = \left\{\mathbf{x}\in\mathbb{R}^3\mid\mathbf{A}\mathbf{x} = \mathbf{b}\right\}$, where $\mathbf{A}$ is a $3\times3$ matrix and $\mathbf{b}$ is a 3-vector.
I'm looking for guidance on how to work these problems out?

REPLY [0 votes]: So, in fact, for the first part, $O$ is a plane $\mathbf{x}\cdot\mathbf{a}=b$.
Letting $\overrightarrow{OP}=\mathbf{p}=\left(\begin{matrix}p\\q\\r\end{matrix}\right)$, what can you say about the length of project of $\overrightarrow{OP}$ in the direction of $\mathbf{a}$?

 We have the distance from the origin to $P$ in the direction of $\mathbf{a}$ as $\mathbf{p}\cdot\hat{\mathbf{a}}$.

We know that the distance from the origin to the plane $O$ is $\frac{b}{\|\mathbf{a}\|}$.

 So the distance is simply $$D=\left|\frac{\mathbf{p}\cdot\mathbf{a}-b}{\|\mathbf{a}\|}\right|\text{.}$$

Very similar logic applies to hyperplane as well.


text:
In this section, we further examine the performances of the \pdp algorithm by numerical experiments, with simulated data analyzed in \Cref{sec-sim} and a real data set in \Cref{sec-real-data}.

\subsection{Simulated data analysis} \label{sec-sim}

We generate data according to \Cref{model:sepp change point} and \Cref{assume:parameters}.  In particular, we adopt the setting in  \cite{mark2018network} and assume that the design function $g_t(\cdot)$ is defined to be
	\begin{equation}\label{eq-g-specify}
		g_t\{\mathcal X(t)\} = \left(\min\{\mathcal{X}_1(t), \, C_g\}, \ldots, \min\{\mathcal{X}_M(t), \, C_g\}\right)^{\top} \in \mathbb{R}^M,
	\end{equation}
	where $C_g > 0$ is a constant, $\mathcal{X}(t)$ is an $M \times t$ matrix and $\mathcal{X}_m(t)$ denotes the $m$th row of $\mathcal{X}(t)$, $m \in \{1, \ldots, M\}$.   For the two tuning parameters $\lambda$ and $\gamma$ defined in \eqref{eq:penalized likelihood} and \eqref{eq:SEPP DP}, respectively, with the theoretical guidance in \Cref{theorem:SEPP change point}, we fix $\lambda =90 \log(TM)$ and $\gamma = \log^2(M)/2$ in all experiments in this section.

Since the piecewise-stationary \sepp model is first introduced here, we do not have direct competitors.  For illustration purpose, however, we compare our \pdp algorithm with the SBS-MVTS algorithm \citep{cho2015multiple} and E-Divisive procedure \citep{matteson2014nonparametric}, both of which are designed to detect abrupt change points in multivariate time series, but neither of which is designed specifically for the scenarios we are studying here.  Having said this, there are the reasons we choose these two competitors.  The SBS-MVTS can identify covariance changes in the high-dimensional autoregressive time series and the E-Divisive procedure can estimate of both the number and locations of change points under mild assumptions on the first or second moments of the underlying distributions.  Since Poisson random variables have the same means and variances, these two competitors may be able to detect the changes in Poisson processes with piecewise-constant parameters.  In all the simulated experiments, the tuning parameters for SBS-MVTS algorithm and E-Divisive procedure are selected according to the information-type criteria and permutation tests in the R \citep{R} packages wbs \citep{wbs-R} and ecp \citep{ecp-R}, respectively.

Let $\{\widehat \eta_k\}_{k=1}^{\widehat K}$ and $\{\eta_k\}_{k=1}^{K}$ be a collection of change point estimates and a collection of true change points, respectively.  We evaluate the estimators' performances by the absolute error $|K -\widehat K|$ and their Hausdorff distance.  The Hausdorff distance between two sets $\mathcal A$ and $\mathcal B$ is defined as
	\begin{equation}\label{eq-D-defineee}
		\mathcal D( \mathcal A, \mathcal  B ) = \max\{ d ( \mathcal A | \mathcal  B ),\, d(\mathcal  B | \mathcal  A)   \},
	\end{equation}
	where $$d(\mathcal  A | \mathcal  B) = \max_{a\in \mathcal A } \min_{b \in \mathcal B } |a-b|. $$

In the sequel, we consider three settings.  Recall that $T$ is the total number of time points, $M$ is the dimensionality of the time series and $C_g$ is the threshold used in the design function $g_t(\cdot)$, which is specified in \eqref{eq-g-specify}.  Every setting is repeated 100 times.  Additional setting details are listed below.
	\begin{itemize}
	\item [(a)]	One change point and varying jump size.  Fix $T = 300$, $M = 30$, $C_g = 6$ and the intercept $v = 1/2$, which is defined in \eqref{eq-lambda-definition}. Let
		\[
			A^*(t) = \begin{cases}
				 (\rho v_1, \rho v_2, 0_{M\times (M-2)}) \in \mathbb{R}^{M \times M}, & t \in [1, 150], \\
				 (\rho v_2, \rho v_1, 0_{M\times (M-2)}) \in \mathbb{R}^{M \times M}, & t \in [151, 300],
			\end{cases}
		\]
	where $v_1 \in \mathbb{R}^M$ with odd coordinates being 1 and even coordinates being $-1$, $v_2 = -v_1$, $0_{M \times (M-2)} \in \mathbb{R}^{M \times (M-2)}$ is an all zero matrix and $\rho \in \{0.15, 0.20, 0.25, 0.30, 0.35\}$.
	\item [(b)] Two change points and varying minimal spacing.  Let $T \in \{180, 240, 300, 360, 420\}$, $M = 40$, $C_g = 8$ and the intercept $v = 1/4$.  Let the coefficient matrices satisfy $(A^*(t))_{ij} = 0$, $|i - j| > 1$, $t \in [1, T]$,
		\[
			(A^*(t))_{ij} = \begin{cases}
				\begin{cases}
 					0.15 & t \in [1, T/3] \cup (2T/3, T], \\
 					-0.15 & t \in (T/3, 2T/3],
 				\end{cases} & i = j, \\ \\
				\begin{cases}
	 				-0.15 & t \in [1, T/3], \\
 					0.15 & t \in (T/3, T],
 				\end{cases} & i - j = -1, \\ \\
				\begin{cases}
 					0.15 & t \in [1, 2T/3], \\
	 				-0.15 & t \in (2T/3, T],
 				\end{cases} & i - j = 1.
 			\end{cases}
		\]
	\item [(c)]	Two change points and varying dimension.  Let $T = 450$, $C_g = 4$, $v =1/5$ and $M \in \{15, 20, 25, 30, 35\}$.  Let
		\[
			A(t) = \begin{cases}
				(v_1, v_2, v_3, 0_{M \times (M-3)}), & t \in [1, 150], \\
				(v_2, v_3, v_3, 0_{M \times (M-3)}), & t \in [151, 300], \\
				(v_3, v_2, v_1, 0_{M \times (M-3)}), & t \in [301, 450],
			\end{cases}
		\]
		where $v_1, v_2, v_3 \in \mathbb{R}^M$ are
		\begin{align*}
			v_1 & = (-0.075, 0.15, 0.3, -0.3, 0, \ldots, 0)^{\top}, \\
			v_2 & = (\underbrace{0, \ldots, 0}_4, 0.375, -0.225, -0.075, 1.5, 0.225, 0, \ldots, 0)^{\top}, \\
			v_3 & = (\underbrace{0, \ldots, 0}_8, -0.15, -0.075, 0.45 , -0.225, 0, \ldots, 0)^{\top}.\end{align*}
	\end{itemize}

\begin{table}[h]\small
\begin{center}
\begin{tabular}{ccccccc}
 	\multicolumn{7}{c}{Setting (a)} \\[5pt]
	Method & Metric & $\rho = 0.15$ & $\rho = 0.20$ & $\rho = 0.25$ & $\rho = 0.30$ & $\rho = 0.35$ \\ [3pt]
	\pdp & $\mathcal{D}$ & 3.1(9.8) & 1.1(1.0) & 0.7(0.5) & 0.6(0.5) & 0.6(0.5) \\
	SBS-MVTS &  & 282.6(69.1) & 226.5(119.9) & 114.7(130.8) & 47.3(52.9) & 9.3(21.3) \\
	E-Divisive &  & 151.0(0.0) & 151.0(0.0) & 151.0(0.0) & 151.0(0.0) & 151.0(0.0) \\ [3pt]
	\pdp & $|\widehat{K} - K|$ & 0.0(0.0) & 0.0(0.0) & 0.0(0.0) & 0.0(0.0) & 0.0(0.0) \\
	SBS-MVTS & & 0.9(0.2) & 0.7(0.4) & 0.4(0.5) & 0.5(0.5) & 0.1(0.3) \\
	E-Divisive & & 300.0(0.0) & 300.0(0.1) & 300.0(0.5) & 296.4(16.2) & 287.2(31.4) \\[5pt]
	\hline
 	\multicolumn{7}{c}{Setting (b)} \\[5pt]
 	& & $T = 180$ & $T = 240$ & $T = 300$ & $T = 360$ & $T = 420$ \\ [3pt]
	\pdp & $\mathcal{D}$ & 11.5(6.2) & 3.7(4.6) & 2.5(4.6) & 2.8(4.3) & 1.2(3.6) \\
	SBS-MVTS & & 177.0(21.1)  & 233.3(38.1)  & 270.1(85.5) & 243.8  (156.1) & 263.5(185.2) \\
	E-Divisive & & 61.0(0.0) & 81.0(0.0)  & 101.0(0.0) & 121.0(0.0) & 141.0(0.0)  \\  [3pt]
	\pdp & $|\widehat{K} - K|$ & 0.0(0.0) & 0.0(0.0) & 0.0(0.0) & 0.0(0.0) & 0.0(0.0) \\
	SBS-MVTS & & 2.0(0.2) & 1.9(0.3) & 1.9(0.4) & 1.6(0.7) & 1.6(0.6) \\
	E-Divisive & & 178.9(0.3) & 238.9(0.3) & 298.9(0.3) & 358.8(0.4) & 418.8(0.4) \\	 [5pt]
	\hline
 	\multicolumn{7}{c}{Setting (c)} \\[5pt]
	& & $M = 15$ & $M = 20$ & $M = 25$ & $M = 30$ & $M = 35$ \\ [3pt]
	\pdp & $\mathcal{D}$ & 3.3(5.0) & 3.6(5.5) & 3.2(4.5) & 5.0(12.4) & 6.1(13.2) \\
	SBS-MVTS & & 401.4(112.8) & 378.2(129.9) & 411.3(101.7) & 377.7(134.1) & 375.4(134.5) \\
	E-Divisive & & 151.0(0.0) & 151.0(0.0) & 151.0(0.0) & 151.0(0.0) & 151.0(0.0) \\  [3pt]
	\pdp & $|\widehat{K} - K|$ & 0.0(0.0) & 0.0(0.0) & 0.0(0.0) & 0.0(0.0) & 0.0(0.0) \\
	SBS-MVTS & & 1.8(0.4) & 1.7(0.5) & 1.9(0.3) & 1.8(0.4) & 1.8(0.4) \\
	E-Divisive & & 448.6(0.5) & 449.0(0.3) & 449.0(0.1) & 449.0(0.0) & 449.0(0.0)
\end{tabular}
\end{center}
\caption{Simulation results.  Each cell is in the form of mean(standard error).  For the metrics, $\mathcal{D}$ denotes the Hausdorff distance defined in \eqref{eq-D-defineee} and $|\widehat{K} - K|$ denotes the absolute errors in estimating the numbers of the change points.  \pdp uniformly outperforms the other two methods across a range of parameter values, including $\rho$ (reflecting the jump size), $T$ (the number of samples), and $M$ (the dimension of the time series). \label{tab-sim}}
\end{table}
\begin{figure}[h]
	\includegraphics[width=\columnwidth]{A.png}
	\caption{A visualization of the mean Hausdorff distance metric $\mathcal{D}$ \eqref{eq-D-defineee} in \Cref{tab-sim}.  The methods concerned are: \Cref{algorithm:PDP}, \pdp; SBS, SBS-MVTS; ECP, E-Divisive.  In each panel, the y-axis represents the mean Hausdorff distance across 100 repetitions and the x-axis represents the varying parameter in each setting.  \pdp uniformly outperforms the other two methods across a range of parameter values, including $\rho$ (reflecting the jump size), $T$ (the number of samples), and $M$ (the dimension of the time series).}
	\label{fig:simulations}
\end{figure}

We collect the simulation results in \Cref{tab-sim}, each cell containing the mean and standard errors of 100 repetitions.  The Hausdorff distances are visualized in \Cref{fig:simulations} to improve readability.  These three settings have ranged over various situations.  It is clearly that \pdp outperforms both competitors in all settings on both metrics.

config: arxiv


TITLE: What are the rules restricting the dimensions allowed for tensor multiplication?
QUESTION [1 upvotes]: When I'm working with matrices, I know the dimensions have to match for certain operations to be defined. For matrix multiplication, if $A \in \mathbb{R}^{m\times n}, B\in \mathbb{R}^{n\times k}$, then $AB\in \mathbb{R}^{m\times k}$. For matrix addition, two matrices $C,D$ must have the same dimensions for $C + D$ to be defined.
I am confused how this works for tensors. When I say tensor, I mean a multi-dimensional array such as this one I generated in Python
[[[1 1 7]
  [9 9 3]
  [6 7 2]]

 [[0 3 5]
  [9 4 4]
  [6 4 4]]

 [[3 4 4]
  [8 4 3]
  [7 5 5]]]

I assume for tensor addition, the same rule applies. For rank $m$ tensors, $T_{1}+T_{2}$ is only defined if the dimensions are the same, i.e. $T_{1},T_{2}\in\mathbb{R}^{d_{1} \times \cdots \times d_{m}}$ for dimensions $d_{1},...,d_{m}$,
What are the rules for multiplication?
More specifically, if I have tensor
$T_{1} \in\mathbb{R}^{a_{1} \times \cdots \times a_{m}}$ and $T_{2} \in\mathbb{R}^{b_{1} \times \cdots \times b_{n}}$
what are the restrictions on $m,n$ and the $a$s and $b$s for tensor multiplication to be defined?

REPLY [0 votes]: The multiplication you can reasonably define depends on what type of tensors you have. As mentioned in the other answers for any tensors you can form the outer product of these tensors, which is just the tensor product, that is, you have two elements
$$
T \in V_1 \otimes \cdots \otimes V_n, S \in W_1 \otimes \cdots \otimes W_m
$$
then $T \otimes S \in (V_1 \otimes \cdots \otimes V_n) \otimes (W_1 \otimes \cdots \otimes W_m)$. This generalizes the outer product of two vectors, where if $t^i \in \mathbb R^n$, $s^j \in \mathbb R^m$ then
$$
(t \otimes s)^{ij} = t^is^j.
$$
This outer product is really all you can say in the general case. Now suppose we have the situation where
$T \in V_1 \otimes V_2 \cdots \otimes V_n$ and $S \in V_1^* \otimes W_2 \otimes \cdots \otimes W_m$, so ($W_1 = V_1^*$). If we consider simple tensors
$$
v_1 \otimes \cdots \otimes v_n \in V_1 \otimes V_2 \cdots \otimes V_n,\  f \otimes w_1 \otimes \cdots \otimes w_m \in V_1^* \otimes W_2 \otimes \cdots \otimes W_m
$$
then we can define multiplication by contracting the first vector with the element of the dual space, so
$$
(v_1 \otimes \cdots \otimes v_n)(f \otimes w_1 \otimes \cdots \otimes w_m) = f(v_1) (v_2 \otimes \cdots v_n \otimes w_2 \cdots \otimes w_n) \in V_2 \otimes \cdots \otimes V_n \otimes W_2 \otimes \cdots \otimes W_m
$$
Which we can then extend to arbitrary tensors by linearity. If also $V_i$ = $W_j^*$ then you can define other multiplications (or contractions) by choosing which elements to contract. This generalizes matrix multiplication. To see this, note that for vector spaces $V, W, X$
$$
\text{Hom}(V, W) = V^* \otimes W, \ \text{Hom}(W, X) = W^* \otimes X
$$
where $\text{Hom}(V, W)$ is the set of linear maps between $V$ and $W$. Then if you multiply tensors as above from these spaces, you'll get an element in $V^* \otimes X$, which can be seen as a linear map $V \to X$. If you write all this out with simple tensors using bases and dual bases you can check that the two definitions of multiplication agree.


TITLE: How many ways to get a sum of 29 by adding 5 & 2? ex 5+5+5+5+5+2+2 = 29, is one way.
QUESTION [1 upvotes]: Ex: $2+2+3$, $2+3+2$, $3+2+2$ these are three ways to get a sum of $7$ with $3$ and $2$. But my example is with $5$ and $2$ and a sum of $29$.
I believe there are three ways to get a sum of $29$ by using fives and nines. But is there any formula for this? What if I want to check the sum of $500$ or $1 000 0000$ using $5$ and $2$?

REPLY [2 votes]: Here's an observation: $(x^2+x^3)^k$ is a polynomial whose $x^n$ coefficient is the number of ways to get $n$ by using $k$ total $2$'s and $3$'s. So, if we don't care how many total we use, the $x^n$ coefficient of the geometric series
$$
\sum_{k=0}^\infty (x^2+x^3)^k = \frac{1}{1-x^2-x^3}
$$
is the number of ways of getting $n$ using any number of $2$'s and $3$'s.
The first terms of this are
$$
\frac{1}{1-x^2-x^3} = 1+x^2+x^3+x^4+2x^5+2x^6+3x^7+4x^8+5x^9+7x^{10}+\cdots.
$$
This supports what you found, that there are three ways to get $7$.
Getting a nice closed-form formula depends on factoring the denominator, if possible, to do partial fractions to represent this as a sum of geometric series. That's one way to calculate a particular coefficient. Another is to just go through with polynomial long division, which isn't so bad, but it will take a while to (by hand) figure out how many ways there are to get ten million!
For fives and nines, the corresponding rational function is
$$
\sum_{k=0}^\infty(x^5+x^9)^k = \frac{1}{1-x^5-x^9} = 1+x^5+x^9+x^{10}+2 x^{14}+x^{15}+x^{18}+3 x^{19}+x^{20}+3
   x^{23}+4 x^{24}+x^{25}+x^{27}+6 x^{28}+5
   x^{29} + \cdots.
$$
This says there are five ways of getting $29$, not three.
Another way to understand this, rather than using power series, is that to calculate the number of ways $f(n)$ of getting $n$ with fives and nines, you can calculate $f(n-5) + f(n-9)$ since you add together the number of ways where the last number chosen is a five and the number of ways where the last number chosen is a nine. Then you make a table starting with $n=0$ with $f(0)=1$ (since there is one way to get $0$). By calculating the values of this function at consecutive numbers, you get to reuse previous calculations. (This is equivalent to the long division approach.)


TITLE: Asymptotic estimate of the form $k=C\log\log n$.
QUESTION [1 upvotes]: Suppose that we have
$$
n=k^{\frac{1}{\beta}k^22^{k+12}\log\frac 1{\alpha}}
$$
where $\alpha,\beta\in(0,1)$. It is claimed that
$$
k\sim C\log\log n
$$
for some constant $C=C(\alpha,\beta)$. How do one deduce such an estimate?
I am totally lost here, any help is very much appreciated.

REPLY [1 votes]: I assume logarithms in base $2$. This would not change anything anyway, besides constants.
First, note that
$$
n=k^{\frac{1}{\beta}k^22^{k+12}\log\frac{1}{\alpha}}
= 2^{\frac{1}{\beta}k^22^{k+12}\log\frac{1}{\alpha} \log k}
= 2^{\frac{2^{12}\log\frac{1}{\alpha}}{\beta}k^22 ^{k} \log k}
$$
so
$$
\log n = \frac{2^{12}\log\frac{1}{\alpha}}{\beta}\cdot k^22 ^{k} \log k
= C'\cdot 2 ^{k + 2\log k+\log\log k}
$$
setting $C'\stackrel{\rm def}{=} \frac{2^{12}\log\frac{1}{\alpha}}{\beta}$.
Taking the logarithm again, we get
$$
\log\log n = k + 2\log k+\log\log k + O(1)
$$
and, when $k\to\infty$, the right-hand side satisfies $$k + 2\log k+\log\log k + O(1)\operatorname*{\sim}_{k\to\infty} k$$
which implies
$$
\log\log n\operatorname*{\sim}_{k\to\infty} k.
$$


TITLE: Let $u_n=\ln\left(1+\frac {(-1)^n}{n}\right)$, $n\ge2$, show that the series $\sum u_n$ converges.
QUESTION [0 upvotes]: Let $u_n=\ln\left(1+\dfrac {(-1)^n}{n}\right)\qquad n\ge2,\quad$, show that the series $\displaystyle \sum u_n$ converges and its limit.

I found the result, but the correction gives me something different and more complicated. So I'm wondering if my solution is correct.
Let $u_{2p}=\ln\left(1+\dfrac {1}{2p}\right)$ and $u_{2p+1}=\ln\left(1-\dfrac {1}{2p+1}\right)$
$\begin{array}l \displaystyle \sum_{n\ge2} u_n
&=\displaystyle \sum_{p\ge1}(u_{2p}+u_{2p+1})\\
&=\displaystyle \sum_{p\ge1}\bigg[\ln\left(1+\dfrac {1}{2p}\right)+\ln\left(1-\dfrac {1}{2p+1}\right)\bigg]
\\&=\displaystyle\sum_{p\ge1} \bigg(\ln(2p+1)-\ln2p+\ln 2p-\ln(2p+1)\bigg)\\
&=\displaystyle\sum_{p\ge1} 0=0
\end{array}$
So $\displaystyle \sum_{n\ge2} u_n$ converges to $\ell=0$

REPLY [0 votes]: I won't use at the moment the Leibniz criterion .
For $n>0$
$S_{2n+1}=\displaystyle \sum_{k=2}^{2n+1} \ln\left(1+\dfrac {(-1)^k}{k}\right)$ as $\forall p\in \mathbb{N}$ we have $u_{2p}+u_{2p+1} =0$ so $S_{2n+1}=0$
$S_{2n}=\displaystyle \sum_{k=2}^{2n} \ln\left(1+\dfrac {(-1)^k}{k}\right)=\ln\left(1+\dfrac{1}{2n}\right)$
Thus $S_{2n+1}-S_{2n}=-\ln\left(1+\dfrac{1}{2n}\right)=\ln\left(\dfrac{2n}{2n+1}\right)\underset{n\to +\infty}{\longrightarrow}0$ so $(S_n)$ converges
With the same argument ($u_{2p}+u_{2p+1} =0$), we can say that $S_{2n-1}=\displaystyle \sum_{k=2}^{2n-1} \ln\left(1+\dfrac {(-1)^k}{k}\right)=0$
So we can conclude this series converges to $0$


TITLE: How to sum results of repeated subtraction
QUESTION [2 upvotes]: Trying to teach myself maths and I realise this is a very basic question (and probably a basic concept), but I don't know how to express what I'm looking for (my Google skills are letting me down...)
If I wanted to repeatedly subtract n from a, I understand that the number of times (t) I'd have to do that to reach zero could be expressed as t = a/n
What I don't understand, is how I can use t to  sum the total of the result of each subtraction.
So, if a = 5 and n = 1...
b = 4
c = 3
d = 2
e = 1
f = 0
The sum of b to f is 10.
What I'd like to understand is how I can express the formula to find s when a and n are known.
So s = ???
Realise I've probably not worded this very clearly, so questions are welcome.

REPLY [1 votes]: You are looking for the sum of an arithmetic progression.
The formula you're looking for is
$$
\sum_{k=0}^{t} (c + k n)
=
(t+1) c + n \binom{t+1}{2}
=
(t+1) c + n \frac{(t+1)t}{2}.
$$
Possibly you are only interested in the special case $c = 0$.


TITLE: Show $D_3\cong S_3$ and $D_n\ncong S_n$ for $n\gt 3$
QUESTION [2 upvotes]: Show that $D_3\cong S_3$ and $D_n\ncong S_n$ for $n\gt 3$, where $D_3$ denotes the dihedral group of order 6 and $S_3$ the symmetric group.

I define a group isomorphism between $D_3$ and $S_3$. Both group have $6$ elements, the dihedral group is the symmetric group of an equilateral triangle.
Let the vertices $$P_k = (\cos(\frac{2(k-1)\pi}{3}), \sin(\frac{2(k-1)\pi}{3})),\qquad k=1,2,3.$$
I define a group isomorphism $\varphi:D_3\to S_3, f\mapsto \sigma(f)$, where $\sigma(f)$ are the permutation of the vertices defined by $f$.
E.g. for $r\in D_3$ the rotation by $\frac{2\pi}{3}$ is the permutation $\sigma(r)=(1 2 3)$.
If I can show that no two rotations define the same permutation, it follows that $\varphi$ is a bijection and I'm finished. How can I show that? Also, how do I show that $D_n\ncong S_n$ for $n\gt 3$? Is there a good counterexample?

REPLY [2 votes]: $D_n$ has $2n$ elements while $S_n$ has $n!$ elements. These are different if $n>3$.


TITLE: Rank of a special linear group over a finite field
QUESTION [2 upvotes]: What is the rank (minimal number of group generators) of $SL(n,\mathbb{F})$ in the situation when $SL(n,\mathbb{F})$ is not perfect (i.e. when $SL(n,\mathbb{F})$ is different from $SL(2,\mathbb{F}_2)$ and $SL(2,\mathbb{F}_3)$)? If the general formula is not known, are there $n$ and $F$ which make $rank(SL(n,\mathbb{F}))>k$ for a fixed $k$ (or at least for $k=2$)?

REPLY [3 votes]: For any finite field $F$ and $n \ge 2$, ${\rm SL}(n,F)$ is generated by $A$ and $B$, where $A$ is the diagonal matrix with entries $(\omega,\omega^{-1},1,1,\ldots,1)$, for a primitive field element $\omega$ and
$$B = \left(\begin{array}{ccccccc}-1&0&0&\ldots&0&0&1\\
-1&0&0&\ldots&0&0&0\\
0&-1&0&\ldots&0&0&0\\
0&0&-1&\ldots&0&0&0\\
&&&\ldots&&&&\\
0&0&0&\ldots&0&-1&0\\
\end{array}\right).$$


TITLE: Eigenvalues of $A^{2018}$
QUESTION [3 upvotes]: Find the eigenvalues and eigenvectors of $A^{2018}$.
$$
A=\begin{bmatrix} 1 & 3 & 4\\ 3 & 1 & 4\\ 0 & 0 & 4\end{bmatrix}
$$

My solution:
First, by substracting first row times three from second row we get:
$$
A\approx \begin{bmatrix} 1 & 3 & 4\\ 0 & -8 & -8\\ 0 & 0 & 4\end{bmatrix}
$$
We achieved the upper triangular matrix so the characteristic polynomial is:
$$
\chi_{A^{2018}}(\lambda)=det (\begin{bmatrix} 1 & 3 & 4\\ 0 & -8 & -8\\ 0 & 0 & 4\end{bmatrix}^{2018}-\lambda I)=(1^{2018}-\lambda)((-8)^{2018}-\lambda)(4^{2018}-\lambda)
$$
Therefore the set of eigevalues is $\{1,4^{2018},8^{2018},\}$.

Please verify if this the correct solution, and in case it isn't, help me find the correct one.

REPLY [2 votes]: Your matirx is the sum of a relatively easy one (symmetric) and a nilpotent matrix, and these commute. $N$ is zero except for the pair of $4$ in positions $(1,3)$  and $(2,3).$  Call the symmetric one $S$ which can be nicely diagonalized. because they commute,
$$  (S + N)^{2018} = S^{2018} + 2018 S^{2017} N. $$
It stops there since $N^2 = 0.$
I just guessed this, all that is needed is explicit $P^{-1} S P = D.$  It is not really necessary that $P$ be orthogonal. In fact, what I do is
$$ P^T S P = D  $$
$$\left(
\begin{array}{rrr}
\frac{1}{\sqrt 2} & \frac{1}{\sqrt 2} & 0 \\
-\frac{1}{\sqrt 2}  & \frac{1}{\sqrt 2} & 0 \\
0 & 0 & 1 \\
\end{array}
\right)
\left(
\begin{array}{rrr}
1 & 3 & 0 \\
3 & 1 & 0 \\
0 & 0 & 4 \\
\end{array}
\right)
\left(
\begin{array}{rrr}
\frac{1}{\sqrt 2} & -\frac{1}{\sqrt 2}  & 0 \\
\frac{1}{\sqrt 2} & \frac{1}{\sqrt 2} & 0 \\
0 & 0 & 1 \\
\end{array}
\right)
 = \left(
\begin{array}{rrr}
4 & 0 & 0 \\
0 &  - 2 & 0 \\
0 & 0 & 4 \\
\end{array}
\right)
$$
where $PP^T = P^TP = I$
$ P^T S P = D  $  so that $S = PDP^T.$  Thus $S^{n} = P D^n P^T$ for all $n \geq 1$
the $S+N$ is called a Jordan Chevalley decomposition, sometimes much easier than Jordan canonical form. This time, not much different


TITLE: Is concept of entropy really indispensable? Especially when the concept of potential energy can serve the purpose?
QUESTION [22 upvotes]: We see that all the natural systems aspire for minimum potential energy state and we also see that all the natural systems also aspire for maximum entropy state. Now from this understanding it seems that entropy is inversely proportional to potential energy. All the systems aspire for minimum potential energy and maximum entropy. It seems like the concept of potential energy itself and in isolation sufficient to explain all the phenomena which we explain with the help of concept of Entropy, so why do we need an extra concept of Entropy when the concept of potential energy can serve all the purposes?
Can we completely define concept of Entropy in terms of concept of potential energy?
What extra knowledge the concept of Entropy serves us in addition to the concept of potential energy?

REPLY [3 votes]: This is an excellent question, which I think primarily emerges due to lazy science teaching.
The two principles you mention differ in their generality.  Entropy maximization is - so far as we know - completely general.  If you isolate a system from outside influences and leave it alone, it will transform into the state with the highest possible entropy that doesn't violate the conservation of energy.  Note that the distinguishing feature of energy here is its conservation; it is not minimized, it is conserved (remains constant).
Principles of energy minimization however are special cases, where the maximization of entropy leads to a particular form of energy being minimized.  Let's take the example of a ball dropped from a tall building.  It's commonly asserted that the ball will minimize its gravitational potential energy, but this is only true because the ball loses kinetic energy to the air molecules in the atmosphere, and to the ground on impact.  In the absence of an atmosphere, and with perfectly elastic collisions, the ball would bounce forever, perpetually exchanging potential for kinetic energy and vice versa.  It's because of the dispersion of energy as heat (the maximization of entropy) that the portion of the ball's total energy we refer to as gravitational is minimized.  Ultimately, the warmer ball at groundlevel is a higher entropy state than the cooler ball sitting on the rooftop.
As this example shows, the confusion is largely due to the way we partition a system's energy into different forms (e.g. gravitational, thermal etc), which locally are minimized.  Energy in aggregate is conserved, but the quantity taking a particular form can be changed.  It’s therefore important to specify which form of energy is being minimized in a particular case.
It has been suggested that confusions of this kind might be avoided if less emphasis were placed on the different 'forms' of energy in the science curriculum.  An excellent case is made for this here: https://www.researchgate.net/publication/253046883_Energy_forms_or_energy_carriers


text:
\section{System Model}
\label{sec:model}
We consider a network of $N$ nodes that seek to transmit their data to a common
access point (AP). For each pair of nodes $k,l$ of the network, we associate with the transmission from $k$ to $l$ the achievable rate $R_{kl}$. We denote by $R_k$ the achievable rate for direct transmission from node $k$ to the AP. We aim to guarantee the same
throughput to all nodes in the network, irrespective of their achievable transmission rates, therefore, we constantly set the amount of data per packet to $1$~nat. The packet length for a
transmission from node $k$ to the AP is then given by $1/R_{k}$.
For the cooperative protocols CoopMAC and fairMAC (to be
presented in Section~\ref{sec:protocol}), some nodes have the possibility to transmit their packets to the AP via a helper. Following \cite{Liu2007}, we let node $h$ help node $k$ if
\begin{align}
\frac{1}{R_k}>\frac{1}{R_{kh}}+\frac{1}{R_h}\label{eq:helper2}
\end{align}
i.e., transmitting from $k$ via $h$ to the AP is better than transmitting directly from $k$ to the AP. The node $h$ is the best helper if
\begin{align}
h=\argmin_{l\in [1,N]}\frac{1}{R_{kl}}+\frac{1}{R_l}\label{eq:helper1}
\end{align}
We assume that node~$k$ knows the rate~$R_k$ and if it has a helper $h$ according
to \eqref{eq:helper2}, it also knows $R_{kh}$. We have a quasi-static environment in mind where a part of the nodes permanently experiences a
channel much worse than other nodes. We therefore assume that the rates of the
links remain constant over the period of interest. All nodes are restricted to the same fixed transmit power $\pwr$ during transmission.


text:
\begin{document}

\title[Sums of squares and torsion]{
	Sums of squares in pseudoconvex hypersurfaces
	and torsion phenomena for Catlin's boundary systems
}

\author[A. Basyrov]{Alexander Basyrov}

\address{Department of Mathematics, Statistics and Computer Science, University of Wisconsin-Stout, Menomonie, WI 54751}

\email{abasyrov@gmail.com}

\author[A. Nicoara]{Andreea C. Nicoara}

\author[D. Zaitsev]{Dmitri Zaitsev}

\address{School of Mathematics, Trinity College Dublin, Dublin 2, Ireland}

\email{anicoara@maths.tcd.ie, zaitsev@maths.tcd.ie}

\subjclass[2010]{Primary 32T27, 41A10; Secondary 32F17.}

\keywords{multi-weight, inverse weight, normal form, Catlin multitype, Catlin boundary system, pseudoconvex domains in $\C^n$}

\begin{abstract}
Given a pseudoconvex hypersurface in $\C^n$ and an arbitrary weight,
we show the existence of local coordinates in which the polynomial model
contains a particularly simple sum of squares of monomials.

Our second main result provides a normalization of a part of any Catlin boundary system.
We illustrate by an example that

this normalization cannot be extended to the rest of the boundary system
due to the existence of what we refer to as torsion.

\end{abstract}

\maketitle

\section{Introduction}\label{intro}

The goal of this paper is to gain new geometric insight into the tools
developed for establishing global regularity and subelliptic estimates for the $\bar\d$-Neumann problem.
We are focusing on the approach by Catlin
in

\cite{C84, C87}.
However, we expect our methods to
also shed light
on Kohn's multiplier ideal technique
initiated in \cite{kohnacta}
and continued more recently in
\cite{fribourgcatda, siunote,  ra, kimzaitsev, siunew}
as well as on
other research related to the $\bar\d$-equation
(see \cite[1.3]{dimatensors}) and potentially
 more general PDE's,
as evidenced by the program pioneered by Siu in \cite{siunew}.

Recall that Catlin established global regularity and subelliptic estimates
for the $\bar\d$-Neumann problem
as consequences of his Property (P) type conditions.
The only known proofs of Property (P) type conditions for
general smooth pseudoconvex finite type domains in the sense of D'Angelo~\cite{opendangelo}
rely on the techniques of multitype, polynomial models, and boundary systems
introduced in \cite{catlinbdry}.

One of the motivations in this paper is reducing the complexity in Catlin's techniques
by a more explicit use of pseudoconvexity and a precise normalization of the geometry.

Our first result is showing the existence of so-called positive balanced terms in
polynomial models of pseudoconvex hypersurfaces.

We call a monomial $z_1^{\a_1} \z_1^{\b_1} \ldots z_n^{\a_n} \z_n^{\b_n} $
{\em balanced} if $\a_j=\b_j$ for all $j$.
We shall use the (standard) {\em lexicographic order} for multiweights  and
the {\em reverse lexicographic order} for multidegrees.
We prove the following:

\begin{thm}
  \label{main}
  Let $M\subset \C^n$ be a pseudoconvex real
  smooth hypersurface with $0\in M$.
  Let $z=(z_1, \ldots, z_n)$ be local
  holomorphic coordinates in a neighborhood of $0$
  and
  $$
  	\mu= (\mu_1, \mu_2, \mu_3, \ldots, \mu_n),
	\quad
	1=\mu_1> \mu_2\ge  \mu_3 \ge \ldots \ge \mu_n > 0,
  $$
   be a (multi-)weight such that $M$ is given by

$$
	r(z,\bar z) =0,
	\quad
	d r \ne 0,
	\quad
	r = O_\mu(1),
$$
i.e.\ the expansion of $r$  contains only terms of weight greater or equal to $1$.

Then after a weighted homogenous polynomial  change of coordinates,
the defining function
$r$ of $M$ admits a decomposition

  \begin{equation}\label{main-eq}

    r(z,\bar z) =-2\re z_1

  + p (z_2, \ldots, z_n, \bar z_2, \ldots, \bar z_n)

+ o_\mu(1),

  \end{equation}
  where
  $p$ is a weighted homogeneous polynomial of weight $1$

containing, as part of its expansion, the sum of squares
\beq\label{bal}
    A_2 |z_2|^{2k_{22}} + A_3 |z_2|^{2k_{32}} |z_3|^{2k_{33}}
    + \ldots
    + A_n  |z_2|^{2k_{n2}} \cdots |z_n|^{2k_{nn}}
\eeq
with $A_j \ge 0$, $k_{jj} >0$ for all $j=2,\ldots, n,$
such that the (total) degree of $p$ in each $(z_j, \bar z_j)$ is not greater than $2k_{jj}$,

and  $o_\mu(1)$ stands for a smooth function in
$(\im z_1, z_2, \ldots, z_n, \bar z_2, \ldots, \bar z_n)$
whose formal Taylor series expansion
contains only terms
of weight greater than $1$.
In addition, for each $j$, the multidegree of each term of \eqref{bal} in
$(z_2,\z_2), \ldots, (z_j,\z_j)$ is maximal among all
balanced monomials in $p$

in the reverse lexicographic order.

Furthermore, either all $A_j$ can be chosen positive, or the weight $\mu$ can be lowered
lexicographically.
\end{thm}

The following example illustrates that pseudoconvexity is an essential assumption:

\be
Let $M$ be the non-pseudoconvex domain given by $r<0$ with
$$
	r= -2\re z_1 + 2\re(z_2^2\z_3^3).
$$
Then no weighted polynomial change of variables
transforms $M$ into a form satisfying the conclusion of Theorem~\ref{main}.
In fact,

no terms as in \eqref{bal}
can be obtained (even with $A_j$ negative).
\ee

On the other hand, when $M$ is pseudoconvex,
a natural question arises whether
the statement could be  improved
 by reducing the polynomial $p$ to just a sum of
 the terms in \eqref{bal}.
 It is not possible in general, however,
 as the following simple example illustrates:

 \be
 Let $M\subset\C^2$ be the tube given by $r=0$ with
 $$
 	r=-2\re z_1 + (\re z_2)^2.
 $$
 Then the polynomial $(\re z_2)^2$
 is invariant under weighted homogeneous polynomial coordinate changes,
 and hence cannot be reduced to contain the terms \eqref{bal} only.
 \ee

 Furthermore, it is generally not possible to reduce $r$
 to the sum \eqref{bal} only,
 even when $r$ can be written as a sum of squares of holomorphic functions:

 \be
 Let $p,q \in \N,$ $p,q \ge 2.$ Consider
\[
	r_0 =
	 -2\re z_1 + |z_2|^{2p}+|z_3|^{2q} +
	 2\epsilon \re  z_2^p \bar z_3^q
\]
with $|\epsilon|<1$.
Then $r_0$ determines a real-algebraic pseudoconvex hypersurface
that can be written as a sum of squares of holomorphic functions:
\beq\label{sq}
	r_0 =
	-2\re z_1 +\left |z_2^p
	+{\epsilon}z_3^q\right|^2
	+ (1-\epsilon^2) | z_3|^{2q}.
\eeq
By a direct computation (or using e.g.\ \cite[Theorem~4.1]{martinIMRN}),
it can be seen, however, that no
biholomorphic change of variables can transform $r_0$ into
a sum of squares of the form
$$
	|a_2z_2|^{2k_{22}} + A_3 |z_2|^{2k_{32}} |z_3|^{2k_{33}}.
$$
\ee

 The following example illustrates that
 the terms \eqref{bal}
 cannot be in general reduced
 to sums of single powers $|z_j|^{2k_{jj}}$.
  \be
 Let $M\subset\C^3$ be given by $r=0$ with
 \beq\label{eqq}
 	r=-2\re z_1 + |z_2|^8 + |z_2|^4|z_3|^6,
 \eeq
a weighed homogeneous polynomial in $(z_1, z_2, z_3)$ and conjugates
with corresponding weights $(1,8,12)$.
Then the only weighted homogeneous changes of coordinates
are the linear dilations $(z_1,z_2,z_3)\mapsto (a_1z_1,a_2z_2,a_3z_3)$
that clearly preserve \eqref{eqq} up to a change of coefficients.
In particular, it is not possible to obtain a conclusion similar to Theorem~\ref{main}
with \eqref{bal} consisting of sums of single powers $|z_j|^{2k_{jj}}$ only.
 \ee

Applying Theorem~\ref{main} to the Catlin multitype yields the following:

\begin{cor}
  \label{catlincase}
  Let $M$ be a pseudoconvex smooth real hypersurface in $\C^n$ with $0 \in M$ and
  of the Catlin multitype
  $$
  \Lambda= (1, \lambda_2, \lambda_3, \ldots, \lambda_n),
  \quad
  \lambda_n < + \infty
  $$
  at $0$.

  Then there exists a holomorphic change of coordinates at $0$
  preserving the multitype so that the defining function for $M$ in the new coordinates is given by
  \begin{equation}\label{m-eq}
    r = -2\re z_1 + p(z_2, \ldots, z_n, \bar z_2, \ldots, \bar z_n)
    + o_{\L^{-1}}(1),
  \end{equation}
    where

    $p$ is a weighted homogeneous polynomial of weight $1$ that
  contains the sum of squares
  \begin{equation}\label{a-terms}

  |z_2|^{2k_{22}} + |z_2|^{2k_{32}} |z_3|^{2k_{33}} + \ldots + |z_2|^{2k_{n2}} \cdots |z_n|^{2k_{nn}},

  \end{equation}
  where

  $k_{jj} >0$ for all $j$ and the (total) degree of $p$ in each $(z_j, \bar z_j)$ is not greater than $k_{jj}.$

\end{cor}

\br
It follows from the weighted homogeneity of
\eqref{a-terms} that
  \beq\label{lj}
   \sum_{l=2}^j \frac{2 k_{jl}}{ \lambda_l} =1,
   \quad
   j=1,\ldots, n.
  \eeq
  In particular, since $k_{jj}\ne 0$, the weights $\l_l$
  are uniquely determined from \eqref{lj}.
\er

A better understanding of the Catlin multitype
has been obtained when $M$ is a boundary
of a {\em convex} domain,
see \cite{bs, mcneal, jiyeyu}.
However, even in this case,
Thereom~\ref{main}
seems to be new.

For a pseudoconvex hypersurface, the multitype and the commutator multitype coincide as Catlin established in \cite{catlinbdry}.  Without pseudoconvexity, however,
it might not be possible to obtain terms of the type
$$
	|z_2|^{2k_{j2}} \cdots |z_n|^{2k_{jj}}
$$
via a change of variables, and the two multitypes may differ, as the following example due to Bloom shows:

 \be
 Consider
\[
	r_0 =
	 \re z_1 + (\re z_2 +|z_3|^2)^2.
\]
The multitype at $0$ is given by $\mt=(1,2,4),$ whereas the commutator multitype at $0$ is lexicographically strictly larger: $\ct=(1,2, + \infty).$ Catlin proved that $\mt \leq \ct$ for any domain, and this example shows nothing more can be expected to hold in the absence of pseudoconvexity.
 \ee

Our second main result
is a normalization of any boundary system for a pseudoconvex domain via a change of variables:

\bt
  \label{flatnessprop}
  Let $M$ be a pseudoconvex smooth real hypersurface in $\C^n$ with $0 \in M,$ Levi rank $s_0$ at $0,$ and
  of the Catlin multitype
  $$
  \Lambda= (1, \underbrace{2, \dots, 2}_{s_0}, \lambda_{s_0+2}, \ldots, \lambda_n)

  $$
  at $0$, where
  $$
  	2<\lambda_{s_0+2}=\dots = \lambda_{s_0+s_1+1}< \lambda_{s_0+s_1+2} < +\infty.
$$
Then for any boundary system at $0$,
   $$
   	\B_n (0) = \{r_1, r_{s_0+2},\dots, r_n; L_2, \dots, L_n\},
$$
there exists a holomorphic change of coordinates at $0$
 preserving the multitype
 and  transforming $\B_n(0)$  into
 $$
 	\tilde \B_n (0) = \{\tilde r_1,\tilde  r_{s_0+2}, \dots, \tilde r_n; \tilde L_2, \dots, \tilde L_n\},
$$ satisfying the normalization
  \begin{equation}\label{flatness-eq}
  \begin{aligned}
\tilde r_j &= \re z_j
	+o(
		\lambda_j^{-1}
	),
	\quad s_0+2 \leq j \leq s_0+s_1+1,\\
\tilde L_k&=\d_{z_k}
	+o(
		\lambda_k^{-1}
	),
	\quad 2\le k\le s_0+s_1+2, \\

   \end{aligned}
  \end{equation}
   where the partial derivatives $\d_{\z_j}$ are counted with weight $-\l_j^{-1}$.
  \et

Therefore, the first function in the boundary system beside the defining function can always be brought to the simplest possible form.

In case several entries of the Catlin multitype are equal to the first $\lambda_j >2,$
all of their corresponding functions and vector fields in the boundary system can be normalized. This normalization process cannot be carried out on the subsequent functions, however.
In fact, we provide a {\em counterexample} in the final section of the paper.
This non-existence of a complete normalization provides a very important insight
into the behavior of Catlin's boundary systems
that we call a {\em torsion phenomenon}.

In particular, for $M$ of Levi rank $0$ in $\C^3,$
this flattening result yields a simplified geometric picture,
which we state as a corollary:

\begin{cor}
 \label{C3case}
   Let $M$ be a pseudoconvex smooth real hypersurface in $\C^3$ with $0 \in M,$ Levi rank $0,$ and
  of the Catlin multitype
  $$
  \Lambda= (1, \lambda_2, \lambda_3),
  \quad
  \lambda_3 < + \infty
  $$
  at $0$. After a holomorphic change of variables, any boundary system at $0$
  $$
  	\B_3 (0) = \{r_1, r_2, r_3; L_2, L_3\}
$$ becomes $$\tilde \B_3 (0) = \{\tilde r_1, \tilde r_2, \tilde r_3; \tilde L_2, \tilde L_3\}$$ with
   \begin{equation}\label{flatness-eqc3}
  \begin{aligned}
\tilde r_{2} &= \re z_2 +o (\lambda_2^{-1}),\\
\tilde L_j&=\partial_{z_j}+
	o( \lambda_j^{-1} ),
	\quad j =2,3,\\

   \end{aligned}
  \end{equation}
 \end{cor}

The paper is organized as follows: Section~\ref{examples} provides additional examples
illustrating various phenomena.
Section~\ref{notation} gives the relevant definitions and notation. Section~\ref{bdrysystems} defines Catlin's multitype and boundary systems. Section~\ref{estimates} presents some elementary auxiliary results such as one-dimensional estimates for non-negative homogeneous polynomials and a several variables version proven via scaling using the Newton polygon. Section~\ref{normalforms} contains the proofs of Theorem~\ref{main} and Corollary~\ref{catlincase} carried out in a sequence of lemmas. In the same section, it is shown that the first function in the boundary system can always be normalized, thus establishing Theorem~\ref{flatnessprop} and Corollary~\ref{C3case}.
Section~\ref{r3counterexample} demonstrates by example that the same type of normalization cannot be carried out on subsequent functions in the boundary system.

\section{Further motivation and examples}\label{examples}

\be
The grandfather of all examples is a strongly pseudoconvex
hypersurface given by $r=0$ with
$$
	r=-2\re z_1 +  |z_2|^2 +\ldots + |z_n|^2 + o_{\L^{-1}}(1),
	\quad
	\L=(1, 2, \ldots, 2),
$$
where the whole leading polynomial (the quadric),
is already of the form \eqref{bal},
once diagonalized.
Of course, the diagonalization here is a special property of quadrics
that does not extend to higher degree polynomials.
\ee

More generally,
it was shown by the third author in \cite{dimatensors}
that any pseudoconvex hypersurface admits the form
$r=0$ with
\beq\label{p4}
	r = -2\re z_1 + |z_2|^2 + \ldots + |z_{q-1}|^2
	+ p_4(z_{[q+2,n]}, \z_{[q+2,n]} ) + o_{\L^{-1}}(1),
\eeq
with the inverse weights
$
	\L= (1, 2, \ldots, 2, 4, \ldots, 4),
$
where the number of $2$'s equals the Levi form rank $q$,
and $p_4$ represents the CR invariant quartic tensor
defined in \cite{dimatensors}.
In view of this general fact,
it suffices to only study terms
arising from $p_4$ and $o_{\L^{-1}}(1)$.

\be
Any real hypersurface $M\subset\C^2$ of finite type $m$
admits the form $r=0$ with
$$
	r = -2\re z_1 + p_m(z_2,\z_2) + o_{\L^{-1}}(1),
	\quad
	p_m = \sum_{j+k=m} a_{jk} z_2^j \z_2^{k},
$$
where $\L=(1,m)$ and $p_m$ is not harmonic.
In this (well-known) case,
if $M$ is pseudoconvex,
Theorem~\ref{main}
implies that  $m=2l$ is even
and $p_m$ contains a nontrivial term $a_{ll} |z_2|^{2l}$,
$a_l\ne 0$.
Since $p_m$ is a (tensor) invariant,
it is clear that other terms $a_{jk} z_2^j \z_2^{k}$
with $j\ne k$ cannot be eliminated.
\ee

\be
For a general pseudoconvex hypersurface $M\subset\C^3$
of the form \eqref{main-eq}
in its multitype coordinates,
Corollary~\ref{catlincase} implies
that after a linear change of coordinates,
$p$ contains nontrivial terms
\beq\label{p22}
	p = |z_2|^{2k_{22}} + |z_2|^{2k_{32}} |z_3|^{2k_{33}} +
	\2p(z_2,z_3, \z_2,\z_3),
	\quad
	k_{22}, k_{33} \ge 1.
\eeq
where $\2p$ consists of all remaining terms.
In particular, the multitype $\L=(1, m_2, m_3)$
is uniquely determined from the identities
$$
	m_2= 2k_{22},
	\quad
	\frac{2k_{32}}{m_2} + \frac{2k_{33}}{m_3} = 1
$$
expressing the property that the first two terms in
\eqref{p22} are of weight $1$.

Furthermore, the additional degree property in Theorem~\ref{main}
asserts that the degree of $p$
in $(z_3,\z_3)$ equals $2k_{33}$. This property puts additional restrictions on the terms in $p$
and makes the choice of the first two terms in \eqref{p22} canonical.
For instance, if
$$
	p= |z_2|^4 + |z_2z_3|^2 + |z_3|^4,
$$
the degree condition forces us to choose the terms
$|z_2|^4 + |z_3|^4$ rather than $|z_2|^4 + |z_2z_3|^2$,
because the latter choice would violate
the property that the degree of $p$ in $(z_3,\z_3)$ is $2$.
\ee

\be
Let $M\subset\C^4$ be given by $r=0$ with
$$
	r = - 2\re z_1 + |z_2|^4 + |z_2|^2 |z_3|^2 + ( |z_2|^2 + |z_3|^2 ) |z_4|^2.
$$
Then the degree property in Theorem~\ref{main}
implies that the sum of squares in  \eqref{a-terms}
must be
\beq\label{sum0}
	|z_2|^4 + |z_2|^2 |z_3|^2 + |z_3|^2 |z_4|^2,
\eeq
since the remaining square term
$|z_2|^2 |z_4|^2$
has the same degree in $(z_4,\z_4)$ as $|z_3|^2 |z_4|^2$
but lower degree in $(z_3,\z_3)$.
That last restriction again determines
uniquely the terms in \eqref{sum0}.
\ee

\be
Corollary~\ref{catlincase} allows us to estimate how many inverse weights can arise as multitypes $\mt=(m_1, \dots,m_n)$ at $0$ of a pseudoconvex hypersurface $M\subset\C^n$ of finite $1$-type $m.$ We first recall that by part (4) of Catlin's Main Theorem in \cite{catlinbdry}, $m_n \leq m.$ It is always the case that $m_1=1,$ $m_2$ is an integer, and $2 \leq m_2 \leq \cdots \leq m_n.$

Since $m$ is rational in general, consider its floor (or integral part) $\lfloor m \rfloor$.
By equation~\eqref{a-terms}, $m_2 = 2k_{22} \leq m,$
so there are at most $\lfloor\frac{m}{2}\rfloor$ values for

$$
	m_2 = 2, 4, \ldots, \left\lfloor\frac{m}{2}\right\rfloor.
$$
Once again from equation~\eqref{a-terms} we obtain
\beq\label{m23}
	\frac{2k_{32}}{m_2} + \frac{2k_{33}}{m_3} = 1
\eeq
with $k_{33}\neq 0$,
implying
$$
	0 \leq k_{32}<\frac{m}{2}.
$$
If $\frac{m}{2} \not\in \Z,$ then there are $\lfloor\frac{m}{2}\rfloor+1$ choices for $k_{32},$ namely the integers from $0$ to $\lfloor\frac{m}{2}\rfloor.$ If $\frac{m}{2}\in \Z,$ then $0 \leq k_{32} \leq \frac{m}{2}-1,$ so there are $\frac{m}{2}$ choices for $k_{32}.$
In both cases, we get at most $\lfloor\frac{m}{2}\rfloor+1$ choices for $k_{32}.$
As for $k_{33},$
\eqref{m23} implies
$$0<2k_{33} \leq m_3 \le m,$$
so there are at most $\lfloor\frac{m}{2}\rfloor$ choices for $k_{33}.$
Since the choice of $k_{32}$ and $k_{33}$ determines $m_3,$ we have $\left(\lfloor\frac{m}{2}\rfloor+1\right)\lfloor\frac{m}{2}\rfloor$ choices for $m_3$,
without accounting for different equations yielding the same solution. To determine the number of choice for $m_4,$ we use the equation $$\frac{2k_{42}}{m_2} + \frac{2k_{43}}{m_3}+ \frac{2k_{44}}{m_4} = 1.$$ The same analysis gives us $\lfloor\frac{m}{2}\rfloor+1$ choices for each of $k_{42}$ and $k_{43}$ and $\lfloor\frac{m}{2}\rfloor$ choices for $k_{44}$ due to the condition $k_{44}\neq 0.$ We thus have at most $\left(\lfloor\frac{m}{2}\rfloor+1\right)^2\lfloor\frac{m}{2}\rfloor$ choices for $m_4.$ In general, there are $\left(\lfloor\frac{m}{2}\rfloor+1\right)^{j-2}\lfloor\frac{m}{2}\rfloor$ choices for $m_j,$ where $2 \leq j \leq n.$ Altogether, we have obtained $$\left(\left\lfloor\frac{m}{2}\right\rfloor+1\right)^{0+1+ \cdots +(n-2)}\left(\left\lfloor\frac{m}{2}\right\rfloor\right)^{n-1}=\left(\left\lfloor\frac{m}{2}\right\rfloor+1\right)^{\frac{(n-2)(n-1)}{2}}\left(\left\lfloor\frac{m}{2}\right\rfloor\right)^{n-1}$$ possible multitypes  at $0$ of a pseudoconvex hypersurface $M\subset\C^n$ of finite $1$-type $m.$ This estimate significantly improves the one in \cite{ra}.

\ee

\section{Notation}
\label{notation}

For an $n$-tuple $z = (z_1, \ldots, z_n)$,
we shall use the short-hand notation

  \[
  	z_{[k,m]} := (z_k, z_{k+1}, \ldots, z_m),
	\quad
	1\le k \le m\le n.
  \]

 We use the extended sets of nonnegative
 rationals and reals
 $$
      \1\Q_{\ge0} := \Q_{\ge0}\cup \{+\infty\},
      \quad
      \1\R_{\ge0} := \R_{\ge0}\cup \{+\infty\},
 $$
 and
  consider
 real nonnegative  $n$-tuples of weights,
 or simply weights
 \beq\label{reg-wt}
 \mu= (1, \mu_2,  \ldots, \mu_n),
 \quad
 1=\mu_1> \mu_2\ge \ldots \ge \mu_n\ge 0,
 \quad
 \mu_i \in \R_{\ge0}.
 \eeq

 Following Catlin's notation \cite{catlinbdry},
 we also consider {\em inverse weights}
  $$
  	\Lambda= (1, \lambda_2, \lambda_3, \ldots, \lambda_n),
	\quad
	\lambda_i \in \1\Q_{\ge0}.
$$

For every weight $\mu= (1, \mu_2, \mu_3, \ldots, \mu_n),$
we have
its associated inverse weight given by reciprocals
$$
	\Lambda= (1, \lambda_2, \ldots, \lambda_n)
	= (1, \mu_2^{-1}, \ldots, \mu_n^{-1})
$$

with the convention that $0^{-1} = +\infty$, $(+\infty)^{-1}=0$.

  Let
  $$
  	(\alpha | \mu) := \alpha_1 \mu_1 + \alpha_2 \mu_2 + \cdots + \alpha_n \mu_n
$$
for $\alpha = (\alpha_1, \alpha_2, \dots, \alpha_n)$ a multi-index.

Given a smooth real function $r(z,\bar z)$ defined
in a neighborhood of $0$ in $\C^n$,
a weight $\mu$ as in \eqref{reg-wt}
and nonnegative constant $C\ge0$
we write
$$
	r = O_\mu(C),
	\quad \text{ resp. }
	r = o_\mu(C),
$$
whenever
$(\a+\b|\mu)\ge C$,
resp.\
$(\a+\b|\mu)> C$
holds
for any
nonzero monomial
$r_{\a\b}z^\a\bar z^\b$
in the Taylor expansion of $r$ at $0$.

Let
$M\subset\C^n$
be an oriented smooth real hypersurface
defined in a neighborhood of a point $p=0$
by $r=0$ with $dr\ne 0$,
such that $r<0$ is the negative side
with respect to the orientation.

Recall that $M$
 is pseudoconvex if
and only if
the restriction of the complex Hessian of $r$
to the complex tangent space of $M$
is positive semidefinite.

We have the following elementary properties,
provided with short proofs for the reader's convenience.

\bl
	Let

	$$

		r = -2 \re z_1 + f(z_{[2,n]}, \z_{[2,n]}),
	$$
	where $f$ is any smooth function.
	Then the domain given by $\{r<0\}$
	is pseudoconvex if and only if
	\beq\label{f}
		\sum_{j,k=2}^n f_{z_j\z_k} a_j \bar a_k \ge 0
	\eeq
	for all $(a_2, \ldots, a_n)\in \C^{n-1}$.
\el

\bpf
	The Levi form of the boundary $M := \{r=0\}$ is given
	by the restriction of
	the complex Hessian of $r$, given by the
	left-hand side of \eqref{f},
	to the complex tangent subbundle of $M$.
	Since the latter projects surjectively to
	$\{0\}\times \C^{n-1}$, the Levi form
	is positive semidefinite if and only if \eqref{f} holds,
	proving the statement.
\epf

\bl
	Given a weight $\mu$ as in \eqref{reg-wt},
	let
	$$

		r = -2 \re z_1 + p(z_{[2,n]}, \z_{[2,n]}) + o_\mu(1),
	$$
	where $p$ is a weighted homogeneous
	polynomial of weight $1$.
	Assume that the domain given by $\{r<0\}$
	is pseudoconvex.
	Then the model domain given by
	$\{r_0<0\}$, where
	$$
		r_0 := -2 \re z_1 + p(z_{[2,n]}, \z_{[2,n]}),
	$$
	is also pseudoconvex. \label{pscmodel}
\el

\bpf
	The proof is obtained by a simple weighted scaling argument.
	Consider the weighted dilation
	$$
		T_t(z_1, \ldots, z_n):= (z_1, t^{\mu_2} z_2, \ldots, t^{\mu_n} z_n).
	$$
	Then $r_0$ is invariant under composition with $T_t$, whereas
	for any function $f(z,\z)=o_\mu(1)$,
	the rescaled function $f(T_t(z), \1{T_t(z)})$
	 converges to $0$ uniformly on compacta as $t\to 0$.
	 The statement follows from the continuity
	 of the complex tangent bundles and the
	  Levi form under the limit $t\to 0$.
\epf

Finally, we shall write
\beq\label{sim}
	A\sim B
\eeq
whenever there is a nonzero constant $c$
with $A=cB$.

\section{Catlin Multitype and Boundary Systems}
\label{bdrysystems}

We devote this section to defining the multitype notion
as Catlin introduced in \cite{catlinbdry} in order to characterize the vanishing order of the defining function in different directions.

In the previous section, we defined completely general weights and inverse weights, but Catlin restricts the inverse weights he considers to only those that could represent the vanishing of the defining function.
We restrict the set of weights via two natural definitions:

\begin{defn}
An inverse weight $\Lambda= (1, \lambda_2, \lambda_3, \ldots, \lambda_n)$ is called {\it admissible} if for every $i,$ $1 \leq i \leq n,$ either $\lambda_i = + \infty$ or there exists a set of non-negative integers $a_1, \dots , a_i$ with $a_i >0$ such that $\displaystyle\sum_{j=1}^i {a_j}\lambda_j^{-1}=1.$
Let $\Gamma_n$ be the set of all admissible inverse weights ordered lexicographically.
\end{defn}

\begin{defn}
Consider a smooth domain $\Omega \subset \C^n$ with defining function $r.$
An admissible inverse weight $\Lambda=(\lambda_1, \dots, \lambda_n) \in \Gamma_n$ is called {\it distinguished} at $z_0\in \d\Omega$
 if there exist holomorphic coordinates $(z_1, \dots, z_n)$ about $z_0$ with $z_0$ mapped to the origin such that if $\sum_{i=1}^n \: \frac{\alpha_i+ \bar \beta_i}{\lambda_i}<1,$ then $D^\alpha \bar D^{\bar \beta} r(0)=0,$ where $D^\alpha= \frac{\partial^{|\alpha|}}{\partial z^{\alpha_1}_1 \cdots \partial z^{\alpha_n}_n}$ and $\bar D^{\bar\beta}= \frac{\partial^{|\bar\beta|}}{\partial \bar z^{\bar\beta_1}_1 \cdots \partial \bar z^{\bar\beta_n}_n}.$ Let $\tilde \Gamma_n (z_0)$ be the set of distinguished weights at $z_0.$ \label{distinguishedweightdef}
\end{defn}

\begin{defn}
\label{multitypedef} The multitype $\mt(z_0)$ is defined to be lexicographically the smallest admissible weight $\mt(x_0) = (m_1, \dots, m_n)$ such that $\mt(z_0) \geq \Lambda$ for every admissible distinguished weight $\Lambda \in \tilde \Gamma_n (z_0).$
\end{defn}

\noindent Definitions~\ref{distinguishedweightdef} and~\ref{multitypedef} together prompt the following natural question:

\smallskip\noindent {\bf Question:}
Let the multitype $\mt(z_0) = (m_1, \dots, m_n)$ be such that $m_n < + \infty.$
What are the multi-indices $\alpha$ and $\bar\beta$ satisfying $\sum_{i=1}^n \: \frac{\alpha_i+ \bar \beta_i}{\lambda_i}=1$ such that $D^\alpha \bar D^{\bar \beta} r(0)\neq0$
after a holomorphic change of variables mapping $z_0$ to the origin?

\smallskip\noindent Corollary~\ref{catlincase},
which we shall prove,
not only gives an answer to this question but also identifies balanced terms in the defining function responsible for the condition $D^\alpha \bar D^{\bar \beta} r(0)\neq0.$

A priori,
Definition~\ref{multitypedef} gives no indication how to compute the multitype $\mt(z_0).$
To achieve that, Catlin introduced in \cite{catlinbdry} the commutator multitype $\ct(z_0)$ computed by differentiating the Levi form

along certain lists of vector fields
arising from a geometric object called a {\em boundary system}.
He was then able to prove that this commutator multitype $\ct(z_0)$ equals the multitype

 for a pseudoconvex domain.

 Recall from~\cite{catlinbdry} that
a boundary system is a collection of vector fields and real-valued functions $$\B_\nu (z_0)= \{r_1, r_{p+2}, \dots, r_\nu; L_2, \dots, L_\nu\}$$ for some $\nu \leq n$.

The first function in the boundary system is $r_1=r,$ the defining function. Let $p$ be the rank of the Levi form of $b \Omega$ at $z_0.$ Since $r=0$ defines a manifold, we can choose
the vector field $L_1$ such that $L_1(r)=1.$
Recall from the beginning of this section that the multitype seeks to capture the vanishing order of the defining function in different directions. From the information we have so far, if $\ct(z_0)= (1, c_2, c_3, \ldots, c_n),$ then the first entry comes from the condition $L_1(r)=1,$ and subsequently, $c_2 = \dots = c_{p+1}=2,$ an entry of $2$ for every non-zero eigenvalue of the Levi form.  We choose vector fields of type $(1,0)$ $L_2, \dots, L_{p+1}$ such that $L_i(r)=\partial r (L_i)\equiv 0$ and the $p \times p$ Hermitian matrix $\partial \bar \partial r (L_i, L_j)(x_0)$ is nonsingular for $2 \leq i,j \leq p+1.$ We have kept Catlin's notation of round parentheses for the evaluation of forms on vector fields.
If $p+1=n,$ our construction is finished; otherwise, we need to make sense of vanishing orders higher than two. Let us denote by $T^{\, (1,0)}_{p+2}$ the bundle composed of $(1,0)$ vector fields $L$ such that $\partial r (L)=0$ and $\partial \bar \partial r (L, \bar L_j)=0$ for $j=2, \dots, p+1.$ For $l \geq 3$ we denote by $\ls$ a list of vector fields $\ls= \{L^1, \dots, L^l\}$ and by $\ls  \partial r$ the function $$\ls  \partial r (z) = L^1 \cdots L^{l-2} \, \partial r \, ([L^{l-1},L^l]) (z)$$ for $z \in b \Omega.$ We are interested in lists $\ls$ such that $\ls  \partial r(z_0) \neq 0$ that are chosen in the most natural way possible. For every $j$ such that $p+2 \leq j \leq n,$ we will pick a $(1,0)$ vector field $L_j \in T^{\, (1,0)}_{p+2}$ and a corresponding real-valued function $r_j$ such that $L_j r_j \neq 0$ but $L_j r_i = 0$ whenever $i<j.$ The process is inductive. When $j = p+2,$ the simplest possible list $\ls$ of $(1,0)$ vectors in $T^{\, (1,0)}_{p+2}$ that can yield $\ls  \partial r(z_0) \neq 0$ consists of a smooth $(1,0)$ vector field $L_{p+2}$ and its conjugate $\bar L_{p+2}.$ If no such list exists, we set $c_{p+2}= \dots =c_n =+\infty,$ and we have finished our construction of the commutator multitype. If such a list exists, however, we choose a list $\ls_{p+2} = \{ L^1, \dots, L^l \}$ of minimal length $l$ and set $c_{p+2}=l.$ Let $\ls'_{p+2} = \{ L^2, \dots, L^l \}.$
Set $r_{p+2}= \re (\ls'_{p+2} \partial r)$ or $r_{p+2}= \im (\ls'_{p+2} \partial r)$ so that the condition $L_{p+2} r_{p+2} \neq 0$ holds. Define $S_{p+2}=\{L_{p+2}, \bar L_{p+2}\}.$

Now assume that for some integer $j-1$ with $p+2 \leq j-1<n$ we have already constructed finite positive numbers $c_1, \dots, c_{j-1}$ as well as real-valued functions $r_1,$ $r_{p+2}, \dots, r_{j-1};$ linearly independent smooth $(1,0)$ vector fields $L_2, \dots, L_{j-1};$ and lists $\ls_{p+2}, \dots, \ls_{j-1}$ such that the following properties hold:
\begin{enumerate}
\item $\ls_i \partial r(z_0) \neq 0$ for every $i,$ $p+2 \leq i \leq j-1;$
\item If $\ls_i = \{ L^1, \dots, L^l \},$ then $\ls'_i = \{ L^2, \dots, L^l \}$ and $r_i= \re (\ls'_i \partial r)$ or $r_i= \im (\ls'_i \partial r)$ in order that the condition $L_i r_i \neq 0$ holds;
\item $L_i r_k =0$ for $p+2 \leq k < i \leq j-1;$
\item Each of the lists $\ls_i = \{ L^1, \dots, L^l \}$ is
\begin{enumerate}[(a)]
\item i-{\it admissible} (in Catlin's terminology) meaning $L^1 \in S_i =\{L_i, \bar L_i\}$ and if $l_k$ is the number of times a vector from $S_k$ occurs in the list, then $$\displaystyle \sum_{k=p+2}^{i-1} \frac{l_k}{c_k} <1$$

and

\item {\it ordered} meaning $L^k \in S_{\alpha_k}$ for every $1 \leq k \leq l$ and $\alpha_1 \geq \alpha_2 \geq \dots \geq \alpha_l;$
\end{enumerate}
\item If $l^i_k$ equals the number of times $L_k$ and $\bar L_k$ occur in $\ls_i,$ then $l^i_k=0$ whenever $k>i$ and $\displaystyle \sum_{k=p+2}^{j-1} \frac{l^i_k}{c_k} = 1;$
\item All lists $\ls_i$ are of minimal length, namely if $\ls = \{ L^1, \dots, L^l \}$ is any ordered list, $l_k$ equals the number of times $L_k$ and $\bar L_k$ occur in $\ls,$ and $\displaystyle \sum_{k=p+2}^{j-1} \frac{l_k}{c_k} <1,$ then $\ls\partial r(z_0) = 0.$
\end{enumerate}

We will show that we can chose a positive rational number $c_j$ such that properties (1)-(6) are fulfilled with $j$ replacing $j-1.$ Let $T^{\, (1,0)}_j$ denote the set of $(1,0)$ smooth vector fields $L$ such that $\partial \bar \partial r (L, \bar L_i)=0$ for $i=2, \dots, p+1$ and $L(r_k)=0$ for $k=1,p+2,\dots,j-1.$
For any smooth vector field $L_j \in T^{\, (1,0)}_j,$ we consider all ordered j-admissible lists $\ls.$ If for all such lists, $\ls\partial r(z_0) = 0,$ then we set $c_j = \dots = c_n = + \infty;$ otherwise, there exists at least one such list $\ls$ for which $\ls\partial r(z_0) \neq 0.$ We choose one of minimal length and denote it $\ls_j.$ The vector field $L_j$ used in its construction gets added to the collection $L_2, \dots, L_{j-1}.$ For $p+2\leq k \leq j$ let $l_k$ be the number of times a vector from $S_k=\{L_k, \bar L_k\}$ occurs in the list   $\ls_j,$ and let $c(\ls)$ denote the solution to the equation $$\sum_{k=p+2}^{j-1} \frac{l_k}{c_k}+\frac{l_j}{c(\ls)}=1.$$ Since $\ls_j$ is j-admissible, $c(\ls)\in \Q^+.$ Let $c_j = c(\ls)$ and let $r_j= Re (\ls'_j \partial r)$ or $r_j= Im (\ls'_j \partial r)$ so that the condition $L_j r_j \neq 0$ holds. All properties (1)-(6) are thus fulfilled. We continue this process until we have generated $\ct(z_0)= (1, c_2, c_3, \ldots, c_n),$ the {\it commutator multitype} at $z_0.$ Let $\nu \leq n$ be the highest index for which the entry $c_\nu$ is finite. The collection $$\B_\nu (x_0) = \{r_1, r_{p+2}, \dots, r_\nu; L_2, \dots, L_\nu\}$$ of functions and vector fields that we have generated in the process of computing $\ct(z_0)$ is called a {\it boundary system} of rank $p$ and codimension $n-\nu.$

\section{Estimates for Non-negative Homogeneous Polynomials}
\label{estimates}

\subsection{One Variable Case}
\begin{lem}
Let $P(z,\bar z)\ge0$ be a real
homogeneous polynomial of degree $2m$ in
$\C$,
\[
P(z, \bar z) =
\sum_{k=-m}^m C_k z^{m+k} \bar z^{m-k}.
\]
Then
$C_0 \ge 0$ and
$ |C_{k}| \le  C_0$ for all $k$.
Furthermore, if $P(z,\bar z) \not\equiv 0$, then $C_0 > 0.$

\label{estdegree1}
\end{lem}

\bpf

Considering the values of $z$ on $|z| = 1$, we observe that $\bar z = 1/z$, and
\[
P = \sum_{k=-m}^m C_k z^{2k} \ge 0, \quad |z| = 1.
\]
We parametrize $|z|=1$ as $\gamma (\theta) = e^{i \theta}$ on $[-\pi, \pi]$ and observe that
\[
0 \le \frac{1}{2\pi } \int_{-\pi}^\pi P(\theta) d \theta = C_0,
\]
whence $C_0 \ge 0$. Note that if $P > 0$ for some $z$ in a neighbourhood of $0,$ then $\displaystyle \int_{-\pi}^\pi P(\theta) d \theta >0$ so $C_0 > 0.$

Since for any $k \neq 0$ and $z$ with $|z|=1$,
\[
0 \le (2\re z^k)^2 = (z^k + \bar z^k)^2 = (z^k + 1/z^k)^2 = z^{2k} + z^{-2k} + 2
\]
and
\[
0 \ge (2i\im z^k)^2 = (z^k - \bar z^k)^2 = (z^k - 1/z^k)^2 = z^{2k} + z^{-2k} - 2,
\]
we have
\[
0 \le \frac{1}{2\pi } \int_{-\pi}^\pi (e^{i\theta k} + e^{-i\theta k})^2 P(\theta) d \theta = C_{-k} + C_{k} + 2C_{0}
\]
and
\[
0 \ge \frac{1}{2\pi }\int_{-\pi}^\pi (e^{i\theta k} - e^{-i\theta k})^2 P(\theta) d \theta = C_{-k} + C_{k} - 2C_{0},
\]
which immediately gives $ |C_{-k} + C_{k}| \le 2C_{0} $. Since $C_{k} = \bar C_{-k}$, we have
\begin{equation}
\label{eq:real_part_is_smaller}
|\re C_{-k} | = |\re C_{k} | \le C_{0}.
\end{equation}

Furthermore, by rotating $z$ we may assume $C_k\in\R$,
and hence the above inequality yields $|C_k|\le C_0$ as desired.
\epf

\medskip
Inspired by these estimates, we seek to divide the terms of a non-negative homogenous polynomial $P(z, \bar z)$ in $\C^n$ into the terms that control others and those that are controlled.

\begin{defn}
Let a universal constant $M>0$ be given, and let $P(z,\bar z)$ be a non-negative homogeneous polynomial of degree $2m$ in $\C^n.$ If
\[
	P(z, \bar z) = \sum_{|\alpha|+|\bar\beta|=2m} C_{\alpha \bar\beta} \, z^\alpha {\bar z}^{\bar \beta},
\]
then a coefficient $C_{\alpha \bar\beta}$ is called $M$-dominant if $|C_{\alpha' \bar\beta'}| \le M\, |C_{\alpha \bar\beta}|$
for all $\alpha', \bar\beta'$ such that $|\alpha'|+|\bar\beta'|=2m.$
\end{defn}

\subsection{Newton Polygon Lemma}

\begin{lem}\label{newton}
Let $P(x,y)$ be a non-negative homogeneous polynomial of degree $2m$ in $\R^p \times \R^q$ for $x \in \R^p$ and $y \in \R^q.$ If \[ P(x, y) = \sum_{p+q=2m} P_{pq}, \] where $P_{pq}(\lambda x, \mu y)= \lambda^p \mu^q P(x,y),$ then $P_{p_0 q_0}\geq 0$ if either $p_0 = \max p$ or $q_0 = \max q.$ \label{newtonpolygon}
\end{lem}

\smallskip\noindent {\bf Proof:} We use a scaling argument. $P(x,y) \geq 0$ for all $(x,y) \in \R^p \times \R^q$ implies for any $t \in \R,$ $t \neq 0,$ we have that $P(t x, t^{-1} y) \geq 0.$ Letting $t \to \infty$ shows $P_{p_0 q_0}\geq 0$ when $p_0 = \max p.$ Letting $t \to 0$ shows $P_{p_0 q_0}\geq 0$ when $q_0 = \max q.$ \qed

\smallskip

\begin{rem}
The statement of
Lemma~\ref{newtonpolygon} also holds for weighted homogenous polynomials.
\end{rem}

\section{Normal forms in the pseudoconvex case}
\label{normalforms}

\subsection{Setup}
Consider a smooth real hypersurface $M$ passing through $0$,
defined near $0$ by $r=0$, where
\[
r = -2\re z_1 + p(z_{[2,n]},\bar z_{[2,n]}) +
o_\mu(1),
\]
$p$ is a weighted homogeneous polynomial

of weight $1$,
and
where the components $z_1,\ldots, z_n$ and their conjugates
are assigned the corresponding weights
$1, \mu_2, \mu_3, \ldots, \mu_n$.
In other words, we can write
$$
	\displaystyle p(z_{[2,n]},\bar z_{[2,n]}) =
	\sum_{(\alpha +  \beta | \mu) =1}
	C_{\alpha  \beta} z^\alpha \bar z^{ \beta}.
$$
Together with $M,$ we consider its model hypersurface $M_0$ defined by the weighted homogeneous part
\[
r_0=0,
\quad r_0: = -2\re z_1 + p(z_{[2,n]}, \bar z_{[2,n]}).
\]

Note that by elementary scaling argument, if $M$ is pseudoconvex, then so is its model $ M_0$ as seen in Lemma~\ref{pscmodel}.

As customary, we shall assume that $p(z_{[2,n]}, \bar z_{[2,n]})$
does not contain any pure (harmonic) monomials
 of the form $z^\alpha$ or $\bar z^\beta$.
 Otherwise, they can be always eliminated by
 a holomorphic transformation
 \[
 	(z_1, z_{[2,n]}) \mapsto (z_1 + h(z_{[2,n]}),  z_{[2,n]}).
\]

In what follows, homogeneity will be gauged with respect to a regular weight $\mu$

\subsection{First Step}
\begin{lem}\label{5.1}
Let $M_0\subset \C^n$, $n\ge 2$, be a pseudoconvex
model hypersurface
defined by
\[
	r_0 =0, \quad  r_0= -2\re z_1 + p(z_{[2,n]}, \bar z_{[2,n]}),
\]
where $p$ is a weighted homogeneous polynomial of weight $1$
with respect to some weights
\[
	\mu= (\mu_1, \mu_2, \mu_3, \ldots, \mu_n),
	\quad
	1=\mu_1>\mu_2\ge \mu_3 \ge \ldots \ge \mu_n \ge0.
\]
Let $s$ be such that
$$
	\mu_2 = \ldots = \mu_s  > \mu_{s+1},
$$
and assume that
\beq\label{p2r}
	p_{[2,s]}(z_{[2,s]}, \bar z_{[2,s]}) :=
	p(z_{[2,s]},0, \bar z_{[2,s]}, 0) \not\equiv 0.
\eeq

Then after a unitary change of the variables $(z_2, \dots, z_s)$,
we have
\beq\label{p2-def}
	p_2(z_2, \bar z_2) := p(z_2,0, \bar z_2, 0) \not\equiv 0,
\eeq
which is a plurisubharmonic homogeneous polynomial
of even degree $2 k_{22}$, where $k_{22} := \frac{1}{2 \mu_2}$.
Furthermore, $p_2$ has the form
\beq \label{p2}
	p_2 = \sum_{j=-k_{22}+1}^{k_{22}-1} C_{2,j} \, z_2^{k_{22}+j} \bar z_2^{k_{22}-j},
\eeq
where $C_{2,0}>0
$ is $\frac{1}{2 \mu_2}$-dominant among all the coefficients of $p_2$.
\label{firststeprotation}
\end{lem}

\bpf

By our assumptions, $p_{[2,s]}$ is a nonzero
weighted homogenous polynomial
in $(z_{[2,s]}, \bar z_{[2,s]})$.
Then clearly after a unitary transformation of $z_{[2,s]}$,
we may assume that \eqref{p2-def} holds with $p_2$
of the form \eqref{p2}.

Using pseudoconvexity of $M_0$

 we obtain
$$
	\partial_{z_2 \bar z_2} p_2 \ge 0,
$$
where $p_2$ is defined by \eqref{p2-def}.
Since $p_2$ does not contain any harmonic terms by our assumption,
each monomial in $(z_2, \z_2)$
will contribute to $\partial_{z_2 \bar z_2} p_2$.

We compute
\[
	\partial_{z_2 \bar z_2} p_2 = \sum_{j=-k_{22}+1}^{k_{22}-1} C_{2,j}(k_{22}+j)(k_{22}-j) \, z_2^{k_{22}+j-1} \bar z_2^{k_{22}-j-1} .
\]
By Lemma~\ref{estdegree1} applied to $\partial_{z_2 \bar z_2} p_2,$
we conclude
$C_{2,0} > 0,$
and

\[
	|C_{2,j}| \leq
	\frac{k_{22}^2}
	{k_{22}^2-j^2} C_{2,0}
	\le
	\frac{k_{22}^2}
	{2k_{22}-1} C_{2,0}
	<
	k_{22} C_{2,0}
	 ,
	 \quad
	 j \ne 0.
\]

 Note that $C_{2,0}$ is the coefficient of the balanced term $C_{2,0} \, z_2^{k_{22}} \bar z_2^{k_{22}}$ in $p_2.$ Since $r_0$ has weight $1$ with respect to the weight $\mu,$ we have
 $
 	k_{22} =\frac{1}{ 2\mu_2}
$
and $2 k_{22}$ is the degree of $p_2$.
\epf

\bigskip
We shall now apply Lemma~\ref{5.1}
with the weights given by the Catlin multitype.
Using the previous lemma, we can normalize the first non-trivial function
in the Catlin boundary system:

\begin{lem}
Let $M$ be a pseudoconvex hypersurface
defined by $r=0$, where
\[
	r =
	 -2\re z_1 + p(z_{[2,n]}, \bar z_{[2,n]})
	 + o_\mu(1),
\]
such that $p$ is a weighted homogeneous polynomial of weight $1$
with respect to the Catlin multitype at $0$,
\[
\Lambda= (1, \lambda_2, \lambda_3, \ldots, \lambda_n).
\]
Assume the Levi rank at $0$ is $s_0$ and $2<\lambda_{s_0+2} = \dots = \lambda_{s_0+s_1+1}< \lambda_{s_0+s_1+2}< +\infty.$ Let $$\B_n (0) = \{r_1, r_{s_0+2},\dots, r_n; L_2, \dots, L_n\}$$ be any boundary system at $0.$ Then there
exists a holomorphic change of coordinates at $0$
 preserving the multitype so that the boundary system in the new coordinates $$\tilde \B_n (0) = \{\tilde r_1,\tilde  r_{s_0+2}, \dots, \tilde r_n; \tilde L_2, \dots, \tilde L_n\},$$ has the simplest possible first functions $r_{s_0+2}, \dots, r_{s_0+s_1+1}$ given by
\beq
	r_j = \re z_j+o\left(\frac{1}{\lambda_j}\right)
\eeq
\label{firststepfixr2}
for $s_0+2 \leq j \leq s_0+s_1+1.$
\end{lem}

\bpf By a Chern-Moser type argument \cite{CM}, we may assume that at $0$ the Levi rank $s_0=0.$
Furthermore, it is easy to see this lemma reduces to proving that at the level of the model hypersurface $r_0=0,$ where \[
	r_0 =
	 -2\re z_1 + p(z_{[2,n]}, \bar z_{[2,n]}),
\] for $s_0+2 \leq j \leq s_0+s_1+1$ we can bring $r_j$ to the form $r_j=\re z_j$ via a holomorphic polynomial change of the variables.
We start by noting that
the assumption \eqref{p2r}
must hold for the Catlin's multitype of the model hypersurface, which is the same as that of the original hypersurface.
Indeed, otherwise we could increase the inverse weights
$$
	\lambda_2 =\ldots = \lambda_{s_1+1}
$$
and decrease the remaining bigger inverse weights,
still keeping the total weighted degrees of
the terms in $p$ greater or equal $1$, which would contradict that assumption that $(1, \lambda_2, \lambda_3, \ldots, \lambda_n)$ is the Catlin multitype at $0$. For the moment, assume $s_1=1.$

We can apply Lemma~\ref{firststeprotation} to obtain
a decomposition
\[
	r_0 = -2\re z_1 + p_2(z_2, \bar z_2) + q_2(z_{[2,n]}, \bar z_{[2,n]}),
\]
where $p_2$ satisfies \eqref{p2} and
$$
	q_2(z_2,0,\bar z_2,0) \equiv 0.
$$
We would like to make another change of variables that would ensure the function $r_2$ in the boundary system has the simplest possible expression, namely $r_2 = \re z_2.$ Note that the boundary system contains a function $r_2$ due to the assumption $2<\lambda_2 < +\infty.$ To determine what change of variables needs to be made, we notice that  regardless of what form $r_2$ initially assumes, after the change of variables mandated by the application of Lemma~\ref{firststeprotation},
\begin{equation}
\label{rp+2prep}
\frac{1}{(k'-1)! k''!}
\partial^{k' - 1}_{z_2} \partial^{k''}_{\bar z_2} r_0
= C_{2,0} \, z_2 + C_{2,-1} \, \bar z_2
+ T(z_{[3,n]},\bar z_{[3,n]} ),
\end{equation}
where $k'+k''=2 k_{22}=\lambda_{2}$ and $ T(z_{[3,n]},\bar z_{[3,n]} )$ is the sum of terms coming from
differentiation of $q_2$ in the expression for $r_0.$ Note that $T$ cannot depend on $z_2$ due to the weight restriction.

It is beneficial to split $q_2$ as
\begin{equation*}

q_2 =
\sum_{k+l = 2k_{22}-1} z_2^k \bar z_2^l T_{kl}(z_{[3,n]}, \bar z_{[3,n]})\\

+
S_2(z_{[2,n]}, \bar z_{[2,n]}),

\end{equation*}
where all monomials in
$S_2$ have their total degree in $(z_2, \bar z_2)$
less than $2k_{22}-1$.

By the pseudoconvexity of $M_0$, we see that for $j \ge 3$,
\[
\partial_{z_j \bar z_j} r_0 =
	\sum_{k+l = 2k_{22}-1} z_2^k \bar z_2^l
	\partial_{z_j \bar z_j}T_{kl}(z_{[3,n]}, \bar z_{[3,n]})

+ \partial_{z_j \bar z_j} S_2 \ge 0.
\]
Choosing
$|z_2| >> |z_j|$ for all $j \ge 3$,
 we conclude
\[
	\sum_{k+l = 2k_{22}-1} z_2^k \bar z_2^l
	\partial_{z_j \bar z_j}T_{kl}(z_{[3,n]}, \bar z_{[3,n]})
	\ge 0,
	\quad
	j \ge 3.
\]
Since the left-hand side changes the sign when $z_2$ does, we obtain

\[
\partial_{z_j \bar z_j} T_{kl} = 0, \ j \ge 3.
\]
Since the $z_j$-direction can be rotated
arbitrarily by a change of coordinates,
by a similar argument, the whole Levi form of each $T_{kl}$
must vanish identically,
which means that each $T_{kl}$ is harmonic,
i.e.\ a sum of holomorphic and antiholomorphic functions
in $z_{[3,n]}$.

In particular, after the change of variables mandated by the application of Lemma~\ref{firststeprotation},
in the boundary system
$$
	L_2:= \d_{z_2} + p_{z_2} \d_{z_1},
	\quad
	\ls = \{\bar L_2, L_2, \bar L_2, \ldots, L_2, \bar L_2\},
$$
where $L_2$ and $\bar L_2$ appear $k'-1$ and $k''$ times respectively. Note that if $\lambda_2 = \lambda_3 = \dots = \lambda_{s_1+1},$ another linear change of variables to gather all terms coming from $z_3, \dots, z_{s_1+1}$ into $z_2$ may be required in order to achieve the expression for $L_2$ claimed above.

Since $p$ does not depend on $z_1$,
we can ignore differentiations in that direction
in the expressions of $\ls \d r$.

Hence we can compute $r_2$ up to a constant as
$$
	r_2 = \ls \d r  \sim   \re \partial^{k' - 1}_{z_2} \partial^{k''}_{\bar z_2} r_0
	 \sim \re( C_{2,0} \, z_2 + C_{2,-1} \, \bar z_2 + T),
$$
where
\[
T = \phi_2(z_{[3,n]}) + \overline{\psi_2(z_{[3,n]})}
\]
with $\phi_2$ and $\psi_2$ holomorphic.
By a rotation in $z_2$, we can assume
$C_{2,-1}$ real and nonnegative.
Since $C_{2,0}>0$,
we can consider the change of variables,
\begin{equation}
\label{eq:change_of_vars_z2}
z_2 = \frac{1}{(C_{2,0} + \bar C_{2,-1})} z'_2 - (\phi_2 + \psi_2)
\end{equation}
leading to
$r_2 \sim \re z_2$ and finally by scaling to
\[ r_2 = \re z_2.  \]
Now let $s_1>1.$ For every $j$ such that $3 \leq j \leq s_1+1,$ we carry out the same procedure noting that due to weight considerations the change of variables required to transform $r_j$  into $r_j = \re z_j$ will not affect variables $z_1, \dots, z_{j-1}.$
\epf

\smallskip
\begin{rem}
A similar argument cannot be carried out to normalize
the next boundary system function $r_{s_0+s_1+2}$ if $\lambda_{s_0+s_1+1} < \lambda_{s_0+s_1+2}.$ A counterexample is given at the end of the paper in Section~\ref{r3counterexample}.
\end{rem}

\medskip\noindent {\bf Proof of Theorem~\ref{flatnessprop}:} At the level of the model hypersurface, $r_0=0,$ with \[
	r_0 =
	 -2\re z_1 + p(z_{[2,n]}, \bar z_{[2,n]}),
\] Lemma~\ref{firststepfixr2} shows that after a change of variables $\tilde r_j = \re z_j$ for $s_0+2 \leq j \leq s_0+ s_1+1.$ Therefore, $\tilde L_j=\frac{\partial}{\partial z_j}$ and $
\tilde L_{s_0+ s_1+2} =\frac{\partial}{\partial z_{s_0+ s_1+1}}+o\left(-\frac{1}{\lambda_{s_0+ s_1+2}}\right)$ for the model hypersurface as $\tilde L_{s_0+ s_1+2}$ is chosen so that $\tilde L_{s_0+ s_1+2} \tilde r_{s_0+ s_1+1} = 0$, and by Catlin own normalization result in \cite{catlinbdry}, Proposition 5.3, $$r_0=2\re z_1+\sum_{j=2}^{s_0+1} |z_j|^2+f_1(z_{s_0+2}, \dots, z_n)+ 2 \re \left(\sum_{j=2}^{s_0+1} z_j f_j(z_{s_0+2}, \dots, z_n)\right).$$ The proposition follows.
\qed

\medskip\noindent {\bf Proof of Corollary~\ref{C3case}:} We apply Proposition~\ref{flatnessprop} with $s_0=0$ and $n=3.$
\qed

\subsection{Second Step}

\begin{lem}
Let $M_0$ be a pseudoconvex hypersurface with polynomial defining function
\[
r_0 = -2\re z_1 + p(z_{[2,n]}, \bar z_{[2,n]}).
\]
such that $p$ is a weighted homogeneous polynomial in $z_2, \dots, z_n$
 of total weight $1$ with respect to the weights
\[
\mu= (1, \mu_2, \mu_3, \ldots, \mu_n).
\]
Let $s$ be such that
$$
	\mu_3 = \ldots = \mu_s > \mu_{s+1},
$$
and assume that
\begin{equation}
\label{eq:nondegeneracy_z3}
	p(z_{[2,s]},0, \bar z_{[2,s]},0) \not\equiv p_2(z_2, \bar z_2),
\end{equation}
where $p_2$ is given by \eqref{p2-def}.

Then after a unitary change of variables $z_3, \dots, z_s$,
the polynomial
$p$ admits a decomposition
\begin{equation}
\label{eq:decomposition_z3}
	p=p_2(z_2, \bar z_2) + p_3(z_{[2,3]}, \bar z_{[2,3]}) + q_3(z_{[2,n]}, \bar z_{[2,n]}),
\end{equation}
where $p_3$ is of degrees $2k_{23}$ and $2k_{33}$
in $(z_2,\bar z_2)$ and $(z_3, \bar z_3)$
respectively, $q_3$ has only terms of degree less than $2k_{33}$
in $(z_3, \bar z_3)$,
and $p_3$ contains a non-zero term
$$
	C |z_2|^{2k_{23}} |z_3|^{2k_{33}} \ge 0,
	\quad k_{33}>0.
$$

\label{secondsteprotation}
\end{lem}

\smallskip\noindent {\bf Proof:}
Just like at the beginning of the proof of Lemma~\ref{firststepfixr2}, we write $r_0$ as
\[
r_0 = -2\re z_1 + p_2(z_2, \bar z_2) + q_2(z_{[2,n]}, \bar z_{[2,n]} ).
\]
After a possible unitary change of variables in $z_{[3,s]}$,
we can assume that
$$q_2(z_{[2,3]},0, \bar z_{[2,3]},0)\not\equiv 0.$$
Using Lemma~\ref{newtonpolygon} for guidance, we next identify the non-zero terms in $q_2$
of the highest (total) degree $d_3$ in $(z_3, \bar z_3)$
and denote their sum by
$p_3(z_{[2,3]}, \bar z_{[2,3]})$.
Then $p$ can be decomposed as
$$
	p =  p_2(z_2, \bar z_2)
	+
	p_3(z_{[2,3]}, \bar z_{[2,3]})
	+ q_3(z_{[2,n]}, \bar z_{[2,n]} ),
$$
where
all monomials in
$q_3(z_{[2,3]}, 0, \bar z_{[2,3]}, 0)$
have degree less than $d_3$ in $(z_3, \bar z_3)$.

We shall consider the inequality
\beq\label{diag}
	(\d_{z_2} + t\d_{z_3}) (\d_{\bar z_2} + t\d_{\bar z_3})
	(p_2(z_2, \bar z_2) + p_3(z_{[2,3]}, \bar z_{[2,3]}) + q_3(z_{[2,3]},0, \bar z_{[2,3]},0)) \ge 0,
\eeq
that follows from the pseudoconvexity of $M_0$,
where $t$ is an arbitrary parameter.
Identifying terms of the highest degree in $(z_3, \bar z_3)$ we obtain
$$
	\d_{z_2\bar z_2} p_3 \ge 0.
$$

We first assume that
\beq\label{z22}
	\d_{z_2\bar z_2} p_3 \equiv 0,
\eeq
i.e.\ all terms in $p_3$ are harmonic in $z_2$.
Then again identifying terms of the highest degree in $(z_3, \bar z_3)$
under this assumption, we obtain
$$
	2t \re \d_{z_2\bar z_3} p_3 + \d_{z_2\bar z_2} \tilde q_3 \ge 0,
$$
where $\tilde q_3$ is the sum of certain terms from $q_3$.
Since $t$ is arbitrary, we must have
$$
	\d_{z_2\bar z_3} p_3 \equiv 0.
$$
Since $p_3$ has no harmonic terms and all terms are harmonic in $z_2$,
the only possibility remaining is that $p_3$ is independent of $z_2$.
But then, since $p_3$ is nonzero and has no harmonic terms, we must have
\beq\label{d33}
	\d_{z_3\bar z_3} p_3 \not\equiv 0.
\eeq

On the other hand, if \eqref{z22} does not hold,
we obtain the polynomial $\d_{z_2\bar z_2} p_3\ge 0$,
which for any generic fixed $z_2$, is non-constant and homogeneous in $(z_3,\bar z_3)$,
which again implies \eqref{d33}.

Thus in all cases, we must have \eqref{d33}.
Applying Lemma~\ref{estdegree1}
to $\d_{z_3\bar z_3} p_3$ for fixed $z_2$ (when it does not identically vanish),
we conclude that the degree $d_3$ in $(z_3, \bar z_3)$
is even, $d_3=2k_{33}$, and $\d_{z_3\bar z_3} p_3$ contains
nonzero terms of the form
$$\tilde p(z_2,\bar z_2)z_3^{k_{33}}\bar z_3^{k_{33}} \ge 0.$$
Applying again Lemma~\ref{estdegree1}, this time to $\tilde p$,
we conclude that $p_3$ contains a nonzero term
$$
	C z_2^{k_{23}} z_3^{k_{33}} \bar z_2^{k_{23}}  \bar z_3^{k_{33}} \ge 0,
$$
as desired.
\qed

\subsection{Inductive Step}
The general inductive step
will be obtained from the following result.

\begin{lem}
Let $M_0$ be a pseudoconvex (model) hypersurface through $0$ with polynomial defining function
\[
r = -2\re z_1 + p(z_{[2,n]}, \bar z_{[2,n]}).
\]
such that $p$ is a weighted homogeneous polynomial in $z_2, \dots, z_n$ of weight $1$
with respect  to the weights
\[
\mu= (1, \mu_2, \ldots, \mu_n),
\quad
1>\mu_2\ge\ldots\ge \mu_n.
\]
Assume that we have already shown that
\[
\begin{aligned}
p(z_{[2,n]}, \bar z_{[2,n]}) &=
p_2(z_2, \bar z_2)
+
p_3(z_{[2,3]}, \bar z_{[2,3]})
+
\cdots
\\
&
+
p_{m-1}(z_{[2,m-1]},\bar z_{[2,m-1]})
+ q_{m-1}(z_{[2,n]}, \bar z_{[2,n]}).
\end{aligned}
\]
where
$$
	q_{m-1}(z_{[2,m-1]},0,\bar z_{[2,m-1]},0) \equiv 0.

$$
Let $s$ be such that
$$
	\mu_m = \ldots = \mu_s  > \mu_{s+1},
$$
and assume that
\begin{equation}
\label{eq:nondegeneracy_z_n}

	q_{m-1}(0,z_{[m,s]},0, 0,\bar z_{[m,s]},0) \not\equiv 0.

\end{equation}

Then after a unitary change of the variables $(z_m, \dots, z_s)$,
$q_{m-1}$ admits the decomposition
\begin{equation}
\label{eq:decomposition_z_n}
	q_{m-1} = p_m(z_{[2,m]}, \bar z_{[2,m]}) + q_m(z_{[2,n]}, \bar z_{[2,n]}),
\end{equation}
where
$p_m$ is a homogeneous polynomial of degree $2k_{mm}>0$ in $(z_m, \bar z_m)$
whose expansion contains a term

\[
C |z_2|^{2 k_{2m}} |z_3|^{2 k_{3m}} \cdots |z_m|^{2 k_{mm}},

\quad C > 0,

\]

and
$q_m$ has only terms of degree less than $2k_{mm}$
in $(z_m, \bar z_m)$.
\label{inductivesteprotation}
\end{lem}

\smallskip\noindent {\bf Proof:}

After a possible unitary change of variables in $z_{[m,s]}$,
we can assume that
$$q_{m-1}(0,z_m,0, 0,\bar z_m,0)\not\equiv 0.$$
We next identify the non-zero terms in $q_{m-1}$
of the highest degree $d_m>0$ in $(z_m, \bar z_m)$
and denote their sum by
$p_m(z_{[2,m]}, \bar z_{[2,m]})$.
We thus write
\[
	q_{m-1} = p_m(z_{[2,m]}, \bar z_{[2,m]}) + q_m(z_{[2,n]}, \bar z_{[2,n]}),

\]
where all monomials in $q_{m}(z_{[2,m]},0, \bar z_{[2,m]},0)$ have degree less than $d_m$ in $(z_m, \bar z_m)$ by construction.

We shall now use the pseudoconvexity assumption on $M_0.$
For any $j,$ $2\leq j<m$,
and any arbitrary real parameter $t,$ consider
\beq\label{diagm}
\begin{aligned}
	(\d_{z_j} + t\d_{z_m}) (\d_{\bar z_j} + t\d_{\bar z_m}) &
	\Big(
		p_2(z_2, \bar z_2) + p_3(z_{[2,3]}, \bar z_{[2,3]}) + \cdots \\&+
p_{m-1}(z_{[2,m-1]},\bar z_{[2,m-1]})
+
p_{m}(z_{[2,m]},\bar z_{[2,m]})\\&
+
q_{m}(z_{[2,n]}, \bar z_{[2,n]})
\Big) \ge 0.
\end{aligned}
\eeq
Identifying the highest degree terms in $(z_m, \bar z_m),$ we obtain that
\beq\label{pos}
\partial_{z_j\bar z_j} p_m  \ge 0,
\quad j<m.
\eeq

We first assume $\partial_{z_j\bar z_j} p_m  \equiv 0$ for all $j<m$,
i.e.\ all terms of $p_m$ are harmonic in $z_j$.
 Then looking at the highest degree terms in $(z_m, \bar z_m)$ in \eqref{diagm} yields
$$
	2t \re \d_{z_j\bar z_m} p_m + \d_{z_j\bar z_j} \tilde q_m \ge 0,
$$
where $\tilde q_m$ consists of the sum of the terms of degree $d_m-1$
in $(z_m, \bar z_m)$
from $p_2+\cdots+ p_m + q_m$.
Given that $t$ is arbitrary, we conclude
$$
	\d_{z_j\bar z_m} p_m \equiv 0.
$$
Note that $p_m$ contains no harmonic terms and by our assumption, all terms of $p_m$ are harmonic in $z_j$ for all $j<m$.
Hence any nonzero term of $p_m$ must have both $z_m$ and $\bar z_m$,
that is

we must have that
\beq\label{mmDpm}
\partial_{z_m\bar z_m} p_m  \not\equiv 0.
\eeq

Now, on the contrary, assume that $\partial_{z_j\bar z_j} p_m  \not\equiv 0$
for some $j<m$.
For any generic fixed $z_2, \dots, z_{m-1}$,
 the polynomial $\partial_{z_j\bar z_j} p_m$ is non-constant, non-negative by \eqref{pos},
 and homogeneous in $(z_m, \bar z_m)$ of degree $d_m>0$.
 Clearly, \eqref{mmDpm} must hold in this case as well. Therefore, regardless of the case, \eqref{mmDpm} holds.

 We claim that by Lemma~\ref{estdegree1} inductively applied to $\partial_{z_m\bar z_m} p_m,$ the expansion of the polynomial $\partial_{z_m\bar z_m} p_m$ contains a term
\beq\label{c-term}
	C |z_2|^{2 \alpha_2}|z_3|^{2 \alpha_3} \cdots |z_m|^{2 \alpha_m},
	\quad \alpha_m>0,
	\quad C> 0.
\eeq
Indeed, first keep $z_2, \dots, z_{m-1}$ fixed and apply Lemma~\ref{estdegree1} to $\partial_{z_m\bar z_m} p_m,$ a non-constant, non-negative,
 and homogeneous polynomial in $(z_m, \bar z_m)$ of degree $d_m-2$.
We conclude that the sum of the terms in $p_m$ having equal degrees in $z_m$ and $\bar z_m$ is of the form
  $$
 	P^{m-1}(z_2, \dots, z_{m-1}, \bar z_2, \dots, \bar z_{m-1})  |z_m|^{2 \alpha_m} \geq 0,
	\quad
	\alpha_m = d_m/2 > 0,
 $$
 where

 $P^{m-1}$ is a nonzero weighted homogeneous polynomial.

Let $l$ be the highest index among $2, \dots, m-1$ for which $P^{m-1}$ has  degree $d_l >0$ in $(z_l, \bar z_l).$ If no such $l$ exists, then $P^{m-1}$ is constant and positive, and we are done; otherwise we extract the sum $\tilde P^{m-1}$ of terms of the top degree $d_l$ in $(z_l, \bar z_l)$, which is not identically zero, and nonnegative in view of Lemma~\ref{newton},
 keep $z_2, \dots, z_{l-1}$ fixed and apply Lemma~\ref{estdegree1} to $\tilde P^{m-1}$ viewed as a homogeneous polynomial in $(z_l, \bar z_l).$
 Proceeding inductively, we see that
 $

 p_m$ contains a non-zero term \eqref{c-term}

maximizing the multidegree in $(z_2,\z_2), \ldots, (z_m, \z_m)$
in the reversed lexicographic order

as claimed.

\qed

\medskip\noindent {\bf Proof of Theorem~\ref{main}:}
Our Main Theorem is a consequence of Lemmas~\ref{firststeprotation}, \ref{secondsteprotation}, and \ref{inductivesteprotation}.
In fact, at each step, either the nonvanishing assumption in the Lemmas holds, and hence
we obtain a positive $A_j$ or we can lower the weight $\mu$ lexicographically starting with
$\mu_j$. In the latter case, either we regain the nonvanishing assumption for a lower $\mu_j$
and keep applying the Lemmas with lower weights, or no further term is left and the proof is complete.
\qed

\medskip\noindent {\bf Proof of Corollary~\ref{catlincase}:} This result follows from Theorem~\ref{main}. \qed

\section{Counterexample to a boundary system normalization}
\label{r3counterexample}

We would like to show via an example that the kind of normalization of function $r_2$ in Catlin's boundary system that we carried out in Theorem~\ref{flatnessprop} fails for $r_3.$ Let the defining function of the domain be given by
\[
	r_0 = -2\re z_1 + p(z_{[2,4]}, \bar z_{[2,4]}),
\]
where $p$ is a weighted homogeneous polynomial chosen so that the weight of $z_2^2$ equals the weight of $z_3^3.$ For example, the polynomial
\[
\begin{split}
p(z_{[2,4]}, \bar z_{[2,4]}) &= |z_2|^6
	+ |z_2|^2 |z_3|^6
	+ |z_2|^4 |z_3|^2 |z_4|^2
	+|z_2|^2|z_3|^4 |z_4|^4\\&
	+ 2\epsilon \re ( |z_2|^2 z_3^2 \bar z_3^3  |z_4|^2)
	+ |z_3|^8|z_4|^2
\end{split}
\]

is homogeneous of weight $1$ with respect to

$$
	\Lambda = \left(1, \frac16, \frac19, \frac1{18}\right).
$$
Note that
$$
	f:=\d_{z_2}\d_{\bar z_2} \d_{z_3}^2 \d_{\bar z_3}^3 p
	= c_1 z_3 + c_2 |z_4|^2,
$$
and hence $r_3=\re f$
cannot be tranformed into $c\re z_3$
by any holomorphic coordinate change.

We would like to show that $p$ is plurisubharmonic when $\epsilon$ is small, where $0<\epsilon<1.$
First, we observe that if $z_2=0,$ $z_3=0,$ or $z_4=0,$ the term $2\epsilon \re ( |z_2|^2 z_3^2 \bar z_3^3  |z_4|^2)$ vanishes, and thus $ p$ is a sum of squares, making it automatically plurisubharmonic. Therefore, without the loss of generality, we can assume simultaneously that $z_2\neq0,$ $z_3\neq0,$ and $z_4\neq0.$ As a result, we can compute the Levi form in terms of vectors fields $$X=\sum_{j=2}^4 a_j \, z_j \, \frac{\partial}{\partial z_j}$$ and $\bar X,$ which keep the weight of each term of $p$ unchanged.

Rather than writing out the Levi form in full in terms of $X,\bar X$ as a quadratic form in $a_j,$ we observe that by Cauchy-Schwarz,
\begin{equation}
\label{cs1}
\left|2\re ( |z_2|^2 z_3^2 \bar z_3^3  |z_4|^2)\right| \le ( |z_2|^2 |z_3|^6 + |z_2|^2|z_3|^4 |z_4|^4)
\end{equation}
and
\begin{equation}
\label{cs2}
\left|2\re ( |z_2|^2 z_3^2 \bar z_3^3  |z_4|^2)\right|  \le ( |z_2|^4 |z_3|^2 |z_4|^2 + |z_3|^8|z_4|^2).
\end{equation}

For the right-hand side expression in \eqref{cs1}, its kernel is given by the simultaneous vanishing of $\{a_2+3a_3 =0\}$ and $\{a_2+2a_3+2a_4 =0\}.$ For the right-hand side expression in \eqref{cs2}, its kernel is given by the simultaneous vanishing of $\{2a_2+a_3+a_4 =0\}$ and $\{4a_3+a_4 =0\}.$ The intersection of these kernels is just the origin, so for small $\epsilon,$ $p$ is indeed plurisubharmonic. Therefore, $r_0$ defines a pseudoconvex domain.

\bibliographystyle{alpha}