pub mod columns;
use miden_crypto::stark::air::AirBuilder;
use crate::{MainCols, MidenAirBuilder, constraints::constants::*};
pub fn enforce_main<AB>(builder: &mut AB, local: &MainCols<AB::Var>, next: &MainCols<AB::Var>)
where
AB: MidenAirBuilder,
{
let v = local.range.value;
let v_next = next.range.value;
{
builder.when_first_row().assert_zero(v);
builder.when_last_row().assert_eq(v, TWO_POW_16_MINUS_1);
}
{
let change_v = v_next - v;
builder.when_transition().assert_zero(
change_v.clone()
* (change_v.clone() - F_1)
* (change_v.clone() - F_3)
* (change_v.clone() - F_9)
* (change_v.clone() - F_27)
* (change_v.clone() - F_81)
* (change_v.clone() - F_243)
* (change_v.clone() - F_729)
* (change_v - F_2187),
);
}
}