Group Abstract Group Abstract

Message Boards Message Boards

0
|
4.6K Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Translating math words to Mathematica, an example, an experiment

Posted 4 years ago
POSTED BY: Andrew Meit
2 Replies

Beware the difference between | and ||, between = and ==, and between {} and (). The following is closer to the textbook phrase:

ForAll[{n, m},
 Element[n | m, Integers]
  && (n > 0 || n < 0 || n == 0)
  && (m > 0 || m < 0 || m == 0)
  && m >= n,
 predicate]

For example

ForAll[{n, m},
  Element[n | m, Integers]
   && (n > 0 || n < 0 || n == 0)
   && (m > 0 || m < 0 || m == 0)
   && m >= n,
  2^m >= 2^n] // Reduce
POSTED BY: Gianluca Gorni
Posted 4 years ago

Wonderful, now I have a template to use/edit going forward in my translating textbook text into live Mathematica code experiments. Since there are definitions and assumptions that are stated before giving the formula or function. Thank you!

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