Legacy Documentation

The Mathematical ExplorerTM (2001)

This is documentation for an obsolete product.
Current products and services
Rule

  • lhs -> rhs or lhs rhs represents a rule that transforms lhs to rhs.
  • The character can be entered as -> or \[Rule].
  • lhs -> rhs evaluates rhs immediately.
  • You can apply rules using Replace.
  • The assignment lhs = rhs specifies that the rule lhs -> rhs should be used whenever it applies.
  • lhs rhs can be entered as lhs \[Rule] rhs or lhs-> rhs.
  • In StandardForm, Rule is printed usingĀ .
  • Rule is a scoping construct (see Section A.3.8).
  • Symbols that occur as pattern names in lhs are treated as local to the rule. This is true when the symbols appear on the right-hand side of /; conditions in lhs, and when the symbols appear anywhere in rhs, even inside other scoping constructs.
  • See The Mathematica Book on the web:Section 2.4.1 andĀ Section A.5.5.
  • Implementation Notes on the web: see Section A.9.3.
  • See also: RuleDelayed.