### 9.1.12 Substituting a variable by a value

The | operator is an infixed operator that evaluates an expression after giving values to some variables. It does not evaluate the expression before the variables are replaced by the requested values.

- | is an infixed operator, hence it takes two arguments:
  - expr, an expression depending on one or more variables on the left hand side.
  - x1=a1, ldots; an equality or sequence of several equalities.
- expr|x1=a1,… returns the expression expr with x1 replaced by a1, etc.

#### Examples

The command lines below work even if a and/or b have been assigned.

a^2+1 | a=2

5 |  |  |  |  |  |  |  |  |  |

a^2+b | a=2,b=3

7 |  |  |  |  |  |  |  |  |  |