\section{The exact count optimum and all determinant regimes}\label{sec:all-regimes} We now remove the positive-determinant restriction from the unrestricted infimum. Throughout this section all entries of $R,L$, the three observed masses, and the direct visible flows are positive and satisfy the consistency identities of Section~\ref{observations-and-the-main-theorem}. Put \begin{equation} R=\begin{pmatrix}a&x\\y&b\end{pmatrix},\quad s=x+y,\quad j=x-y,\quad h=\min\{\sqrt{ab},\sqrt{xy}\},\quad \vartheta=\sqrt{1-4h^2/s^2}. \label{eq:all-coordinates} \end{equation} All square roots are real, $0\le\vartheta<1$, and $\vartheta\ge |j|/s$. Define, with its continuous value at $\vartheta=0$, \begin{equation} \Psi(R)=2s\vartheta\artanh\vartheta,\qquad \mathcal B(d)=(F_{12}-F_{21})\log(F_{12}/F_{21})+\Psi(R). \label{eq:sharp-count-functional} \end{equation} If $\det R\ge0$, then $\vartheta=|j|/s$ and $\mathcal B=B$. If $\det R<0$, then $\mathcal B>B$. These expressions are continuous, including at $\det R=0$ and $x=y$. \begin{theorem}[Exact count optimum and fixed-first-moment infimum]\label{thm:all-infimum} Every finite compatible model satisfies $\sigma(Q)\ge\mathcal B(d)$. If only $P,F,R$ are prescribed, the minimum is $\mathcal B(d)$ and is attained with at most two hidden states. If the full positive data $d=(P,F,R,L)$ are prescribed, then \begin{equation} \boxed{I_\infty(d)=I_4(d)=\mathcal B(d).} \label{eq:all-infimum} \end{equation} The latter infimum can be approached with the same data held exactly fixed, no hidden-to-hidden edges, and a uniform upper bound on transition rates. This statement includes positive, zero and negative determinants. Four is a sufficient budget; it is not claimed to be the smallest universal budget. \end{theorem} The geometric matrices $J,Z$, stationary path weights and Gram bound used below are defined in Appendix~\ref{sec:negative}, in \eqref{eq:geometric-killed}, \eqref{eq:path-rate-discrete} and \eqref{eq:affinity-Gram}--\eqref{eq:affinity-upper}. \subsection{A scalar inequality and its equality condition} For $00\quad(00$ and vanishes at zero. The limiting derivatives at $v=1$ preserve strict convexity. For each microscopic excursion sequence $\gamma:1\to H\to2$, let $A_\gamma=w(\gamma)>0$ and $B_\gamma=w(\bar\gamma)>0$, with $w$ as in \eqref{eq:path-rate-discrete}. Their total rates are $x,y$. Set \[p_\gamma=\frac{A_\gamma+B_\gamma}{s},\quad u_\gamma=\frac{A_\gamma-B_\gamma}{A_\gamma+B_\gamma},\quad v_\gamma=\sqrt{1-u_\gamma^2}. \] Then $\sum p_\gamma=1$, $\sum p_\gamma u_\gamma=j/s$ and \begin{equation} \sum_\gamma(A_\gamma-B_\gamma)\log\frac{A_\gamma}{B_\gamma} =s\sum_\gamma p_\gamma f(v_\gamma) \ge s f\left(\frac{2G_{12}}s\right). \label{eq:sharp-affinity-jensen} \end{equation} Jensen holds on this countable probability space because the left side is integrable for every fixed finite chain. The Gram bound \eqref{eq:affinity-upper} and Cauchy--Schwarz on cross paths imply $G_{12}\le h$. Since $f$ decreases, \eqref{eq:sharp-affinity-jensen} is at least $s f(2h/s)=\Psi(R)$. Return-path entropy is nonnegative and direct jumps give the remaining term. This proves the universal lower bound. For $\det R<0$, equality forces, separately, zero return-path entropy, $G_{12}=\sqrt{ab}$, and $|u_\gamma|=\vartheta$ for every supported cross path. This follows from strict decrease and strict Jensen equality. Both signs occur, because $\vartheta>|j|/s$. If $\det R\ge0$, equality with $B$ instead forces the familiar log-sum equality: every cross-path ratio equals $x/y$, and every return path has the same rate as its reverse. \subsection{Constructing the two optimal channels} For $\det R<0$ define positive weights \begin{equation} w_\pm=\frac{s\pm j/\vartheta}{2} \end{equation} and matrices \begin{equation} M_\pm=w_\pm \begin{pmatrix} a/s&(1\pm\vartheta)/2\\ (1\mp\vartheta)/2&b/s \end{pmatrix}. \label{eq:optimal-opposite-channels} \end{equation} They are strictly positive, sum to $R$, and have determinant zero since $(1-\vartheta^2)/4=ab/s^2$. Their cross affinities are respectively $\pm2\artanh\vartheta$. Their combined entropy contribution is exactly $\Psi(R)$ by \eqref{eq:H6}. The opposite affinities are required for this optimum; they are not inferred from a nonzero net current, which can vanish. For $\det R>0$, use the two matrices \eqref{eq:H9} with $R_f=R$; the second is a diagonal-only channel. For $\det R=0$, $R$ itself is one positive rank-one channel. Their cost is the cross term in $B$. To fit arbitrary positive $P,F$ consistent with $R$, give every channel the common residence time $P_H/(\mathbf1^TR\mathbf1)$ and use the channel construction of Section~\ref{exact-first-moments-with-arbitrarily-little-extra-dissipation}. This proves exact attainment for the count-only problem, with at most two hidden states. The symmetric specialization is established prior work: for $R_{11}=R_{22}=1-p$ and $R_{12}=R_{21}=p>1/2$, the result reduces to the two-channel formula in Skinner--Dunkel \cite[Author manuscript, Appendix Eqs.~(A28)--(A29)]{Skinner2021}. Indeed, if $u=\sqrt{2p-1}$, then $\vartheta=2u/(1+u^2)$ and $\Psi(R)=4u\log((1+u)/(1-u))$. We do not claim that special formula or its counterflow mechanism as new. The proof above treats arbitrary positive asymmetric $R$ without assuming a symmetric optimizer, and the following first-moment and attainment results concern the specified fixed-data inverse problem. \subsection{Restoring arbitrary first moments exactly} Choose $0<\delta<\min_{ij}L_{ij}/R_{ij}$ and define $R_f,S$ by \eqref{eq:H7}. Both are entrywise positive for small positive $\varepsilon$, whether or not either determinant is positive. Realize $R_f$ by the at-most-two optimal channels just constructed, with residence time $\delta$. Realize the positive $S$ by the two positive rank-one factors $S_1,S_2$ constructed below \eqref{eq:H9}, with occurrence matrices $\varepsilon S_g$ and residence time $1/\varepsilon$. The identities \eqref{eq:H8} prove exact agreement with $R,L$, and consistency recovers $P,F$. Zero channels at determinant zero are omitted. The entropy equals the fixed direct term plus \[\Psi(R_f(\varepsilon))+\varepsilon\sum_{g=1}^2 (S_{g,12}-S_{g,21})\log(S_{g,12}/S_{g,21}).\] Continuity of $\Psi$ and the positive limiting slow factors give convergence to $\mathcal B(d)$. Every fast total exit rate is $1/\delta$, every slow total exit rate is $\varepsilon$, and visible departure rates are fixed by the observations. All masses and nonzero rates are finite and positive at every positive parameter. This proves \eqref{eq:all-infimum}. It does not replace the endpoint by a reducible chain or exchange a singular limit with a duration moment. \section{When is the unrestricted infimum attained?}\label{sec:all-attainment} The preceding theorem gives an infimum for every strictly positive consistent first-moment data set. Finite attainment has a more restrictive, exactly describable boundary. \begin{theorem}[Finite-attainment classification]\label{thm:finite-attainment-all} Under the positivity and consistency assumptions of Theorem~\ref{thm:all-infimum}, some finite compatible model attains $\mathcal B(d)$ if and only if the condition in its determinant regime holds: \begin{align} \det R>0:&\quad L_{12}/R_{12}=L_{21}/R_{21}\ \text{and}\ \det L>0;\label{eq:attain-positive}\\ \det R=0:&\quad L=tR\quad\text{for some }t>0;\label{eq:attain-zero}\\ \det R<0:&\quad L=t_+M_++t_-M_-\quad\text{for some }t_+,t_->0.\label{eq:attain-negative} \end{align} The respective sufficient hidden-state budgets are four, one and two. For negative determinant, the last condition is equivalently \begin{equation} \frac{L_{11}}a=\frac{L_{22}}b=\frac{L_{12}+L_{21}}s, \qquad |L_{12}-L_{21}|<\vartheta(L_{12}+L_{21}). \label{eq:negative-attainment-test} \end{equation} Failure means nonattainment in every finite hidden dimension, not failure of the unrestricted infimum formula. \end{theorem} \begin{proof} We use a Laplace-weighted version of the geometric matrix. With $\Pi=\diag(\pi_h)$, set \begin{equation} G(z)=Z(J+z\Pi)^{-1}Z^T,\qquad z\ge0. \label{eq:weighted-geometric-kernel} \end{equation} The path expansion multiplies each visit to $h$ in \eqref{eq:path-rate-discrete} by $d_h/(d_h+z\pi_h)$. This is the conditional Laplace transform of its exponential holding time, and its product is unchanged by path reversal. Consequently $G(z)$ is precisely the sum of geometric forward/reverse path rates with that common duration weight. In particular, when every return sequence has equal forward/reverse rate, $\mathcal K_{ii}(z)=G_{ii}(z)$. Suppose first $\det R\ge0$ and equality is attained. Every cross-path rate ratio is $c=x/y$. Thus for all $z\ge0$, \begin{equation} D_c^{-1/2}\mathcal K(z)D_c^{1/2}=G(z),\qquad D_c=\diag(c,1). \label{eq:equality-kernel-symmetry} \end{equation} If $\det R>0$, then $G(0)$ is positive definite, so $Z$ has row rank two. Therefore \[-G'(0)=ZJ^{-1}\Pi J^{-1}Z^T\] is positive definite as well. Equation \eqref{eq:equality-kernel-symmetry} makes $D_c^{-1/2}LD_c^{1/2}$ symmetric positive definite. This is exactly the equal-cross-mean condition and $\det L>0$, since the diagonal entries of $L$ are positive. Conversely assume \eqref{eq:attain-positive}. Both symmetrized matrices $R,L$ are entrywise positive and positive definite. Choose $\delta>0$ so small that $L-\delta R$ has both properties, and then choose $\varepsilon>0$ so small that $R-\varepsilon L$ does too. The matrices $R_f,S$ in \eqref{eq:H7} consequently have positive determinant and the same cross ratio $c$. Factor each using \eqref{eq:H9}; its non-diagonal factor has ratio $c$ and its other factor is diagonal-only. Give the fast factors time $\delta$ and the slow factors time $1/\varepsilon$, with slow occurrences multiplied by $\varepsilon$. Every cross channel now has ratio $c$, not merely in a limit. The four-hidden-state realization matches $d$ and attains $B(d)$ exactly. If $\det R=0$, \eqref{eq:equality-kernel-symmetry} implies that $G(0)$ has rank one. Since $J$ is positive definite, $Z$ has rank one. Formula \eqref{eq:weighted-geometric-kernel} then has the form $G(z)=g(z)uu^T$, so \eqref{eq:equality-kernel-symmetry} implies $\mathcal K(z)=a(z)R$ with $a(0)=1$. Differentiation yields $L=tR$, with $t>0$ because all hidden durations are positive. Conversely the single channel $R$ with time $t$ gives a saturating realization. Finally suppose $\det R<0$. Equality in \eqref{eq:sharp-affinity-jensen} forces $u_\gamma=\pm\vartheta$, return-path reversibility, and $G_{12}(0)=\sqrt{ab}$. Since $G_{ii}(0)=R_{ii}$, $G(0)$ has rank one and hence $Z$ has rank one. Therefore \[\frac{\mathcal K_{11}(z)}a=\frac{\mathcal K_{22}(z)}b =\frac{G_{12}(z)}{\sqrt{ab}}. \] On each cross path, $\sqrt{A_\gamma B_\gamma}=(\sqrt{ab}/s)(A_\gamma+B_\gamma)$. The common duration weight gives \[G_{12}(z)=\frac{\sqrt{ab}}s\bigl(\mathcal K_{12}(z)+\mathcal K_{21}(z)\bigr). \] All conditional first duration moments are finite for a fixed finite chain, so the nonnegative path sums may be differentiated at zero by monotone convergence. Differentiating proves the two equalities in \eqref{eq:negative-attainment-test}. Let $\ell_\pm$ be the sums of $(A_\gamma+B_\gamma)\mathbb E[T\mid\gamma]$ over paths with sign $\pm\vartheta$. Both are strictly positive: both sign classes have positive occurrence rate and every supported duration has positive mean. Then \[\ell_++\ell_-=L_{12}+L_{21},\qquad \vartheta(\ell_+-\ell_-)=L_{12}-L_{21}. \] This proves the strict inequality. Conversely set \begin{equation} \ell_\pm=\frac{L_{12}+L_{21}\pm (L_{12}-L_{21})/\vartheta}{2},\qquad t_\pm=\ell_\pm/w_\pm>0. \end{equation} The two equalities in \eqref{eq:negative-attainment-test} and the sum/difference formulas give $L=t_+M_++t_-M_-$ entry by entry. The two channels of \eqref{eq:optimal-opposite-channels} with these times provide a finite attaining model. This also proves equivalence of the two formulations. \end{proof} \subsection{The singular two-hidden-state boundary}\label{sec:rank-one-boundary} The nonsingular compactness theorem cannot be extended to rank-one data. The exact alternative is as follows. \begin{theorem}[Rank-one feasibility and safe nonattainment]\label{thm:rank-one} Let $R$ be strictly positive with $\det R=0$, and keep the other positive consistency hypotheses. A model with at most two hidden states exists if and only if \begin{equation} \operatorname{rank}[R\ L]=1\quad\text{or}\quad \operatorname{rank}\begin{pmatrix}R\\L\end{pmatrix}=1. \label{eq:rank-one-feasibility} \end{equation} Whenever this condition holds, $I_2(d)=I_\infty(d)=B(d)$. The infimum is attained if and only if $L=tR$ for some $t>0$, in which case one hidden state suffices. Thus two-hidden-state reduction is safe throughout its feasible positive rank-one slice, even when the cross means differ; it can be safe without possessing a minimizer. \end{theorem} \begin{proof} For an actual two-hidden-state fit, $R=AK^{-1}C$ with $K$ invertible. Since $\det R=0$, $A$ or $C$ has rank at most one, and neither has rank zero. In the first case the columns of both $R,L$ lie in the one-dimensional image of $A$; in the second their rows lie in the row space of $C$. A one-hidden-state fit has both properties. This proves necessity of \eqref{eq:rank-one-feasibility}. Conversely choose $\delta,\varepsilon$ as in \eqref{eq:H7}. The positive $R_f,S$ inherit the common rank-one column or row factor. They are therefore themselves positive rank-one channels. Give them occurrence matrices $R_f,\varepsilon S$ and times $\delta,1/\varepsilon$. This is an exact two-hidden-state fit with entropy tending to $B(d)$. Theorem~\ref{thm:finite-attainment-all} supplies the precise attainment criterion, in every finite dimension.\end{proof} \begin{corollary}[Safety in all feasible two-hidden-state regimes]\label{cor:all-safety} Suppose a model with at most two hidden states fits the positive data. Safety, meaning $I_2(d)=I_\infty(d)$, holds precisely as follows: \begin{center} \begin{tabular}{@{}lp{0.69\textwidth}@{}}\toprule Occurrence matrix & Necessary and sufficient safety condition\\\midrule $\det R>0$ & Equal conditional cross-excursion means.\\ $\det R=0$ & Always safe; attainment requires $L=tR$.\\ $\det R<0$ & The two equalities and strict inequality in \eqref{eq:negative-attainment-test}.\\\bottomrule \end{tabular} \end{center} \end{corollary} \begin{proof} The positive case is Theorem~\ref{thm:H2} and the zero case is Theorem~\ref{thm:rank-one}. For negative determinant, Proposition~\ref{thm:H4} makes the two-hidden-state infimum attained. Equality of infima is therefore equivalent to finite attainment of $\mathcal B(d)$; Theorem~\ref{thm:finite-attainment-all} both characterizes it and gives a two-hidden-state witness.\end{proof} \subsection{Examples separating safety, attainment and feasibility} For the negative-determinant example of Appendix~\ref{sec:negative}, $s=17/2$, $\vartheta=15/17$, and $L=R/50$. Theorem~\ref{thm:all-infimum} gives its exact optimum: \begin{equation} I_\infty(d)=I_2(d)=\frac{15}{2}\log16. \end{equation} This symmetric value reproduces the established two-channel count mechanism discussed above. It serves as an exact check of the general formula and of the first-moment attainment criterion. A feasible but unsafe negative-determinant example uses \[N_1=\begin{pmatrix}2&8\\1/4&1\end{pmatrix},\quad N_2=\begin{pmatrix}1&1/4\\4&1\end{pmatrix},\qquad t_1=1/100,\quad t_2=1/50. \] Then \[R=\begin{pmatrix}3&33/4\\17/4&2\end{pmatrix},\quad L=\begin{pmatrix}1/25&17/200\\33/400&3/100\end{pmatrix},\] with $P_H=19/80$, $P_1=P_2=61/160$, and $F_{12}=1,F_{21}=5$. The channels prove feasibility. Here $L_{11}/R_{11}=1/75\ne3/200=L_{22}/R_{22}$, so $I_2> I_\infty=\mathcal B$. Here $\vartheta=23/25$ and $I_\infty=4\log5+(23/2)\log24$. The positive reduction gap follows from attained reduced minimization; no numerical value for that gap is claimed. For a singular safe but unattained example take \[R=\begin{pmatrix}1&1\\1&1\end{pmatrix},\quad L=\frac1{100}\begin{pmatrix}1&2\\1&2\end{pmatrix},\quad P=(47/100,47/100,3/50),\quad F_{12}=F_{21}=1. \] The common column space verifies \eqref{eq:rank-one-feasibility}; the cross means are $1/50$ and $1/100$. Consequently $I_2=I_\infty=0$, but every finite compatible model has strictly positive entropy production. This demonstrates why the nonsingular assumption in the earlier equal-mean safety theorem is essential.