Module combine_mles

Module combine_mles 

Source
Expand description

This module contains the code used to combine parts of a layer and combining them to determine the evaluation of a layer’s layerwise bookkeeping table at a point.

Enums§

CombineMleRefError
Error handling for gate mle construction

Functions§

collapse_mles_with_free_in_prefix 🔒
This function will take a list of MLEs and updates the list to contain MLEs where all fixed bits are contiguous
combine_mles_with_aggregate
This function takes in a list of mles, a challenge point we want to combine them under, and returns the final value in the bookkeeping table of the combined mle. This is equivalent to combining all of these mles according to their prefix bits, and then fixing variable on this combined mle (which is the layerwise bookkeeping table). Instead, we fix variable as we combine as this keeps the bookkeeping table sizes at one.
combine_pair 🔒
Given an MLE evaluation, and an option of a second MLE evaluation pair, this combines the two together this assumes that the first MLE evaluation and the second MLE evaluation are pairs, if the second MLE evaluation is a Some()
find_pair_and_combine 🔒
Given a list of mles, the lsb fixed var index, and the MLE evaluation that contributes to it, this will go through all of them and find its pair (if none exists, we assume it is 0) and combine the two it will then update the original list of MLEs to contain the combined MLE evaluation and remove the original ones that were paired.
get_indexed_layer_mles_to_combine
Function that prepares all the mles to be combined. We simply index all the MLEs that are to be fixed and combined, and ensure that all fixed bits are always contiguous.
get_lsb_fixed_var 🔒
Gets the index of the least significant bit (lsb) of the fixed bits out of a vector of MLEs.
pre_fix_mles
This fixes mles with shared points in the claims so that we don’t repeatedly do so.
split_mle 🔒
This function takes an MLE that has a free variable in between fixed variables, and it splits it into two MLEs, one where the free variable is replaced with Fixed(false), and the other where it is replaced with Fixed(true). This ensures that all the fixed bits are contiguous. NOTE we assume that this function is called on an mle that has a free variable within a bunch of fixed variables (note how it is used in the collapse_mles_with_free_in_prefix function)

Type Aliases§

MleEvaluationAndPrefixBits 🔒
Type alias for an MLE evaluation and its prefix bits, as this type is used throughout the combining code.