mirror of
https://github.com/vacp2p/linea-monorepo.git
synced 2026-01-09 20:27:58 -05:00
* switch the go import path to linea-monorepo * address every occurence to zkevm-monorepo
22 lines
513 B
Go
22 lines
513 B
Go
package query
|
|
|
|
import (
|
|
"github.com/consensys/linea-monorepo/prover/maths/field"
|
|
"github.com/consensys/linea-monorepo/prover/protocol/ifaces"
|
|
)
|
|
|
|
/*
|
|
Utility function used to manually check permutation and inclusion
|
|
constraints. Will return a linear combination of i-th element of
|
|
each list.
|
|
*/
|
|
func rowLinComb(alpha field.Element, i int, list []ifaces.ColAssignment) field.Element {
|
|
var res field.Element
|
|
for j := range list {
|
|
res.Mul(&res, &alpha)
|
|
x := list[j].Get(i)
|
|
res.Add(&res, &x)
|
|
}
|
|
return res
|
|
}
|