I am trying to determine the sign of a fraction by determining the sign of the denominator and the numerator seperately using some parametric assumptions (ass6):

Assuming[ass6, TrueQ[Simplify[Denominator[detHesse] < 0]]]

which returns True and

Assuming[ass6, TrueQ[Simplify[Numerator[detHesse] < 0]]]

also returning True. However,

Assuming[ass6, TrueQ[Simplify[detHesse > 0]]]

returns False.

What am I missing? Thank you guys

  • 1
    $\begingroup$ For a full answer can you post a self-contained code? Need to have the ass6 and detHesse. or just ass6 would probably be enough. $\endgroup$ Sep 9 '16 at 13:19
  • $\begingroup$ Have you tried using FullSimplify rather than Simplify? $\endgroup$
    – Bob Hanlon
    Sep 9 '16 at 15:26
  • $\begingroup$ Thank you @VahagnTumanyan and @BobHanlon. As @mikado pointed out the problem is that Simplify[detHesse > 0] doesn't simplify to Trueexplicitly, so that TrueQreturns False. I realized that the problem arises because I use Reduce in the definition of ass6. $\endgroup$
    – slosud
    Sep 11 '16 at 10:51

From the help

Unless expr is manifestly True, TrueQ[expr] effectively assumes that expr is False.

So expressions that do not simplify to True will not necessarily return true even if they are.

eqns = {Cos[x]^2 + Sin[x]^2 == 1, x Gamma[x] == Gamma[x + 1]};

TrueQ /@ eqns
(* {False, False} *)

TrueQ[Simplify[#]] & /@ eqns
(* {True, False} *)

TrueQ[FullSimplify[#]] & /@ eqns
(* {True, True} *)

This behaviour is common to functions whose name ends in Q

  • $\begingroup$ Thanks @mikado, that seems to be exactly the issue. In fact, I realized that the problem in my case seems to be that I use Reduce on my set of assumptions which suggests that Reduce does not what I thought it does. $\endgroup$
    – slosud
    Sep 11 '16 at 10:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.