# Unexpected FullSimplify results [duplicate]

I have just started using Mathematica and I am having a hard time understanding the results from FullSimplify. Please see examples bellow:

FullSimplify[(0.5*H + R), (0.5*H + R) == p]
FullSimplify[(H + R + T), (H + R + T) == 1]
FullSimplify[(0.5*H + R)*(H + R + T), (0.5*H + R) == p && (H + R + T) == 1]


I get the following results:

p
1
0.5 (1 + R - T)


My questions is: Why the last expression does not output p (or p*1)?

• Seems like a bug to me... The output isn't even correct. Commented Jan 1, 2017 at 3:36
• @JungHwanMin Why do you say the output is incorrect? Consider (0.5*H + R)*(H + R + T) /. H -> 1 - R - T // Factor. Commented Jan 1, 2017 at 3:46
• @MichaelE2 You're right... I somehow had a lingering definition for p Commented Jan 1, 2017 at 3:47
• Try substituting x for p, then repeat your evaluation. The answer this time will be x. This behavior is not isolated to FullSimplify. See Question #95374 for how canonical order of symbols can affect the results of Integrate. Commented Jan 1, 2017 at 6:59
• Also check out @Jens answer to Question 17926. Commented Jan 1, 2017 at 7:29