Solution (source code)

= Solution

Normalize the second price to one and write $p>0$ for the first price and $t>0$ for the varying endowment. Let $Z(p,t)$ be first-good <aggregate excess demand>. Under <Walras law>, the second excess-demand coordinate equals $-pZ(p,t)$, so one market-clearing equation suffices. A <regular exchange economy> at fixed $t$ has $Z_p(p,t)\ne0$ at every equilibrium.

A sufficient joint condition is that zero be a <regular value> of the smooth map $Z:(0,\infty)^2\to\mathbb R$:
$$
\boxed{Z(p,t)=0\quad\Longrightarrow\quad (Z_p(p,t),Z_t(p,t))\ne(0,0).}
$$
To prove the almost-everywhere conclusion, the <regular level set theorem> makes $M=Z^{-1}(0)$ a smooth one-dimensional <manifold>. Project $M$ to the parameter axis by $\pi(p,t)=t$. Its <tangent space> consists of vectors $(h,k)$ with $Z_ph+Z_tk=0$. If $Z_p\ne0$, every $k$ is possible, so the derivative of $\pi$ is surjective. If $Z_p=0$, the joint condition gives $Z_t\ne0$, forcing $k=0$; the point is critical for $\pi$.

Thus the parameters with a singular equilibrium are exactly the critical values of this projection. <Sard theorem> makes that set a <null set>. Therefore \b[almost every parameter gives a regular economy]. No claim of existence at every parameter is needed for this sufficient regularity criterion.