Buffalo Way is a common method for proving inequalities by substituting variables $a_1, \dots, a_n$ in the following manner: $$ \begin{align} a_1 &\to a_1 \\ a_2 &\to a_1 + x_2 \\ a_3 &\to a_1 + x_2 + x_3 \\ \vdots \\ a_n &\to a_1 +\sum_{i=2}^nx_i \end{align} $$ How can I write a program in Mathematica that does this automatically regardless of the number of variables ($n$ in the example above)?
It seems I need some kind of a "rule" to be used with ReplaceAll
, but I don't know how to generate one (instead of writing it out directly, which is impossible not knowing the number of variables).
bds
is a multi-var polynomial ofa1
,a2
and so on. I want to substitute the variables like what/.
does. @MarcoB $\endgroup$FindInstance
orLinearOptimization
orReduce
? $\endgroup$n = 3;k = 0; NestList[# + x[++k] &, a1, n]
? $\endgroup$