Formula rewriting software I would like to have a program that rewrites formula's for me.
What I would like a software where I can imput some formulas, constraints, and so on, 
and then the program outputs the formulas that result from them.
For example, 
if I input


*

*$ i = \frac{1}{p} $

*$ c = \frac{i+p}{2} $

*$ d = \frac{1}{c} $

*$ r = |c-p| $


with all varables > 0, 0 < p < 1
The program can make:


*

*$ d = \frac{1}{\sqrt{r^2+1}} $


Does such software exist?
(free if possible)
 A: Mathematica can express $d$ in a number of ways.
Union[Cases[Reduce[
 i>0 && c>0 && d>0 && r>0 && 0<p<1 &&
  i==1/p && c==(i+p)/2 && d==1/c &&
  (r==i-p || r==p-i), #] & /@ Permutations[{i, p, c, d, r}],
 Equal[d, rhs_] :> Equal[d, Simplify[rhs, Assumptions -> r > 0]], 2]]


I suppose the last form is close to what you want.  The dependence of the variables in the result is dictated by the order of the variables in the call to Reduce.  I used Permutations to generate all the possibilities.  I suppose if we solve for $r$, then $d$, and then the rest, we should get something like what you want.
Reduce[i>0 && c>0 && d>0 && r>0 && 0<p<1 &&
  i==1/p && c==(i+p)/2 && d==1/c &&
  (r==i-p || r==p-i), {r,d,p,c,i}]


You can also use Eliminate and then call Solve on the result, though I don't think that this technique works easily with your inequality constraints.
Eliminate[i==1/p && c==(i+p)/2 && d==1/c && (r==i-p || r==p-i), {i,c,p}]
Solve[%, d]


The Eliminate based approach can also be done in the open source CAS Maxima.
eliminate([i-1/p, c-(i+p)/2, d-1/c,r-(p-i)],[i,p,c]);
solve(%,d);

$$\left[ d=-{{2}\over{\sqrt{r^2+4}}} , d={{2}\over{\sqrt{r^2+4}}}\right]$$
I don't know that Maxima provides anything quite like Mathematica's Reduce, however.  Perhaps, someone will correct me.
