\r
我们假设 $x=idx_{i+1,j},y=idx_{i,j+1}$。不妨设 $x<=y$。\r
\r
-将 $x,y$ 带入得, $f_{i,j}+f_{i+1,j+1}=f_{i,x}+f_{x+1,j}+cost_{i,j}+f_{i+1,y}+f_{y+1,j+1}+cost_{i+1,j+1}$\r
+将 $x,y$ 带入得,$f_{i,j}+f_{i+1,j+1}=f_{i,x}+f_{x+1,j}+cost_{i,j}+f_{i+1,y}+f_{y+1,j+1}+cost_{i+1,j+1}$\r
\r
由于上一步已经证明出了$cost$满足四边形不等式,而该不等式的左边在上式出现过,将其替换得\r
\r
-$f_{i,x}+f_{x+1,j}+cost_{i,j}+f_{i+1,y}+f_{y+1,j+1}+cost_{i+1,j+1}$\r
-\r
-$\le f_{i,x}+f_{x+1,j+1}+cost_{i,j+1}+f_{i+1,y}+f_{y+1,j}+cost_{i+1,j}$\r
+$$\r
+\begin{aligned}\r
+&&f_{i,\,x}+f_{x+1,\,j}+cost_{i,\,j}+f_{i+1,\,y}+f_{y+1,\,j+1}+cost_{i+1,\,j+1}\\\r
+&\le&f_{i,\,x}+f_{x+1,\,j+1}+cost_{i,\,j+1}+f_{i+1,\,y}+f_{y+1,\,j}+cost_{i+1,\,j}\\\r
+\end{aligned}\r
+$$\r
\r
消去公共项可得 $f_{i,j}+f_{i+1,j+1}\le f_{i+1,j}+f_{i,j+1}$\r
\r