How to Write an AIR using Stwo Abstractions

This guide walks through the process of creating a custom AIR using Stwo's abstractions and tools.

AIR Structure

An AIR in Stwo consists of:

  1. Trace columns
  2. Transition constraints
  3. Boundary constraints
  4. Lookup tables (optional)

Best Practices

When writing an AIR:

  1. Keep constraints simple and modular
  2. Use lookup tables for repeated patterns
  3. Optimize field operations
  4. Consider composition with other AIRs