Module miden_air::stack::field_ops

source ·

Constants

  • The degrees of constraints in individual stack operations of the field operations.
  • The number of transition constraints in all the field operations.

Functions

  • Enforces constraints of the ADD operation. The ADD operation adds the first two elements in the current trace. Therefore, the following constraints are enforced:
  • Enforces constraints of the AND operation. The AND operation computes the bitwise and of the first two elements in the current trace. Therefore, the following constraints are enforced:
  • Enforces constraints of the Field operations.
  • Enforces constraints of the EQ operation. The EQ operation checks if the top two elements in the current frame are equal or not. Therefore, the following constraints are enforced:
  • Enforces constraints of the EQZ operation. The EQZ operation checks if the top element in the current frame is 0 or not. Therefore, the following constraints are enforced:
  • Enforces constraints of the EXPACC operation. The EXPACC operation computes a single turn of exponent accumulation for the given inputs. Therefore, the following constraints are enforced:
  • Enforces constraints of the EXT2MUL operation. The EXT2MUL operation computes the product of two elements in the extension field of degree 2. Therefore, the following constraints are enforced, assuming the first 4 elements of the stack in the current frame are a1, a0, b1, b0:
  • Enforces constraints of the INCR operation. The INCR operation increments the top element in the stack by 1. Therefore, the following constraints are enforced:
  • Enforces constraints of the INV operation. The INV operation updates the top element in the stack with its inverse. Therefore, the following constraints are enforced:
  • Enforces constraints of the MUL operation. The MUL operation multiplies the first two elements in the current trace. Therefore, the following constraints are enforced:
  • Enforces constraints of the NEG operation. The NEG operation updates the top element in the stack with its inverse. Therefore, the following constraints are enforced:
  • Enforces constraints of the NOT operation. The NOT operation updates the top element in the stack with its bitwise not value. Therefore, the following constraints are enforced:
  • Enforces constraints of the OR operation. The OR operation computes the bitwise or of the first two elements in the current trace. Therefore, the following constraints are enforced:
  • Returns the number of transition constraints of the field operations.
  • Builds the transition constraint degrees of the field operations.