In [1]:

```
import proveit
# Prepare this notebook for defining the common expressions of a theory:
%common_expressions_notebook # Keep this at the top following 'import proveit'.
from proveit import ExprRange, IndexedVar
from proveit import a, b, i, k, n, x, y, U, V, W
from proveit.core_expr_types import a_k, x_k
from proveit.logic import Or, Set, Difference, NotEquals
from proveit.numbers import zero, one
from proveit.linear_algebra import VecAdd, VecZero, ScalarMult
```

In [2]:

```
%begin common
```

A binary linear combination:

In [3]:

```
binary_lin_comb_ax_by = VecAdd(ScalarMult(a, x), ScalarMult(b, y))
```

A general linear combination:

In [4]:

```
lin_comb_axn = VecAdd(ExprRange(k, ScalarMult(a_k, x_k), one, n))
```

At least one $a_i$ is not zero

In [5]:

```
some_nonzero_a = Or(ExprRange(k, NotEquals(a_k, zero), one, n))
```

In [6]:

```
%end common
```