Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::DeltaRangeConstraintRelationImpl< FF_ > Class Template Reference

Delta Range Constraint Relation for efficient range checks. More...

#include <delta_range_constraint_relation.hpp>

Public Types

using FF = FF_
 

Static Public Member Functions

template<typename AllEntities >
static bool skip (const AllEntities &in)
 Returns true if the contribution from all subrelations for the provided inputs is identically zero.
 
template<typename ContainerOverSubrelations , typename AllEntities , typename Parameters >
static void accumulate (ContainerOverSubrelations &accumulators, const AllEntities &in, BB_UNUSED const Parameters &, const FF &scaling_factor)
 Expression for the generalized permutation sort gate.
 

Static Public Attributes

static constexpr std::array< size_t, 4 > SUBRELATION_PARTIAL_LENGTHS
 

Detailed Description

template<typename FF_>
class bb::DeltaRangeConstraintRelationImpl< FF_ >

Delta Range Constraint Relation for efficient range checks.

This relation enables efficient range proofs by enforcing that consecutive wire values differ by at most 3. When witnesses are sorted in ascending order, constraining adjacent differences to be in {0, 1, 2, 3} proves that the full range of values lies within a bounded interval.

Definition at line 20 of file delta_range_constraint_relation.hpp.

Member Typedef Documentation

◆ FF

template<typename FF_ >
using bb::DeltaRangeConstraintRelationImpl< FF_ >::FF = FF_

Definition at line 22 of file delta_range_constraint_relation.hpp.

Member Function Documentation

◆ accumulate()

template<typename FF_ >
template<typename ContainerOverSubrelations , typename AllEntities , typename Parameters >
static void bb::DeltaRangeConstraintRelationImpl< FF_ >::accumulate ( ContainerOverSubrelations &  accumulators,
const AllEntities &  in,
BB_UNUSED const Parameters &  ,
const FF scaling_factor 
)
inlinestatic

Expression for the generalized permutation sort gate.

The relation is defined as C(in(X)...) = q_delta_range * \sum{ i = [0, 3]} \alpha^i D_i(D_i - 1)(D_i - 2)(D_i - 3) where D_0 = w_2 - w_1 D_1 = w_3 - w_2 D_2 = w_4 - w_3 D_3 = w_1_shift - w_4

Parameters
evalstransformed to evals + C(in(X)...)*scaling_factor
inan std::array containing the fully extended Univariate edges.
parametersunused
scaling_factoroptional term to scale the evaluation before adding to evals.

Definition at line 56 of file delta_range_constraint_relation.hpp.

◆ skip()

template<typename FF_ >
template<typename AllEntities >
static bool bb::DeltaRangeConstraintRelationImpl< FF_ >::skip ( const AllEntities &  in)
inlinestatic

Returns true if the contribution from all subrelations for the provided inputs is identically zero.

Definition at line 35 of file delta_range_constraint_relation.hpp.

Member Data Documentation

◆ SUBRELATION_PARTIAL_LENGTHS

template<typename FF_ >
constexpr std::array<size_t, 4> bb::DeltaRangeConstraintRelationImpl< FF_ >::SUBRELATION_PARTIAL_LENGTHS
staticconstexpr
Initial value:
{
6,
6,
6,
6
}

Definition at line 24 of file delta_range_constraint_relation.hpp.


The documentation for this class was generated from the following file: