Skip to main content
added 246 characters in body
Source Link
m_goldberg
  • 108.1k
  • 16
  • 104
  • 259

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

It's a badly written example. What it 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]

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
Source Link
m_goldberg
  • 108.1k
  • 16
  • 104
  • 259

It's a badly written example. What it 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]