namespace Main(16);
// ANCHOR: declarations
    // This defines a integer constant. We can omit the type when it is used
    // somewhere that constrains its type. Since it is not used below,
    // we have to specify `: int` (another option would be `fe`, field element).
    let rows: int = 16;
    // This defines a fixed column that contains the row number in each row.
    // Only symbols whose type is "col" are considered fixed columns.
    let step: col = |i| i;
    // Here, we have a witness column, the do not need an explicit `: col`.
    let x;
    // This functions defines a fixed column where each cell contains the
    // square of its row number.
    let square: col = |x| x*x;
    // This is a generic function that computes the sum of an array
    // given its length.
    // It is not stored as a column.
    // If it is used in a constraint, it has to be evaulated, while
    // columns must be used symbolically.
    let<T: Add + FromLiteral> sum: T[], int -> T = |a, len| match len {
        0 => 0,
        _ => sum(a, len - 1) + a[len - 1],
    };
    // This is a constraint that uses the `sum` function:
    sum([x, step], 2) = 0;
// ANCHOR_END: declarations
