I have a list of functions, each containing none or more of the functions Plus, Times, Subtract and Divide. They could be in any arrangement and with any numbers. This is one such example.
HoldForm[Plus[3+Times[7,Subtract[9,Plus[4,5]],Divide[29,Subtract[4,3]]]]]*
There is an error here, The above should read: Plus[3,Times[7
The numbers can be any positive integer. I need to calculate just the Divide and Subtract functions to find out if they evaluate to 1 or 0 respectively as I consider functions in the list that have this property trivial and I want to filter them out.
I am somewhat a beginner with Wolfram/Mathematica code and I have been attempting to extract the Divide and Subtract parts as a list and then calculating just them parts but so-far my attempts at solving this have been totally unfruitful, partly because I can't know beforehand where the Divide or Subtract functions are in the function or how deep they will be.
Is there a way to accomplish this?
Edit: Just to help clarify what I am trying to achieve. I have a list of functions such as
{HoldForm[Plus[3,Times[7,Subtract[9,Plus[4,5]],Divide[29,Subtract[4,3]]]]],
HoldForm[Plus[7,Times[2,Divide[16,Subtract[9,Plus[4,1]]]]]],
HoldForm[Plus[3,Times[7,9],29]]}
I need to remove the first element from the list because it is a function that divides by 1 (and subtracts 0), making is only trivially different from the 3rd element of the list. After removing the first function I want to display the output like this
{$7+2 \frac{16}{9-(4+1)}$,$3+7\times 9+29$}

Subtract[9,Plus[4,5]]ifPlusis not included in your list? – Kuba Sep 13 '18 at 13:10Subtract[9,Plus[4,5]]will evaluate to 0 and so it means the example is trivial as there will be another function in the list that is the same except it won'tSubtract[0]– RedPython Sep 13 '18 at 13:19-and/are not represented withSubtractandDivide? Thus unless you explicitly typed inSubtract/Divide, kglr's answer (which I would also have suggested otherwise) will not work. – Szabolcs Sep 13 '18 at 13:21HoldForm[Plus[3+Times[7,Subtract[9,Plus[4,5]],Divide[29,Subtract[4,3]]]]]should be rejected from my list butHoldForm[Plus[7,Times[2,Divide[16,Subtract[9,Plus[4,1]]]]]]should not. – RedPython Sep 13 '18 at 13:411/(2+3)or (2) expression likeDivide[1, 2+3]? Are you aware that these are not the same thing? Do you really work with the specific functionDivide, or do you work with division in general, which may be represented in a different way? – Szabolcs Sep 13 '18 at 14:03