# Fixed columns

powdr-pil requires the definition of fixed columns at the time of declaration.

For example:

```
col fixed ONES = [1]*; // this is valid
// col fixed ONES; // this is invalid
```

A number of mechanisms are supported to declare fixed columns. Let `N`

be the total length of the column we're defining.

## Values with repetitions

powdr-pil supports a basic language to define the value of constant columns using:

- arrays, for example
`[1, 2, 3]`

- repetition, for example
`[1, 2]*`

- concatenation, for example
`[1, 2] + [3, 4]`

These mechanisms can be combined, as long as a single repetition is used per column definition.

```
// valid, as for a given total length, only one column fits this definition for a given `N`
col fixed A = [1, 2] + [3, 4]* + [5];
// invalid, as many columns fit this definition
// col fixed A = [1, 2]* + [3, 4]*
```

## Mappings

A column can be seen as a mapping from integers to field elements. In this context, different functions are supported:

```
col fixed B(i) { i + 1 };
col fixed C(i) {match i {
0 => 1,
_ => 0
}};
```

Note that conversion from integer to field element is currently implicit, as seen in the first example above.