I thought that === is shorthand for SameQ? Then why do these two expressions yield True for one and False for the other?
SameQ[((k^2 (k + 1)^2)/4 + (k + 1)^3) == (((k + 1)^2 (k + 2)^2)/4)]
((k^2 (k + 1)^2)/4 + (k + 1)^3) === (((k + 1)^2 (k + 2)^2)/4)
SameQ[blub]
givesTrue
and you don't do what you think you do. $\endgroup$==
in the first line with a comma;SameQ[a, b]
is equivalent toa === b
, butSameQ[a == b]
should evaluate as eitherSameQ[True]
orSameQ[False]
. $\endgroup$SameQ @@ (((k^2 (k + 1)^2)/4 + (k + 1)^3) == (((k + 1)^2 (k + 2)^2)/4))
? $\endgroup$SameQ[False]
andSameQ[True]
? $\endgroup$SameQ[a == b]
will always evaluate toTrue
. TrySameQ[1 == 1]
andSameQ[1 == 2]
. 2. Yes,a==b
usually evaluates toTrue
orFalse
. In the case of the question above, it is not. This is, why the result of the first line isSameQ[a==b]
with unevaluated equation :) $\endgroup$