Group Abstract Group Abstract

Message Boards Message Boards

0
|
1.4K Views
|
4 Replies
|
6 Total Likes
View groups...
Share
Share this post:

Does With[] do anything Assuming[] doesn't do?

Posted 5 months ago
POSTED BY: Jay Gourley
4 Replies

With is a localization construct, similar to Block in a number of ways. It specifies specific values for localized parameters.

Assuming restricts parameters to restricted: e.g. Reals, Regions, etc... And various functions, e.g., Integrate, FullSimplify, ... algorithmically behave in particular ways depending on the assumptions specified.

They are different beasts entierly.

POSTED BY: David Reiss
POSTED BY: Michael Rogers
Posted 5 months ago

Thanks, Michael Rogers. The examples were especially helpful. Your observation that Simplify thinks 5 is simpler than 15 let me to discover ComplexityFunction[], a neat option. Too bad Simplify[] doesn't work on the documentation.

POSTED BY: Jay Gourley
Posted 5 months ago

I'm not sure what you mean by "they react", but I emphatically disagree with the notion that Assuming is a generalized version of With.

With suspends evaluation of its body until after the specified replacements are made. It performs a mutation on the expression in complete ignorance of what the expression might "mean". On the other hand Assuming applies logical constraints that affect the evaluation of some expression, in particular expressions meant to "solve" for something.

POSTED BY: Eric Rimbey
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard