# or

Logical OR for symbolic expressions

## Syntax

`A | Bor(A,B)`

## Description

`A | B` represents the logical disjunction. `A | B` is true when either `A` or `B` or both are true.

`or(A,B)` is equivalent to `A | B`.

## Input Arguments

 `A` Symbolic equation, inequality, or logical expression that contains symbolic subexpressions. `B` Symbolic equation, inequality, or logical expression that contains symbolic subexpressions.

## Examples

Combine these symbolic inequalities into the logical expression using `|`:

```syms x y xy = x >= 0 | y >= 0;```

Set the corresponding assumptions on variables `x` and `y` using `assume`:

`assume(xy)`

Verify that the assumptions are set:

`assumptions`
```ans = 0 <= x | 0 <= y```

Combine two symbolic inequalities into the logical expression using `|`:

`range = x < -1 | x > 1;`

Replace variable `x` with these numeric values. If you replace `x` with 10, one inequality is valid. If you replace `x` with 0, both inequalities are invalid. Note that `subs` does not evaluate these inequalities to logical `1` or `0`.

```x1 = subs(range, x, 10) x2 = subs(range, x, 0)```
```x1 = 1 < 10 | 10 < -1 x2 = 0 < -1 | 1 < 0```

To evaluate these inequalities to logical `1` or `0`, use `isAlways`:

```isAlways(x1) isAlways(x2)```
```ans = 1 ans = 0```

Note that `simplify` does not simplify these logical expressions to logical `1` or `0`. Instead, they return symbolic values `TRUE` or `FALSE`.

```s1 = simplify(x1) s2 = simplify(x2)```
```s1 = TRUE s2 = FALSE```

Convert symbolic `TRUE` or `FALSE` to logical values using `isAlways`:

```isAlways(s1) isAlways(s2)```
```ans = 1 ans = 0```

expand all