1
$\begingroup$

In the documentation for FullSimplify, under Options > Assumptions it is stated that:

When assumptions are given as an argument, $Assumptions is used as well:

Assuming[x > 0, FullSimplify[E^(LogGamma[x] + LogGamma[y]), y > 0]]
(* Gamma[x] Gamma[y] *)

Specifying assumptions as an option value prevents FullSimplify from using $Assumptions:

Assuming[x > 0, FullSimplify[E^(LogGamma[x] + LogGamma[y]), Assumptions -> y > 0]]
(* Gamma[x] Gamma[y] *)

The resuls are just the same. What is the point?

$Version
(* 10.1.0  for Microsoft Windows (64-bit) (March 24, 2015) *)
$\endgroup$
  • $\begingroup$ Try FullSimplify[E^(LogGamma[x] + LogGamma[y])] without assumptions. $\endgroup$ – Michael E2 Jun 12 '15 at 17:14
  • $\begingroup$ I get the same result. $\endgroup$ – Giovanni F. Jun 12 '15 at 17:17
  • 1
    $\begingroup$ So the assumptions are irrelevant, since the simplification is valid more generally. $\endgroup$ – Michael E2 Jun 12 '15 at 17:20
  • $\begingroup$ This documentation example just adds nothing then. $\endgroup$ – Giovanni F. Jun 12 '15 at 17:23
  • $\begingroup$ Yes, it's strange. I wonder if it has changed since some version. $\endgroup$ – Michael E2 Jun 12 '15 at 17:26
1
$\begingroup$

It's a badly written example. What it is trying to show is something like the following behavior, where the local Assumptions option overrides the global $Assumptions.

$Assumptions = x == -1;
FullSimplify[E^(LogGamma[x] + LogGamma[y])]

FullSimplify::infd : "Expression LogGamma[x] + LogGamma[y] simplified to ∞.

FullSimplify[E^(LogGamma[x] + LogGamma[y]), Assumptions -> x == 1]
Gamma[y]

However, Assumming only adds to $Assumptions, so

Assuming[x == 1, FullSimplify[E^(LogGamma[x] + LogGamma[y])]]

produces

$Assumptions::cas : Warning : contradictory assumption (s) x == 1 && x == -1 encountered. >>

1
$\endgroup$

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.