This section and the following sections are intended for developers who have completed the Writing a Simple AIR section or are already familiar with the workflow of creating an AIR. If you have not gone through the Writing a Simple AIR section, we recommend you to do so first as the following sections gloss over a lot of boilerplate code.

Figure 1: Preprocessed trace as a selector
isFirst
column, where the value is 1 for the first row and 0 for all other rows.
Boilerplate code is omitted for brevity. Please refer to the full example code for the full implementation.
IsFirstColumn
struct that will be used as a preprocessed trace.
We will use the gen_column()
function to generate a CircleEvaluation
struct that is 1 for the first row and 0 for all other rows.
The id()
function is needed to identify this column when evaluating the constraints.
is_first_id
field to retrieve the row value of the IsFirstColumn
struct.
Then, we compose two constraints using the IsFirstColumn
row value as a selector and adding them together.
If you’re unfamiliar with how max_constraint_log_degree_bound(&self)
should be implemented, please refer to this note.