From 84b21ee2b879c506f1fcd18f5442f10bb11b86b4 Mon Sep 17 00:00:00 2001 From: Ivo Kubjas Date: Thu, 4 Jun 2026 09:35:12 +0000 Subject: [PATCH 01/13] feat: add code generation of verifier-side System --- verifier-ray/codegen/go.mod | 20 ++ verifier-ray/codegen/go.sum | 44 +++++ verifier-ray/codegen/vanishing.go | 261 +++++++++++++++++++++++++ verifier-ray/codegen/vanishing_test.go | 137 +++++++++++++ verifier-ray/codegen/vanishing_zig.go | 213 ++++++++++++++++++++ 5 files changed, 675 insertions(+) create mode 100644 verifier-ray/codegen/go.sum create mode 100644 verifier-ray/codegen/vanishing.go create mode 100644 verifier-ray/codegen/vanishing_test.go create mode 100644 verifier-ray/codegen/vanishing_zig.go diff --git a/verifier-ray/codegen/go.mod b/verifier-ray/codegen/go.mod index 996099c34f6..4acc4061750 100644 --- a/verifier-ray/codegen/go.mod +++ b/verifier-ray/codegen/go.mod @@ -1,3 +1,23 @@ module github.com/consensys/linea-monorepo/verifier-ray/codegen go 1.25.7 + +require github.com/consensys/linea-monorepo/prover-ray v0.0.0-20260604100845-588fd53a8c0f + +require ( + github.com/bits-and-blooms/bitset v1.24.4 // indirect + github.com/blang/semver/v4 v4.0.0 // indirect + github.com/consensys/gnark v0.14.1-0.20260219004710-bbfb2f70a565 // indirect + github.com/consensys/gnark-crypto v0.20.2-0.20260514182922-df0578435b08 // indirect + github.com/fxamacker/cbor/v2 v2.9.1 // indirect + github.com/google/pprof v0.0.0-20260402051712-545e8a4df936 // indirect + github.com/mattn/go-colorable v0.1.14 // indirect + github.com/mattn/go-isatty v0.0.21 // indirect + github.com/ronanh/intcomp v1.1.1 // indirect + github.com/rs/zerolog v1.35.1 // indirect + github.com/sirupsen/logrus v1.9.4 // indirect + github.com/x448/float16 v0.8.4 // indirect + golang.org/x/crypto v0.50.0 // indirect + golang.org/x/sync v0.20.0 // indirect + golang.org/x/sys v0.43.0 // indirect +) diff --git a/verifier-ray/codegen/go.sum b/verifier-ray/codegen/go.sum new file mode 100644 index 00000000000..b2e9a0d633a --- /dev/null +++ b/verifier-ray/codegen/go.sum @@ -0,0 +1,44 @@ +github.com/bits-and-blooms/bitset v1.24.4 h1:95H15Og1clikBrKr/DuzMXkQzECs1M6hhoGXLwLQOZE= +github.com/bits-and-blooms/bitset v1.24.4/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= +github.com/consensys/gnark v0.14.1-0.20260219004710-bbfb2f70a565 h1:NlOAmbLYsVb/hcuOBxza6CAA+233tB0eFiunGVEMyv4= +github.com/consensys/gnark v0.14.1-0.20260219004710-bbfb2f70a565/go.mod h1:EoWWbEboQRydCqJDSA7zrFxucIeoy/5R+MDx04oFpF4= +github.com/consensys/gnark-crypto v0.20.2-0.20260514182922-df0578435b08 h1:EdljQKaHxACX5JMSTXlVM9R8qASU/W1husqDsB2b5tU= +github.com/consensys/gnark-crypto v0.20.2-0.20260514182922-df0578435b08/go.mod h1:NzeBHSZ49bIM7RtrNTYYR2kymTqwvI/A4eTgQlyQc+Q= +github.com/consensys/linea-monorepo/prover-ray v0.0.0-20260604100845-588fd53a8c0f h1:1z/yV6WAzsvTXhKrFfSJNvI7kQQYL8N/uPgi651jZzo= +github.com/consensys/linea-monorepo/prover-ray v0.0.0-20260604100845-588fd53a8c0f/go.mod h1:2cEA44vEDPh8MB1huZtKZv//iXB0ZOghXq7idgt4UPc= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/fxamacker/cbor/v2 v2.9.1 h1:2rWm8B193Ll4VdjsJY28jxs70IdDsHRWgQYAI80+rMQ= +github.com/fxamacker/cbor/v2 v2.9.1/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= +github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/google/pprof v0.0.0-20260402051712-545e8a4df936 h1:EwtI+Al+DeppwYX2oXJCETMO23COyaKGP6fHVpkpWpg= +github.com/google/pprof v0.0.0-20260402051712-545e8a4df936/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI= +github.com/leanovate/gopter v0.2.11 h1:vRjThO1EKPb/1NsDXuDrzldR28RLkBflWYcU9CvzWu4= +github.com/leanovate/gopter v0.2.11/go.mod h1:aK3tzZP/C+p1m3SPRE4SYZFGP7jjkuSI4f7Xvpt0S9c= +github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= +github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= +github.com/mattn/go-isatty v0.0.21 h1:xYae+lCNBP7QuW4PUnNG61ffM4hVIfm+zUzDuSzYLGs= +github.com/mattn/go-isatty v0.0.21/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/ronanh/intcomp v1.1.1 h1:+1bGV/wEBiHI0FvzS7RHgzqOpfbBJzLIxkqMJ9e6yxY= +github.com/ronanh/intcomp v1.1.1/go.mod h1:7FOLy3P3Zj3er/kVrU/pl+Ql7JFZj7bwliMGketo0IU= +github.com/rs/zerolog v1.35.1 h1:m7xQeoiLIiV0BCEY4Hs+j2NG4Gp2o2KPKmhnnLiazKI= +github.com/rs/zerolog v1.35.1/go.mod h1:EjML9kdfa/RMA7h/6z6pYmq1ykOuA8/mjWaEvGI+jcw= +github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= +github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +golang.org/x/crypto v0.50.0 h1:zO47/JPrL6vsNkINmLoo/PH1gcxpls50DNogFvB5ZGI= +golang.org/x/crypto v0.50.0/go.mod h1:3muZ7vA7PBCE6xgPX7nkzzjiUq87kRItoJQM1Yo8S+Q= +golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= +golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI= +golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/verifier-ray/codegen/vanishing.go b/verifier-ray/codegen/vanishing.go new file mode 100644 index 00000000000..2c92b6afdb6 --- /dev/null +++ b/verifier-ray/codegen/vanishing.go @@ -0,0 +1,261 @@ +package codegen + +import ( + "errors" + "fmt" + + "github.com/consensys/linea-monorepo/prover-ray/maths/koalabear/field" + "github.com/consensys/linea-monorepo/prover-ray/wiop" + "github.com/consensys/linea-monorepo/prover-ray/wiop/compilers/global" +) + +// UnsupportedExpressionError reports an expression leaf or operation that the +// first verifier-ray vanishing checker intentionally does not evaluate yet. +type UnsupportedExpressionError struct { + Type string +} + +func (e *UnsupportedExpressionError) Error() string { + return fmt.Sprintf("unsupported vanishing expression %s", e.Type) +} + +func IsUnsupportedExpression(err error) bool { + var unsupported *UnsupportedExpressionError + return errors.As(err, &unsupported) +} + +type NamedVanishingSystem struct { + Name string + System VanishingSystem +} + +type VanishingSystem struct { + SourceName string + Modules []VanishingModule + RoundCoinCounts []int + RoundCoinOffsets []int + MaxRoundCoins int + TotalRoundCoins int + DynamicModuleCount int + TotalWitnessClaims int + TotalQuotientClaims int +} + +type ModuleSize struct { + Dynamic bool + StaticSize int + DynamicIndex int +} + +type VanishingModule struct { + SourceName string + Size ModuleSize + Expressions []ExprNode + Buckets []VanishingBucket + WitnessClaimOffset int +} + +type VanishingBucket struct { + Ratio int + Vanishings []Vanishing + QuotientClaimOffset int +} + +type Vanishing struct { + SourceName string + Expression int + CancelledPositions []int +} + +type ExprNode struct { + Kind ExprKind + ColumnClaim int + ColumnSourceName string + Cell ScalarRef + Coin ScalarRef + Constant field.Element + Operator Operator + Operands []int +} + +type ExprKind int + +const ( + ExprColumnClaim ExprKind = iota + ExprCellValue + ExprCoinValue + ExprConstant + ExprOp +) + +type ScalarRef struct { + Round int + Index int + FlatIndex int + SourceName string +} + +type Operator string + +const ( + OperatorAdd Operator = "add" + OperatorMul Operator = "mul" + OperatorSub Operator = "sub" + OperatorDiv Operator = "div" + OperatorDouble Operator = "double" + OperatorSquare Operator = "square" + OperatorNegate Operator = "negate" + OperatorInverse Operator = "inverse" +) + +type viewKey struct { + id wiop.ObjectID + shift int +} + +// BuildVanishingSystem extracts only compiled global.Verifier actions from sys +// and converts them to the compact data representation consumed by Zig. +func BuildVanishingSystem(sys *wiop.System) (VanishingSystem, error) { + out := VanishingSystem{SourceName: sys.Context.Path()} + out.RoundCoinCounts = make([]int, len(sys.Rounds)) + out.RoundCoinOffsets = make([]int, len(sys.Rounds)) + for i, round := range sys.Rounds { + out.RoundCoinOffsets[i] = out.TotalRoundCoins + out.RoundCoinCounts[i] = len(round.Coins) + out.TotalRoundCoins += len(round.Coins) + if len(round.Coins) > out.MaxRoundCoins { + out.MaxRoundCoins = len(round.Coins) + } + } + dynamicIndices := map[*wiop.Module]int{} + + for _, round := range sys.Rounds { + for _, action := range round.VerifierActions { + verifier, ok := action.(*global.Verifier) + if !ok { + continue + } + moduleRef := verifier.Module + module := VanishingModule{SourceName: moduleRef.Context.Label, WitnessClaimOffset: out.TotalWitnessClaims} + if moduleRef.IsDynamic() { + idx, ok := dynamicIndices[moduleRef] + if !ok { + idx = len(dynamicIndices) + dynamicIndices[moduleRef] = idx + } + module.Size = ModuleSize{Dynamic: true, DynamicIndex: idx} + } else { + module.Size = ModuleSize{StaticSize: moduleRef.Size()} + } + + views := make(map[viewKey]int, len(verifier.WitnessViews)) + for i, view := range verifier.WitnessViews { + views[viewKey{id: view.Column.Context.ID, shift: view.ShiftingOffset}] = i + } + + out.TotalWitnessClaims += len(verifier.WitnessClaims) + for _, bucket := range verifier.Buckets { + b := VanishingBucket{ + Ratio: bucket.Ratio, + QuotientClaimOffset: out.TotalQuotientClaims, + } + out.TotalQuotientClaims += len(bucket.QuotientClaims) + + for _, v := range bucket.Vanishings { + exprIdx, err := appendExpr(&module, views, out.RoundCoinOffsets, v.Expression) + if err != nil { + return VanishingSystem{}, err + } + b.Vanishings = append(b.Vanishings, Vanishing{ + SourceName: v.Context().Label, + Expression: exprIdx, + CancelledPositions: append([]int(nil), v.CancelledPositions...), + }) + } + module.Buckets = append(module.Buckets, b) + } + + out.Modules = append(out.Modules, module) + } + } + + out.DynamicModuleCount = len(dynamicIndices) + return out, nil +} + +func appendExpr(module *VanishingModule, views map[viewKey]int, roundCoinOffsets []int, expr wiop.Expression) (int, error) { + switch e := expr.(type) { + case *wiop.ColumnView: + idx, ok := views[viewKey{id: e.Column.Context.ID, shift: e.ShiftingOffset}] + if !ok { + return 0, fmt.Errorf("column view %s shift %d was not exported as a witness claim", e.Column.Context.Path(), e.ShiftingOffset) + } + module.Expressions = append(module.Expressions, ExprNode{Kind: ExprColumnClaim, ColumnClaim: idx, ColumnSourceName: e.Column.Context.Label}) + return len(module.Expressions) - 1, nil + case *wiop.Constant: + module.Expressions = append(module.Expressions, ExprNode{Kind: ExprConstant, Constant: e.Value}) + return len(module.Expressions) - 1, nil + case *wiop.ArithmeticOperation: + operands := make([]int, len(e.Operands)) + for i, operand := range e.Operands { + idx, err := appendExpr(module, views, roundCoinOffsets, operand) + if err != nil { + return 0, err + } + operands[i] = idx + } + op, err := mapOperator(e.Operator) + if err != nil { + return 0, err + } + module.Expressions = append(module.Expressions, ExprNode{Kind: ExprOp, Operator: op, Operands: operands}) + return len(module.Expressions) - 1, nil + case *wiop.Cell: + module.Expressions = append(module.Expressions, ExprNode{ + Kind: ExprCellValue, + Cell: ScalarRef{ + Round: e.Context.ID.Slot(), + Index: e.Context.ID.Position(), + SourceName: e.Context.Label, + }, + }) + return len(module.Expressions) - 1, nil + case *wiop.CoinField: + round := e.Context.ID.Slot() + module.Expressions = append(module.Expressions, ExprNode{ + Kind: ExprCoinValue, + Coin: ScalarRef{ + Round: round, + Index: e.Context.ID.Position(), + FlatIndex: roundCoinOffsets[round] + e.Context.ID.Position(), + SourceName: e.Context.Label, + }, + }) + return len(module.Expressions) - 1, nil + default: + return 0, &UnsupportedExpressionError{Type: fmt.Sprintf("%T", expr)} + } +} + +func mapOperator(op wiop.ArithmeticOperator) (Operator, error) { + switch op { + case wiop.ArithmeticOperatorAdd: + return OperatorAdd, nil + case wiop.ArithmeticOperatorMul: + return OperatorMul, nil + case wiop.ArithmeticOperatorSub: + return OperatorSub, nil + case wiop.ArithmeticOperatorDiv: + return OperatorDiv, nil + case wiop.ArithmeticOperatorDouble: + return OperatorDouble, nil + case wiop.ArithmeticOperatorSquare: + return OperatorSquare, nil + case wiop.ArithmeticOperatorNegate: + return OperatorNegate, nil + case wiop.ArithmeticOperatorInverse: + return OperatorInverse, nil + default: + return "", &UnsupportedExpressionError{Type: fmt.Sprintf("ArithmeticOperator(%d)", int(op))} + } +} diff --git a/verifier-ray/codegen/vanishing_test.go b/verifier-ray/codegen/vanishing_test.go new file mode 100644 index 00000000000..3c3a32329dc --- /dev/null +++ b/verifier-ray/codegen/vanishing_test.go @@ -0,0 +1,137 @@ +package codegen + +import ( + "bytes" + "strings" + "testing" + + "github.com/consensys/linea-monorepo/prover-ray/wiop" + "github.com/consensys/linea-monorepo/prover-ray/wiop/compilers/global" +) + +func TestBuildVanishingSystemStaticModuleSize(t *testing.T) { + sys := wiop.NewSystemf("static") + r0 := sys.NewRound() + mod := sys.NewSizedModule(sys.Context.Childf("mod"), 8, wiop.PaddingDirectionNone) + col := mod.NewColumn(sys.Context.Childf("col"), wiop.VisibilityOracle, r0) + mod.NewVanishing(sys.Context.Childf("bool"), wiop.Sub(wiop.Mul(col.View(), col.View()), col.View())) + + global.Compile(sys) + got, err := BuildVanishingSystem(sys) + if err != nil { + t.Fatalf("BuildVanishingSystem() error = %v", err) + } + if len(got.Modules) != 1 { + t.Fatalf("module count = %d, want 1", len(got.Modules)) + } + if got.Modules[0].Size.Dynamic { + t.Fatalf("static module exported as dynamic") + } + if got.Modules[0].Size.StaticSize != 8 { + t.Fatalf("static size = %d, want 8", got.Modules[0].Size.StaticSize) + } +} + +func TestBuildVanishingSystemDynamicIndicesAreCompact(t *testing.T) { + sys := wiop.NewSystemf("dynamic") + r0 := sys.NewRound() + staticMod := sys.NewSizedModule(sys.Context.Childf("static"), 4, wiop.PaddingDirectionNone) + dynA := sys.NewDynamicModule(sys.Context.Childf("dynA"), wiop.PaddingDirectionRight) + dynB := sys.NewDynamicModule(sys.Context.Childf("dynB"), wiop.PaddingDirectionRight) + staticCol := staticMod.NewColumn(sys.Context.Childf("staticCol"), wiop.VisibilityOracle, r0) + colA := dynA.NewColumn(sys.Context.Childf("colA"), wiop.VisibilityOracle, r0) + colB := dynB.NewColumn(sys.Context.Childf("colB"), wiop.VisibilityOracle, r0) + staticMod.NewVanishing(sys.Context.Childf("staticBool"), wiop.Sub(wiop.Mul(staticCol.View(), staticCol.View()), staticCol.View())) + dynA.NewVanishing(sys.Context.Childf("aBool"), wiop.Sub(wiop.Mul(colA.View(), colA.View()), colA.View())) + dynB.NewVanishing(sys.Context.Childf("bBool"), wiop.Sub(wiop.Mul(colB.View(), colB.View()), colB.View())) + + global.Compile(sys) + got, err := BuildVanishingSystem(sys) + if err != nil { + t.Fatalf("BuildVanishingSystem() error = %v", err) + } + if got.DynamicModuleCount != 2 { + t.Fatalf("dynamic module count = %d, want 2", got.DynamicModuleCount) + } + var indices []int + for _, module := range got.Modules { + if module.Size.Dynamic { + indices = append(indices, module.Size.DynamicIndex) + } + } + if len(indices) != 2 || indices[0] != 0 || indices[1] != 1 { + t.Fatalf("dynamic indices = %v, want [0 1]", indices) + } +} + +func TestWriteVanishingScenariosZigEmitsSizeModes(t *testing.T) { + sys := wiop.NewSystemf("mixed") + r0 := sys.NewRound() + staticMod := sys.NewSizedModule(sys.Context.Childf("static"), 4, wiop.PaddingDirectionNone) + dynMod := sys.NewDynamicModule(sys.Context.Childf("dyn"), wiop.PaddingDirectionRight) + staticCol := staticMod.NewColumn(sys.Context.Childf("staticCol"), wiop.VisibilityOracle, r0) + dynCol := dynMod.NewColumn(sys.Context.Childf("dynCol"), wiop.VisibilityOracle, r0) + staticMod.NewVanishing(sys.Context.Childf("staticBool"), wiop.Sub(wiop.Mul(staticCol.View(), staticCol.View()), staticCol.View())) + dynMod.NewVanishing(sys.Context.Childf("dynBool"), wiop.Sub(wiop.Mul(dynCol.View(), dynCol.View()), dynCol.View())) + + global.Compile(sys) + vanishingSystem, err := BuildVanishingSystem(sys) + if err != nil { + t.Fatalf("BuildVanishingSystem() error = %v", err) + } + var out bytes.Buffer + if err := WriteVanishingScenariosZig(&out, []NamedVanishingSystem{{Name: "mixed", System: vanishingSystem}}); err != nil { + t.Fatalf("WriteVanishingScenariosZig() error = %v", err) + } + zig := out.String() + for _, want := range []string{".{ .static = 4 }", ".{ .dynamic = 0 }"} { + if !strings.Contains(zig, want) { + t.Fatalf("generated Zig missing %q:\n%s", want, zig) + } + } +} + +func TestBuildVanishingSystemSupportsCellAndCoinLeaves(t *testing.T) { + sys := wiop.NewSystemf("cell-coin") + r0 := sys.NewRound() + r1 := sys.NewRound() + mod := sys.NewSizedModule(sys.Context.Childf("mod"), 4, wiop.PaddingDirectionNone) + col := mod.NewColumn(sys.Context.Childf("col"), wiop.VisibilityOracle, r0) + cell := r0.NewCell(sys.Context.Childf("cell"), false) + coin := r1.NewCoinField(sys.Context.Childf("coin")) + mod.NewVanishing(sys.Context.Childf("coinScaled"), wiop.Mul(coin, wiop.Sub(col.View(), cell))) + + global.Compile(sys) + vanishingSystem, err := BuildVanishingSystem(sys) + if err != nil { + t.Fatalf("BuildVanishingSystem() error = %v", err) + } + + var sawCell, sawCoin bool + for _, expr := range vanishingSystem.Modules[0].Expressions { + sawCell = sawCell || expr.Kind == ExprCellValue + sawCoin = sawCoin || expr.Kind == ExprCoinValue + } + if !sawCell || !sawCoin { + t.Fatalf("cell/coin leaves exported: cell=%v coin=%v", sawCell, sawCoin) + } + + var out bytes.Buffer + if err := WriteVanishingScenariosZig(&out, []NamedVanishingSystem{{Name: "cell-coin", System: vanishingSystem}}); err != nil { + t.Fatalf("WriteVanishingScenariosZig() error = %v", err) + } + zig := out.String() + for _, want := range []string{".cell_value", ".coin_value"} { + if !strings.Contains(zig, want) { + t.Fatalf("generated Zig missing %q:\n%s", want, zig) + } + } +} + +func TestExprNodeLiteralRendersZeroConstant(t *testing.T) { + got := exprNodeLiteral(ExprNode{Kind: ExprConstant}) + want := ".{ .constant = field.Element.init(0) }," + if got != want { + t.Fatalf("exprNodeLiteral(zero constant) = %q, want %q", got, want) + } +} diff --git a/verifier-ray/codegen/vanishing_zig.go b/verifier-ray/codegen/vanishing_zig.go new file mode 100644 index 00000000000..8ce7a2b9123 --- /dev/null +++ b/verifier-ray/codegen/vanishing_zig.go @@ -0,0 +1,213 @@ +package codegen + +import ( + "fmt" + "io" + "strings" + "text/template" +) + +// VanishingZigOptions configures imports and wrapping sections for generated +// Zig vanishing.System data. +type VanishingZigOptions struct { + FieldImport string + VanishingImport string + EmitHeader bool + EmitSystemsList bool +} + +func defaultVanishingZigOptions() VanishingZigOptions { + return VanishingZigOptions{ + FieldImport: `@import("../field/koalabear.zig")`, + VanishingImport: `@import("../query/vanishing.zig")`, + EmitHeader: true, + EmitSystemsList: true, + } +} + +// WriteVanishingScenariosZig writes generated Zig source that contains the +// vanishing.System values for the supplied cases. It emits data only; Zig owns +// the evaluator and quotient identity implementation. +func WriteVanishingScenariosZig(w io.Writer, cases []NamedVanishingSystem) error { + return WriteVanishingScenariosZigWithOptions(w, cases, defaultVanishingZigOptions()) +} + +func WriteVanishingScenariosZigWithOptions(w io.Writer, cases []NamedVanishingSystem, opts VanishingZigOptions) error { + data := vanishingTemplateData{ + Options: opts, + Cases: make([]vanishingTemplateCase, len(cases)), + } + for i, tc := range cases { + data.Cases[i] = newVanishingTemplateCase(i, tc) + } + return executeVanishingTemplate(w, data) +} + +func WriteVanishingSystemZig(w io.Writer, index int, system NamedVanishingSystem) error { + return WriteVanishingSystemZigWithOptions(w, index, system, defaultVanishingZigOptions()) +} + +func WriteVanishingSystemZigWithOptions(w io.Writer, index int, system NamedVanishingSystem, opts VanishingZigOptions) error { + data := vanishingTemplateData{ + Options: opts, + Cases: []vanishingTemplateCase{newVanishingTemplateCase(index, system)}, + } + return executeVanishingTemplate(w, data) +} + +func executeVanishingTemplate(w io.Writer, data vanishingTemplateData) error { + tmpl, err := template.New("vanishing_scenarios").Funcs(template.FuncMap{ + "expr": exprNodeLiteral, + "ints": intSlice, + "intArray": intArray, + "moduleSize": moduleSizeLiteral, + "zig": zigString, + }).Parse(vanishingScenariosTemplate) + if err != nil { + return err + } + return tmpl.Execute(w, data) +} + +type vanishingTemplateData struct { + Options VanishingZigOptions + Cases []vanishingTemplateCase +} + +type vanishingTemplateCase struct { + Index int + Name string + System VanishingSystem + Modules []vanishingTemplateModule +} + +type vanishingTemplateModule struct { + Index int + Module VanishingModule + Buckets []vanishingTemplateBucket +} + +func (m vanishingTemplateModule) SingleExpressionName() string { + if len(m.Buckets) != 1 || len(m.Buckets[0].Bucket.Vanishings) != 1 { + return "" + } + return m.Buckets[0].Bucket.Vanishings[0].SourceName +} + +type vanishingTemplateBucket struct { + ModuleIndex int + Index int + Bucket VanishingBucket +} + +func newVanishingTemplateCase(index int, tc NamedVanishingSystem) vanishingTemplateCase { + out := vanishingTemplateCase{ + Index: index, + Name: tc.Name, + System: tc.System, + Modules: make([]vanishingTemplateModule, len(tc.System.Modules)), + } + for moduleIndex, module := range tc.System.Modules { + moduleView := vanishingTemplateModule{ + Index: moduleIndex, + Module: module, + Buckets: make([]vanishingTemplateBucket, len(module.Buckets)), + } + for bucketIndex, bucket := range module.Buckets { + moduleView.Buckets[bucketIndex] = vanishingTemplateBucket{ + ModuleIndex: moduleIndex, + Index: bucketIndex, + Bucket: bucket, + } + } + out.Modules[moduleIndex] = moduleView + } + return out +} + +const vanishingScenariosTemplate = `{{if .Options.EmitHeader}}// Code generated by verifier-ray/testdata/generate; DO NOT EDIT. + +const field = {{.Options.FieldImport}}; +const vanishing = {{.Options.VanishingImport}}; + +{{end}}{{range .Cases}}{{- $case := . }} +// scenario: "{{zig $case.Name}}" + +{{range $case.Modules}}{{- $module := . }}{{with $module.SingleExpressionName}}// expression: "{{zig .}}" +{{end}}const system_{{$case.Index}}_module_{{$module.Index}}_expressions = [_]vanishing.ExprNode{ +{{range $module.Module.Expressions}} {{expr .}} +{{end}}}; + +{{range $module.Buckets}}{{- $bucket := . }}const system_{{$case.Index}}_module_{{$bucket.ModuleIndex}}_bucket_{{$bucket.Index}}_vanishings = [_]vanishing.Vanishing{ +{{range $bucket.Bucket.Vanishings}} // expression: "{{zig .SourceName}}" + .{ .expression = {{.Expression}}, .cancelled_positions = &{{ints .CancelledPositions}} }, +{{end}}}; + +{{end}}const system_{{$case.Index}}_module_{{$module.Index}}_buckets = [_]vanishing.Bucket{ +{{range $module.Buckets}} .{ .ratio = {{.Bucket.Ratio}}, .vanishings = &system_{{$case.Index}}_module_{{.ModuleIndex}}_bucket_{{.Index}}_vanishings, .quotient_claim_offset = {{.Bucket.QuotientClaimOffset}} }, +{{end}}}; + +{{end}}const system_{{$case.Index}}_modules = [_]vanishing.Module{ +{{range $case.Modules}} // module: "{{zig .Module.SourceName}}" + .{ .size = {{moduleSize .Module.Size}}, .expressions = &system_{{$case.Index}}_module_{{.Index}}_expressions, .buckets = &system_{{$case.Index}}_module_{{.Index}}_buckets, .witness_claim_offset = {{.Module.WitnessClaimOffset}} }, +{{end}}}; + +const system_{{$case.Index}}_round_coin_counts = [_]usize{{intArray $case.System.RoundCoinCounts}}; +const system_{{$case.Index}}_round_coin_offsets = [_]usize{{intArray $case.System.RoundCoinOffsets}}; + +// system: "{{zig $case.System.SourceName}}" +const system_{{$case.Index}} = vanishing.System{ + .modules = &system_{{$case.Index}}_modules, + .round_coin_counts = &system_{{$case.Index}}_round_coin_counts, + .round_coin_offsets = &system_{{$case.Index}}_round_coin_offsets, + .max_round_coins = {{$case.System.MaxRoundCoins}}, + .total_round_coins = {{$case.System.TotalRoundCoins}}, + .dynamic_module_count = {{$case.System.DynamicModuleCount}}, + .total_witness_claims = {{$case.System.TotalWitnessClaims}}, + .total_quotient_claims = {{$case.System.TotalQuotientClaims}}, +}; + +{{end}}{{if .Options.EmitSystemsList}}pub const systems = [_]vanishing.System{ +{{range .Cases}} system_{{.Index}}, +{{end}}}; +{{end}}` + +func exprNodeLiteral(expr ExprNode) string { + switch expr.Kind { + case ExprColumnClaim: + return fmt.Sprintf(".{ .column_claim = %d }, // col: \"%s\"", expr.ColumnClaim, zigString(expr.ColumnSourceName)) + case ExprCellValue: + return fmt.Sprintf(".{ .cell_value = .{ .round = %d, .index = %d } }, // cell: \"%s\"", expr.Cell.Round, expr.Cell.Index, zigString(expr.Cell.SourceName)) + case ExprCoinValue: + return fmt.Sprintf(".{ .coin_value = %d }, // coin: \"%s\"", expr.Coin.FlatIndex, zigString(expr.Coin.SourceName)) + case ExprConstant: + return fmt.Sprintf(".{ .constant = field.Element.init(%d) },", expr.Constant.Uint64()) + case ExprOp: + return fmt.Sprintf(".{ .op = .{ .operator = .%s, .operands = &%s } },", expr.Operator, intSlice(expr.Operands)) + default: + panic(fmt.Sprintf("unknown ExprKind %d", int(expr.Kind))) + } +} + +func moduleSizeLiteral(size ModuleSize) string { + if size.Dynamic { + return fmt.Sprintf(".{ .dynamic = %d }", size.DynamicIndex) + } + return fmt.Sprintf(".{ .static = %d }", size.StaticSize) +} + +func intSlice(values []int) string { + return "." + intArray(values) +} + +func intArray(values []int) string { + parts := make([]string, len(values)) + for i, value := range values { + parts[i] = fmt.Sprintf("%d", value) + } + return "{ " + strings.Join(parts, ", ") + " }" +} + +func zigString(value string) string { + return strings.NewReplacer("\\", "\\\\", "\"", "\\\"").Replace(value) +} From 0ac4af840701880516afb58804f5937cefabae79 Mon Sep 17 00:00:00 2001 From: Ivo Kubjas Date: Thu, 4 Jun 2026 09:44:34 +0000 Subject: [PATCH 02/13] feat: add exponentiation with comptime exponent --- verifier-ray/src/field/koalabear_ext.zig | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/verifier-ray/src/field/koalabear_ext.zig b/verifier-ray/src/field/koalabear_ext.zig index c9e402c4eb8..e416560c797 100644 --- a/verifier-ray/src/field/koalabear_ext.zig +++ b/verifier-ray/src/field/koalabear_ext.zig @@ -110,6 +110,17 @@ pub const Ext = extern struct { return result; } + pub fn powComptime(self: Ext, comptime exponent: usize) Ext { + var result = Ext.one(); + var b = self; + comptime var exp = exponent; + inline while (exp != 0) : (exp >>= 1) { + if ((exp & 1) == 1) result = result.mul(b); + b = b.square(); + } + return result; + } + pub fn toBytes(self: Ext) [bytes]u8 { var out: [bytes]u8 = undefined; const limbs = [_]base.Element{ self.B0.a0, self.B0.a1, self.B1.a0, self.B1.a1, self.B2.a0, self.B2.a1 }; From 0c8454db1c17c130ebd0d252d507aa3d57defc47 Mon Sep 17 00:00:00 2001 From: Ivo Kubjas Date: Thu, 4 Jun 2026 09:49:28 +0000 Subject: [PATCH 03/13] feat: add vanishing polynomial check --- verifier-ray/src/lib.zig | 4 + verifier-ray/src/query/vanishing.zig | 280 +++++++++++++++++++++++++++ 2 files changed, 284 insertions(+) create mode 100644 verifier-ray/src/query/vanishing.zig diff --git a/verifier-ray/src/lib.zig b/verifier-ray/src/lib.zig index fe2939ad858..e67ee12ab1a 100644 --- a/verifier-ray/src/lib.zig +++ b/verifier-ray/src/lib.zig @@ -18,6 +18,10 @@ pub const pcs = struct { pub const polynomial = @import("pcs/polynomial.zig"); }; +pub const query = struct { + pub const vanishing = @import("query/vanishing.zig"); +}; + pub const precompiles = struct { pub const interface = @import("precompiles/interface.zig"); pub const native = @import("precompiles/native.zig"); diff --git a/verifier-ray/src/query/vanishing.zig b/verifier-ray/src/query/vanishing.zig new file mode 100644 index 00000000000..517b42eebda --- /dev/null +++ b/verifier-ray/src/query/vanishing.zig @@ -0,0 +1,280 @@ +const field = @import("../field/koalabear.zig"); +const ext = @import("../field/koalabear_ext.zig"); +const runtime = @import("../runtime.zig"); + +pub const Error = runtime.Error || error{ + MissingDynamicModuleSize, + InvalidModuleSize, + InvalidClaimCount, + InvalidRoundCount, + InvalidCoinCount, + QuotientIdentityMismatch, +}; + +pub const ModuleSize = union(enum) { + static: usize, + dynamic: usize, +}; + +pub const Operator = enum { + add, + mul, + sub, + div, + double, + square, + negate, + inverse, +}; + +pub const ExprOp = struct { + operator: Operator, + operands: []const usize, +}; + +pub const ScalarRef = struct { + round: usize, + index: usize, +}; + +pub const ExprNode = union(enum) { + column_claim: usize, + cell_value: ScalarRef, + coin_value: usize, + constant: field.Element, + op: ExprOp, +}; + +pub const Vanishing = struct { + expression: usize, + cancelled_positions: []const i32 = &.{}, +}; + +pub const Bucket = struct { + ratio: usize, + vanishings: []const Vanishing, + quotient_claim_offset: usize, +}; + +pub const Module = struct { + size: ModuleSize, + expressions: []const ExprNode, + buckets: []const Bucket, + witness_claim_offset: usize, +}; + +pub const System = struct { + modules: []const Module, + round_coin_counts: []const usize = &.{}, + round_coin_offsets: []const usize = &.{}, + max_round_coins: usize = 0, + total_round_coins: usize = 0, + dynamic_module_count: usize = 0, + total_witness_claims: usize = 0, + total_quotient_claims: usize = 0, +}; + +pub const CheckInput = struct { + rounds: []const runtime.RoundMessage, + witness_claims: []const ext.Ext, + quotient_claims: []const ext.Ext, + module_sizes: []const usize = &.{}, +}; + +pub fn verify(comptime system: System, input: CheckInput) Error!void { + if (input.witness_claims.len != system.total_witness_claims) return error.InvalidClaimCount; + if (input.quotient_claims.len != system.total_quotient_claims) return error.InvalidClaimCount; + if (input.module_sizes.len < system.dynamic_module_count) return error.MissingDynamicModuleSize; + if (system.round_coin_counts.len < 3) return error.InvalidRoundCount; + if (system.round_coin_offsets.len != system.round_coin_counts.len) return error.InvalidRoundCount; + if (input.rounds.len + 1 != system.round_coin_counts.len) return error.InvalidRoundCount; + if (system.max_round_coins < system.modules.len) return error.InvalidCoinCount; + + var rt = runtime.Runtime.initWithRoundCount(system.round_coin_counts.len); + var all_coins: [system.total_round_coins]runtime.Coin = undefined; + var round_coins: [system.max_round_coins]runtime.Coin = undefined; + var merge_coins: [system.modules.len]runtime.Coin = undefined; + var eval_coins: [system.modules.len]runtime.Coin = undefined; + + const merge_advance_index = system.round_coin_counts.len - 3; + const eval_advance_index = system.round_coin_counts.len - 2; + + for (input.rounds, 0..) |round, round_index| { + const next_coin_count = system.round_coin_counts[round_index + 1]; + const message = runtime.RoundMessage{ + .columns = round.columns, + .cells = round.cells, + .next_round_coin_count = next_coin_count, + }; + const coins = try rt.advanceRoundWithMessage(round_index, message, round_coins[0..]); + const coin_offset = system.round_coin_offsets[round_index + 1]; + if (coin_offset + coins.len > all_coins.len) return error.InvalidCoinCount; + for (coins, 0..) |coin, coin_index| all_coins[coin_offset + coin_index] = coin; + + if (round_index == merge_advance_index) { + if (coins.len != system.modules.len) return error.InvalidCoinCount; + for (coins, 0..) |coin, coin_index| merge_coins[coin_index] = coin; + } else if (round_index == eval_advance_index) { + if (coins.len != system.modules.len) return error.InvalidCoinCount; + for (coins, 0..) |coin, coin_index| eval_coins[coin_index] = coin; + } + } + + inline for (system.modules, 0..) |module, module_index| { + switch (module.size) { + .static => |n| try verifyModule(module, n, 0, input, all_coins[0..], merge_coins[module_index], eval_coins[module_index]), + .dynamic => |size_index| { + if (size_index >= input.module_sizes.len) return error.MissingDynamicModuleSize; + try verifyModule(module, 0, input.module_sizes[size_index], input, all_coins[0..], merge_coins[module_index], eval_coins[module_index]); + }, + } + } +} + +fn verifyModule( + comptime module: Module, + comptime static_n: usize, + dynamic_n: usize, + input: CheckInput, + coins: []const runtime.Coin, + merge_coin: ext.Ext, + eval_coin: ext.Ext, +) Error!void { + // Static module sizes are embedded in the generated System, so Zig can + // specialize this function at comptime. Dynamic modules use static_n == 0 + // as a sentinel and read n from CheckInput.module_sizes at runtime. + // + // The inline loops below are intentional: they traverse generated metadata + // whose indices must stay comptime-known to avoid runtime expression-DAG + // dispatch. Data loops, such as quotient-share recombination, remain plain + // for loops. + comptime { + if (static_n != 0 and !validModuleSize(static_n)) { + @compileError("static vanishing module size must be a non-zero power of two"); + } + } + if (static_n == 0 and !validModuleSize(dynamic_n)) return error.InvalidModuleSize; + + // Let r be the evaluation coin and H the module domain of size n. + // The prover computes the domain annihilator Z_H(r) = r^n - 1. + const r_pow_n = powModuleSize(eval_coin, static_n, dynamic_n); + const annihilator = r_pow_n.sub(ext.Ext.one()); + + inline for (module.buckets) |bucket| { + try verifyBucket(module, bucket, static_n, dynamic_n, input, coins, merge_coin, eval_coin, r_pow_n, annihilator); + } +} + +fn powModuleSize(r: ext.Ext, comptime static_n: usize, dynamic_n: usize) ext.Ext { + // When static_n is non-zero, the exponent n is part of the comptime System + // and powComptime emits a fixed exponentiation chain. Otherwise n is known + // only from the verifier input and we use the runtime exponentiation path. + if (static_n != 0) { + return r.powComptime(static_n); + } + return r.pow(@as(u256, dynamic_n)); +} + +fn verifyBucket( + comptime module: Module, + comptime bucket: Bucket, + comptime static_n: usize, + dynamic_n: usize, + input: CheckInput, + coins: []const runtime.Coin, + merge_coin: ext.Ext, + eval_coin: ext.Ext, + r_pow_n: ext.Ext, + annihilator: ext.Ext, +) Error!void { + var quotient = ext.Ext.zero(); + var r_pow_kn = ext.Ext.one(); + for (0..bucket.ratio) |i| { + // Recombine quotient-share claims: + // Q(r) = sum_k r^(k*n) * Q_k(r) = sum_k (r^n)^k * Q_k(r). + quotient = quotient.add(r_pow_kn.mul(input.quotient_claims[bucket.quotient_claim_offset + i])); + r_pow_kn = r_pow_kn.mul(r_pow_n); + } + + var aggregate = ext.Ext.zero(); + var coin_power = ext.Ext.one(); + inline for (bucket.vanishings) |v| { + // Aggregate the vanished numerators with the merge coin alpha: + // P_agg(r) = sum_i alpha^i * P_i(r) * C_i(r). + const value = evalExpr(module, v.expression, input, coins); + const cancellation = try cancellationAtPoint(v.cancelled_positions, static_n, dynamic_n, eval_coin); + aggregate = aggregate.add(coin_power.mul(value.mul(cancellation))); + coin_power = coin_power.mul(merge_coin); + } + + // PLONK quotient identity checked by prover-ray/global.Verifier.Check: + // P_agg(r) = Z_H(r) * Q(r) = (r^n - 1) * Q(r). + if (!aggregate.eql(annihilator.mul(quotient))) return error.QuotientIdentityMismatch; +} + +fn evalExpr(comptime module: Module, comptime expr_index: usize, input: CheckInput, coins: []const runtime.Coin) ext.Ext { + const node = module.expressions[expr_index]; + return switch (node) { + .column_claim => |claim_index| input.witness_claims[module.witness_claim_offset + claim_index], + .cell_value => |ref| scalarToExt(input.rounds[ref.round].cells[ref.index]), + .coin_value => |coin_index| coins[coin_index], + .constant => |value| ext.Ext.lift(value), + .op => |op| evalOp(module, op, input, coins), + }; +} + +fn scalarToExt(value: runtime.Scalar) ext.Ext { + return switch (value) { + .base => |base| ext.Ext.lift(base), + .ext => |extended| extended, + }; +} + +fn evalOp(comptime module: Module, comptime op: ExprOp, input: CheckInput, coins: []const runtime.Coin) ext.Ext { + const a = evalExpr(module, op.operands[0], input, coins); + return switch (op.operator) { + .add => a.add(evalExpr(module, op.operands[1], input, coins)), + .mul => a.mul(evalExpr(module, op.operands[1], input, coins)), + .sub => a.sub(evalExpr(module, op.operands[1], input, coins)), + .div => a.div(evalExpr(module, op.operands[1], input, coins)), + .double => a.add(a), + .square => a.square(), + .negate => a.neg(), + .inverse => a.inverse(), + }; +} + +fn cancellationAtPoint( + comptime positions: []const i32, + comptime static_n: usize, + dynamic_n: usize, + r: ext.Ext, +) Error!ext.Ext { + if (positions.len == 0) return ext.Ext.one(); + + const omega = if (static_n == 0) field.rootOfUnityBy(dynamic_n) catch return error.InvalidModuleSize else field.Element.one(); + var result = ext.Ext.one(); + + inline for (positions) |position| { + // Cancellation polynomial for openings already enforced elsewhere: + // C(r) = product_{k in cancelled} (r - omega_n^norm(k)). + const root = if (static_n != 0) comptime staticRootPower(static_n, normalizePosition(position, static_n, 0)) else omega.pow(@as(u64, @intCast(normalizePosition(position, 0, dynamic_n)))); + result = result.mul(r.sub(ext.Ext.lift(root))); + } + return result; +} + +fn staticRootPower(comptime n: usize, comptime k: usize) field.Element { + const omega = field.rootOfUnityBy(n) catch unreachable; + return omega.pow(@as(u64, k)); +} + +fn normalizePosition(comptime position: i32, comptime static_n: usize, dynamic_n: usize) usize { + const n = if (static_n != 0) static_n else dynamic_n; + if (position < 0) return n - @as(usize, @intCast(-position)); + return @as(usize, @intCast(position)); +} + +fn validModuleSize(n: usize) bool { + return field.isPowerOfTwo(n); +} From d22722fa711ae7b8bd0725a18c220cc60947245a Mon Sep 17 00:00:00 2001 From: Ivo Kubjas Date: Thu, 4 Jun 2026 10:28:26 +0000 Subject: [PATCH 04/13] test: add vanishing fixture generation --- verifier-ray/testdata/generate/go.mod | 7 +- verifier-ray/testdata/generate/go.sum | 4 +- verifier-ray/testdata/generate/main.go | 322 +++++++++++++++++++++++++ 3 files changed, 330 insertions(+), 3 deletions(-) diff --git a/verifier-ray/testdata/generate/go.mod b/verifier-ray/testdata/generate/go.mod index 3a7c28c31a0..609a421458d 100644 --- a/verifier-ray/testdata/generate/go.mod +++ b/verifier-ray/testdata/generate/go.mod @@ -2,7 +2,10 @@ module github.com/consensys/linea-monorepo/verifier-ray/testdata/generate go 1.25.7 -require github.com/consensys/linea-monorepo/prover-ray v0.0.0-20260521063207-ab0f753372c8 +require ( + github.com/consensys/linea-monorepo/prover-ray v0.0.0-20260604100845-588fd53a8c0f + github.com/consensys/linea-monorepo/verifier-ray/codegen v0.0.0 +) require ( github.com/bits-and-blooms/bitset v1.24.4 // indirect @@ -21,3 +24,5 @@ require ( golang.org/x/sync v0.20.0 // indirect golang.org/x/sys v0.43.0 // indirect ) + +replace github.com/consensys/linea-monorepo/verifier-ray/codegen => ../../codegen diff --git a/verifier-ray/testdata/generate/go.sum b/verifier-ray/testdata/generate/go.sum index e59f5137a1f..b2e9a0d633a 100644 --- a/verifier-ray/testdata/generate/go.sum +++ b/verifier-ray/testdata/generate/go.sum @@ -6,8 +6,8 @@ github.com/consensys/gnark v0.14.1-0.20260219004710-bbfb2f70a565 h1:NlOAmbLYsVb/ github.com/consensys/gnark v0.14.1-0.20260219004710-bbfb2f70a565/go.mod h1:EoWWbEboQRydCqJDSA7zrFxucIeoy/5R+MDx04oFpF4= github.com/consensys/gnark-crypto v0.20.2-0.20260514182922-df0578435b08 h1:EdljQKaHxACX5JMSTXlVM9R8qASU/W1husqDsB2b5tU= github.com/consensys/gnark-crypto v0.20.2-0.20260514182922-df0578435b08/go.mod h1:NzeBHSZ49bIM7RtrNTYYR2kymTqwvI/A4eTgQlyQc+Q= -github.com/consensys/linea-monorepo/prover-ray v0.0.0-20260521063207-ab0f753372c8 h1:ZFVPaOu3F7rf8Tv6vtO00jnadeXB2OUopYxrtdqjwMY= -github.com/consensys/linea-monorepo/prover-ray v0.0.0-20260521063207-ab0f753372c8/go.mod h1:2cEA44vEDPh8MB1huZtKZv//iXB0ZOghXq7idgt4UPc= +github.com/consensys/linea-monorepo/prover-ray v0.0.0-20260604100845-588fd53a8c0f h1:1z/yV6WAzsvTXhKrFfSJNvI7kQQYL8N/uPgi651jZzo= +github.com/consensys/linea-monorepo/prover-ray v0.0.0-20260604100845-588fd53a8c0f/go.mod h1:2cEA44vEDPh8MB1huZtKZv//iXB0ZOghXq7idgt4UPc= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/fxamacker/cbor/v2 v2.9.1 h1:2rWm8B193Ll4VdjsJY28jxs70IdDsHRWgQYAI80+rMQ= diff --git a/verifier-ray/testdata/generate/main.go b/verifier-ray/testdata/generate/main.go index 77be8261ee0..027196dcff6 100644 --- a/verifier-ray/testdata/generate/main.go +++ b/verifier-ray/testdata/generate/main.go @@ -21,6 +21,13 @@ import ( "github.com/consensys/linea-monorepo/prover-ray/maths/koalabear/field" "github.com/consensys/linea-monorepo/prover-ray/maths/koalabear/polynomials" "github.com/consensys/linea-monorepo/prover-ray/wiop" + "github.com/consensys/linea-monorepo/prover-ray/wiop/compilers/global" + "github.com/consensys/linea-monorepo/prover-ray/wiop/compilers/localvanishing" + "github.com/consensys/linea-monorepo/prover-ray/wiop/compilers/logderivativesum" + "github.com/consensys/linea-monorepo/prover-ray/wiop/compilers/lookuptologderivsum" + "github.com/consensys/linea-monorepo/prover-ray/wiop/compilers/rangecheck" + "github.com/consensys/linea-monorepo/prover-ray/wiop/wioptest" + "github.com/consensys/linea-monorepo/verifier-ray/codegen" ) const koalaModulus = uint64(2_130_706_433) @@ -34,6 +41,10 @@ func main() { writePoseidonCases(&out) writeFiatShamirCases(&out) writeRuntimeTraceCases(&out) + vanishingCases, vanishingSystems, err := buildVanishingFixtureCases() + if err != nil { + panic(err) + } data := out.Bytes() zigfmt, err := runZigFmt(data) @@ -45,6 +56,9 @@ func main() { if err := os.WriteFile(outputPath, data, 0o644); err != nil { panic(err) } + if err := writeVanishingFixtures(vanishingCases, vanishingSystems); err != nil { + panic(err) + } } func writeHeader(out *bytes.Buffer) { @@ -554,6 +568,302 @@ func extTraceCell(value field.Ext) runtimeTraceCell { return runtimeTraceCell{extValue: &value} } +type vanishingFixtureCase struct { + name string + honest vanishingProofView + invalid *vanishingProofView +} + +type vanishingProofView struct { + rounds []runtimeTraceRound + witnessClaims []field.Ext + quotientClaims []field.Ext + moduleSizes []int +} + +type vanishingAssign func(rt *wiop.Runtime) + +func compileFullPipeline(sys *wiop.System) { + rangecheck.Compile(sys) + lookuptologderivsum.Compile(sys) + logderivativesum.Compile(sys) + localvanishing.Compile(sys) + global.Compile(sys) +} + +func buildVanishingFixtureCases() ([]vanishingFixtureCase, []codegen.NamedVanishingSystem, error) { + var cases []vanishingFixtureCase + var systems []codegen.NamedVanishingSystem + + add := func(source, name string, sys *wiop.System, honest vanishingAssign, invalid vanishingAssign) error { + compileFullPipeline(sys) + vanishingSystem, err := codegen.BuildVanishingSystem(sys) + if err != nil { + return fmt.Errorf("build vanishing system %s/%s: %w", source, name, err) + } + if len(vanishingSystem.Modules) == 0 { + return nil + } + + prefixedName := source + "/" + name + honestProof := buildVanishingProofView(sys, honest) + var invalidProof *vanishingProofView + if invalid != nil { + proof := buildVanishingProofView(sys, invalid) + invalidProof = &proof + } + cases = append(cases, vanishingFixtureCase{name: prefixedName, honest: honestProof, invalid: invalidProof}) + systems = append(systems, codegen.NamedVanishingSystem{Name: prefixedName, System: vanishingSystem}) + return nil + } + + for _, factory := range wioptest.VanishingScenarios() { + sc := factory() + if err := add("Vanishing", sc.Name, sc.Sys, sc.AssignHonest, sc.AssignInvalid); err != nil { + return nil, nil, err + } + } + for _, factory := range wioptest.LocalVanishingScenarios() { + sc := factory() + if err := add("LocalVanishing", sc.Name, sc.Sys, sc.AssignHonest, sc.AssignInvalid); err != nil { + return nil, nil, err + } + } + for _, factory := range wioptest.LogDerivativeSumCompilerScenarios() { + sc := factory() + if err := add("LogDerivativeSumCompiler", sc.Name, sc.Sys, sc.AssignWitness, nil); err != nil { + return nil, nil, err + } + } + for _, factory := range wioptest.LookupScenarios() { + sc := factory() + if err := add("Lookup", sc.Name, sc.Sys, sc.AssignWitness, nil); err != nil { + return nil, nil, err + } + } + for _, factory := range wioptest.RangeCheckCompilerScenarios() { + sc := factory() + if err := add("RangeCheckCompiler", sc.Name, sc.Sys, sc.AssignWitness, nil); err != nil { + return nil, nil, err + } + } + + return cases, systems, nil +} + +func buildVanishingProofView(sys *wiop.System, assign vanishingAssign) vanishingProofView { + rt := wiop.NewRuntime(sys) + assign(&rt) + runVanishingProver(&rt) + + verifiers := globalVerifiers(sys) + + var witnessClaims []field.Ext + var quotientClaims []field.Ext + for _, verifier := range verifiers { + for _, claim := range verifier.WitnessClaims { + witnessClaims = append(witnessClaims, rt.GetCellValue(claim).AsExt()) + } + for _, bucket := range verifier.Buckets { + for _, claim := range bucket.QuotientClaims { + quotientClaims = append(quotientClaims, rt.GetCellValue(claim).AsExt()) + } + } + } + + rounds := make([]runtimeTraceRound, 0, len(sys.Rounds)-1) + for i := 0; i < len(sys.Rounds)-1; i++ { + rounds = append(rounds, runtimeTraceRoundFromRuntime(rt, sys.Rounds[i])) + } + + return vanishingProofView{ + rounds: rounds, + witnessClaims: witnessClaims, + quotientClaims: quotientClaims, + moduleSizes: dynamicModuleSizes(verifiers, rt), + } +} + +func runVanishingProver(rt *wiop.Runtime) { + for _, action := range rt.CurrentRound().ProverActions { + action.Run(*rt) + } + for rt.CurrentRound().ID < len(rt.System.Rounds)-1 { + rt.AdvanceRound() + for _, action := range rt.CurrentRound().ProverActions { + action.Run(*rt) + } + } +} + +func globalVerifiers(sys *wiop.System) []*global.Verifier { + var verifiers []*global.Verifier + for _, round := range sys.Rounds { + for _, action := range round.VerifierActions { + if verifier, ok := action.(*global.Verifier); ok { + verifiers = append(verifiers, verifier) + } + } + } + return verifiers +} + +func dynamicModuleSizes(verifiers []*global.Verifier, rt wiop.Runtime) []int { + indices := map[*wiop.Module]int{} + for _, verifier := range verifiers { + module := verifier.Module + if !module.IsDynamic() { + continue + } + if _, ok := indices[module]; !ok { + indices[module] = len(indices) + } + } + out := make([]int, len(indices)) + for module, idx := range indices { + out[idx] = module.RuntimeSize(rt) + } + return out +} + +func runtimeTraceRoundFromRuntime(rt wiop.Runtime, round *wiop.Round) runtimeTraceRound { + var trace runtimeTraceRound + for _, col := range round.Columns { + if col.Visibility < wiop.VisibilityOracle || !rt.HasColumnAssignment(col) { + continue + } + vec := rt.GetColumnAssignment(col).Plain + if vec.IsBase() { + trace.columns = append(trace.columns, runtimeTraceColumn{publicBaseValues: append([]field.Element(nil), vec.AsBase()...)}) + } else { + trace.columns = append(trace.columns, runtimeTraceColumn{publicExtValues: append([]field.Ext(nil), vec.AsExt()...)}) + } + } + for _, cell := range round.Cells { + if !rt.HasCellValue(cell) { + continue + } + value := rt.GetCellValue(cell) + if value.IsBase() { + trace.cells = append(trace.cells, baseTraceCell(value.AsBase())) + } else { + trace.cells = append(trace.cells, extTraceCell(value.AsExt())) + } + } + return trace +} + +func writeVanishingFixtures(cases []vanishingFixtureCase, systems []codegen.NamedVanishingSystem) error { + var out bytes.Buffer + writeVanishingHeader(&out) + for i := range cases { + if err := codegen.WriteVanishingSystemZigWithOptions(&out, i, systems[i], codegen.VanishingZigOptions{ + FieldImport: "verifier_ray.field.koalabear", + VanishingImport: "verifier_ray.query.vanishing", + }); err != nil { + return err + } + writeVanishingScenario(&out, i, cases[i]) + } + writeVanishingScenarioList(&out, len(cases)) + + data := out.Bytes() + zigfmt, err := runZigFmt(data) + if err == nil { + data = zigfmt + } + return os.WriteFile(filepath.Join("..", "generated", "vanishing.zig"), data, 0o644) +} + +func writeVanishingHeader(out *bytes.Buffer) { + fmt.Fprintln(out, "// Code generated by verifier-ray/testdata/generate; DO NOT EDIT.") + fmt.Fprintln(out) + fmt.Fprintln(out, "const verifier_ray = @import(\"verifier_ray\");") + fmt.Fprintln(out, "const field = verifier_ray.field.koalabear;") + fmt.Fprintln(out, "const vanishing = verifier_ray.query.vanishing;") + fmt.Fprintln(out) + fmt.Fprintln(out, "pub const RuntimeTraceColumn = union(enum) { oracle: []const [8]u32, public_base: []const u32, public_ext: []const [6]u32 };") + fmt.Fprintln(out, "pub const RuntimeTraceCell = union(enum) { base: u32, ext: [6]u32 };") + fmt.Fprintln(out, "pub const RuntimeTraceRound = struct { columns: []const RuntimeTraceColumn, cells: []const RuntimeTraceCell };") + fmt.Fprintln(out, "pub const VanishingProofView = struct { rounds: []const RuntimeTraceRound, witness_claims: []const [6]u32, quotient_claims: []const [6]u32, module_sizes: []const usize };") + fmt.Fprintln(out, "pub const VanishingScenario = struct { name: []const u8, system: vanishing.System, honest: VanishingProofView, invalid: ?VanishingProofView = null };") + fmt.Fprintln(out) +} + +func writeVanishingScenario(out *bytes.Buffer, idx int, tc vanishingFixtureCase) { + fmt.Fprintf(out, "const vanishing_scenario_%d = VanishingScenario{\n", idx) + fmt.Fprintf(out, " .name = \"%s\",\n", zigString(tc.name)) + fmt.Fprintf(out, " .system = system_%d,\n", idx) + fmt.Fprintln(out, " .honest =") + writeVanishingProofView(out, tc.honest, " ") + if tc.invalid != nil { + fmt.Fprintln(out, " .invalid =") + writeVanishingProofView(out, *tc.invalid, " ") + } + fmt.Fprintln(out, "};") + fmt.Fprintln(out) +} + +func writeVanishingScenarioList(out *bytes.Buffer, count int) { + fmt.Fprintln(out, "pub const scenarios = [_]VanishingScenario{") + for i := range count { + fmt.Fprintf(out, " vanishing_scenario_%d,\n", i) + } + fmt.Fprintln(out, "};") +} + +func writeVanishingProofView(out *bytes.Buffer, proof vanishingProofView, indent string) { + fmt.Fprintf(out, "%s.{\n", indent) + fmt.Fprintf(out, "%s .rounds = &.{\n", indent) + for _, round := range proof.rounds { + writeVanishingRuntimeTraceRound(out, round, indent+" ") + } + fmt.Fprintf(out, "%s },\n", indent) + fmt.Fprintf(out, "%s .witness_claims = &%s,\n", indent, extSlice(proof.witnessClaims)) + fmt.Fprintf(out, "%s .quotient_claims = &%s,\n", indent, extSlice(proof.quotientClaims)) + fmt.Fprintf(out, "%s .module_sizes = &%s,\n", indent, intSlice(proof.moduleSizes)) + fmt.Fprintf(out, "%s},\n", indent) +} + +func writeVanishingRuntimeTraceRound(out *bytes.Buffer, round runtimeTraceRound, indent string) { + fmt.Fprintf(out, "%s.{\n", indent) + fmt.Fprintf(out, "%s .columns = &.{\n", indent) + for _, column := range round.columns { + writeVanishingRuntimeTraceColumn(out, column, indent+" ") + } + fmt.Fprintf(out, "%s },\n", indent) + fmt.Fprintf(out, "%s .cells = &.{\n", indent) + for _, cell := range round.cells { + writeVanishingRuntimeTraceCell(out, cell, indent+" ") + } + fmt.Fprintf(out, "%s },\n", indent) + fmt.Fprintf(out, "%s},\n", indent) +} + +func writeVanishingRuntimeTraceColumn(out *bytes.Buffer, column runtimeTraceColumn, indent string) { + switch { + case column.commitments != nil: + fmt.Fprintf(out, "%s.{ .oracle = &%s },\n", indent, commitmentSlice(column.commitments)) + case column.publicBaseValues != nil: + fmt.Fprintf(out, "%s.{ .public_base = &%s },\n", indent, elemSlice(column.publicBaseValues)) + case column.publicExtValues != nil: + fmt.Fprintf(out, "%s.{ .public_ext = &%s },\n", indent, extSlice(column.publicExtValues)) + default: + panic("runtime trace column has no data variant") + } +} + +func writeVanishingRuntimeTraceCell(out *bytes.Buffer, cell runtimeTraceCell, indent string) { + switch { + case cell.baseValue != nil: + fmt.Fprintf(out, "%s.{ .base = %d },\n", indent, u(*cell.baseValue)) + case cell.extValue != nil: + fmt.Fprintf(out, "%s.{ .ext = %s },\n", indent, ext6(*cell.extValue)) + default: + panic("runtime trace cell has no data variant") + } +} + func elem(v uint64) field.Element { var e field.Element e.SetUint64(v) @@ -645,6 +955,18 @@ func extSlice(values []field.Ext) string { return ".{ " + strings.Join(parts, ", ") + " }" } +func intSlice(values []int) string { + parts := make([]string, len(values)) + for i, value := range values { + parts[i] = fmt.Sprintf("%d", value) + } + return ".{ " + strings.Join(parts, ", ") + " }" +} + +func zigString(value string) string { + return strings.NewReplacer("\\", "\\\\", "\"", "\\\"").Replace(value) +} + func commitmentSlice(values []field.Octuplet) string { parts := make([]string, len(values)) for i, value := range values { From bdc1176197e4ee3b628ea72ec89d975bebf227ae Mon Sep 17 00:00:00 2001 From: Ivo Kubjas Date: Thu, 4 Jun 2026 10:30:46 +0000 Subject: [PATCH 05/13] chore: generate vanishing testdata --- verifier-ray/testdata/generated/vanishing.zig | 8369 +++++++++++++++++ 1 file changed, 8369 insertions(+) create mode 100644 verifier-ray/testdata/generated/vanishing.zig diff --git a/verifier-ray/testdata/generated/vanishing.zig b/verifier-ray/testdata/generated/vanishing.zig new file mode 100644 index 00000000000..14b40a1ab15 --- /dev/null +++ b/verifier-ray/testdata/generated/vanishing.zig @@ -0,0 +1,8369 @@ +// Code generated by verifier-ray/testdata/generate; DO NOT EDIT. + +const verifier_ray = @import("verifier_ray"); +const field = verifier_ray.field.koalabear; +const vanishing = verifier_ray.query.vanishing; + +pub const RuntimeTraceColumn = union(enum) { oracle: []const [8]u32, public_base: []const u32, public_ext: []const [6]u32 }; +pub const RuntimeTraceCell = union(enum) { base: u32, ext: [6]u32 }; +pub const RuntimeTraceRound = struct { columns: []const RuntimeTraceColumn, cells: []const RuntimeTraceCell }; +pub const VanishingProofView = struct { rounds: []const RuntimeTraceRound, witness_claims: []const [6]u32, quotient_claims: []const [6]u32, module_sizes: []const usize }; +pub const VanishingScenario = struct { name: []const u8, system: vanishing.System, honest: VanishingProofView, invalid: ?VanishingProofView = null }; + +// scenario: "Vanishing/BooleanColumn" + +// expression: "bool" +const system_0_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, +}; + +const system_0_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "bool" + .{ .expression = 4, .cancelled_positions = &.{} }, +}; + +const system_0_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_0_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_0_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_0_module_0_expressions, .buckets = &system_0_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_0_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_0_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "bool-col" +const system_0 = vanishing.System{ + .modules = &system_0_modules, + .round_coin_counts = &system_0_round_coin_counts, + .round_coin_offsets = &system_0_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 1, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_0 = VanishingScenario{ + .name = "Vanishing/BooleanColumn", + .system = system_0, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 0, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{.{ 1347096082, 997183271, 2024727729, 473491915, 1834332932, 1513211784 }}, + .quotient_claims = &.{.{ 1598029825, 0, 0, 0, 0, 0 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 2, 0, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1604296705, 0, 0, 0, 0, 0 }, .{ 958817896, 0, 0, 0, 0, 0 }, .{ 2124439554, 0, 0, 0, 0, 0 }, .{ 1331691521, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{.{ 174395034, 187508812, 1644405456, 64543109, 1989752537, 850930437 }}, + .quotient_claims = &.{.{ 573262348, 489397423, 953933642, 372487517, 2011764470, 24549056 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/Fibonacci" + +// expression: "fib" +const system_1_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 1 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 2 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, +}; + +const system_1_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "fib" + .{ .expression = 4, .cancelled_positions = &.{ 0, 1 } }, +}; + +const system_1_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_1_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_1_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 8 }, .expressions = &system_1_module_0_expressions, .buckets = &system_1_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_1_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_1_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "fib" +const system_1 = vanishing.System{ + .modules = &system_1_modules, + .round_coin_counts = &system_1_round_coin_counts, + .round_coin_offsets = &system_1_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 3, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_1 = VanishingScenario{ + .name = "Vanishing/Fibonacci", + .system = system_1, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 1, 1, 2, 3, 5, 8, 13, 21 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 552753386, 0, 0, 0, 0, 0 }, .{ 1170422654, 0, 0, 0, 0, 0 }, .{ 1520879065, 0, 0, 0, 0, 0 }, .{ 1398117480, 0, 0, 0, 0, 0 }, .{ 1740509171, 0, 0, 0, 0, 0 }, .{ 1122839903, 0, 0, 0, 0, 0 }, .{ 772383492, 0, 0, 0, 0, 0 }, .{ 895145077, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1447242592, 978962941, 713008718, 2098986074, 810460008, 1622438948 }, .{ 1595630697, 1671389507, 1674422187, 1691736160, 1824101463, 792937680 }, .{ 1881232788, 627383792, 680025590, 1782463208, 1665432448, 1958953104 } }, + .quotient_claims = &.{.{ 121605825, 302074000, 1996294172, 1700051928, 98596367, 812372901 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 1, 1, 2, 3, 5, 8, 13, 22 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1039702195, 0, 0, 0, 0, 0 }, .{ 1441997329, 0, 0, 0, 0, 0 }, .{ 1381606708, 0, 0, 0, 0, 0 }, .{ 769807354, 0, 0, 0, 0, 0 }, .{ 1164221666, 0, 0, 0, 0, 0 }, .{ 761926532, 0, 0, 0, 0, 0 }, .{ 822317153, 0, 0, 0, 0, 0 }, .{ 1135626563, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1151832766, 489109694, 745564059, 2065529070, 787588006, 1722051715 }, .{ 1842952544, 1264021167, 1374471502, 1711228060, 247568247, 1873163260 }, .{ 468663487, 519972582, 1677417873, 175539661, 684550919, 698689360 } }, + .quotient_claims = &.{.{ 105354878, 539148090, 407216735, 2029376794, 1215296786, 1606162197 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/GeometricProgression" + +// expression: "geo" +const system_2_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .constant = field.Element.init(2) }, + .{ .column_claim = 1 }, // col: "col" + .{ .op = .{ .operator = .mul, .operands = &.{ 1, 2 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 3 } } }, +}; + +const system_2_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "geo" + .{ .expression = 4, .cancelled_positions = &.{0} }, +}; + +const system_2_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_2_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_2_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 8 }, .expressions = &system_2_module_0_expressions, .buckets = &system_2_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_2_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_2_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "geo" +const system_2 = vanishing.System{ + .modules = &system_2_modules, + .round_coin_counts = &system_2_round_coin_counts, + .round_coin_offsets = &system_2_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 2, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_2 = VanishingScenario{ + .name = "Vanishing/GeometricProgression", + .system = system_2, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 1, 2, 4, 8, 16, 32, 64, 128 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1864368097, 0, 0, 0, 0, 0 }, .{ 1864368097, 0, 0, 0, 0, 0 }, .{ 1864368097, 0, 0, 0, 0, 0 }, .{ 1864368097, 0, 0, 0, 0, 0 }, .{ 1864368097, 0, 0, 0, 0, 0 }, .{ 1864368097, 0, 0, 0, 0, 0 }, .{ 1864368097, 0, 0, 0, 0, 0 }, .{ 1864368097, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 299197256, 763018535, 273524042, 1677061344, 931490984, 612995876 }, .{ 1225565914, 1802301049, 1570015284, 1167872199, 725653957, 489765574 } }, + .quotient_claims = &.{.{ 1864368097, 0, 0, 0, 0, 0 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 1, 3, 9, 27, 81, 243, 729, 2187 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1097135825, 0, 0, 0, 0, 0 }, .{ 1520620376, 0, 0, 0, 0, 0 }, .{ 2032560275, 0, 0, 0, 0, 0 }, .{ 1667051586, 0, 0, 0, 0, 0 }, .{ 1707115502, 0, 0, 0, 0, 0 }, .{ 585422720, 0, 0, 0, 0, 0 }, .{ 1130884757, 0, 0, 0, 0, 0 }, .{ 1233300525, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1218205724, 1603148158, 917411023, 738469863, 1093002239, 906840879 }, .{ 2090802652, 781532229, 196627541, 740980217, 296145893, 1174148865 } }, + .quotient_claims = &.{.{ 645006388, 1635411842, 233786543, 937491403, 1405815550, 1041399226 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/ConditionalCounter" + +// expression: "ctr" +const system_3_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "colA" + .{ .column_claim = 1 }, // col: "colA" + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 2 }, // col: "colB" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, +}; + +const system_3_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "ctr" + .{ .expression = 4, .cancelled_positions = &.{0} }, +}; + +const system_3_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_3_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_3_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 8 }, .expressions = &system_3_module_0_expressions, .buckets = &system_3_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_3_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_3_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "ctr" +const system_3 = vanishing.System{ + .modules = &system_3_modules, + .round_coin_counts = &system_3_round_coin_counts, + .round_coin_offsets = &system_3_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 3, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_3 = VanishingScenario{ + .name = "Vanishing/ConditionalCounter", + .system = system_3, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 1, 1, 2, 3, 3, 3 } }, + .{ .public_base = &.{ 0, 1, 0, 0, 1, 1, 0, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 799014912, 0, 0, 0, 0, 0 }, .{ 799014912, 0, 0, 0, 0, 0 }, .{ 799014912, 0, 0, 0, 0, 0 }, .{ 799014912, 0, 0, 0, 0, 0 }, .{ 799014912, 0, 0, 0, 0, 0 }, .{ 799014912, 0, 0, 0, 0, 0 }, .{ 799014912, 0, 0, 0, 0, 0 }, .{ 799014912, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 2055933749, 866269194, 1231219137, 455409017, 1438706976, 1329656453 }, .{ 1803501990, 681396941, 942850399, 658189912, 1465517144, 325026275 }, .{ 2100188691, 1631176578, 1396019341, 1947334857, 997770823, 726121119 } }, + .quotient_claims = &.{.{ 799014912, 0, 0, 0, 0, 0 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 1, 1, 1, 3, 3, 3 } }, + .{ .public_base = &.{ 0, 1, 0, 0, 1, 1, 0, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 846831671, 0, 0, 0, 0, 0 }, .{ 846831671, 0, 0, 0, 0, 0 }, .{ 846831671, 0, 0, 0, 0, 0 }, .{ 846831671, 0, 0, 0, 0, 0 }, .{ 1771220468, 0, 0, 0, 0, 0 }, .{ 1629664756, 0, 0, 0, 0, 0 }, .{ 846831671, 0, 0, 0, 0, 0 }, .{ 846831671, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1005143664, 444470892, 768896119, 713557852, 250295176, 1348450932 }, .{ 200179298, 271327379, 629823045, 1987197001, 440067662, 522596674 }, .{ 1256077328, 221724296, 1658075606, 921385519, 1413986813, 1387956995 } }, + .quotient_claims = &.{.{ 1797683354, 158481732, 1769301639, 1990446138, 685069321, 365527916 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/PythagoreanTriplet" + +// expression: "pyth" +const system_4_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "colA" + .{ .op = .{ .operator = .square, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "colB" + .{ .op = .{ .operator = .square, .operands = &.{2} } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 3 } } }, + .{ .column_claim = 2 }, // col: "colC" + .{ .op = .{ .operator = .square, .operands = &.{5} } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 4, 6 } } }, +}; + +const system_4_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "pyth" + .{ .expression = 7, .cancelled_positions = &.{} }, +}; + +const system_4_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_4_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_4_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 8 }, .expressions = &system_4_module_0_expressions, .buckets = &system_4_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_4_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_4_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "pyth" +const system_4 = vanishing.System{ + .modules = &system_4_modules, + .round_coin_counts = &system_4_round_coin_counts, + .round_coin_offsets = &system_4_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 3, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_4 = VanishingScenario{ + .name = "Vanishing/PythagoreanTriplet", + .system = system_4, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 5, 1, 17, 5, 13, 0, 0 } }, + .{ .public_base = &.{ 0, 3, 0, 15, 4, 5, 0, 0 } }, + .{ .public_base = &.{ 0, 4, 1, 8, 3, 12, 0, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 518081830, 0, 0, 0, 0, 0 }, .{ 789740332, 0, 0, 0, 0, 0 }, .{ 453184355, 0, 0, 0, 0, 0 }, .{ 1857154566, 0, 0, 0, 0, 0 }, .{ 643251762, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 2114663936, 114777422, 15412438, 2011912399, 1464434366, 1798477065 }, .{ 1967563917, 358234591, 832210107, 1398783869, 1862552223, 1585056298 }, .{ 828644885, 357296671, 46987991, 229350711, 651818895, 1549556730 } }, + .quotient_claims = &.{.{ 592008129, 464249399, 274217022, 1537628298, 973575580, 105122496 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 5, 1, 17, 5, 13, 0, 0 } }, + .{ .public_base = &.{ 0, 3, 0, 15, 4, 5, 0, 0 } }, + .{ .public_base = &.{ 0, 5, 1, 8, 3, 12, 0, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1992899991, 0, 0, 0, 0, 0 }, .{ 2092905736, 0, 0, 0, 0, 0 }, .{ 393839656, 0, 0, 0, 0, 0 }, .{ 712211300, 0, 0, 0, 0, 0 }, .{ 1186587689, 0, 0, 0, 0, 0 }, .{ 776420915, 0, 0, 0, 0, 0 }, .{ 147332501, 0, 0, 0, 0, 0 }, .{ 2121306113, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 988870300, 1203699276, 1330121521, 2115066293, 108155212, 1797498855 }, .{ 2094768038, 208927751, 1661254795, 1662391509, 188846522, 57040700 }, .{ 534917688, 335705016, 1683121587, 734272976, 1314390997, 106930461 } }, + .quotient_claims = &.{.{ 792555281, 1393289163, 105640680, 1958374838, 93028563, 1245367677 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/DynamicFibonacci" + +// expression: "fib" +const system_5_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 1 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 2 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, +}; + +const system_5_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "fib" + .{ .expression = 4, .cancelled_positions = &.{ 0, 1 } }, +}; + +const system_5_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_5_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_5_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .dynamic = 0 }, .expressions = &system_5_module_0_expressions, .buckets = &system_5_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_5_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_5_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "dyn-fib" +const system_5 = vanishing.System{ + .modules = &system_5_modules, + .round_coin_counts = &system_5_round_coin_counts, + .round_coin_offsets = &system_5_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 1, + .total_witness_claims = 3, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_5 = VanishingScenario{ + .name = "Vanishing/DynamicFibonacci", + .system = system_5, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 1, 1, 2, 3, 5, 8, 13, 21 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 552753386, 0, 0, 0, 0, 0 }, .{ 1170422654, 0, 0, 0, 0, 0 }, .{ 1520879065, 0, 0, 0, 0, 0 }, .{ 1398117480, 0, 0, 0, 0, 0 }, .{ 1740509171, 0, 0, 0, 0, 0 }, .{ 1122839903, 0, 0, 0, 0, 0 }, .{ 772383492, 0, 0, 0, 0, 0 }, .{ 895145077, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1447242592, 978962941, 713008718, 2098986074, 810460008, 1622438948 }, .{ 1595630697, 1671389507, 1674422187, 1691736160, 1824101463, 792937680 }, .{ 1881232788, 627383792, 680025590, 1782463208, 1665432448, 1958953104 } }, + .quotient_claims = &.{.{ 121605825, 302074000, 1996294172, 1700051928, 98596367, 812372901 }}, + .module_sizes = &.{8}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 1, 1, 2, 3, 5, 8, 13, 22 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1039702195, 0, 0, 0, 0, 0 }, .{ 1441997329, 0, 0, 0, 0, 0 }, .{ 1381606708, 0, 0, 0, 0, 0 }, .{ 769807354, 0, 0, 0, 0, 0 }, .{ 1164221666, 0, 0, 0, 0, 0 }, .{ 761926532, 0, 0, 0, 0, 0 }, .{ 822317153, 0, 0, 0, 0, 0 }, .{ 1135626563, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1151832766, 489109694, 745564059, 2065529070, 787588006, 1722051715 }, .{ 1842952544, 1264021167, 1374471502, 1711228060, 247568247, 1873163260 }, .{ 468663487, 519972582, 1677417873, 175539661, 684550919, 698689360 } }, + .quotient_claims = &.{.{ 105354878, 539148090, 407216735, 2029376794, 1215296786, 1606162197 }}, + .module_sizes = &.{8}, + }, +}; + +// scenario: "Vanishing/ConstantColumn" + +// expression: "const" +const system_6_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .constant = field.Element.init(7) }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 1 } } }, +}; + +const system_6_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "const" + .{ .expression = 2, .cancelled_positions = &.{} }, +}; + +const system_6_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_6_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_6_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_6_module_0_expressions, .buckets = &system_6_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_6_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_6_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "const-col" +const system_6 = vanishing.System{ + .modules = &system_6_modules, + .round_coin_counts = &system_6_round_coin_counts, + .round_coin_offsets = &system_6_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 1, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_6 = VanishingScenario{ + .name = "Vanishing/ConstantColumn", + .system = system_6, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 7, 7, 7, 7 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{.{ 7, 0, 0, 0, 0, 0 }}, + .quotient_claims = &.{.{ 0, 0, 0, 0, 0, 0 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 7, 7, 8, 7 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 1677931316, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{.{ 1973127318, 1071725045, 1546701898, 1953591799, 619037885, 2117490245 }}, + .quotient_claims = &.{.{ 903580495, 2010933844, 1457560616, 1542548231, 939922038, 2024005909 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/ForwardShiftConstant" + +// expression: "eq-next" +const system_7_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 1 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 1 } } }, +}; + +const system_7_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "eq-next" + .{ .expression = 2, .cancelled_positions = &.{-1} }, +}; + +const system_7_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_7_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_7_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 8 }, .expressions = &system_7_module_0_expressions, .buckets = &system_7_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_7_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_7_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "fwd-shift" +const system_7 = vanishing.System{ + .modules = &system_7_modules, + .round_coin_counts = &system_7_round_coin_counts, + .round_coin_offsets = &system_7_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 2, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_7 = VanishingScenario{ + .name = "Vanishing/ForwardShiftConstant", + .system = system_7, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 5, 5, 5, 5, 5, 5, 5, 5 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 5, 0, 0, 0, 0, 0 }, .{ 5, 0, 0, 0, 0, 0 } }, + .quotient_claims = &.{.{ 0, 0, 0, 0, 0, 0 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 5, 5, 5, 6, 5, 5, 5, 5 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 317302474, 0, 0, 0, 0, 0 }, .{ 317302474, 0, 0, 0, 0, 0 }, .{ 1621978305, 0, 0, 0, 0, 0 }, .{ 421358581, 0, 0, 0, 0, 0 }, .{ 317302474, 0, 0, 0, 0, 0 }, .{ 317302474, 0, 0, 0, 0, 0 }, .{ 317302474, 0, 0, 0, 0, 0 }, .{ 317302474, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 804433097, 1620676177, 990287992, 2039018196, 135097793, 115387262 }, .{ 994426305, 295676780, 247112034, 1839032690, 837435670, 1498661229 } }, + .quotient_claims = &.{.{ 680039963, 1613525747, 1314474821, 1491557534, 1376886374, 1014358606 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/BooleanCube" + +// expression: "cube" +const system_8_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .mul, .operands = &.{ 2, 3 } } }, + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 4, 5 } } }, +}; + +const system_8_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "cube" + .{ .expression = 6, .cancelled_positions = &.{} }, +}; + +const system_8_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 2, .vanishings = &system_8_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_8_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_8_module_0_expressions, .buckets = &system_8_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_8_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_8_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "bool-cube" +const system_8 = vanishing.System{ + .modules = &system_8_modules, + .round_coin_counts = &system_8_round_coin_counts, + .round_coin_offsets = &system_8_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 1, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_8 = VanishingScenario{ + .name = "Vanishing/BooleanCube", + .system = system_8, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 0, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{.{ 1965243559, 1946985294, 2043603636, 1558563342, 124789368, 1175350538 }}, + .quotient_claims = &.{ .{ 491310890, 1552099540, 510900909, 1454994052, 31197342, 1359190851 }, .{ 0, 0, 0, 0, 0, 0 } }, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 0, 2 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 318561282, 0, 0, 0, 0, 0 }, .{ 266338305, 0, 0, 0, 0, 0 }, .{ 1878729729, 0, 0, 0, 0, 0 }, .{ 1774397755, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 1797522433, 0, 0, 0, 0, 0 }, .{ 1864368129, 0, 0, 0, 0, 0 }, .{ 1864629249, 0, 0, 0, 0, 0 }, .{ 309537078, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{.{ 289771514, 2003299582, 204734956, 1828861612, 1831108595, 1058301630 }}, + .quotient_claims = &.{ .{ 252849193, 217432998, 1610577485, 1575739198, 30558966, 1119428406 }, .{ 1819282283, 1599635040, 856355466, 1574593445, 2121728208, 1452707957 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/LinearCombination" + +// expression: "lin" +const system_9_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "a" + .{ .constant = field.Element.init(2) }, + .{ .column_claim = 1 }, // col: "b" + .{ .op = .{ .operator = .mul, .operands = &.{ 1, 2 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 3 } } }, + .{ .constant = field.Element.init(3) }, + .{ .column_claim = 2 }, // col: "c" + .{ .op = .{ .operator = .mul, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 4, 7 } } }, +}; + +const system_9_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "lin" + .{ .expression = 8, .cancelled_positions = &.{} }, +}; + +const system_9_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_9_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_9_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_9_module_0_expressions, .buckets = &system_9_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_9_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_9_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "lin-comb" +const system_9 = vanishing.System{ + .modules = &system_9_modules, + .round_coin_counts = &system_9_round_coin_counts, + .round_coin_offsets = &system_9_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 3, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_9 = VanishingScenario{ + .name = "Vanishing/LinearCombination", + .system = system_9, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 5, 16, 11 } }, + .{ .public_base = &.{ 0, 1, 2, 4 } }, + .{ .public_base = &.{ 0, 1, 4, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1960008046, 1447172305, 658291926, 90462636, 186580020, 1913003028 }, .{ 1329020671, 690507115, 363073207, 642352700, 1367554783, 207641987 }, .{ 1187793190, 1442523647, 687617315, 1022390034, 1991432062, 1919710640 } }, + .quotient_claims = &.{.{ 0, 0, 0, 0, 0, 0 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 5, 17, 11 } }, + .{ .public_base = &.{ 0, 1, 2, 4 } }, + .{ .public_base = &.{ 0, 1, 4, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 1677931316, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1823941423, 263151519, 1246146536, 1160182515, 358024184, 1680795416 }, .{ 1115225087, 1838606502, 1371234076, 455485449, 1143193027, 1109562252 }, .{ 1139230485, 956737555, 874529478, 157962489, 367920112, 1977938408 } }, + .quotient_claims = &.{.{ 1603494983, 1785814702, 1280192645, 263529856, 1613395958, 558310126 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/LargeFibonacci" + +// expression: "fib" +const system_10_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 1 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 2 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, +}; + +const system_10_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "fib" + .{ .expression = 4, .cancelled_positions = &.{ 0, 1 } }, +}; + +const system_10_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_10_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_10_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 16 }, .expressions = &system_10_module_0_expressions, .buckets = &system_10_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_10_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_10_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "fib-16" +const system_10 = vanishing.System{ + .modules = &system_10_modules, + .round_coin_counts = &system_10_round_coin_counts, + .round_coin_offsets = &system_10_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 3, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_10 = VanishingScenario{ + .name = "Vanishing/LargeFibonacci", + .system = system_10, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1508433631, 0, 0, 0, 0, 0 }, .{ 672112753, 0, 0, 0, 0, 0 }, .{ 1641924320, 0, 0, 0, 0, 0 }, .{ 1099612679, 0, 0, 0, 0, 0 }, .{ 1166319299, 0, 0, 0, 0, 0 }, .{ 987318621, 0, 0, 0, 0, 0 }, .{ 1519026334, 0, 0, 0, 0, 0 }, .{ 1075680403, 0, 0, 0, 0, 0 }, .{ 668691724, 0, 0, 0, 0, 0 }, .{ 1505012602, 0, 0, 0, 0, 0 }, .{ 535201035, 0, 0, 0, 0, 0 }, .{ 1077512676, 0, 0, 0, 0, 0 }, .{ 1010806056, 0, 0, 0, 0, 0 }, .{ 1189806734, 0, 0, 0, 0, 0 }, .{ 658099021, 0, 0, 0, 0, 0 }, .{ 1101444952, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 926706506, 1985233341, 741070870, 2118913290, 1798733312, 277902152 }, .{ 136504979, 263084284, 1740711073, 293711138, 83007851, 348967605 }, .{ 1382034168, 406715145, 1096679903, 1798082245, 273337158, 990364762 } }, + .quotient_claims = &.{.{ 675523183, 1738070127, 208759153, 1798324165, 2030970002, 1341674104 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 988 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 161593571, 0, 0, 0, 0, 0 }, .{ 56838003, 0, 0, 0, 0, 0 }, .{ 337774231, 0, 0, 0, 0, 0 }, .{ 1204261918, 0, 0, 0, 0, 0 }, .{ 517696303, 0, 0, 0, 0, 0 }, .{ 270561350, 0, 0, 0, 0, 0 }, .{ 2082786986, 0, 0, 0, 0, 0 }, .{ 28905318, 0, 0, 0, 0, 0 }, .{ 1821096873, 0, 0, 0, 0, 0 }, .{ 1925852441, 0, 0, 0, 0, 0 }, .{ 1644916213, 0, 0, 0, 0, 0 }, .{ 778428526, 0, 0, 0, 0, 0 }, .{ 1464994141, 0, 0, 0, 0, 0 }, .{ 1712129094, 0, 0, 0, 0, 0 }, .{ 2030609891, 0, 0, 0, 0, 0 }, .{ 236641429, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 2074386300, 2071721473, 1061210629, 419950703, 1112831183, 1870491262 }, .{ 1678501505, 1080527041, 1337532843, 1687882257, 595480026, 1155336596 }, .{ 717197291, 1272088723, 573334617, 910825196, 1045760043, 530102252 } }, + .quotient_claims = &.{.{ 212652276, 444144378, 549665988, 731030959, 461881125, 251140824 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/MultipleVanishingsSameRatio" + +const system_11_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "a" + .{ .constant = field.Element.init(4) }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 1 }, // col: "b" + .{ .column_claim = 0 }, // col: "a" + .{ .op = .{ .operator = .sub, .operands = &.{ 3, 4 } } }, +}; + +const system_11_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "v1" + .{ .expression = 2, .cancelled_positions = &.{} }, + // expression: "v2" + .{ .expression = 5, .cancelled_positions = &.{} }, +}; + +const system_11_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_11_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_11_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_11_module_0_expressions, .buckets = &system_11_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_11_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_11_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "same-ratio" +const system_11 = vanishing.System{ + .modules = &system_11_modules, + .round_coin_counts = &system_11_round_coin_counts, + .round_coin_offsets = &system_11_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 2, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_11 = VanishingScenario{ + .name = "Vanishing/MultipleVanishingsSameRatio", + .system = system_11, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 4, 4, 4, 4 } }, + .{ .public_base = &.{ 4, 4, 4, 4 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 4, 0, 0, 0, 0, 0 }, .{ 4, 0, 0, 0, 0, 0 } }, + .quotient_claims = &.{.{ 0, 0, 0, 0, 0, 0 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 4, 4, 4, 4 } }, + .{ .public_base = &.{ 4, 5, 4, 4 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 846685573, 2059327613, 284186396, 640064918, 1492968971, 1927526189 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 4, 0, 0, 0, 0, 0 }, .{ 1075501314, 1875079920, 388307539, 1663005651, 1625379181, 1388397484 } }, + .quotient_claims = &.{.{ 1336408627, 2007396609, 1462072341, 1939077379, 2003470601, 746169839 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/MixedRatioVanishings" + +const system_12_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "a" + .{ .column_claim = 1 }, // col: "a" + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 0 }, // col: "a" + .{ .column_claim = 0 }, // col: "a" + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 4 } } }, + .{ .column_claim = 0 }, // col: "a" + .{ .op = .{ .operator = .sub, .operands = &.{ 5, 6 } } }, +}; + +const system_12_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "lin" + .{ .expression = 2, .cancelled_positions = &.{0} }, + // expression: "bool" + .{ .expression = 7, .cancelled_positions = &.{} }, +}; + +const system_12_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_12_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_12_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_12_module_0_expressions, .buckets = &system_12_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_12_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_12_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "mixed-ratio" +const system_12 = vanishing.System{ + .modules = &system_12_modules, + .round_coin_counts = &system_12_round_coin_counts, + .round_coin_offsets = &system_12_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 2, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_12 = VanishingScenario{ + .name = "Vanishing/MixedRatioVanishings", + .system = system_12, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 0, 0, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } }, + .quotient_claims = &.{.{ 0, 0, 0, 0, 0, 0 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 7, 7, 7, 7 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 69570753, 314764734, 1442360487, 502275499, 28665133, 206433943 }, .{ 69570753, 314764734, 1442360487, 502275499, 28665133, 206433943 }, .{ 69570753, 314764734, 1442360487, 502275499, 28665133, 206433943 }, .{ 69570753, 314764734, 1442360487, 502275499, 28665133, 206433943 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 7, 0, 0, 0, 0, 0 }, .{ 7, 0, 0, 0, 0, 0 } }, + .quotient_claims = &.{.{ 69570753, 314764734, 1442360487, 502275499, 28665133, 206433943 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/MultiModule" + +// expression: "a-bool" +const system_13_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "colA" + .{ .column_claim = 0 }, // col: "colA" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 0 }, // col: "colA" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, +}; + +const system_13_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "a-bool" + .{ .expression = 4, .cancelled_positions = &.{} }, +}; + +const system_13_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_13_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "b-const" +const system_13_module_1_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "colB" + .{ .constant = field.Element.init(7) }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 1 } } }, +}; + +const system_13_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "b-const" + .{ .expression = 2, .cancelled_positions = &.{} }, +}; + +const system_13_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_13_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +const system_13_modules = [_]vanishing.Module{ + // module: "modA" + .{ .size = .{ .static = 4 }, .expressions = &system_13_module_0_expressions, .buckets = &system_13_module_0_buckets, .witness_claim_offset = 0 }, + // module: "modB" + .{ .size = .{ .static = 8 }, .expressions = &system_13_module_1_expressions, .buckets = &system_13_module_1_buckets, .witness_claim_offset = 1 }, +}; + +const system_13_round_coin_counts = [_]usize{ 0, 2, 2 }; +const system_13_round_coin_offsets = [_]usize{ 0, 0, 2 }; + +// system: "multi-mod" +const system_13 = vanishing.System{ + .modules = &system_13_modules, + .round_coin_counts = &system_13_round_coin_counts, + .round_coin_offsets = &system_13_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 4, + .dynamic_module_count = 0, + .total_witness_claims = 2, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_13 = VanishingScenario{ + .name = "Vanishing/MultiModule", + .system = system_13, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 0, 1 } }, + .{ .public_base = &.{ 7, 7, 7, 7, 7, 7, 7, 7 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 208677211, 293301717, 315566930, 280347465, 389628941, 505439178 }, .{ 7, 0, 0, 0, 0, 0 } }, + .quotient_claims = &.{ .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } }, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 2, 0, 1 } }, + .{ .public_base = &.{ 7, 7, 7, 7, 7, 7, 7, 7 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1604296705, 0, 0, 0, 0, 0 }, .{ 958817896, 0, 0, 0, 0, 0 }, .{ 2124439554, 0, 0, 0, 0, 0 }, .{ 1331691521, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1326141209, 907395769, 1437313093, 1266332665, 1246748923, 1739628158 }, .{ 7, 0, 0, 0, 0, 0 } }, + .quotient_claims = &.{ .{ 1469394455, 262789538, 2073903642, 1591109914, 1810598607, 118935781 }, .{ 0, 0, 0, 0, 0, 0 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/ManualCancellation" + +// expression: "incr" +const system_14_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 1 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 1 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, +}; + +const system_14_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "incr" + .{ .expression = 4, .cancelled_positions = &.{0} }, +}; + +const system_14_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_14_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_14_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_14_module_0_expressions, .buckets = &system_14_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_14_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_14_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "manual-cxl" +const system_14 = vanishing.System{ + .modules = &system_14_modules, + .round_coin_counts = &system_14_round_coin_counts, + .round_coin_offsets = &system_14_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 2, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_14 = VanishingScenario{ + .name = "Vanishing/ManualCancellation", + .system = system_14, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 42, 43, 44, 45 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 2130706432, 0, 0, 0, 0, 0 }, .{ 2130706432, 0, 0, 0, 0, 0 }, .{ 2130706432, 0, 0, 0, 0, 0 }, .{ 2130706432, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1874309315, 2044673488, 1850475327, 504591908, 1242847305, 2032110434 }, .{ 2076235895, 1091139613, 1474717747, 1933955204, 89367176, 1672257200 } }, + .quotient_claims = &.{.{ 2130706432, 0, 0, 0, 0, 0 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 42, 43, 44, 46 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1069531135, 0, 0, 0, 0, 0 }, .{ 1069531135, 0, 0, 0, 0, 0 }, .{ 1069531135, 0, 0, 0, 0, 0 }, .{ 1975290265, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 291404139, 863054829, 427179187, 1257843797, 513529852, 41741884 }, .{ 1889995693, 750070736, 1985651859, 1117142956, 1999516247, 1745032339 } }, + .quotient_claims = &.{.{ 1289773871, 348908357, 823373999, 72871492, 1771777085, 968846551 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/PrecomputedSelector" + +// expression: "masked" +const system_15_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "sel" + .{ .column_claim = 1 }, // col: "col" + .{ .constant = field.Element.init(9) }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 3 } } }, +}; + +const system_15_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "masked" + .{ .expression = 4, .cancelled_positions = &.{} }, +}; + +const system_15_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_15_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_15_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_15_module_0_expressions, .buckets = &system_15_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_15_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_15_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "pre-sel" +const system_15 = vanishing.System{ + .modules = &system_15_modules, + .round_coin_counts = &system_15_round_coin_counts, + .round_coin_offsets = &system_15_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 2, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_15 = VanishingScenario{ + .name = "Vanishing/PrecomputedSelector", + .system = system_15, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 9, 42, 9, 17 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 2078482431, 0, 0, 0, 0, 0 }, .{ 532676600, 0, 0, 0, 0, 0 }, .{ 584900600, 0, 0, 0, 0, 0 }, .{ 2130706431, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1584112123, 327716731, 2058938135, 1878085552, 1801554260, 1151460928 }, .{ 1807948667, 1514495116, 185126994, 464990810, 410476982, 2061080673 } }, + .quotient_claims = &.{.{ 376046702, 1089177201, 137054358, 520488355, 343630399, 346366665 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 9, 42, 8, 17 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 2078482431, 0, 0, 0, 0, 0 }, .{ 530587640, 0, 0, 0, 0, 0 }, .{ 1570352325, 0, 0, 0, 0, 0 }, .{ 534765566, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 335028758, 2000745778, 746453253, 981575823, 1654003484, 365923992 }, .{ 705723753, 1751515310, 1618523967, 472583522, 868054696, 560508846 } }, + .quotient_claims = &.{.{ 416098343, 714162962, 980147318, 1700768418, 750468824, 1579565168 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/CellLeaf" + +// expression: "eq" +const system_16_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .cell_value = .{ .round = 0, .index = 0 } }, // cell: "c" + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 1 } } }, +}; + +const system_16_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "eq" + .{ .expression = 2, .cancelled_positions = &.{} }, +}; + +const system_16_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_16_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_16_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_16_module_0_expressions, .buckets = &system_16_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_16_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_16_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "cell-leaf" +const system_16 = vanishing.System{ + .modules = &system_16_modules, + .round_coin_counts = &system_16_round_coin_counts, + .round_coin_offsets = &system_16_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 1, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_16 = VanishingScenario{ + .name = "Vanishing/CellLeaf", + .system = system_16, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 11, 11, 11, 11 } }, + }, + .cells = &.{ + .{ .base = 11 }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{.{ 11, 0, 0, 0, 0, 0 }}, + .quotient_claims = &.{.{ 0, 0, 0, 0, 0, 0 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 11, 11, 12, 11 } }, + }, + .cells = &.{ + .{ .base = 11 }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 1677931316, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{.{ 923561453, 1341217096, 1695479306, 1415890710, 435375563, 1504960052 }}, + .quotient_claims = &.{.{ 1236700717, 229835857, 1033279047, 284036938, 1843176493, 2042983112 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/CoinScaled" + +// expression: "scaled" +const system_17_module_0_expressions = [_]vanishing.ExprNode{ + .{ .coin_value = 0 }, // coin: "coin" + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 1 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 3 } } }, +}; + +const system_17_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "scaled" + .{ .expression = 4, .cancelled_positions = &.{0} }, +}; + +const system_17_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_17_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_17_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_17_module_0_expressions, .buckets = &system_17_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_17_round_coin_counts = [_]usize{ 0, 1, 1, 1 }; +const system_17_round_coin_offsets = [_]usize{ 0, 0, 1, 2 }; + +// system: "coin-scaled" +const system_17 = vanishing.System{ + .modules = &system_17_modules, + .round_coin_counts = &system_17_round_coin_counts, + .round_coin_offsets = &system_17_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 3, + .dynamic_module_count = 0, + .total_witness_claims = 2, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_17 = VanishingScenario{ + .name = "Vanishing/CoinScaled", + .system = system_17, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 8, 8, 8, 8 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 8, 0, 0, 0, 0, 0 }, .{ 8, 0, 0, 0, 0, 0 } }, + .quotient_claims = &.{.{ 0, 0, 0, 0, 0, 0 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 8, 9, 8, 8 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 428954110, 880838158, 10495769, 1464354977, 476193849, 801786597 }, .{ 1760864052, 198817920, 647801941, 1250106441, 57458562, 2116331440 }, .{ 183845090, 967688374, 119461637, 793003367, 1664486080, 699219622 }, .{ 428954110, 880838158, 10495769, 1464354977, 476193849, 801786597 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1018444698, 510928748, 2052476326, 2046666802, 1861496364, 509283290 }, .{ 469390399, 1466632015, 436409329, 2105995322, 1620804916, 1808185502 } }, + .quotient_claims = &.{.{ 1812376492, 864938383, 819083467, 1445554049, 1710614314, 1930575025 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/ThreeStepRecurrence" + +// expression: "rec" +const system_18_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 1 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 2 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, +}; + +const system_18_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "rec" + .{ .expression = 4, .cancelled_positions = &.{ 0, 1, 2 } }, +}; + +const system_18_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_18_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_18_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 8 }, .expressions = &system_18_module_0_expressions, .buckets = &system_18_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_18_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_18_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "step3" +const system_18 = vanishing.System{ + .modules = &system_18_modules, + .round_coin_counts = &system_18_round_coin_counts, + .round_coin_offsets = &system_18_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 3, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_18 = VanishingScenario{ + .name = "Vanishing/ThreeStepRecurrence", + .system = system_18, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 1, 1, 2, 3, 4, 6 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 975339769, 0, 0, 0, 0, 0 }, .{ 1831188293, 0, 0, 0, 0, 0 }, .{ 1579145358, 0, 0, 0, 0, 0 }, .{ 250461535, 0, 0, 0, 0, 0 }, .{ 773180390, 0, 0, 0, 0, 0 }, .{ 2013096857, 0, 0, 0, 0, 0 }, .{ 1676145095, 0, 0, 0, 0, 0 }, .{ 909063927, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1212317019, 1046300066, 339921802, 1296401469, 955185789, 1214629007 }, .{ 1113670471, 1596770810, 877384688, 1672756639, 1611674573, 2114584179 }, .{ 891700793, 985003458, 1264638372, 1528266288, 1271883525, 1442764720 } }, + .quotient_claims = &.{.{ 442522959, 196726658, 1484922430, 1196819200, 167023860, 125807703 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 1, 1, 2, 3, 4, 7 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 971161849, 0, 0, 0, 0, 0 }, .{ 1829099333, 0, 0, 0, 0, 0 }, .{ 1670600956, 0, 0, 0, 0, 0 }, .{ 778932281, 0, 0, 0, 0, 0 }, .{ 577679550, 0, 0, 0, 0, 0 }, .{ 219594135, 0, 0, 0, 0, 0 }, .{ 1572155738, 0, 0, 0, 0, 0 }, .{ 1381271008, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1946683252, 1929330494, 416488481, 941374490, 1004167468, 783886461 }, .{ 1617419272, 799578598, 1457767614, 2075274270, 274522679, 1259553475 }, .{ 1549984317, 797177602, 1451495987, 352803734, 274644296, 828326908 } }, + .quotient_claims = &.{.{ 1624060146, 580838449, 1458592632, 1087535010, 836521278, 1485277406 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/Quartic" + +// expression: "q" +const system_19_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 4 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 2, 5 } } }, + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 6, 7 } } }, +}; + +const system_19_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "q" + .{ .expression = 8, .cancelled_positions = &.{} }, +}; + +const system_19_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 4, .vanishings = &system_19_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_19_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_19_module_0_expressions, .buckets = &system_19_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_19_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_19_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "quartic" +const system_19 = vanishing.System{ + .modules = &system_19_modules, + .round_coin_counts = &system_19_round_coin_counts, + .round_coin_offsets = &system_19_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 1, + .total_quotient_claims = 4, +}; + +const vanishing_scenario_19 = VanishingScenario{ + .name = "Vanishing/Quartic", + .system = system_19, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 0, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1731198977, 0, 0, 0, 0, 0 }, .{ 665845761, 0, 0, 0, 0, 0 }, .{ 1731198977, 0, 0, 0, 0, 0 }, .{ 665845761, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 1997537281, 0, 0, 0, 0, 0 }, .{ 1997537281, 0, 0, 0, 0, 0 }, .{ 1997537281, 0, 0, 0, 0, 0 }, .{ 1997537281, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{.{ 1762475286, 900585133, 73976946, 762152638, 475376702, 1117853747 }}, + .quotient_claims = &.{ .{ 481730187, 1515645783, 36988473, 381076319, 237688351, 1624280090 }, .{ 1997537281, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } }, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 0, 2 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1101680643, 0, 0, 0, 0, 0 }, .{ 1356660738, 0, 0, 0, 0, 0 }, .{ 346533888, 0, 0, 0, 0, 0 }, .{ 1221798880, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 1006014466, 0, 0, 0, 0, 0 }, .{ 516030465, 0, 0, 0, 0, 0 }, .{ 1291153409, 0, 0, 0, 0, 0 }, .{ 1180183510, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 2122383361, 0, 0, 0, 0, 0 }, .{ 2122383361, 0, 0, 0, 0, 0 }, .{ 2122383361, 0, 0, 0, 0, 0 }, .{ 1321675732, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 1329998804, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{.{ 416000572, 1290445026, 906793859, 784242126, 2054442864, 937924386 }}, + .quotient_claims = &.{ .{ 739478131, 1020238360, 896747218, 1693742011, 778098824, 1018799210 }, .{ 997898718, 878577213, 975019172, 891604563, 279031866, 1136290959 }, .{ 1753385026, 1614356563, 1981771553, 2124978732, 498911576, 447305516 }, .{ 1761708098, 1614356563, 1981771553, 2124978732, 498911576, 447305516 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/LeftPadDynamic" + +// expression: "eq" +const system_20_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 1 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 1 } } }, +}; + +const system_20_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "eq" + .{ .expression = 2, .cancelled_positions = &.{0} }, +}; + +const system_20_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_20_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_20_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .dynamic = 0 }, .expressions = &system_20_module_0_expressions, .buckets = &system_20_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_20_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_20_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "dyn-leftpad" +const system_20 = vanishing.System{ + .modules = &system_20_modules, + .round_coin_counts = &system_20_round_coin_counts, + .round_coin_offsets = &system_20_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 1, + .total_witness_claims = 2, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_20 = VanishingScenario{ + .name = "Vanishing/LeftPadDynamic", + .system = system_20, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 9, 9, 9, 9, 9, 9, 9, 9 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 9, 0, 0, 0, 0, 0 }, .{ 9, 0, 0, 0, 0, 0 } }, + .quotient_claims = &.{.{ 0, 0, 0, 0, 0, 0 }}, + .module_sizes = &.{8}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 9, 9, 9, 9, 9, 8, 9, 9 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 2084978634, 0, 0, 0, 0, 0 }, .{ 2084978634, 0, 0, 0, 0, 0 }, .{ 2084978634, 0, 0, 0, 0, 0 }, .{ 2084978634, 0, 0, 0, 0, 0 }, .{ 2084978634, 0, 0, 0, 0, 0 }, .{ 1302145549, 0, 0, 0, 0, 0 }, .{ 848781687, 0, 0, 0, 0, 0 }, .{ 2084978634, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1441755679, 1546607480, 1167183543, 922434605, 1511134777, 977503327 }, .{ 1721837416, 1489126610, 2054060195, 2118877939, 1244571932, 1716699190 } }, + .quotient_claims = &.{.{ 919044730, 699938810, 2114606905, 752538805, 1367047649, 551348400 }}, + .module_sizes = &.{8}, + }, +}; + +// scenario: "Vanishing/CubicWithBackShift" + +// expression: "cube-shift" +const system_21_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 1 }, // col: "col" + .{ .op = .{ .operator = .mul, .operands = &.{ 2, 3 } } }, + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 4, 5 } } }, +}; + +const system_21_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "cube-shift" + .{ .expression = 6, .cancelled_positions = &.{0} }, +}; + +const system_21_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 2, .vanishings = &system_21_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_21_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 8 }, .expressions = &system_21_module_0_expressions, .buckets = &system_21_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_21_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_21_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "cube-shift" +const system_21 = vanishing.System{ + .modules = &system_21_modules, + .round_coin_counts = &system_21_round_coin_counts, + .round_coin_offsets = &system_21_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 2, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_21 = VanishingScenario{ + .name = "Vanishing/CubicWithBackShift", + .system = system_21, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 1, 1, 1, 1, 1, 1, 1, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1, 0, 0, 0, 0, 0 }, .{ 1, 0, 0, 0, 0, 0 } }, + .quotient_claims = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } }, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 1, 1, 1, 1, 1, 2, 1, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 786127070, 0, 0, 0, 0, 0 }, .{ 609414847, 0, 0, 0, 0, 0 }, .{ 432702624, 0, 0, 0, 0, 0 }, .{ 1378765345, 0, 0, 0, 0, 0 }, .{ 1971403620, 0, 0, 0, 0, 0 }, .{ 1090868189, 0, 0, 0, 0, 0 }, .{ 2020439992, 0, 0, 0, 0, 0 }, .{ 1970770782, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 110610320, 0, 0, 0, 0, 0 }, .{ 1328767380, 0, 0, 0, 0, 0 }, .{ 416218007, 0, 0, 0, 0, 0 }, .{ 449640855, 0, 0, 0, 0, 0 }, .{ 788671390, 0, 0, 0, 0, 0 }, .{ 1670114603, 0, 0, 0, 0, 0 }, .{ 1194902994, 0, 0, 0, 0, 0 }, .{ 77187472, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 109767876, 613298344, 938343177, 717243899, 316332102, 1706916365 }, .{ 619155612, 1326318455, 1447536772, 639551585, 362822289, 59351190 } }, + .quotient_claims = &.{ .{ 273771528, 1116226430, 1954998734, 223609569, 512958974, 407939761 }, .{ 1092528302, 481134226, 692307193, 235760926, 2052850167, 332952539 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/MixedHighRatio" + +const system_22_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .mul, .operands = &.{ 2, 3 } } }, + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 4, 5 } } }, + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .mul, .operands = &.{ 7, 8 } } }, + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .mul, .operands = &.{ 10, 11 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 9, 12 } } }, + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 13, 14 } } }, +}; + +const system_22_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "cube" + .{ .expression = 6, .cancelled_positions = &.{} }, +}; + +const system_22_module_0_bucket_1_vanishings = [_]vanishing.Vanishing{ + // expression: "quartic" + .{ .expression = 15, .cancelled_positions = &.{} }, +}; + +const system_22_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 2, .vanishings = &system_22_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, + .{ .ratio = 4, .vanishings = &system_22_module_0_bucket_1_vanishings, .quotient_claim_offset = 2 }, +}; + +const system_22_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 8 }, .expressions = &system_22_module_0_expressions, .buckets = &system_22_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_22_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_22_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "mixed-hi-ratio" +const system_22 = vanishing.System{ + .modules = &system_22_modules, + .round_coin_counts = &system_22_round_coin_counts, + .round_coin_offsets = &system_22_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 1, + .total_quotient_claims = 6, +}; + +const vanishing_scenario_22 = VanishingScenario{ + .name = "Vanishing/MixedHighRatio", + .system = system_22, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 0, 1, 0, 1, 0, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 1731198977, 0, 0, 0, 0, 0 }, .{ 665845761, 0, 0, 0, 0, 0 }, .{ 1731198977, 0, 0, 0, 0, 0 }, .{ 665845761, 0, 0, 0, 0, 0 }, .{ 1731198977, 0, 0, 0, 0, 0 }, .{ 665845761, 0, 0, 0, 0, 0 }, .{ 1731198977, 0, 0, 0, 0, 0 }, .{ 665845761, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 1997537281, 0, 0, 0, 0, 0 }, .{ 1997537281, 0, 0, 0, 0, 0 }, .{ 1997537281, 0, 0, 0, 0, 0 }, .{ 1997537281, 0, 0, 0, 0, 0 }, .{ 1997537281, 0, 0, 0, 0, 0 }, .{ 1997537281, 0, 0, 0, 0, 0 }, .{ 1997537281, 0, 0, 0, 0, 0 }, .{ 1997537281, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{.{ 1332973099, 745366490, 712072735, 1073865776, 1598757682, 1121563911 }}, + .quotient_claims = &.{ .{ 333243275, 1251694839, 710694792, 268466444, 1465042637, 813067586 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 1332332310, 372683245, 1421389584, 536932888, 799378841, 1626135172 }, .{ 1997537281, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } }, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 0, 1, 2, 1, 0, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 532676609, 0, 0, 0, 0, 0 }, .{ 1420875384, 0, 0, 0, 0, 0 }, .{ 1740077057, 0, 0, 0, 0, 0 }, .{ 442434295, 0, 0, 0, 0, 0 }, .{ 1311941910, 0, 0, 0, 0, 0 }, .{ 2039433611, 0, 0, 0, 0, 0 }, .{ 1589151746, 0, 0, 0, 0, 0 }, .{ 1424022795, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 1505698551, 0, 0, 0, 0, 0 }, .{ 1997015041, 0, 0, 0, 0, 0 }, .{ 890287735, 0, 0, 0, 0, 0 }, .{ 512926994, 0, 0, 0, 0, 0 }, .{ 356580618, 0, 0, 0, 0, 0 }, .{ 522240, 0, 0, 0, 0, 0 }, .{ 1508845962, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 216399873, 0, 0, 0, 0, 0 }, .{ 1453070049, 0, 0, 0, 0, 0 }, .{ 2060531713, 0, 0, 0, 0, 0 }, .{ 374301215, 0, 0, 0, 0, 0 }, .{ 903421689, 0, 0, 0, 0, 0 }, .{ 1668832547, 0, 0, 0, 0, 0 }, .{ 835897346, 0, 0, 0, 0, 0 }, .{ 432286179, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 1431568385, 0, 0, 0, 0, 0 }, .{ 986800538, 0, 0, 0, 0, 0 }, .{ 1634455553, 0, 0, 0, 0, 0 }, .{ 1472594971, 0, 0, 0, 0, 0 }, .{ 1852251889, 0, 0, 0, 0, 0 }, .{ 1535579752, 0, 0, 0, 0, 0 }, .{ 829173761, 0, 0, 0, 0, 0 }, .{ 932283366, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 2080768001, 0, 0, 0, 0, 0 }, .{ 1276276028, 0, 0, 0, 0, 0 }, .{ 50460672, 0, 0, 0, 0, 0 }, .{ 1885962108, 0, 0, 0, 0, 0 }, .{ 104406766, 0, 0, 0, 0, 0 }, .{ 520201925, 0, 0, 0, 0, 0 }, .{ 2046953473, 0, 0, 0, 0, 0 }, .{ 246049925, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 420683502, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{.{ 1000762965, 424812860, 1829652551, 1800859147, 763084662, 147208042 }}, + .quotient_claims = &.{ .{ 1871082908, 757905425, 460240282, 1040916105, 1001703905, 977036457 }, .{ 1802424043, 295800760, 1421212634, 657590635, 1170955656, 343220247 }, .{ 72762391, 251756953, 774064452, 785157668, 2114651741, 1327860223 }, .{ 721510256, 1066204725, 1827593854, 961120950, 2052692954, 1466952673 }, .{ 1471695921, 257347890, 1946366443, 1777524120, 2111786238, 2128619772 }, .{ 1806191800, 1587423517, 395374918, 727785533, 1191233164, 2050466305 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/MultiModuleHighRatio" + +// expression: "cubeA" +const system_23_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "colA" + .{ .column_claim = 0 }, // col: "colA" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 0 }, // col: "colA" + .{ .op = .{ .operator = .mul, .operands = &.{ 2, 3 } } }, + .{ .column_claim = 0 }, // col: "colA" + .{ .op = .{ .operator = .sub, .operands = &.{ 4, 5 } } }, +}; + +const system_23_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "cubeA" + .{ .expression = 6, .cancelled_positions = &.{} }, +}; + +const system_23_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 2, .vanishings = &system_23_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "cubeB" +const system_23_module_1_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "colB" + .{ .column_claim = 0 }, // col: "colB" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 0 }, // col: "colB" + .{ .op = .{ .operator = .mul, .operands = &.{ 2, 3 } } }, + .{ .column_claim = 0 }, // col: "colB" + .{ .op = .{ .operator = .sub, .operands = &.{ 4, 5 } } }, +}; + +const system_23_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "cubeB" + .{ .expression = 6, .cancelled_positions = &.{} }, +}; + +const system_23_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 2, .vanishings = &system_23_module_1_bucket_0_vanishings, .quotient_claim_offset = 2 }, +}; + +const system_23_modules = [_]vanishing.Module{ + // module: "modA" + .{ .size = .{ .static = 4 }, .expressions = &system_23_module_0_expressions, .buckets = &system_23_module_0_buckets, .witness_claim_offset = 0 }, + // module: "modB" + .{ .size = .{ .static = 8 }, .expressions = &system_23_module_1_expressions, .buckets = &system_23_module_1_buckets, .witness_claim_offset = 1 }, +}; + +const system_23_round_coin_counts = [_]usize{ 0, 2, 2 }; +const system_23_round_coin_offsets = [_]usize{ 0, 0, 2 }; + +// system: "multi-mod-hi-ratio" +const system_23 = vanishing.System{ + .modules = &system_23_modules, + .round_coin_counts = &system_23_round_coin_counts, + .round_coin_offsets = &system_23_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 4, + .dynamic_module_count = 0, + .total_witness_claims = 2, + .total_quotient_claims = 4, +}; + +const vanishing_scenario_23 = VanishingScenario{ + .name = "Vanishing/MultiModuleHighRatio", + .system = system_23, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 0, 1 } }, + .{ .public_base = &.{ 0, 1, 0, 1, 0, 1, 0, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1512454731, 958598984, 360752375, 352626871, 392274282, 1763221166 }, .{ 1736202540, 1230922383, 1915178044, 916941519, 499064941, 1696376734 } }, + .quotient_claims = &.{ .{ 378113683, 239649746, 622864702, 620833326, 1163421787, 1506158508 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 2032080460, 840407204, 478794511, 761911988, 1722796060, 1489447400 }, .{ 0, 0, 0, 0, 0, 0 } }, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 0, 1 } }, + .{ .public_base = &.{ 0, 1, 0, 1, 0, 1, 0, 2 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 961427586, 0, 0, 0, 0, 0 }, .{ 296562433, 0, 0, 0, 0, 0 }, .{ 1409006337, 0, 0, 0, 0, 0 }, .{ 682491905, 0, 0, 0, 0, 0 }, .{ 1255969153, 0, 0, 0, 0, 0 }, .{ 1085067521, 0, 0, 0, 0, 0 }, .{ 2066578177, 0, 0, 0, 0, 0 }, .{ 1844618519, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 1032502915, 0, 0, 0, 0, 0 }, .{ 1829966081, 0, 0, 0, 0, 0 }, .{ 333208579, 0, 0, 0, 0, 0 }, .{ 1980891137, 0, 0, 0, 0, 0 }, .{ 464213886, 0, 0, 0, 0, 0 }, .{ 2115170049, 0, 0, 0, 0, 0 }, .{ 1532595710, 0, 0, 0, 0, 0 }, .{ 646096146, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 177595024, 812269657, 800835790, 879450272, 2074674568, 274976158 }, .{ 1406797314, 701206298, 712365316, 431506217, 2070867447, 169516254 } }, + .quotient_claims = &.{ .{ 1642428581, 1801097239, 1265562164, 219862568, 518668642, 1134097256 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 505183367, 1411310835, 1889859229, 686174882, 1585152228, 1865482273 }, .{ 2096931289, 733472834, 1073059422, 1673570688, 543216611, 210903558 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/SizeThirtyTwoCubic" + +// expression: "cube" +const system_24_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .mul, .operands = &.{ 2, 3 } } }, + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 4, 5 } } }, +}; + +const system_24_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "cube" + .{ .expression = 6, .cancelled_positions = &.{} }, +}; + +const system_24_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 2, .vanishings = &system_24_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_24_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 32 }, .expressions = &system_24_module_0_expressions, .buckets = &system_24_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_24_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_24_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "cube-32" +const system_24 = vanishing.System{ + .modules = &system_24_modules, + .round_coin_counts = &system_24_round_coin_counts, + .round_coin_offsets = &system_24_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 1, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_24 = VanishingScenario{ + .name = "Vanishing/SizeThirtyTwoCubic", + .system = system_24, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1065353217, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{.{ 1154514664, 2062311162, 2004848474, 1462655287, 957068868, 317691015 }}, + .quotient_claims = &.{ .{ 1886658491, 1580931007, 1566565335, 898340430, 239267217, 612099362 }, .{ 0, 0, 0, 0, 0, 0 } }, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 838486084, 0, 0, 0, 0, 0 }, .{ 127493167, 0, 0, 0, 0, 0 }, .{ 1840443794, 0, 0, 0, 0, 0 }, .{ 1990472380, 0, 0, 0, 0, 0 }, .{ 510121866, 0, 0, 0, 0, 0 }, .{ 25378817, 0, 0, 0, 0, 0 }, .{ 1278358675, 0, 0, 0, 0, 0 }, .{ 164891519, 0, 0, 0, 0, 0 }, .{ 1982476658, 0, 0, 0, 0, 0 }, .{ 1458431862, 0, 0, 0, 0, 0 }, .{ 573945896, 0, 0, 0, 0, 0 }, .{ 2075063317, 0, 0, 0, 0, 0 }, .{ 681044933, 0, 0, 0, 0, 0 }, .{ 115904983, 0, 0, 0, 0, 0 }, .{ 1459917782, 0, 0, 0, 0, 0 }, .{ 879434545, 0, 0, 0, 0, 0 }, .{ 977854328, 0, 0, 0, 0, 0 }, .{ 1392957854, 0, 0, 0, 0, 0 }, .{ 1325155668, 0, 0, 0, 0, 0 }, .{ 145856230, 0, 0, 0, 0, 0 }, .{ 339093003, 0, 0, 0, 0, 0 }, .{ 1815211076, 0, 0, 0, 0, 0 }, .{ 1356882143, 0, 0, 0, 0, 0 }, .{ 972759041, 0, 0, 0, 0, 0 }, .{ 11399283, 0, 0, 0, 0, 0 }, .{ 551339905, 0, 0, 0, 0, 0 }, .{ 405006994, 0, 0, 0, 0, 0 }, .{ 1816592974, 0, 0, 0, 0, 0 }, .{ 298584459, 0, 0, 0, 0, 0 }, .{ 193778983, 0, 0, 0, 0, 0 }, .{ 561758366, 0, 0, 0, 0, 0 }, .{ 1067123921, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 2033643177, 0, 0, 0, 0, 0 }, .{ 884397748, 0, 0, 0, 0, 0 }, .{ 1620697168, 0, 0, 0, 0, 0 }, .{ 273918460, 0, 0, 0, 0, 0 }, .{ 1099527033, 0, 0, 0, 0, 0 }, .{ 620062282, 0, 0, 0, 0, 0 }, .{ 1420303028, 0, 0, 0, 0, 0 }, .{ 1267698555, 0, 0, 0, 0, 0 }, .{ 179535690, 0, 0, 0, 0, 0 }, .{ 1891201602, 0, 0, 0, 0, 0 }, .{ 546372823, 0, 0, 0, 0, 0 }, .{ 1786326839, 0, 0, 0, 0, 0 }, .{ 718488156, 0, 0, 0, 0, 0 }, .{ 736572232, 0, 0, 0, 0, 0 }, .{ 528627008, 0, 0, 0, 0, 0 }, .{ 2049242321, 0, 0, 0, 0, 0 }, .{ 1335174821, 0, 0, 0, 0, 0 }, .{ 1587078383, 0, 0, 0, 0, 0 }, .{ 1429720551, 0, 0, 0, 0, 0 }, .{ 1853254757, 0, 0, 0, 0, 0 }, .{ 1060199691, 0, 0, 0, 0, 0 }, .{ 2068129505, 0, 0, 0, 0, 0 }, .{ 1932236257, 0, 0, 0, 0, 0 }, .{ 2090131457, 0, 0, 0, 0, 0 }, .{ 1560156368, 0, 0, 0, 0, 0 }, .{ 1691100510, 0, 0, 0, 0, 0 }, .{ 925667930, 0, 0, 0, 0, 0 }, .{ 179370602, 0, 0, 0, 0, 0 }, .{ 1807213373, 0, 0, 0, 0, 0 }, .{ 821259343, 0, 0, 0, 0, 0 }, .{ 1985886536, 0, 0, 0, 0, 0 }, .{ 2129980209, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{.{ 137776088, 1290407146, 267915201, 496903175, 405448373, 1245426846 }}, + .quotient_claims = &.{ .{ 794554955, 360678593, 343753912, 1978414617, 280003398, 548125460 }, .{ 812281328, 48894462, 584231351, 699193181, 1361833827, 1587684600 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/LargeForwardShift" + +// expression: "eq-plus3" +const system_25_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 1 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 1 } } }, +}; + +const system_25_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "eq-plus3" + .{ .expression = 2, .cancelled_positions = &.{ -3, -2, -1 } }, +}; + +const system_25_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_25_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_25_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 8 }, .expressions = &system_25_module_0_expressions, .buckets = &system_25_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_25_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_25_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "fwd-shift-3" +const system_25 = vanishing.System{ + .modules = &system_25_modules, + .round_coin_counts = &system_25_round_coin_counts, + .round_coin_offsets = &system_25_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 2, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_25 = VanishingScenario{ + .name = "Vanishing/LargeForwardShift", + .system = system_25, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 4, 4, 4, 4, 4, 4, 4, 4 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 4, 0, 0, 0, 0, 0 }, .{ 4, 0, 0, 0, 0, 0 } }, + .quotient_claims = &.{.{ 0, 0, 0, 0, 0, 0 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 4, 4, 5, 4, 4, 4, 4, 4 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 730210523, 0, 0, 0, 0, 0 }, .{ 1799713717, 0, 0, 0, 0, 0 }, .{ 4789484, 0, 0, 0, 0, 0 }, .{ 612900421, 0, 0, 0, 0, 0 }, .{ 2039222893, 0, 0, 0, 0, 0 }, .{ 439104108, 0, 0, 0, 0, 0 }, .{ 802134381, 0, 0, 0, 0, 0 }, .{ 1434650369, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1049677316, 989713086, 305263581, 2027994646, 188766054, 791778254 }, .{ 571991973, 1671805222, 2024770927, 632287230, 354668586, 429400776 } }, + .quotient_claims = &.{.{ 605522822, 510520734, 1533940761, 2011995412, 1090009456, 833886321 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/BackAndForwardShift" + +// expression: "twoShift" +const system_26_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 1 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 1 } } }, + .{ .constant = field.Element.init(2) }, + .{ .column_claim = 2 }, // col: "col" + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 4 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 5 } } }, +}; + +const system_26_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "twoShift" + .{ .expression = 6, .cancelled_positions = &.{ -1, 0 } }, +}; + +const system_26_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_26_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_26_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 8 }, .expressions = &system_26_module_0_expressions, .buckets = &system_26_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_26_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_26_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "two-shift" +const system_26 = vanishing.System{ + .modules = &system_26_modules, + .round_coin_counts = &system_26_round_coin_counts, + .round_coin_offsets = &system_26_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 3, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_26 = VanishingScenario{ + .name = "Vanishing/BackAndForwardShift", + .system = system_26, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 0, 0, 0, 0, 0, 0, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } }, + .quotient_claims = &.{.{ 0, 0, 0, 0, 0, 0 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 0, 0, 1, 0, 0, 0, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1952704258, 0, 0, 0, 0, 0 }, .{ 1787263785, 0, 0, 0, 0, 0 }, .{ 1911623643, 0, 0, 0, 0, 0 }, .{ 1454105533, 0, 0, 0, 0, 0 }, .{ 266697111, 0, 0, 0, 0, 0 }, .{ 1252470274, 0, 0, 0, 0, 0 }, .{ 1084912899, 0, 0, 0, 0, 0 }, .{ 628338068, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1459971786, 1066059957, 1616860063, 746913289, 1795852079, 1136758617 }, .{ 219959044, 1616445864, 164167838, 1218889072, 34004147, 578109477 }, .{ 2001208116, 1750372018, 1801334472, 1783259259, 359132698, 246191473 } }, + .quotient_claims = &.{.{ 1489742122, 7270632, 792003693, 1735096915, 886652895, 907382589 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "Vanishing/DynamicQuadratic" + +// expression: "bool" +const system_27_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, +}; + +const system_27_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "bool" + .{ .expression = 4, .cancelled_positions = &.{} }, +}; + +const system_27_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_27_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_27_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .dynamic = 0 }, .expressions = &system_27_module_0_expressions, .buckets = &system_27_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_27_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_27_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "dyn-quad" +const system_27 = vanishing.System{ + .modules = &system_27_modules, + .round_coin_counts = &system_27_round_coin_counts, + .round_coin_offsets = &system_27_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 1, + .total_witness_claims = 1, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_27 = VanishingScenario{ + .name = "Vanishing/DynamicQuadratic", + .system = system_27, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 0, 1, 0, 1, 0, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 }, .{ 1598029825, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{.{ 1413096820, 96070362, 393008447, 1671346176, 1527579318, 1184407193 }}, + .quotient_claims = &.{.{ 1598029825, 0, 0, 0, 0, 0 }}, + .module_sizes = &.{8}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 0, 2, 0, 1, 0, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 128448036, 0, 0, 0, 0, 0 }, .{ 1599074305, 0, 0, 0, 0, 0 }, .{ 933729828, 0, 0, 0, 0, 0 }, .{ 524881342, 0, 0, 0, 0, 0 }, .{ 1463314910, 0, 0, 0, 0, 0 }, .{ 1330647041, 0, 0, 0, 0, 0 }, .{ 137890269, 0, 0, 0, 0, 0 }, .{ 1464860673, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{.{ 2062694608, 1504861030, 970551382, 1959951254, 31778349, 1060070188 }}, + .quotient_claims = &.{.{ 1244967415, 1464920846, 357149961, 716507833, 409564937, 2027460110 }}, + .module_sizes = &.{8}, + }, +}; + +// scenario: "Vanishing/QuarticWithBackShift" + +// expression: "quartic-shift" +const system_28_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 1 }, // col: "col" + .{ .column_claim = 1 }, // col: "col" + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 4 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 2, 5 } } }, + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .mul, .operands = &.{ 7, 8 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 6, 9 } } }, +}; + +const system_28_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "quartic-shift" + .{ .expression = 10, .cancelled_positions = &.{0} }, +}; + +const system_28_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 4, .vanishings = &system_28_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_28_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 8 }, .expressions = &system_28_module_0_expressions, .buckets = &system_28_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_28_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_28_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "quartic-shift" +const system_28 = vanishing.System{ + .modules = &system_28_modules, + .round_coin_counts = &system_28_round_coin_counts, + .round_coin_offsets = &system_28_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 2, + .total_quotient_claims = 4, +}; + +const vanishing_scenario_28 = VanishingScenario{ + .name = "Vanishing/QuarticWithBackShift", + .system = system_28, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 1, 1, 1, 1, 1, 1, 1, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1, 0, 0, 0, 0, 0 }, .{ 1, 0, 0, 0, 0, 0 } }, + .quotient_claims = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } }, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 1, 1, 1, 1, 7, 7, 1, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1792381321, 0, 0, 0, 0, 0 }, .{ 1468688372, 0, 0, 0, 0, 0 }, .{ 1065481415, 0, 0, 0, 0, 0 }, .{ 220832686, 0, 0, 0, 0, 0 }, .{ 1890375188, 0, 0, 0, 0, 0 }, .{ 1244972213, 0, 0, 0, 0, 0 }, .{ 1161065910, 0, 0, 0, 0, 0 }, .{ 1992704719, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 1577903462, 0, 0, 0, 0, 0 }, .{ 576790576, 0, 0, 0, 0, 0 }, .{ 771327476, 0, 0, 0, 0, 0 }, .{ 1804164875, 0, 0, 0, 0, 0 }, .{ 411907249, 0, 0, 0, 0, 0 }, .{ 1357845939, 0, 0, 0, 0, 0 }, .{ 53877436, 0, 0, 0, 0, 0 }, .{ 1712382022, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 528974082, 0, 0, 0, 0, 0 }, .{ 1602535458, 0, 0, 0, 0, 0 }, .{ 930367150, 0, 0, 0, 0, 0 }, .{ 1895396872, 0, 0, 0, 0, 0 }, .{ 1972550389, 0, 0, 0, 0, 0 }, .{ 108546702, 0, 0, 0, 0, 0 }, .{ 1145209739, 0, 0, 0, 0, 0 }, .{ 1209261445, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 1395573987, 0, 0, 0, 0, 0 }, .{ 619276601, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 159265250, 881862916, 2014738136, 1644341278, 1107505403, 617775750 }, .{ 934418010, 667762105, 49232403, 177300787, 1636714288, 912506113 } }, + .quotient_claims = &.{ .{ 603620304, 1767794574, 902869831, 231044973, 2055743201, 135635472 }, .{ 618475804, 2081014582, 559367810, 1312212346, 731208139, 1384169523 }, .{ 1514767856, 1318221793, 678574654, 1122080416, 1482463879, 2027592366 }, .{ 487422047, 1777164948, 1854973924, 492210751, 160929736, 488045422 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "LocalVanishing/SingleColumnFirstRowZero" + +// expression: "global" +const system_29_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 1 }, // col: "lagrange-row0" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, +}; + +const system_29_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "global" + .{ .expression = 2, .cancelled_positions = &.{} }, +}; + +const system_29_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_29_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_29_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_29_module_0_expressions, .buckets = &system_29_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_29_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_29_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "lv-row0" +const system_29 = vanishing.System{ + .modules = &system_29_modules, + .round_coin_counts = &system_29_round_coin_counts, + .round_coin_offsets = &system_29_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 2, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_29 = VanishingScenario{ + .name = "LocalVanishing/SingleColumnFirstRowZero", + .system = system_29, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 9, 9, 9 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 799014909, 0, 0, 0, 0, 0 }, .{ 551477246, 0, 0, 0, 0, 0 }, .{ 266338303, 0, 0, 0, 0, 0 }, .{ 2111905793, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1753098428, 1553015963, 1571627753, 1945326155, 133823156, 1601688298 }, .{ 41956446, 64187830, 772355331, 1441068764, 1642346875, 295524952 } }, + .quotient_claims = &.{.{ 1106198120, 1204206469, 472755402, 934873305, 1294184935, 781850424 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 7, 9, 9, 9 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 559310438, 0, 0, 0, 0, 0 }, .{ 1069531136, 0, 0, 0, 0, 0 }, .{ 532676608, 0, 0, 0, 0, 0 }, .{ 2126528513, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1274614595, 1640606557, 196939003, 1253387747, 169067298, 1238726265 }, .{ 1493399140, 245049938, 966883715, 438659343, 2046172784, 445990084 } }, + .quotient_claims = &.{.{ 1435078769, 1794896995, 909393052, 347878077, 1828410, 1087977339 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "LocalVanishing/SingleColumnLastRowZero" + +// expression: "global" +const system_30_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 1 }, // col: "lagrange-row3" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, +}; + +const system_30_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "global" + .{ .expression = 2, .cancelled_positions = &.{} }, +}; + +const system_30_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_30_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_30_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_30_module_0_expressions, .buckets = &system_30_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_30_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_30_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "lv-rowN" +const system_30 = vanishing.System{ + .modules = &system_30_modules, + .round_coin_counts = &system_30_round_coin_counts, + .round_coin_offsets = &system_30_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 2, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_30 = VanishingScenario{ + .name = "LocalVanishing/SingleColumnLastRowZero", + .system = system_30, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 9, 9, 9, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 551477246, 0, 0, 0, 0, 0 }, .{ 266338303, 0, 0, 0, 0, 0 }, .{ 2111905793, 0, 0, 0, 0, 0 }, .{ 799014909, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1942968739, 208627664, 507738553, 717985327, 1581811734, 774770202 }, .{ 257604904, 1634035263, 1837545879, 393714171, 1244714096, 2044620855 } }, + .quotient_claims = &.{.{ 635073024, 219493398, 1857425426, 1524683182, 1846446441, 1435662397 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 9, 9, 9, 7 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1069531136, 0, 0, 0, 0, 0 }, .{ 532676608, 0, 0, 0, 0, 0 }, .{ 2126528513, 0, 0, 0, 0, 0 }, .{ 559310438, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 801300001, 1700511553, 1485458003, 1214014267, 1995941774, 260429853 }, .{ 1730056437, 215097440, 322624215, 458346083, 1132735546, 935138290 } }, + .quotient_claims = &.{.{ 735241292, 89350060, 1787065661, 926969351, 1048186770, 191378242 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "LocalVanishing/ShiftedColumnFirstRowZero" + +// expression: "global" +const system_31_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 1 }, // col: "lagrange-row1" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, +}; + +const system_31_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "global" + .{ .expression = 2, .cancelled_positions = &.{} }, +}; + +const system_31_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_31_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_31_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_31_module_0_expressions, .buckets = &system_31_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_31_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_31_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "lv-shift" +const system_31 = vanishing.System{ + .modules = &system_31_modules, + .round_coin_counts = &system_31_round_coin_counts, + .round_coin_offsets = &system_31_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 2, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_31 = VanishingScenario{ + .name = "LocalVanishing/ShiftedColumnFirstRowZero", + .system = system_31, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 9, 0, 9, 9 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 2111905793, 0, 0, 0, 0, 0 }, .{ 799014909, 0, 0, 0, 0, 0 }, .{ 551477246, 0, 0, 0, 0, 0 }, .{ 266338303, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 329750174, 513429052, 573652692, 4156251, 1312852027, 1079486778 }, .{ 200106252, 416442646, 2066967245, 709773672, 327617871, 1300527980 } }, + .quotient_claims = &.{.{ 547344903, 1418972681, 657160127, 1383225070, 1756319262, 899141600 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 9, 7, 9, 9 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 2126528513, 0, 0, 0, 0, 0 }, .{ 559310438, 0, 0, 0, 0, 0 }, .{ 1069531136, 0, 0, 0, 0, 0 }, .{ 532676608, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 351498494, 1956716827, 822696432, 709954196, 1113280092, 1727045471 }, .{ 889603974, 86994803, 1719358217, 1775729335, 1574066387, 201830481 } }, + .quotient_claims = &.{.{ 1934237612, 1546353986, 1251013835, 895547668, 915537536, 1920234119 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "LocalVanishing/TwoColumnsEqualAtFirstRow" + +// expression: "global" +const system_32_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "a" + .{ .column_claim = 1 }, // col: "b" + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 2 }, // col: "lagrange-row0" + .{ .op = .{ .operator = .mul, .operands = &.{ 2, 3 } } }, +}; + +const system_32_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "global" + .{ .expression = 4, .cancelled_positions = &.{} }, +}; + +const system_32_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_32_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_32_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_32_module_0_expressions, .buckets = &system_32_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_32_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_32_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "lv-pair" +const system_32 = vanishing.System{ + .modules = &system_32_modules, + .round_coin_counts = &system_32_round_coin_counts, + .round_coin_offsets = &system_32_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 3, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_32 = VanishingScenario{ + .name = "LocalVanishing/TwoColumnsEqualAtFirstRow", + .system = system_32, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 5, 9, 9, 9 } }, + .{ .public_base = &.{ 5, 9, 9, 9 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 705110376, 473998178, 1265463323, 1522310671, 1393121839, 807388760 }, .{ 705110376, 473998178, 1265463323, 1522310671, 1393121839, 807388760 }, .{ 1421752233, 946853672, 1281663994, 1217452157, 1249749365, 1928859243 } }, + .quotient_claims = &.{.{ 0, 0, 0, 0, 0, 0 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 5, 9, 9, 9 } }, + .{ .public_base = &.{ 6, 9, 9, 9 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1251790029, 0, 0, 0, 0, 0 }, .{ 534765568, 0, 0, 0, 0, 0 }, .{ 266338304, 0, 0, 0, 0, 0 }, .{ 2128617473, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 69019361, 271819072, 293303964, 1181487162, 565108940, 673695749 }, .{ 51764523, 203864304, 219977973, 1951468588, 423831705, 1037948420 }, .{ 2113451595, 2062751665, 2057380442, 769981426, 1989429198, 364252671 } }, + .quotient_claims = &.{.{ 867844568, 205614190, 515627474, 1651190779, 1315896138, 2005405521 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "LocalVanishing/MultipleConstraintsSameModule" + +const system_33_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 1 }, // col: "lagrange-row0" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 2 }, // col: "lagrange-row3" + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 4 } } }, +}; + +const system_33_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "global" + .{ .expression = 2, .cancelled_positions = &.{} }, + // expression: "global" + .{ .expression = 5, .cancelled_positions = &.{} }, +}; + +const system_33_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_33_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_33_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_33_module_0_expressions, .buckets = &system_33_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_33_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_33_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "lv-multi" +const system_33 = vanishing.System{ + .modules = &system_33_modules, + .round_coin_counts = &system_33_round_coin_counts, + .round_coin_offsets = &system_33_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 3, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_33 = VanishingScenario{ + .name = "LocalVanishing/MultipleConstraintsSameModule", + .system = system_33, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 9, 9, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 247537663, 0, 0, 0, 0, 0 }, .{ 1797445693, 1044513035, 755381742, 256566886, 14486645, 1203469028 }, .{ 2030821980, 175636095, 1689753811, 528173920, 1049183274, 1972107379 }, .{ 1973421664, 827196577, 576391415, 241526738, 1124983094, 1638299705 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1831197805, 1112803582, 1225886425, 1642140550, 1750204948, 1959143650 }, .{ 223638369, 474402434, 665239805, 1359056312, 1243007442, 718199442 }, .{ 1466856483, 2006149475, 1092511866, 1772915856, 1166722093, 958079204 } }, + .quotient_claims = &.{.{ 1568669554, 566506486, 2051073590, 1817700262, 1745815811, 497960775 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 9, 9, 7 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 831936434, 1464156264, 308584744, 1897825907, 1783905384, 644197693 }, .{ 91835267, 565849323, 84606330, 1831919656, 1234899486, 722713189 }, .{ 1183973986, 332482474, 561766363, 553435686, 240006525, 1933869495 }, .{ 1988902656, 1814430041, 1957671007, 659561355, 487889129, 1842138277 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1284712310, 1733101199, 961625783, 1905958643, 2079991738, 67840584 }, .{ 1146210145, 2009959689, 273115016, 1029131884, 1067002682, 741051532 }, .{ 591817496, 742162965, 1486229186, 1873399716, 550611361, 892760680 } }, + .quotient_claims = &.{.{ 1813818615, 1622977931, 1567881226, 1018943197, 518658594, 1014385179 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "LocalVanishing/SecondRowConstraint" + +// expression: "global" +const system_34_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .constant = field.Element.init(42) }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 1 }, // col: "lagrange-row1" + .{ .op = .{ .operator = .mul, .operands = &.{ 2, 3 } } }, +}; + +const system_34_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "global" + .{ .expression = 4, .cancelled_positions = &.{} }, +}; + +const system_34_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_34_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_34_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_34_module_0_expressions, .buckets = &system_34_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_34_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_34_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "lv-row1" +const system_34 = vanishing.System{ + .modules = &system_34_modules, + .round_coin_counts = &system_34_round_coin_counts, + .round_coin_offsets = &system_34_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 2, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_34 = VanishingScenario{ + .name = "LocalVanishing/SecondRowConstraint", + .system = system_34, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 99, 42, 99, 99 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 2011635713, 0, 0, 0, 0, 0 }, .{ 799014891, 0, 0, 0, 0, 0 }, .{ 651747314, 0, 0, 0, 0, 0 }, .{ 266338297, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1259601756, 1615728666, 1724498475, 56036334, 1869254368, 120130345 }, .{ 202186613, 1429505653, 530457860, 1008298901, 714822356, 296938967 } }, + .quotient_claims = &.{.{ 1218557288, 1891449640, 1596403443, 814716973, 240910434, 802422626 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 99, 41, 99, 99 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 2009546753, 0, 0, 0, 0, 0 }, .{ 2050804920, 0, 0, 0, 0, 0 }, .{ 1186512882, 0, 0, 0, 0, 0 }, .{ 532676601, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 352652724, 1244479907, 1008710826, 1620669676, 27285443, 963469259 }, .{ 251074007, 1117369302, 570389519, 45530055, 256683786, 1930413305 } }, + .quotient_claims = &.{.{ 454123681, 488956403, 1558776752, 702497977, 201031782, 2112685355 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "LocalVanishing/CellEquality" + +// expression: "global" +const system_35_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .cell_value = .{ .round = 0, .index = 0 } }, // cell: "c" + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 1 }, // col: "lagrange-row0" + .{ .op = .{ .operator = .mul, .operands = &.{ 2, 3 } } }, +}; + +const system_35_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "global" + .{ .expression = 4, .cancelled_positions = &.{} }, +}; + +const system_35_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_35_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_35_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_35_module_0_expressions, .buckets = &system_35_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_35_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_35_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "lv-cell" +const system_35 = vanishing.System{ + .modules = &system_35_modules, + .round_coin_counts = &system_35_round_coin_counts, + .round_coin_offsets = &system_35_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 2, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_35 = VanishingScenario{ + .name = "LocalVanishing/CellEquality", + .system = system_35, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 5, 9, 9, 9 } }, + }, + .cells = &.{ + .{ .base = 5 }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1065353215, 0, 0, 0, 0, 0 }, .{ 8355839, 0, 0, 0, 0, 0 }, .{ 1065353216, 0, 0, 0, 0, 0 }, .{ 2122350593, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 356125776, 539975027, 226430206, 1315010474, 411632516, 1837539671 }, .{ 1508998383, 1463036068, 1008745665, 736600598, 2027798304, 1138644907 } }, + .quotient_claims = &.{.{ 1930166839, 141915601, 1039137931, 2002652548, 1833984754, 507906889 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 5, 9, 9, 9 } }, + }, + .cells = &.{ + .{ .base = 7 }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1970903449, 0, 0, 0, 0, 0 }, .{ 8355839, 0, 0, 0, 0, 0 }, .{ 1065353216, 0, 0, 0, 0, 0 }, .{ 2122350593, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 739614139, 1979479951, 23791752, 1999039605, 1976916878, 1337894174 }, .{ 880449684, 1103159837, 2124758495, 32916707, 571123997, 730879673 } }, + .quotient_claims = &.{.{ 1373588758, 1004026633, 1012621471, 1691655720, 1527588887, 670667460 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "LocalVanishing/CoinScaled" + +// expression: "global" +const system_36_module_0_expressions = [_]vanishing.ExprNode{ + .{ .coin_value = 0 }, // coin: "coin" + .{ .column_claim = 0 }, // col: "col" + .{ .constant = field.Element.init(5) }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 3 } } }, + .{ .column_claim = 1 }, // col: "lagrange-row0" + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 5 } } }, +}; + +const system_36_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "global" + .{ .expression = 6, .cancelled_positions = &.{} }, +}; + +const system_36_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_36_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_36_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_36_module_0_expressions, .buckets = &system_36_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_36_round_coin_counts = [_]usize{ 0, 1, 1, 1 }; +const system_36_round_coin_offsets = [_]usize{ 0, 0, 1, 2 }; + +// system: "lv-coin" +const system_36 = vanishing.System{ + .modules = &system_36_modules, + .round_coin_counts = &system_36_round_coin_counts, + .round_coin_offsets = &system_36_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 3, + .dynamic_module_count = 0, + .total_witness_claims = 2, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_36 = VanishingScenario{ + .name = "LocalVanishing/CoinScaled", + .system = system_36, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 5, 9, 9, 9 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1282386950, 839335561, 399029919, 1872294246, 44407732, 1846543156 }, .{ 1182767912, 1806258211, 1293946762, 835888950, 531377490, 420501187 }, .{ 1847933272, 990013998, 133009973, 624098082, 725038055, 1325749863 }, .{ 382392199, 173769785, 1102779617, 412307214, 918698620, 100292106 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 761553498, 123209043, 94640249, 1552541095, 1349464307, 552353132 }, .{ 342288236, 1567227564, 509016546, 1209894551, 1260663748, 1992618150 } }, + .quotient_claims = &.{.{ 1775348517, 610659114, 1649513731, 2120599024, 876665781, 2036978808 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 7, 9, 9, 9 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1912048697, 1814906612, 1060639787, 906040340, 1963329928, 1667177320 }, .{ 149551498, 319665621, 1791702116, 751562114, 244694318, 1931281279 }, .{ 1026690315, 2021809943, 1835190570, 1561462509, 677010320, 1162669816 }, .{ 1903829132, 1593247832, 1878679024, 240656471, 1109326322, 394058353 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1413581963, 2065092919, 800736331, 988420386, 1713524121, 820074968 }, .{ 1423915456, 32806757, 664985051, 1636496240, 208591156, 1720668949 } }, + .quotient_claims = &.{.{ 876800542, 361862301, 1536549786, 509320046, 855325240, 1898052439 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "LocalVanishing/MultipleAnchorsSharedColumn" + +const system_37_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .constant = field.Element.init(10) }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 1 }, // col: "lagrange-row0" + .{ .op = .{ .operator = .mul, .operands = &.{ 2, 3 } } }, + .{ .column_claim = 0 }, // col: "col" + .{ .constant = field.Element.init(20) }, + .{ .op = .{ .operator = .sub, .operands = &.{ 5, 6 } } }, + .{ .column_claim = 2 }, // col: "lagrange-row1" + .{ .op = .{ .operator = .mul, .operands = &.{ 7, 8 } } }, + .{ .column_claim = 0 }, // col: "col" + .{ .constant = field.Element.init(30) }, + .{ .op = .{ .operator = .sub, .operands = &.{ 10, 11 } } }, + .{ .column_claim = 3 }, // col: "lagrange-row3" + .{ .op = .{ .operator = .mul, .operands = &.{ 12, 13 } } }, +}; + +const system_37_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "global" + .{ .expression = 4, .cancelled_positions = &.{} }, + // expression: "global" + .{ .expression = 9, .cancelled_positions = &.{} }, + // expression: "global" + .{ .expression = 14, .cancelled_positions = &.{} }, +}; + +const system_37_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_37_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_37_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_37_module_0_expressions, .buckets = &system_37_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_37_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_37_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "lv-anchors" +const system_37 = vanishing.System{ + .modules = &system_37_modules, + .round_coin_counts = &system_37_round_coin_counts, + .round_coin_offsets = &system_37_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 4, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_37 = VanishingScenario{ + .name = "LocalVanishing/MultipleAnchorsSharedColumn", + .system = system_37, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 10, 20, 99, 30 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1016263519, 709405335, 1527156153, 1349820, 1311636339, 27434395 }, .{ 1114117252, 1781216437, 1150517974, 1895392648, 120124994, 87279291 }, .{ 1851884037, 921658475, 1041032192, 1027709699, 2010847111, 754437465 }, .{ 1514185901, 1757369725, 1906748258, 367541539, 2117976209, 1771960370 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1666491461, 1883516549, 2055050087, 500814261, 1819706598, 1734848254 }, .{ 872741952, 1223078995, 1526376482, 1405401726, 703119560, 269760276 }, .{ 891768876, 2012499698, 1353709775, 1330518461, 197075983, 289613014 }, .{ 824467503, 1000830429, 373247649, 1597398594, 76259525, 1364266523 } }, + .quotient_claims = &.{.{ 447600312, 1113570895, 460181271, 1086757177, 1032429245, 1782146118 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 10, 21, 99, 30 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 126000124, 30091540, 1136611288, 1880354567, 1007859201, 1100402297 }, .{ 1959771651, 1628942766, 654693278, 278254014, 1917436790, 1144727181 }, .{ 417689880, 1661809447, 1522527026, 715825089, 1156705905, 811002169 }, .{ 860458768, 416732419, 967269610, 1440779784, 208265456, 1709500652 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 475220899, 772548144, 278539221, 1940696670, 578453864, 1688829539 }, .{ 1933494713, 1520877110, 263092245, 210668653, 1972055768, 1820242802 }, .{ 1545493179, 728048709, 1343706888, 465455743, 774569547, 278061763 }, .{ 1156071124, 230301742, 175706352, 1798757856, 370565933, 370444644 } }, + .quotient_claims = &.{.{ 773774268, 1562783103, 1416473854, 1119834351, 2009258876, 1650435165 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "LocalVanishing/ConstantSubtraction" + +// expression: "global" +const system_38_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .constant = field.Element.init(7) }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 1 }, // col: "lagrange-row0" + .{ .op = .{ .operator = .mul, .operands = &.{ 2, 3 } } }, +}; + +const system_38_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "global" + .{ .expression = 4, .cancelled_positions = &.{} }, +}; + +const system_38_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_38_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_38_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_38_module_0_expressions, .buckets = &system_38_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_38_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_38_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "lv-const" +const system_38 = vanishing.System{ + .modules = &system_38_modules, + .round_coin_counts = &system_38_round_coin_counts, + .round_coin_offsets = &system_38_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 2, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_38 = VanishingScenario{ + .name = "LocalVanishing/ConstantSubtraction", + .system = system_38, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 7, 0, 0, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 799014915, 0, 0, 0, 0, 0 }, .{ 518053890, 0, 0, 0, 0, 0 }, .{ 266338305, 0, 0, 0, 0, 0 }, .{ 14622720, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 66054769, 96846061, 2054309446, 102742519, 175185174, 1347760520 }, .{ 1531369562, 1535768318, 293472778, 319064136, 633799720, 1105697117 } }, + .quotient_claims = &.{.{ 1832769785, 1349699090, 998743794, 1192408104, 43215081, 1720170491 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 8, 0, 0, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1677931319, 0, 0, 0, 0, 0 }, .{ 2113994755, 0, 0, 0, 0, 0 }, .{ 1, 0, 0, 0, 0, 0 }, .{ 16711680, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 674945390, 2057742713, 1897785137, 1717480901, 563876707, 1790463310 }, .{ 617044782, 2121585968, 2101591271, 1013700025, 1402176109, 756484522 } }, + .quotient_claims = &.{.{ 591265767, 1716777070, 1842384025, 1413698341, 2014858861, 2037486492 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "LocalVanishing/WrapAroundShift" + +// expression: "global" +const system_39_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 1 }, // col: "lagrange-row3" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, +}; + +const system_39_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "global" + .{ .expression = 2, .cancelled_positions = &.{} }, +}; + +const system_39_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_39_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_39_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_39_module_0_expressions, .buckets = &system_39_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_39_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_39_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "lv-wrap" +const system_39 = vanishing.System{ + .modules = &system_39_modules, + .round_coin_counts = &system_39_round_coin_counts, + .round_coin_offsets = &system_39_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 2, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_39 = VanishingScenario{ + .name = "LocalVanishing/WrapAroundShift", + .system = system_39, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 99, 99, 99, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1804836840, 0, 0, 0, 0, 0 }, .{ 799014900, 0, 0, 0, 0, 0 }, .{ 1923899393, 0, 0, 0, 0, 0 }, .{ 266338267, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 260526934, 896749336, 450177258, 1980857807, 1673203744, 1243414753 }, .{ 2041985700, 1067056286, 318287063, 1228283993, 1252913897, 1902923816 } }, + .quotient_claims = &.{.{ 888072218, 1734740166, 959160988, 88564383, 1366904894, 182840864 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 99, 99, 99, 7 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 192184297, 0, 0, 0, 0, 0 }, .{ 1065353205, 0, 0, 0, 0, 0 }, .{ 1938522113, 0, 0, 0, 0, 0 }, .{ 26633796, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1177658257, 688723135, 713952303, 1380884180, 1151087695, 1606473862 }, .{ 1515749635, 1081026948, 432276847, 448187440, 890722426, 1696367415 } }, + .quotient_claims = &.{.{ 1481007698, 156087453, 1269076692, 576401249, 52003999, 1063630105 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "LocalVanishing/ProductIsZero" + +// expression: "global" +const system_40_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "a" + .{ .column_claim = 1 }, // col: "b" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 2 }, // col: "lagrange-row0" + .{ .op = .{ .operator = .mul, .operands = &.{ 2, 3 } } }, +}; + +const system_40_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "global" + .{ .expression = 4, .cancelled_positions = &.{} }, +}; + +const system_40_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 2, .vanishings = &system_40_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_40_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_40_module_0_expressions, .buckets = &system_40_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_40_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_40_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "lv-prod" +const system_40 = vanishing.System{ + .modules = &system_40_modules, + .round_coin_counts = &system_40_round_coin_counts, + .round_coin_offsets = &system_40_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 3, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_40 = VanishingScenario{ + .name = "LocalVanishing/ProductIsZero", + .system = system_40, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 9, 9, 9 } }, + .{ .public_base = &.{ 5, 9, 9, 9 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 266338285, 0, 0, 0, 0, 0 }, .{ 1243959274, 0, 0, 0, 0, 0 }, .{ 532676597, 0, 0, 0, 0, 0 }, .{ 87732223, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 1598029827, 0, 0, 0, 0, 0 }, .{ 1588629507, 0, 0, 0, 0, 0 }, .{ 1864368130, 0, 0, 0, 0, 0 }, .{ 1873768450, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 42576198, 552356240, 602397336, 872859011, 1797788983, 1935448910 }, .{ 1439393715, 8746503, 977967627, 151192179, 1035762485, 1333689834 }, .{ 705504790, 1595843199, 1353537918, 1560231780, 273735987, 731930758 } }, + .quotient_claims = &.{ .{ 145571199, 366519545, 1966599763, 1919970104, 1028547585, 1723676867 }, .{ 1861321708, 232376099, 869221913, 887631129, 64800770, 1649635120 } }, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 3, 9, 9, 9 } }, + .{ .public_base = &.{ 5, 9, 9, 9 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 8120053, 0, 0, 0, 0, 0 }, .{ 144138222, 0, 0, 0, 0, 0 }, .{ 2130706424, 0, 0, 0, 0, 0 }, .{ 1453891584, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 540796680, 0, 0, 0, 0, 0 }, .{ 1059086338, 0, 0, 0, 0, 0 }, .{ 532676609, 0, 0, 0, 0, 0 }, .{ 538943489, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1391718603, 466748938, 1998965585, 1840764224, 1427320211, 1095264141 }, .{ 927812405, 1731636914, 2042879201, 1937411627, 1661782285, 730176094 }, .{ 1898753334, 632443988, 21956808, 1113676918, 117231037, 882809193 } }, + .quotient_claims = &.{ .{ 1596845586, 262709944, 788544252, 826541687, 1174395597, 1734792465 }, .{ 838831858, 571070974, 625897955, 370210017, 435737816, 1310237667 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "LocalVanishing/CellAndCoin" + +// expression: "global" +const system_41_module_0_expressions = [_]vanishing.ExprNode{ + .{ .coin_value = 0 }, // coin: "coin" + .{ .column_claim = 0 }, // col: "col" + .{ .cell_value = .{ .round = 0, .index = 0 } }, // cell: "c" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 3 } } }, + .{ .column_claim = 1 }, // col: "lagrange-row0" + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 5 } } }, +}; + +const system_41_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "global" + .{ .expression = 6, .cancelled_positions = &.{} }, +}; + +const system_41_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_41_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_41_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_41_module_0_expressions, .buckets = &system_41_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_41_round_coin_counts = [_]usize{ 0, 1, 1, 1 }; +const system_41_round_coin_offsets = [_]usize{ 0, 0, 1, 2 }; + +// system: "lv-cell-coin" +const system_41 = vanishing.System{ + .modules = &system_41_modules, + .round_coin_counts = &system_41_round_coin_counts, + .round_coin_offsets = &system_41_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 3, + .dynamic_module_count = 0, + .total_witness_claims = 2, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_41 = VanishingScenario{ + .name = "LocalVanishing/CellAndCoin", + .system = system_41, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 7, 9, 9, 9 } }, + }, + .cells = &.{ + .{ .ext = .{ 7, 0, 0, 0, 0, 0 } }, + }, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 2047748714, 360554093, 388726550, 1792699902, 1108655889, 19213368 }, .{ 500419856, 1854305913, 562637813, 757976425, 9768689, 439105288 }, .{ 2103053860, 1540655653, 1550046472, 597566634, 369551963, 6404456 }, .{ 1574981431, 1227005393, 406748698, 437156843, 729335237, 1704410057 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 333666907, 506225635, 1165106912, 1496195174, 923443679, 2054710737 }, .{ 1963872984, 812240399, 1548152977, 1382608846, 603631377, 37997848 } }, + .quotient_claims = &.{.{ 421410025, 879247819, 451312806, 1723080947, 1680750489, 165783364 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 7, 9, 9, 9 } }, + }, + .cells = &.{ + .{ .ext = .{ 8, 0, 0, 0, 0, 0 } }, + }, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1037247287, 1917084554, 334120894, 829920229, 541073560, 364029988 }, .{ 2044340974, 931380693, 1664127664, 671455623, 733509200, 1553166247 }, .{ 1527687942, 1012778063, 423914357, 1704219153, 1923881850, 1481609027 }, .{ 1011034910, 1094175433, 1314407483, 606276250, 983548067, 1410051807 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1509284537, 1852176687, 1235564866, 1126399174, 394806397, 148349774 }, .{ 1376064169, 139264873, 1512924000, 1567506846, 867950018, 2056531546 } }, + .quotient_claims = &.{.{ 1386654222, 100557681, 37212689, 1025994117, 1558014149, 912271469 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "LocalVanishing/ThreeColumnLinear" + +// expression: "global" +const system_42_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "a" + .{ .column_claim = 1 }, // col: "b" + .{ .op = .{ .operator = .add, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 2 }, // col: "c" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .column_claim = 3 }, // col: "lagrange-row0" + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 5 } } }, +}; + +const system_42_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "global" + .{ .expression = 6, .cancelled_positions = &.{} }, +}; + +const system_42_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_42_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_42_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_42_module_0_expressions, .buckets = &system_42_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_42_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_42_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "lv-3col" +const system_42 = vanishing.System{ + .modules = &system_42_modules, + .round_coin_counts = &system_42_round_coin_counts, + .round_coin_offsets = &system_42_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 4, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_42 = VanishingScenario{ + .name = "LocalVanishing/ThreeColumnLinear", + .system = system_42, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 3, 9, 9, 9 } }, + .{ .public_base = &.{ 5, 9, 9, 9 } }, + .{ .public_base = &.{ 8, 9, 9, 9 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 799014909, 0, 0, 0, 0, 0 }, .{ 551477246, 0, 0, 0, 0, 0 }, .{ 266338303, 0, 0, 0, 0, 0 }, .{ 2111905793, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 65853547, 2129240685, 890932454, 1084582106, 1366671620, 1211327650 }, .{ 1464373323, 1419493790, 1304190447, 1433290215, 1621349891, 97316289 }, .{ 1431446554, 1420226664, 858724220, 890999162, 938014081, 1622358897 }, .{ 699259888, 710479769, 1271982213, 1239707271, 1192692352, 508347536 } }, + .quotient_claims = &.{.{ 1696632345, 1129088183, 901301878, 596077876, 1301878777, 1214138914 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 3, 9, 9, 9 } }, + .{ .public_base = &.{ 5, 9, 9, 9 } }, + .{ .public_base = &.{ 9, 9, 9, 9 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 2050804938, 0, 0, 0, 0, 0 }, .{ 1086242814, 0, 0, 0, 0, 0 }, .{ 532676607, 0, 0, 0, 0, 0 }, .{ 2109816833, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 601155949, 1163407105, 200040892, 1259086504, 1629390023, 1220279472 }, .{ 1821241591, 65369259, 1553831550, 129155525, 1796495493, 813519648 }, .{ 9, 0, 0, 0, 0, 0 }, .{ 610042821, 1581687510, 676895329, 500387727, 83552735, 1927326521 } }, + .quotient_claims = &.{.{ 1812223292, 550407390, 785603832, 548841902, 1317701735, 1602745113 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "LocalVanishing/MultiAnchorMultiColumn" + +const system_43_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "a" + .{ .column_claim = 1 }, // col: "lagrange-row0" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 0 }, // col: "a" + .{ .column_claim = 2 }, // col: "b" + .{ .op = .{ .operator = .sub, .operands = &.{ 3, 4 } } }, + .{ .column_claim = 3 }, // col: "lagrange-row3" + .{ .op = .{ .operator = .mul, .operands = &.{ 5, 6 } } }, +}; + +const system_43_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "global" + .{ .expression = 2, .cancelled_positions = &.{} }, + // expression: "global" + .{ .expression = 7, .cancelled_positions = &.{} }, +}; + +const system_43_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_43_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_43_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_43_module_0_expressions, .buckets = &system_43_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_43_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_43_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "lv-multi-anchor-multi-col" +const system_43 = vanishing.System{ + .modules = &system_43_modules, + .round_coin_counts = &system_43_round_coin_counts, + .round_coin_offsets = &system_43_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 4, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_43 = VanishingScenario{ + .name = "LocalVanishing/MultiAnchorMultiColumn", + .system = system_43, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 9, 9, 5 } }, + .{ .public_base = &.{ 99, 99, 99, 5 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 786022500, 957443012, 1333563910, 1619821070, 1370386331, 1905623215 }, .{ 2087383557, 812831526, 806474128, 1894209114, 945273214, 463855993 }, .{ 824258386, 561559729, 1175419768, 1153650110, 1225842427, 357530754 }, .{ 178582632, 1855438621, 1258540501, 1536579487, 1040768095, 1853462341 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 2069436272, 1660620170, 293107347, 117449779, 1830710767, 1694385661 }, .{ 1574154370, 1736981038, 1448647271, 20998847, 417774234, 813487094 }, .{ 1234303244, 1561841262, 63074820, 809206648, 342507886, 1995999764 }, .{ 734883076, 2068756921, 1994032886, 988743366, 1265713323, 1474793881 } }, + .quotient_claims = &.{.{ 1582663064, 1346890498, 1854407209, 372991493, 17191931, 1850711467 }}, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 9, 9, 5 } }, + .{ .public_base = &.{ 99, 99, 99, 6 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1108166466, 1301836583, 917519684, 453235517, 10988144, 2035001731 }, .{ 1269486353, 981319554, 1108424791, 154242122, 188881092, 1016544073 }, .{ 1500975573, 671649434, 992237667, 1570998880, 237331741, 641554279 }, .{ 2001886938, 372530168, 592203873, 990102150, 576066576, 578065060 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 899714392, 1099647894, 291023887, 290770495, 623747103, 1617792462 }, .{ 1876449228, 1692109442, 188352956, 951768754, 1973368347, 2014551089 }, .{ 740989069, 374969200, 1967002931, 837531607, 222806938, 1589283628 }, .{ 1412503332, 179254648, 1101479702, 449210721, 730750526, 922254625 } }, + .quotient_claims = &.{.{ 616629028, 89610259, 1536175341, 944060876, 2015793925, 1199048812 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "LocalVanishing/CubeAtFirstRow" + +// expression: "global" +const system_44_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "col" + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .mul, .operands = &.{ 2, 3 } } }, + .{ .column_claim = 0 }, // col: "col" + .{ .op = .{ .operator = .sub, .operands = &.{ 4, 5 } } }, + .{ .column_claim = 1 }, // col: "lagrange-row0" + .{ .op = .{ .operator = .mul, .operands = &.{ 6, 7 } } }, +}; + +const system_44_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "global" + .{ .expression = 8, .cancelled_positions = &.{} }, +}; + +const system_44_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 4, .vanishings = &system_44_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_44_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_44_module_0_expressions, .buckets = &system_44_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_44_round_coin_counts = [_]usize{ 0, 1, 1 }; +const system_44_round_coin_offsets = [_]usize{ 0, 0, 1 }; + +// system: "lv-cube" +const system_44 = vanishing.System{ + .modules = &system_44_modules, + .round_coin_counts = &system_44_round_coin_counts, + .round_coin_offsets = &system_44_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 2, + .total_quotient_claims = 4, +}; + +const vanishing_scenario_44 = VanishingScenario{ + .name = "LocalVanishing/CubeAtFirstRow", + .system = system_44, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 1, 9, 9, 9 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 20, 0, 0, 0, 0, 0 }, .{ 1420492590, 0, 0, 0, 0, 0 }, .{ 2130706327, 0, 0, 0, 0, 0 }, .{ 710213593, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 2130706409, 0, 0, 0, 0, 0 }, .{ 83558432, 0, 0, 0, 0, 0 }, .{ 18, 0, 0, 0, 0, 0 }, .{ 2047148075, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 2130706431, 0, 0, 0, 0, 0 }, .{ 2130706431, 0, 0, 0, 0, 0 }, .{ 2130706431, 0, 0, 0, 0, 0 }, .{ 2130706431, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1937144229, 1358827143, 1675619963, 336321850, 1039424861, 725775950 }, .{ 823210189, 1694514736, 589562417, 490636377, 1201763413, 1507307831 } }, + .quotient_claims = &.{ .{ 480177953, 585220422, 161654645, 1928120233, 1131897607, 624074558 }, .{ 347447321, 1983946608, 1439575948, 1217469681, 155729168, 1777202748 }, .{ 2130706431, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } }, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 2, 9, 9, 9 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 737649916, 0, 0, 0, 0, 0 }, .{ 1337230127, 0, 0, 0, 0, 0 }, .{ 291307415, 0, 0, 0, 0, 0 }, .{ 577076193, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 629449996, 0, 0, 0, 0, 0 }, .{ 495533088, 0, 0, 0, 0, 0 }, .{ 1647968274, 0, 0, 0, 0, 0 }, .{ 1468711970, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 1902880017, 0, 0, 0, 0, 0 }, .{ 724107263, 0, 0, 0, 0, 0 }, .{ 724107263, 0, 0, 0, 0, 0 }, .{ 724107263, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 1178772754, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1022399370, 152362734, 1655407846, 263246936, 1360037635, 889609507 }, .{ 462716215, 891393795, 981059698, 1179939828, 1632028709, 1394846094 } }, + .quotient_claims = &.{ .{ 496746402, 1426137152, 551604881, 1084016933, 40955471, 2013156863 }, .{ 387853853, 2018871850, 373710812, 1564036200, 486053879, 2124230195 }, .{ 1480207384, 370326310, 617337523, 1001114691, 1471344186, 359115288 }, .{ 756100121, 370326310, 617337523, 1001114691, 1471344186, 359115288 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "LocalVanishing/MultiModule" + +// expression: "global" +const system_45_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "a" + .{ .column_claim = 1 }, // col: "lagrange-row0" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, +}; + +const system_45_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "global" + .{ .expression = 2, .cancelled_positions = &.{} }, +}; + +const system_45_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_45_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "global" +const system_45_module_1_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "b" + .{ .column_claim = 1 }, // col: "lagrange-row3" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, +}; + +const system_45_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "global" + .{ .expression = 2, .cancelled_positions = &.{} }, +}; + +const system_45_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_45_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +const system_45_modules = [_]vanishing.Module{ + // module: "modA" + .{ .size = .{ .static = 4 }, .expressions = &system_45_module_0_expressions, .buckets = &system_45_module_0_buckets, .witness_claim_offset = 0 }, + // module: "modB" + .{ .size = .{ .static = 4 }, .expressions = &system_45_module_1_expressions, .buckets = &system_45_module_1_buckets, .witness_claim_offset = 2 }, +}; + +const system_45_round_coin_counts = [_]usize{ 0, 2, 2 }; +const system_45_round_coin_offsets = [_]usize{ 0, 0, 2 }; + +// system: "lv-multi-mod" +const system_45 = vanishing.System{ + .modules = &system_45_modules, + .round_coin_counts = &system_45_round_coin_counts, + .round_coin_offsets = &system_45_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 4, + .dynamic_module_count = 0, + .total_witness_claims = 4, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_45 = VanishingScenario{ + .name = "LocalVanishing/MultiModule", + .system = system_45, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 9, 9, 9 } }, + .{ .public_base = &.{ 9, 9, 9, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 799014909, 0, 0, 0, 0, 0 }, .{ 551477246, 0, 0, 0, 0, 0 }, .{ 266338303, 0, 0, 0, 0, 0 }, .{ 2111905793, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 551477246, 0, 0, 0, 0, 0 }, .{ 266338303, 0, 0, 0, 0, 0 }, .{ 2111905793, 0, 0, 0, 0, 0 }, .{ 799014909, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 394027044, 704600399, 1315562949, 841189271, 68091860, 1392884829 }, .{ 666454696, 158456226, 1984532772, 1563750640, 229179397, 1975941452 }, .{ 498958901, 571822982, 417073808, 1299112904, 1171928233, 1496215771 }, .{ 891540760, 883444750, 190403625, 92399281, 1053511548, 1727715077 } }, + .quotient_claims = &.{ .{ 2032749915, 563781600, 1686410772, 1032608381, 1090475762, 1578962574 }, .{ 429098096, 1941233021, 1086825933, 68924398, 210770591, 1118943698 } }, + .module_sizes = &.{}, + }, + .invalid = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 9, 9, 9 } }, + .{ .public_base = &.{ 9, 9, 9, 7 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 799014909, 0, 0, 0, 0, 0 }, .{ 551477246, 0, 0, 0, 0, 0 }, .{ 266338303, 0, 0, 0, 0, 0 }, .{ 2111905793, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 1069531136, 0, 0, 0, 0, 0 }, .{ 532676608, 0, 0, 0, 0, 0 }, .{ 2126528513, 0, 0, 0, 0, 0 }, .{ 559310438, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1880561919, 1602638379, 1182471751, 598921129, 239689008, 1351139638 }, .{ 1211519632, 1952635502, 1052340046, 1117179004, 2104074321, 323363692 }, .{ 1985361843, 691009021, 1175894523, 1335561002, 949585664, 365019247 }, .{ 1138025516, 719848706, 477405955, 1462925932, 1655913601, 882843593 } }, + .quotient_claims = &.{ .{ 1804236354, 696789751, 1149141792, 1084262301, 177683007, 1776142789 }, .{ 2011314576, 2115001176, 1401964263, 310236187, 551295849, 205692885 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "LogDerivativeSumCompiler/SingleFractionAllOnes" + +// expression: "z-recurrence-b0-k0" +const system_46_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "num" + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 4 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 5 } } }, +}; + +const system_46_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 6, .cancelled_positions = &.{0} }, +}; + +const system_46_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_46_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_46_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_46_module_0_expressions, .buckets = &system_46_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_46_round_coin_counts = [_]usize{ 0, 0, 1, 1 }; +const system_46_round_coin_offsets = [_]usize{ 0, 0, 0, 1 }; + +// system: "lds-ones" +const system_46 = vanishing.System{ + .modules = &system_46_modules, + .round_coin_counts = &system_46_round_coin_counts, + .round_coin_offsets = &system_46_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 3, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_46 = VanishingScenario{ + .name = "LogDerivativeSumCompiler/SingleFractionAllOnes", + .system = system_46, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 3, 5, 7, 9 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 3, 0, 0, 0, 0, 0 }, .{ 8, 0, 0, 0, 0, 0 }, .{ 15, 0, 0, 0, 0, 0 }, .{ 24, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{ + .{ .ext = .{ 24, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 3, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 24, 0, 0, 0, 0, 0 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 6, 0, 0, 0, 0, 0 }, .{ 6, 0, 0, 0, 0, 0 }, .{ 6, 0, 0, 0, 0, 0 }, .{ 6, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 968936244, 144123972, 456243801, 1068767352, 107291942, 1781101219 }, .{ 958856551, 1948117776, 1726383546, 661282934, 691325484, 1428607 }, .{ 864068723, 1849348009, 757739731, 505754973, 1563981193, 628640697 } }, + .quotient_claims = &.{.{ 6, 0, 0, 0, 0, 0 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "LogDerivativeSumCompiler/PartialFilter" + +// expression: "z-recurrence-b0-k0" +const system_47_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "flt" + .{ .column_claim = 1 }, // col: "num" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .column_claim = 3 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 3, 4 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 7 } } }, +}; + +const system_47_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_47_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_47_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_47_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_47_module_0_expressions, .buckets = &system_47_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_47_round_coin_counts = [_]usize{ 0, 0, 1, 1 }; +const system_47_round_coin_offsets = [_]usize{ 0, 0, 0, 1 }; + +// system: "lds-partial" +const system_47 = vanishing.System{ + .modules = &system_47_modules, + .round_coin_counts = &system_47_round_coin_counts, + .round_coin_offsets = &system_47_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 4, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_47 = VanishingScenario{ + .name = "LogDerivativeSumCompiler/PartialFilter", + .system = system_47, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 3, 5, 7, 9 } }, + .{ .public_base = &.{ 1, 0, 1, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 3, 0, 0, 0, 0, 0 }, .{ 3, 0, 0, 0, 0, 0 }, .{ 10, 0, 0, 0, 0, 0 }, .{ 10, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{ + .{ .ext = .{ 10, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 3, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 10, 0, 0, 0, 0, 0 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1065353219, 0, 0, 0, 0, 0 }, .{ 1056997380, 0, 0, 0, 0, 0 }, .{ 1082064898, 0, 0, 0, 0, 0 }, .{ 1056997381, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1008148267, 1441748770, 176210484, 956961056, 755380307, 682243478 }, .{ 836406092, 303678940, 768283508, 1651714342, 1446008700, 752792621 }, .{ 1263493332, 1316145974, 1961232833, 913097712, 1978286650, 2107209435 }, .{ 1174133030, 1122637145, 1463273106, 522220846, 634310799, 750792795 } }, + .quotient_claims = &.{.{ 1264037026, 2005358661, 1418800448, 98504700, 1426254626, 94770128 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "LogDerivativeSumCompiler/AllZeroFilter" + +// expression: "z-recurrence-b0-k0" +const system_48_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "flt" + .{ .column_claim = 1 }, // col: "num" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .column_claim = 3 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 3, 4 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 7 } } }, +}; + +const system_48_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_48_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_48_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_48_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_48_module_0_expressions, .buckets = &system_48_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_48_round_coin_counts = [_]usize{ 0, 0, 1, 1 }; +const system_48_round_coin_offsets = [_]usize{ 0, 0, 0, 1 }; + +// system: "lds-zeros" +const system_48 = vanishing.System{ + .modules = &system_48_modules, + .round_coin_counts = &system_48_round_coin_counts, + .round_coin_offsets = &system_48_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 4, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_48 = VanishingScenario{ + .name = "LogDerivativeSumCompiler/AllZeroFilter", + .system = system_48, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 3, 5, 7, 9 } }, + .{ .public_base = &.{ 0, 0, 0, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 1133963058, 62448266, 991768476, 1906186086, 2089645378, 464149100 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } }, + .quotient_claims = &.{.{ 0, 0, 0, 0, 0, 0 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "LogDerivativeSumCompiler/FilterMasksZeroDenominator" + +// expression: "z-recurrence-b0-k0" +const system_49_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "flt" + .{ .column_claim = 1 }, // col: "num" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .column_claim = 3 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 3, 4 } } }, + .{ .column_claim = 4 }, // col: "den" + .{ .op = .{ .operator = .mul, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 7 } } }, +}; + +const system_49_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_49_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_49_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_49_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_49_module_0_expressions, .buckets = &system_49_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_49_round_coin_counts = [_]usize{ 0, 0, 1, 1 }; +const system_49_round_coin_offsets = [_]usize{ 0, 0, 0, 1 }; + +// system: "lds-maskzero" +const system_49 = vanishing.System{ + .modules = &system_49_modules, + .round_coin_counts = &system_49_round_coin_counts, + .round_coin_offsets = &system_49_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 5, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_49 = VanishingScenario{ + .name = "LogDerivativeSumCompiler/FilterMasksZeroDenominator", + .system = system_49, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 4, 99, 8, 99 } }, + .{ .public_base = &.{ 2, 0, 4, 0 } }, + .{ .public_base = &.{ 1, 0, 1, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 2, 0, 0, 0, 0, 0 }, .{ 2, 0, 0, 0, 0, 0 }, .{ 4, 0, 0, 0, 0, 0 }, .{ 4, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{ + .{ .ext = .{ 4, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 2, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 4, 0, 0, 0, 0, 0 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 2, 0, 0, 0, 0, 0 }, .{ 413614080, 0, 0, 0, 0, 0 }, .{ 1065353270, 0, 0, 0, 0, 0 }, .{ 651739186, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1351430881, 1088266580, 1144010388, 1230494095, 432195130, 899112766 }, .{ 376399689, 1977284262, 1746697313, 219834738, 60185641, 1301379383 }, .{ 257533642, 1882237150, 2075521114, 1351396282, 759270801, 183577109 }, .{ 2040448099, 970069732, 471179367, 1753758091, 988360297, 492967808 }, .{ 2097482198, 1590177016, 1038142388, 294241731, 1182040642, 1477289732 } }, + .quotient_claims = &.{.{ 597550778, 851285320, 602398993, 451939824, 1591540249, 1161581321 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "LogDerivativeSumCompiler/Packing4Fractions" + +const system_50_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "c0" + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 2, 3 } } }, + .{ .column_claim = 1 }, // col: "c1" + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 5, 6 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 7, 8 } } }, + .{ .op = .{ .operator = .add, .operands = &.{ 4, 9 } } }, + .{ .column_claim = 2 }, // col: "c2" + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 11, 12 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 13, 14 } } }, + .{ .op = .{ .operator = .add, .operands = &.{ 10, 15 } } }, + .{ .column_claim = 3 }, // col: "z-b0-k0" + .{ .column_claim = 4 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 17, 18 } } }, + .{ .constant = field.Element.init(1) }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 20, 21 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 22, 23 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 19, 24 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 16, 25 } } }, + .{ .column_claim = 5 }, // col: "c3" + .{ .column_claim = 6 }, // col: "z-b0-k1" + .{ .column_claim = 7 }, // col: "z-b0-k1" + .{ .op = .{ .operator = .sub, .operands = &.{ 28, 29 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 30, 31 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 27, 32 } } }, +}; + +const system_50_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 26, .cancelled_positions = &.{0} }, +}; + +const system_50_module_0_bucket_1_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k1" + .{ .expression = 33, .cancelled_positions = &.{0} }, +}; + +const system_50_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 4, .vanishings = &system_50_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, + .{ .ratio = 1, .vanishings = &system_50_module_0_bucket_1_vanishings, .quotient_claim_offset = 4 }, +}; + +const system_50_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_50_module_0_expressions, .buckets = &system_50_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_50_round_coin_counts = [_]usize{ 0, 0, 1, 1 }; +const system_50_round_coin_offsets = [_]usize{ 0, 0, 0, 1 }; + +// system: "lds-pack" +const system_50 = vanishing.System{ + .modules = &system_50_modules, + .round_coin_counts = &system_50_round_coin_counts, + .round_coin_offsets = &system_50_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 8, + .total_quotient_claims = 5, +}; + +const vanishing_scenario_50 = VanishingScenario{ + .name = "LogDerivativeSumCompiler/Packing4Fractions", + .system = system_50, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 1, 2, 3, 4 } }, + .{ .public_base = &.{ 5, 6, 7, 8 } }, + .{ .public_base = &.{ 9, 10, 11, 12 } }, + .{ .public_base = &.{ 13, 14, 15, 16 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 15, 0, 0, 0, 0, 0 }, .{ 33, 0, 0, 0, 0, 0 }, .{ 54, 0, 0, 0, 0, 0 }, .{ 78, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 13, 0, 0, 0, 0, 0 }, .{ 27, 0, 0, 0, 0, 0 }, .{ 42, 0, 0, 0, 0, 0 }, .{ 58, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{ + .{ .ext = .{ 136, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 15, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 78, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 13, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 58, 0, 0, 0, 0, 0 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1065353236, 0, 0, 0, 0, 0 }, .{ 1065353236, 0, 0, 0, 0, 0 }, .{ 1065353236, 0, 0, 0, 0, 0 }, .{ 1065353236, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 1065353231, 0, 0, 0, 0, 0 }, .{ 1065353231, 0, 0, 0, 0, 0 }, .{ 1065353231, 0, 0, 0, 0, 0 }, .{ 1065353231, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 802909296, 101534691, 210271426, 596799260, 347038997, 1966325829 }, .{ 802909300, 101534691, 210271426, 596799260, 347038997, 1966325829 }, .{ 802909304, 101534691, 210271426, 596799260, 347038997, 1966325829 }, .{ 588755178, 189818788, 1502030661, 1958177164, 673424258, 813761679 }, .{ 497842038, 202069585, 337116971, 470785904, 1139254438, 1345094394 }, .{ 802909308, 101534691, 210271426, 596799260, 347038997, 1966325829 }, .{ 227406795, 1585785935, 52141862, 1875942413, 159844818, 1086915494 }, .{ 164597801, 1228159791, 2121761007, 630319721, 1807492254, 2099196936 } }, + .quotient_claims = &.{ .{ 1065353236, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 1065353231, 0, 0, 0, 0, 0 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "LogDerivativeSumCompiler/MultiModuleBucketing" + +// expression: "z-recurrence-b0-k0" +const system_51_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "cA" + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 4 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 5 } } }, +}; + +const system_51_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 6, .cancelled_positions = &.{0} }, +}; + +const system_51_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_51_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b1-k0" +const system_51_module_1_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "fB" + .{ .column_claim = 1 }, // col: "cB" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 2 }, // col: "z-b1-k0" + .{ .column_claim = 3 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 3, 4 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 7 } } }, +}; + +const system_51_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_51_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_51_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +const system_51_modules = [_]vanishing.Module{ + // module: "mA" + .{ .size = .{ .static = 4 }, .expressions = &system_51_module_0_expressions, .buckets = &system_51_module_0_buckets, .witness_claim_offset = 0 }, + // module: "mB" + .{ .size = .{ .static = 4 }, .expressions = &system_51_module_1_expressions, .buckets = &system_51_module_1_buckets, .witness_claim_offset = 3 }, +}; + +const system_51_round_coin_counts = [_]usize{ 0, 0, 2, 2 }; +const system_51_round_coin_offsets = [_]usize{ 0, 0, 0, 2 }; + +// system: "lds-multi-mod" +const system_51 = vanishing.System{ + .modules = &system_51_modules, + .round_coin_counts = &system_51_round_coin_counts, + .round_coin_offsets = &system_51_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 4, + .dynamic_module_count = 0, + .total_witness_claims = 7, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_51 = VanishingScenario{ + .name = "LogDerivativeSumCompiler/MultiModuleBucketing", + .system = system_51, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 1, 2, 3, 4 } }, + .{ .public_base = &.{ 5, 6, 7, 8 } }, + .{ .public_base = &.{ 1, 1, 0, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1, 0, 0, 0, 0, 0 }, .{ 3, 0, 0, 0, 0, 0 }, .{ 6, 0, 0, 0, 0, 0 }, .{ 10, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 5, 0, 0, 0, 0, 0 }, .{ 11, 0, 0, 0, 0, 0 }, .{ 11, 0, 0, 0, 0, 0 }, .{ 11, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{ + .{ .ext = .{ 21, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 1, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 10, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 5, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 11, 0, 0, 0, 0, 0 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1065353219, 0, 0, 0, 0, 0 }, .{ 1065353219, 0, 0, 0, 0, 0 }, .{ 1065353219, 0, 0, 0, 0, 0 }, .{ 1065353219, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 532676611, 0, 0, 0, 0, 0 }, .{ 1073709059, 0, 0, 0, 0, 0 }, .{ 528498692, 0, 0, 0, 0, 0 }, .{ 2126528517, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1850454325, 849411709, 1708559337, 1981752658, 1617523214, 298550220 }, .{ 200472685, 1385742001, 1607939793, 59859768, 2127806168, 1022134712 }, .{ 476707089, 1252454222, 1675249155, 966368510, 886222185, 361553189 }, .{ 1400663620, 1875512648, 1112427275, 550760263, 2077181948, 1955744084 }, .{ 191683327, 2119538840, 305174828, 830850416, 272896047, 128773227 }, .{ 1256210368, 1753311176, 1172317932, 1182219377, 2088086571, 1013317715 }, .{ 993340099, 1908557967, 675944150, 1905338344, 363766772, 36456379 } }, + .quotient_claims = &.{ .{ 1065353219, 0, 0, 0, 0, 0 }, .{ 566231818, 588605018, 1292526225, 506615929, 371725082, 256958535 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "LogDerivativeSumCompiler/ConditionalLookupShape" + +// expression: "z-recurrence-b0-k0" +const system_52_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "filterS" + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 3, 4 } } }, + .{ .constant = field.Element.init(7) }, + .{ .column_claim = 3 }, // col: "S" + .{ .op = .{ .operator = .add, .operands = &.{ 6, 7 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 5, 8 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 9 } } }, +}; + +const system_52_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 10, .cancelled_positions = &.{0} }, +}; + +const system_52_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_52_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b1-k0" +const system_52_module_1_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .column_claim = 2 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .constant = field.Element.init(7) }, + .{ .column_claim = 3 }, // col: "T" + .{ .op = .{ .operator = .add, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 7 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 8 } } }, +}; + +const system_52_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 9, .cancelled_positions = &.{0} }, +}; + +const system_52_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_52_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +const system_52_modules = [_]vanishing.Module{ + // module: "mS" + .{ .size = .{ .static = 4 }, .expressions = &system_52_module_0_expressions, .buckets = &system_52_module_0_buckets, .witness_claim_offset = 0 }, + // module: "mT" + .{ .size = .{ .static = 2 }, .expressions = &system_52_module_1_expressions, .buckets = &system_52_module_1_buckets, .witness_claim_offset = 4 }, +}; + +const system_52_round_coin_counts = [_]usize{ 0, 0, 2, 2 }; +const system_52_round_coin_offsets = [_]usize{ 0, 0, 0, 2 }; + +// system: "lds-cond" +const system_52 = vanishing.System{ + .modules = &system_52_modules, + .round_coin_counts = &system_52_round_coin_counts, + .round_coin_offsets = &system_52_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 4, + .dynamic_module_count = 0, + .total_witness_claims = 8, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_52 = VanishingScenario{ + .name = "LogDerivativeSumCompiler/ConditionalLookupShape", + .system = system_52, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 10, 10, 20, 99 } }, + .{ .public_base = &.{ 1, 1, 1, 0 } }, + .{ .public_base = &.{ 10, 20 } }, + .{ .public_base = &.{ 2, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1880035088, 0, 0, 0, 0, 0 }, .{ 1629363743, 0, 0, 0, 0, 0 }, .{ 524553000, 0, 0, 0, 0, 0 }, .{ 524553000, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 501342690, 0, 0, 0, 0, 0 }, .{ 1606153433, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 1880035088, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 524553000, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 501342690, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 1606153433, 0, 0, 0, 0, 0 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 98643817, 0, 0, 0, 0, 0 }, .{ 328184496, 0, 0, 0, 0, 0 }, .{ 1621531228, 0, 0, 0, 0, 0 }, .{ 82346895, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 1933418799, 0, 0, 0, 0, 0 }, .{ 197287631, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1081754075, 1010341656, 249196489, 771269609, 906883951, 193907525 }, .{ 691510501, 830026357, 433868551, 218709983, 1997097011, 445604302 }, .{ 245525179, 1472705653, 1860973460, 1305099651, 1721226865, 1880159338 }, .{ 1961203931, 1969384191, 487470857, 810524362, 2014127984, 421060926 }, .{ 910500362, 1484511564, 1011249112, 392301922, 1068579437, 1975091016 }, .{ 1008555244, 291727069, 1300094520, 1277170550, 907642600, 1020132156 }, .{ 1098940879, 1838979364, 830611913, 853535883, 1223063833, 1110574277 }, .{ 1548528575, 69829391, 541041045, 338393646, 2098444228, 1556154170 } }, + .quotient_claims = &.{ .{ 122189837, 1674092279, 801485207, 1701019454, 633607522, 279711890 }, .{ 613425040, 786564257, 216706602, 2118173335, 553600268, 1678495828 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "LogDerivativeSumCompiler/ManyFractions" + +const system_53_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "c0" + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 2, 3 } } }, + .{ .column_claim = 1 }, // col: "c1" + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 5, 6 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 7, 8 } } }, + .{ .op = .{ .operator = .add, .operands = &.{ 4, 9 } } }, + .{ .column_claim = 2 }, // col: "c2" + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 11, 12 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 13, 14 } } }, + .{ .op = .{ .operator = .add, .operands = &.{ 10, 15 } } }, + .{ .column_claim = 3 }, // col: "z-b0-k0" + .{ .column_claim = 4 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 17, 18 } } }, + .{ .constant = field.Element.init(1) }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 20, 21 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 22, 23 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 19, 24 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 16, 25 } } }, + .{ .column_claim = 5 }, // col: "c3" + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 27, 28 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 29, 30 } } }, + .{ .column_claim = 6 }, // col: "c4" + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 32, 33 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 34, 35 } } }, + .{ .op = .{ .operator = .add, .operands = &.{ 31, 36 } } }, + .{ .column_claim = 7 }, // col: "c5" + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 38, 39 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 40, 41 } } }, + .{ .op = .{ .operator = .add, .operands = &.{ 37, 42 } } }, + .{ .column_claim = 8 }, // col: "z-b0-k1" + .{ .column_claim = 9 }, // col: "z-b0-k1" + .{ .op = .{ .operator = .sub, .operands = &.{ 44, 45 } } }, + .{ .constant = field.Element.init(1) }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 47, 48 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 49, 50 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 46, 51 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 43, 52 } } }, + .{ .column_claim = 10 }, // col: "c6" + .{ .column_claim = 11 }, // col: "z-b0-k2" + .{ .column_claim = 12 }, // col: "z-b0-k2" + .{ .op = .{ .operator = .sub, .operands = &.{ 55, 56 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 57, 58 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 54, 59 } } }, +}; + +const system_53_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 26, .cancelled_positions = &.{0} }, + // expression: "z-recurrence-b0-k1" + .{ .expression = 53, .cancelled_positions = &.{0} }, +}; + +const system_53_module_0_bucket_1_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k2" + .{ .expression = 60, .cancelled_positions = &.{0} }, +}; + +const system_53_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 4, .vanishings = &system_53_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, + .{ .ratio = 1, .vanishings = &system_53_module_0_bucket_1_vanishings, .quotient_claim_offset = 4 }, +}; + +const system_53_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_53_module_0_expressions, .buckets = &system_53_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_53_round_coin_counts = [_]usize{ 0, 0, 1, 1 }; +const system_53_round_coin_offsets = [_]usize{ 0, 0, 0, 1 }; + +// system: "lds-many" +const system_53 = vanishing.System{ + .modules = &system_53_modules, + .round_coin_counts = &system_53_round_coin_counts, + .round_coin_offsets = &system_53_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 13, + .total_quotient_claims = 5, +}; + +const vanishing_scenario_53 = VanishingScenario{ + .name = "LogDerivativeSumCompiler/ManyFractions", + .system = system_53, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 1, 2, 3, 4 } }, + .{ .public_base = &.{ 1, 2, 3, 4 } }, + .{ .public_base = &.{ 1, 2, 3, 4 } }, + .{ .public_base = &.{ 1, 2, 3, 4 } }, + .{ .public_base = &.{ 1, 2, 3, 4 } }, + .{ .public_base = &.{ 1, 2, 3, 4 } }, + .{ .public_base = &.{ 1, 2, 3, 4 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 3, 0, 0, 0, 0, 0 }, .{ 9, 0, 0, 0, 0, 0 }, .{ 18, 0, 0, 0, 0, 0 }, .{ 30, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 3, 0, 0, 0, 0, 0 }, .{ 9, 0, 0, 0, 0, 0 }, .{ 18, 0, 0, 0, 0, 0 }, .{ 30, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 1, 0, 0, 0, 0, 0 }, .{ 3, 0, 0, 0, 0, 0 }, .{ 6, 0, 0, 0, 0, 0 }, .{ 10, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{ + .{ .ext = .{ 70, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 3, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 30, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 3, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 30, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 1, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 10, 0, 0, 0, 0, 0 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 214663723, 742365710, 159811028, 1154265162, 1932235469, 1882530292 }, .{ 214663723, 742365710, 159811028, 1154265162, 1932235469, 1882530292 }, .{ 214663723, 742365710, 159811028, 1154265162, 1932235469, 1882530292 }, .{ 214663723, 742365710, 159811028, 1154265162, 1932235469, 1882530292 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 1065353219, 0, 0, 0, 0, 0 }, .{ 1065353219, 0, 0, 0, 0, 0 }, .{ 1065353219, 0, 0, 0, 0, 0 }, .{ 1065353219, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 2033180136, 1217621384, 161141103, 2058367462, 252888582, 1136828848 }, .{ 2033180136, 1217621384, 161141103, 2058367462, 252888582, 1136828848 }, .{ 2033180136, 1217621384, 161141103, 2058367462, 252888582, 1136828848 }, .{ 1973263677, 25141681, 1137328913, 1491343105, 858151827, 1026474511 }, .{ 1774686269, 1368050913, 1542500448, 1904676086, 1191860206, 1298003250 }, .{ 2033180136, 1217621384, 161141103, 2058367462, 252888582, 1136828848 }, .{ 2033180136, 1217621384, 161141103, 2058367462, 252888582, 1136828848 }, .{ 2033180136, 1217621384, 161141103, 2058367462, 252888582, 1136828848 }, .{ 1973263677, 25141681, 1137328913, 1491343105, 858151827, 1026474511 }, .{ 1774686269, 1368050913, 1542500448, 1904676086, 1191860206, 1298003250 }, .{ 2033180136, 1217621384, 161141103, 2058367462, 252888582, 1136828848 }, .{ 657754559, 718616038, 1799580593, 1207349846, 286050609, 1052393648 }, .{ 2012033045, 456016971, 514166816, 2055362984, 1107522213, 432667750 } }, + .quotient_claims = &.{ .{ 214663723, 742365710, 159811028, 1154265162, 1932235469, 1882530292 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 1065353219, 0, 0, 0, 0, 0 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "LogDerivativeSumCompiler/SizeTwoModule" + +// expression: "z-recurrence-b0-k0" +const system_54_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "num" + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 4 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 5 } } }, +}; + +const system_54_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 6, .cancelled_positions = &.{0} }, +}; + +const system_54_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_54_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_54_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 2 }, .expressions = &system_54_module_0_expressions, .buckets = &system_54_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_54_round_coin_counts = [_]usize{ 0, 0, 1, 1 }; +const system_54_round_coin_offsets = [_]usize{ 0, 0, 0, 1 }; + +// system: "lds-size2" +const system_54 = vanishing.System{ + .modules = &system_54_modules, + .round_coin_counts = &system_54_round_coin_counts, + .round_coin_offsets = &system_54_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 3, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_54 = VanishingScenario{ + .name = "LogDerivativeSumCompiler/SizeTwoModule", + .system = system_54, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 3, 5 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 3, 0, 0, 0, 0, 0 }, .{ 8, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{ + .{ .ext = .{ 8, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 3, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 8, 0, 0, 0, 0, 0 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 4, 0, 0, 0, 0, 0 }, .{ 4, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1434098868, 407194453, 747485902, 1795009709, 961691090, 397534366 }, .{ 389187516, 2083339349, 1868714755, 1291464623, 273521292, 993835915 }, .{ 1741518928, 47367084, 261991678, 839241810, 1857185141, 1136870518 } }, + .quotient_claims = &.{.{ 4, 0, 0, 0, 0, 0 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "LogDerivativeSumCompiler/MultipleQueries" + +const system_55_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "c1" + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 4 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 5 } } }, + .{ .column_claim = 3 }, // col: "c2" + .{ .column_claim = 4 }, // col: "z-b0-k0" + .{ .column_claim = 5 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 8, 9 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 10, 11 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 7, 12 } } }, +}; + +const system_55_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 6, .cancelled_positions = &.{0} }, + // expression: "z-recurrence-b0-k0" + .{ .expression = 13, .cancelled_positions = &.{0} }, +}; + +const system_55_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_55_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_55_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_55_module_0_expressions, .buckets = &system_55_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_55_round_coin_counts = [_]usize{ 0, 0, 1, 1 }; +const system_55_round_coin_offsets = [_]usize{ 0, 0, 0, 1 }; + +// system: "lds-multi-q" +const system_55 = vanishing.System{ + .modules = &system_55_modules, + .round_coin_counts = &system_55_round_coin_counts, + .round_coin_offsets = &system_55_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 6, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_55 = VanishingScenario{ + .name = "LogDerivativeSumCompiler/MultipleQueries", + .system = system_55, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 1, 2, 3, 4 } }, + .{ .public_base = &.{ 5, 6, 7, 8 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1, 0, 0, 0, 0, 0 }, .{ 3, 0, 0, 0, 0, 0 }, .{ 6, 0, 0, 0, 0, 0 }, .{ 10, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 5, 0, 0, 0, 0, 0 }, .{ 11, 0, 0, 0, 0, 0 }, .{ 18, 0, 0, 0, 0, 0 }, .{ 26, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{ + .{ .ext = .{ 10, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 26, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 1, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 10, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 5, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 26, 0, 0, 0, 0, 0 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1013184717, 1628734679, 1113218140, 675201765, 2104978279, 297891497 }, .{ 1013184717, 1628734679, 1113218140, 675201765, 2104978279, 297891497 }, .{ 1013184717, 1628734679, 1113218140, 675201765, 2104978279, 297891497 }, .{ 1013184717, 1628734679, 1113218140, 675201765, 2104978279, 297891497 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 543713758, 548577236, 405694874, 571151148, 1806703592, 929749404 }, .{ 56886728, 927767989, 1322536404, 1645151028, 769759849, 97000440 }, .{ 480701474, 1675535693, 1154652844, 301162154, 824960493, 1954005842 }, .{ 543713762, 548577236, 405694874, 571151148, 1806703592, 929749404 }, .{ 101035327, 991370500, 814609467, 1799049187, 1604454918, 1685291623 }, .{ 368330529, 1682583675, 1453365296, 1775367671, 2081854620, 1182844129 } }, + .quotient_claims = &.{.{ 1013184717, 1628734679, 1113218140, 675201765, 2104978279, 297891497 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "LogDerivativeSumCompiler/VectorDenominator" + +// expression: "z-recurrence-b0-k0" +const system_56_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "num" + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .column_claim = 3 }, // col: "den" + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 4 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 5 } } }, +}; + +const system_56_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 6, .cancelled_positions = &.{0} }, +}; + +const system_56_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_56_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_56_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_56_module_0_expressions, .buckets = &system_56_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_56_round_coin_counts = [_]usize{ 0, 0, 1, 1 }; +const system_56_round_coin_offsets = [_]usize{ 0, 0, 0, 1 }; + +// system: "lds-vec-den" +const system_56 = vanishing.System{ + .modules = &system_56_modules, + .round_coin_counts = &system_56_round_coin_counts, + .round_coin_offsets = &system_56_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 4, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_56 = VanishingScenario{ + .name = "LogDerivativeSumCompiler/VectorDenominator", + .system = system_56, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 6, 10, 15, 21 } }, + .{ .public_base = &.{ 2, 5, 3, 7 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 3, 0, 0, 0, 0, 0 }, .{ 5, 0, 0, 0, 0, 0 }, .{ 10, 0, 0, 0, 0, 0 }, .{ 13, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{ + .{ .ext = .{ 13, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 3, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 13, 0, 0, 0, 0, 0 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1065353223, 0, 0, 0, 0, 0 }, .{ 2109816850, 0, 0, 0, 0, 0 }, .{ 1589673992, 0, 0, 0, 0, 0 }, .{ 1627275286, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 871955516, 21005068, 1973397654, 1333597572, 1085379543, 2081764393 }, .{ 1627493386, 505539626, 1852551870, 558753967, 1134357877, 1996343488 }, .{ 2105812676, 284264574, 1448252167, 95365573, 2057553583, 725816628 }, .{ 1452159406, 900779355, 210992059, 1381678484, 1880680759, 238291691 } }, + .quotient_claims = &.{.{ 455937306, 1866453309, 47631833, 1865703095, 2024525063, 703886066 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "LogDerivativeSumCompiler/AllFiltersOnesPacked" + +// expression: "z-recurrence-b0-k0" +const system_57_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "flt" + .{ .column_claim = 1 }, // col: "n1" + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 2, 3 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 5 } } }, + .{ .column_claim = 0 }, // col: "flt" + .{ .column_claim = 2 }, // col: "n2" + .{ .op = .{ .operator = .mul, .operands = &.{ 7, 8 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 9, 10 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 11, 12 } } }, + .{ .op = .{ .operator = .add, .operands = &.{ 6, 13 } } }, + .{ .column_claim = 0 }, // col: "flt" + .{ .column_claim = 3 }, // col: "n3" + .{ .op = .{ .operator = .mul, .operands = &.{ 15, 16 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 17, 18 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 19, 20 } } }, + .{ .op = .{ .operator = .add, .operands = &.{ 14, 21 } } }, + .{ .column_claim = 4 }, // col: "z-b0-k0" + .{ .column_claim = 5 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 23, 24 } } }, + .{ .constant = field.Element.init(1) }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 26, 27 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 28, 29 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 25, 30 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 22, 31 } } }, +}; + +const system_57_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 32, .cancelled_positions = &.{0} }, +}; + +const system_57_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 4, .vanishings = &system_57_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_57_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_57_module_0_expressions, .buckets = &system_57_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_57_round_coin_counts = [_]usize{ 0, 0, 1, 1 }; +const system_57_round_coin_offsets = [_]usize{ 0, 0, 0, 1 }; + +// system: "lds-ones-pack" +const system_57 = vanishing.System{ + .modules = &system_57_modules, + .round_coin_counts = &system_57_round_coin_counts, + .round_coin_offsets = &system_57_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 2, + .dynamic_module_count = 0, + .total_witness_claims = 6, + .total_quotient_claims = 4, +}; + +const vanishing_scenario_57 = VanishingScenario{ + .name = "LogDerivativeSumCompiler/AllFiltersOnesPacked", + .system = system_57, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 1, 1, 1, 1 } }, + .{ .public_base = &.{ 2, 2, 2, 2 } }, + .{ .public_base = &.{ 3, 3, 3, 3 } }, + .{ .public_base = &.{ 1, 1, 1, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 6, 0, 0, 0, 0, 0 }, .{ 12, 0, 0, 0, 0, 0 }, .{ 18, 0, 0, 0, 0, 0 }, .{ 24, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{ + .{ .ext = .{ 24, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 6, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 24, 0, 0, 0, 0, 0 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 6, 0, 0, 0, 0, 0 }, .{ 6, 0, 0, 0, 0, 0 }, .{ 6, 0, 0, 0, 0, 0 }, .{ 6, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1, 0, 0, 0, 0, 0 }, .{ 1, 0, 0, 0, 0, 0 }, .{ 2, 0, 0, 0, 0, 0 }, .{ 3, 0, 0, 0, 0, 0 }, .{ 668438814, 372625012, 1025070121, 575730570, 970251087, 1071334643 }, .{ 904609868, 1694084141, 1834073163, 287832482, 1956586743, 1016554636 } }, + .quotient_claims = &.{ .{ 6, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Lookup/SingleColumnNoFilters" + +// expression: "z-recurrence-b0-k0" +const system_58_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "T" + .{ .op = .{ .operator = .add, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 7 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 8 } } }, +}; + +const system_58_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 9, .cancelled_positions = &.{0} }, +}; + +const system_58_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_58_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b1-k0" +const system_58_module_1_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b1-k0" + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 2 }, // col: "S" + .{ .op = .{ .operator = .add, .operands = &.{ 4, 5 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 7 } } }, +}; + +const system_58_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_58_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_58_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +const system_58_modules = [_]vanishing.Module{ + // module: "modT" + .{ .size = .{ .static = 4 }, .expressions = &system_58_module_0_expressions, .buckets = &system_58_module_0_buckets, .witness_claim_offset = 0 }, + // module: "modS" + .{ .size = .{ .static = 4 }, .expressions = &system_58_module_1_expressions, .buckets = &system_58_module_1_buckets, .witness_claim_offset = 4 }, +}; + +const system_58_round_coin_counts = [_]usize{ 0, 1, 0, 2, 2 }; +const system_58_round_coin_offsets = [_]usize{ 0, 0, 1, 1, 3 }; + +// system: "lk-simple" +const system_58 = vanishing.System{ + .modules = &system_58_modules, + .round_coin_counts = &system_58_round_coin_counts, + .round_coin_offsets = &system_58_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 5, + .dynamic_module_count = 0, + .total_witness_claims = 7, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_58 = VanishingScenario{ + .name = "Lookup/SingleColumnNoFilters", + .system = system_58, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 10, 20, 30, 40 } }, + .{ .public_base = &.{ 10, 20, 10, 30 } }, + .{ .public_base = &.{ 2, 1, 1, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1167828889, 908643682, 658149589, 1365637472, 1571881781, 1532215807 }, .{ 2031182111, 1656974588, 2045272732, 377020096, 1477642298, 1015565650 }, .{ 1046859959, 602916612, 672277609, 760123764, 1596861927, 1889462564 }, .{ 1046859959, 602916612, 672277609, 760123764, 1596861927, 1889462564 } } }, + .{ .public_ext = &.{ .{ 481438772, 1676384592, 736278422, 1447887697, 279412326, 299245313 }, .{ 1748791983, 928053686, 1479861712, 305798640, 373651809, 815895470 }, .{ 99524322, 473731845, 85433701, 1753686337, 653064135, 1115140783 }, .{ 1083846474, 1527789821, 1458428824, 1370582669, 533844506, 241243869 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 1167828889, 908643682, 658149589, 1365637472, 1571881781, 1532215807 } }, + .{ .ext = .{ 1046859959, 602916612, 672277609, 760123764, 1596861927, 1889462564 } }, + .{ .ext = .{ 481438772, 1676384592, 736278422, 1447887697, 279412326, 299245313 } }, + .{ .ext = .{ 1083846474, 1527789821, 1458428824, 1370582669, 533844506, 241243869 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 632521271, 1268756182, 201108108, 556025100, 704853779, 118200472 }, .{ 863212290, 1276151417, 1968154362, 9291998, 141479106, 1936526610 }, .{ 1233107261, 906580414, 1537861788, 264947502, 609383810, 2001649002 }, .{ 1532572040, 809924853, 554288608, 1300441833, 674989738, 205036782 } } }, + .{ .public_ext = &.{ .{ 1498185162, 861950251, 1929598325, 1574681333, 1425852654, 2012505961 }, .{ 45311670, 841168047, 1420059197, 1288793559, 1757293631, 614914711 }, .{ 1416673723, 751772303, 842978409, 832105745, 81255049, 1695227851 }, .{ 1301242315, 1806522265, 68776935, 565832229, 997011532, 2069470776 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 330204177, 1746814591, 102337572, 2112661808, 529492367, 876894337 }, .{ 2040575252, 879089396, 2023668384, 1093017237, 1622829930, 194258677 }, .{ 491844691, 1254427001, 1082290494, 1983082617, 2102823806, 689468712 }, .{ 523422506, 1979924320, 1822190155, 1142094429, 1300172961, 1253538220 }, .{ 631862574, 1156540215, 707891233, 1174586170, 1016536939, 1115686781 }, .{ 388946237, 216454215, 954911749, 1662524522, 1452572177, 1594169601 }, .{ 929329780, 893075462, 757050607, 2000187313, 1113124504, 2096711152 } }, + .quotient_claims = &.{ .{ 1985670035, 1737293058, 695162779, 900207283, 701960615, 1313262606 }, .{ 4962341, 632827347, 916994485, 423708261, 2072320924, 30754973 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Lookup/FilterOnIncluded" + +// expression: "z-recurrence-b0-k0" +const system_59_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "T" + .{ .op = .{ .operator = .add, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 7 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 8 } } }, +}; + +const system_59_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 9, .cancelled_positions = &.{0} }, +}; + +const system_59_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_59_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b1-k0" +const system_59_module_1_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "filterS" + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .column_claim = 2 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 3, 4 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "S" + .{ .op = .{ .operator = .add, .operands = &.{ 6, 7 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 5, 8 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 9 } } }, +}; + +const system_59_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 10, .cancelled_positions = &.{0} }, +}; + +const system_59_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_59_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +const system_59_modules = [_]vanishing.Module{ + // module: "modT" + .{ .size = .{ .static = 2 }, .expressions = &system_59_module_0_expressions, .buckets = &system_59_module_0_buckets, .witness_claim_offset = 0 }, + // module: "modS" + .{ .size = .{ .static = 4 }, .expressions = &system_59_module_1_expressions, .buckets = &system_59_module_1_buckets, .witness_claim_offset = 4 }, +}; + +const system_59_round_coin_counts = [_]usize{ 0, 1, 0, 2, 2 }; +const system_59_round_coin_offsets = [_]usize{ 0, 0, 1, 1, 3 }; + +// system: "lk-filterA" +const system_59 = vanishing.System{ + .modules = &system_59_modules, + .round_coin_counts = &system_59_round_coin_counts, + .round_coin_offsets = &system_59_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 5, + .dynamic_module_count = 0, + .total_witness_claims = 8, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_59 = VanishingScenario{ + .name = "Lookup/FilterOnIncluded", + .system = system_59, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 10, 20 } }, + .{ .public_base = &.{ 10, 99, 20, 99 } }, + .{ .public_base = &.{ 1, 0, 1, 0 } }, + .{ .public_base = &.{ 1, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 2072438896, 1107449535, 226207115, 1836686127, 522062591, 1482937588 }, .{ 1174560763, 1026307133, 1640854896, 608783717, 1320723891, 541088532 } } }, + .{ .public_ext = &.{ .{ 58267537, 1023256898, 1904499318, 294020306, 1608643842, 647768845 }, .{ 58267537, 1023256898, 1904499318, 294020306, 1608643842, 647768845 }, .{ 956145670, 1104399300, 489851537, 1521922716, 809982542, 1589617901 }, .{ 956145670, 1104399300, 489851537, 1521922716, 809982542, 1589617901 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 2072438896, 1107449535, 226207115, 1836686127, 522062591, 1482937588 } }, + .{ .ext = .{ 1174560763, 1026307133, 1640854896, 608783717, 1320723891, 541088532 } }, + .{ .ext = .{ 58267537, 1023256898, 1904499318, 294020306, 1608643842, 647768845 } }, + .{ .ext = .{ 956145670, 1104399300, 489851537, 1521922716, 809982542, 1589617901 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 227977798, 405712010, 1449586827, 1878099184, 268106366, 447832414 }, .{ 1902728633, 1724994423, 681119606, 252607249, 1862600067, 1682874019 } } }, + .{ .public_ext = &.{ .{ 2016717534, 1927850428, 340559803, 1191656841, 1996653250, 1906790226 }, .{ 881071012, 80846316, 598077400, 1595921997, 216162113, 624132668 }, .{ 1935165224, 1259143992, 1205013505, 1443152356, 1851284471, 1373594289 }, .{ 1559165531, 993572130, 2117762158, 30681672, 197313032, 356895683 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1, 0, 0, 0, 0, 0 }, .{ 1137101386, 1103229940, 645937271, 1910853172, 1386491810, 1635055529 }, .{ 2109898273, 1030526728, 1221124740, 534616672, 456294672, 388970591 }, .{ 1403910092, 345933019, 528695518, 413920782, 1626464857, 660861294 }, .{ 823775979, 618403578, 327788483, 97073875, 1808915363, 437338275 }, .{ 1351110774, 1783481892, 484777759, 953803723, 183002689, 1173476142 }, .{ 1908013121, 497330899, 593895999, 2092498982, 1069045807, 1764467052 }, .{ 661429120, 1244859874, 783193944, 431437891, 1838620170, 2043147680 } }, + .quotient_claims = &.{ .{ 1528134863, 363516060, 1385475521, 489063201, 389572824, 1969011824 }, .{ 702891393, 1571916773, 1853709551, 150464482, 1746899932, 1299241305 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Lookup/FilterOnIncluding" + +// expression: "z-recurrence-b0-k0" +const system_60_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .coin_value = 1 }, // coin: "alpha" + .{ .column_claim = 3 }, // col: "T" + .{ .op = .{ .operator = .mul, .operands = &.{ 6, 7 } } }, + .{ .column_claim = 4 }, // col: "filterT" + .{ .op = .{ .operator = .add, .operands = &.{ 8, 9 } } }, + .{ .op = .{ .operator = .add, .operands = &.{ 5, 10 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 11 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 12 } } }, +}; + +const system_60_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 13, .cancelled_positions = &.{0} }, +}; + +const system_60_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_60_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b1-k0" +const system_60_module_1_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b1-k0" + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .coin_value = 1 }, // coin: "alpha" + .{ .column_claim = 2 }, // col: "S" + .{ .op = .{ .operator = .mul, .operands = &.{ 5, 6 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .add, .operands = &.{ 7, 8 } } }, + .{ .op = .{ .operator = .add, .operands = &.{ 4, 9 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 10 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 11 } } }, +}; + +const system_60_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 12, .cancelled_positions = &.{0} }, +}; + +const system_60_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_60_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +const system_60_modules = [_]vanishing.Module{ + // module: "modT" + .{ .size = .{ .static = 4 }, .expressions = &system_60_module_0_expressions, .buckets = &system_60_module_0_buckets, .witness_claim_offset = 0 }, + // module: "modS" + .{ .size = .{ .static = 4 }, .expressions = &system_60_module_1_expressions, .buckets = &system_60_module_1_buckets, .witness_claim_offset = 5 }, +}; + +const system_60_round_coin_counts = [_]usize{ 0, 2, 0, 2, 2 }; +const system_60_round_coin_offsets = [_]usize{ 0, 0, 2, 2, 4 }; + +// system: "lk-filterT" +const system_60 = vanishing.System{ + .modules = &system_60_modules, + .round_coin_counts = &system_60_round_coin_counts, + .round_coin_offsets = &system_60_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 6, + .dynamic_module_count = 0, + .total_witness_claims = 8, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_60 = VanishingScenario{ + .name = "Lookup/FilterOnIncluding", + .system = system_60, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 10, 999, 20, 999 } }, + .{ .public_base = &.{ 1, 0, 1, 0 } }, + .{ .public_base = &.{ 10, 20, 10, 20 } }, + .{ .public_base = &.{ 2, 0, 2, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1548344877, 41739259, 1669895060, 2108340605, 1881498562, 1210856971 }, .{ 1548344877, 41739259, 1669895060, 2108340605, 1881498562, 1210856971 }, .{ 1197184163, 1476249875, 1828461918, 771600152, 1560170919, 181936004 }, .{ 1197184163, 1476249875, 1828461918, 771600152, 1560170919, 181936004 } } }, + .{ .public_ext = &.{ .{ 291180778, 1044483587, 1295758903, 11182914, 1189957152, 459924731 }, .{ 466761135, 327228279, 1216475474, 1744906357, 285267757, 2039738431 }, .{ 757941913, 1371711866, 381527944, 1756089271, 1475224909, 368956729 }, .{ 933522270, 654456558, 302244515, 1359106281, 570535514, 1948770429 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 1548344877, 41739259, 1669895060, 2108340605, 1881498562, 1210856971 } }, + .{ .ext = .{ 1197184163, 1476249875, 1828461918, 771600152, 1560170919, 181936004 } }, + .{ .ext = .{ 291180778, 1044483587, 1295758903, 11182914, 1189957152, 459924731 } }, + .{ .ext = .{ 933522270, 654456558, 302244515, 1359106281, 570535514, 1948770429 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 873102194, 1953777037, 234326073, 487468985, 102194872, 834546739 }, .{ 433448434, 1636384081, 922118251, 1941695182, 774654166, 277078159 }, .{ 1578919021, 1621135755, 1407308643, 1604858216, 1209751277, 334626009 }, .{ 1375943213, 1180822426, 1697659899, 227390483, 44106118, 684455526 } } }, + .{ .public_ext = &.{ .{ 1257604239, 176929396, 1896380360, 1643237448, 2028511561, 1296159694 }, .{ 1371975662, 1053547976, 584478421, 1791143246, 1427713120, 1961255307 }, .{ 749418728, 1599798652, 1557028775, 774034917, 1110393894, 1629531032 }, .{ 882414241, 1431136842, 223525310, 52997255, 1825500724, 1505173266 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 761637613, 428676261, 1369954621, 1608699624, 2015446100, 1061901202 }, .{ 75795132, 1411355211, 551849333, 1391881429, 38436800, 1348734626 }, .{ 177610363, 1778778035, 276596899, 525410815, 1778548457, 1670517221 }, .{ 141673220, 1762182535, 2082837190, 157823386, 1238340514, 1594932730 }, .{ 1446172023, 1279691347, 1750330527, 804349812, 1007723050, 530950601 }, .{ 1952603836, 1839617444, 465222977, 2076016310, 1219136616, 294462024 }, .{ 1254688729, 863354854, 1164992307, 682918190, 70918431, 435884917 }, .{ 1893856393, 1107464246, 603360611, 522587106, 2058442492, 230108817 } }, + .quotient_claims = &.{ .{ 819606509, 739928043, 470380032, 371415314, 509965036, 1026187313 }, .{ 1591750897, 928355508, 733876383, 528991461, 1660767531, 9004066 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Lookup/DoubleConditional" + +// expression: "z-recurrence-b0-k0" +const system_61_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .coin_value = 1 }, // coin: "alpha" + .{ .column_claim = 3 }, // col: "T" + .{ .op = .{ .operator = .mul, .operands = &.{ 6, 7 } } }, + .{ .column_claim = 4 }, // col: "filterT" + .{ .op = .{ .operator = .add, .operands = &.{ 8, 9 } } }, + .{ .op = .{ .operator = .add, .operands = &.{ 5, 10 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 11 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 12 } } }, +}; + +const system_61_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 13, .cancelled_positions = &.{0} }, +}; + +const system_61_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_61_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b1-k0" +const system_61_module_1_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "filterS" + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .column_claim = 2 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 3, 4 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .coin_value = 1 }, // coin: "alpha" + .{ .column_claim = 3 }, // col: "S" + .{ .op = .{ .operator = .mul, .operands = &.{ 7, 8 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .add, .operands = &.{ 9, 10 } } }, + .{ .op = .{ .operator = .add, .operands = &.{ 6, 11 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 5, 12 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 13 } } }, +}; + +const system_61_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 14, .cancelled_positions = &.{0} }, +}; + +const system_61_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_61_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +const system_61_modules = [_]vanishing.Module{ + // module: "modT" + .{ .size = .{ .static = 4 }, .expressions = &system_61_module_0_expressions, .buckets = &system_61_module_0_buckets, .witness_claim_offset = 0 }, + // module: "modS" + .{ .size = .{ .static = 4 }, .expressions = &system_61_module_1_expressions, .buckets = &system_61_module_1_buckets, .witness_claim_offset = 5 }, +}; + +const system_61_round_coin_counts = [_]usize{ 0, 2, 0, 2, 2 }; +const system_61_round_coin_offsets = [_]usize{ 0, 0, 2, 2, 4 }; + +// system: "lk-double" +const system_61 = vanishing.System{ + .modules = &system_61_modules, + .round_coin_counts = &system_61_round_coin_counts, + .round_coin_offsets = &system_61_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 6, + .dynamic_module_count = 0, + .total_witness_claims = 9, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_61 = VanishingScenario{ + .name = "Lookup/DoubleConditional", + .system = system_61, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 10, 999, 20, 999 } }, + .{ .public_base = &.{ 1, 0, 1, 0 } }, + .{ .public_base = &.{ 10, 0, 20, 7 } }, + .{ .public_base = &.{ 1, 0, 1, 0 } }, + .{ .public_base = &.{ 1, 0, 1, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 816645226, 384567737, 62578502, 132073652, 308225868, 1418024482 }, .{ 816645226, 384567737, 62578502, 132073652, 308225868, 1418024482 }, .{ 1787119431, 1367264825, 574728803, 1542036143, 916715589, 823874291 }, .{ 1787119431, 1367264825, 574728803, 1542036143, 916715589, 823874291 } } }, + .{ .public_ext = &.{ .{ 1314061207, 1746138696, 2068127931, 1998632781, 1822480565, 712681951 }, .{ 1314061207, 1746138696, 2068127931, 1998632781, 1822480565, 712681951 }, .{ 343587002, 763441608, 1555977630, 588670290, 1213990844, 1306832142 }, .{ 343587002, 763441608, 1555977630, 588670290, 1213990844, 1306832142 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 816645226, 384567737, 62578502, 132073652, 308225868, 1418024482 } }, + .{ .ext = .{ 1787119431, 1367264825, 574728803, 1542036143, 916715589, 823874291 } }, + .{ .ext = .{ 1314061207, 1746138696, 2068127931, 1998632781, 1822480565, 712681951 } }, + .{ .ext = .{ 343587002, 763441608, 1555977630, 588670290, 1213990844, 1306832142 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1422721526, 392887169, 693425861, 153869043, 776976834, 39118689 }, .{ 2118422689, 1012247869, 1466100369, 656941403, 715940423, 2055191186 }, .{ 1917978034, 1598761337, 887856951, 209568830, 592246024, 1144196866 }, .{ 932997048, 1257516491, 1214029685, 1110327157, 45543152, 1022906125 } } }, + .{ .public_ext = &.{ .{ 707984907, 1737819264, 1437280572, 1976837390, 1353729599, 2091587744 }, .{ 956984898, 49547174, 813476594, 1866842064, 1870864223, 1826686329 }, .{ 152566290, 331699081, 293980502, 326675119, 118143013, 1099516890 }, .{ 313170340, 11640914, 1716675198, 91058293, 918676031, 1374328336 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 392805677, 382383221, 853049400, 2109182247, 679795631, 1039521624 }, .{ 1411086211, 1534935732, 108805253, 93049020, 1273967876, 1921939128 }, .{ 1229265807, 1841566028, 274167328, 1968453863, 221934581, 1097278540 }, .{ 1817021848, 1114012136, 1520694598, 2103899451, 1160547666, 1023926774 }, .{ 392805677, 382383221, 853049400, 2109182247, 679795631, 1039521624 }, .{ 8593800, 2031574119, 1335220437, 1766084826, 1335932861, 818940409 }, .{ 1445308368, 2118745884, 946608079, 1064851030, 966358839, 888290458 }, .{ 1317266236, 1006745148, 345168064, 1201333269, 1125982325, 180357669 }, .{ 562196855, 1271877777, 565224808, 1836732787, 1387351583, 1065200208 } }, + .quotient_claims = &.{ .{ 1451886264, 928253701, 2096256371, 1616547234, 1310823661, 1085738052 }, .{ 1132677885, 1949604440, 1572231807, 415880319, 1897149676, 836347172 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Lookup/MultiColumn" + +// expression: "z-recurrence-b0-k0" +const system_62_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .coin_value = 1 }, // coin: "alpha" + .{ .column_claim = 3 }, // col: "Ty" + .{ .op = .{ .operator = .mul, .operands = &.{ 6, 7 } } }, + .{ .column_claim = 4 }, // col: "Tx" + .{ .op = .{ .operator = .add, .operands = &.{ 8, 9 } } }, + .{ .op = .{ .operator = .add, .operands = &.{ 5, 10 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 11 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 12 } } }, +}; + +const system_62_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 13, .cancelled_positions = &.{0} }, +}; + +const system_62_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_62_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b1-k0" +const system_62_module_1_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b1-k0" + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .coin_value = 1 }, // coin: "alpha" + .{ .column_claim = 2 }, // col: "Sy" + .{ .op = .{ .operator = .mul, .operands = &.{ 5, 6 } } }, + .{ .column_claim = 3 }, // col: "Sx" + .{ .op = .{ .operator = .add, .operands = &.{ 7, 8 } } }, + .{ .op = .{ .operator = .add, .operands = &.{ 4, 9 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 10 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 11 } } }, +}; + +const system_62_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 12, .cancelled_positions = &.{0} }, +}; + +const system_62_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_62_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +const system_62_modules = [_]vanishing.Module{ + // module: "modT" + .{ .size = .{ .static = 4 }, .expressions = &system_62_module_0_expressions, .buckets = &system_62_module_0_buckets, .witness_claim_offset = 0 }, + // module: "modS" + .{ .size = .{ .static = 4 }, .expressions = &system_62_module_1_expressions, .buckets = &system_62_module_1_buckets, .witness_claim_offset = 5 }, +}; + +const system_62_round_coin_counts = [_]usize{ 0, 2, 0, 2, 2 }; +const system_62_round_coin_offsets = [_]usize{ 0, 0, 2, 2, 4 }; + +// system: "lk-multi-col" +const system_62 = vanishing.System{ + .modules = &system_62_modules, + .round_coin_counts = &system_62_round_coin_counts, + .round_coin_offsets = &system_62_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 6, + .dynamic_module_count = 0, + .total_witness_claims = 9, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_62 = VanishingScenario{ + .name = "Lookup/MultiColumn", + .system = system_62, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 1, 2, 3, 4 } }, + .{ .public_base = &.{ 10, 20, 30, 40 } }, + .{ .public_base = &.{ 2, 2, 3, 1 } }, + .{ .public_base = &.{ 20, 20, 30, 10 } }, + .{ .public_base = &.{ 1, 2, 1, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 120372168, 1667999052, 1625279779, 2051827897, 1221810367, 916088049 }, .{ 1043072506, 1628020255, 2045599209, 1606332858, 724042843, 1981961502 }, .{ 1957777362, 1097296991, 1987562985, 1311550876, 1501867937, 761708843 }, .{ 1957777362, 1097296991, 1987562985, 1311550876, 1501867937, 761708843 } } }, + .{ .public_ext = &.{ .{ 1669356264, 1085342615, 1920546718, 1288100736, 248883762, 532416490 }, .{ 1208006095, 39978797, 1710387003, 445495039, 497767524, 1064832980 }, .{ 293301239, 570702061, 1768423227, 740277021, 1850648863, 154379206 }, .{ 172929071, 1033409442, 143143448, 819155557, 628838496, 1368997590 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 120372168, 1667999052, 1625279779, 2051827897, 1221810367, 916088049 } }, + .{ .ext = .{ 1957777362, 1097296991, 1987562985, 1311550876, 1501867937, 761708843 } }, + .{ .ext = .{ 1669356264, 1085342615, 1920546718, 1288100736, 248883762, 532416490 } }, + .{ .ext = .{ 172929071, 1033409442, 143143448, 819155557, 628838496, 1368997590 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 145472831, 232052076, 1419241783, 1624927703, 1337319371, 813515523 }, .{ 2067046907, 195395760, 731362736, 1284107132, 552594342, 1376345516 }, .{ 1120566304, 1160106589, 1018946504, 260369608, 1619391978, 2123976693 }, .{ 928326820, 543152008, 1091861843, 1092008423, 752107175, 2078281567 } } }, + .{ .public_ext = &.{ .{ 2058221933, 1787642152, 619106683, 47562851, 1342047365, 251259701 }, .{ 192363004, 1484672265, 114471534, 1955524511, 186284198, 73695569 }, .{ 2086414252, 743375866, 339711734, 1940679940, 1973692479, 1424547931 }, .{ 2055120114, 245722583, 1057416482, 317645564, 759388824, 381203232 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1498104010, 1653632248, 64386280, 232703927, 324201123, 1207189132 }, .{ 1457681916, 2066916414, 1197704037, 511263268, 2078618252, 351919208 }, .{ 1914611804, 487402315, 276652702, 932153204, 851203957, 1502025321 }, .{ 456605229, 91597420, 267872726, 902994416, 324652834, 1485813101 }, .{ 1537155026, 9159742, 1731352419, 1794864588, 458606570, 787793240 }, .{ 1100596919, 402577921, 2109537997, 1816177110, 1500017962, 1404613373 }, .{ 346203571, 604902356, 1186396570, 36909121, 1398908237, 64044592 }, .{ 648043766, 726175089, 1418892039, 387474672, 961730443, 1877024337 }, .{ 1769369523, 1564112012, 1633383707, 1317171327, 2013808834, 400773077 } }, + .quotient_claims = &.{ .{ 441308543, 1241124293, 1269610163, 1610445318, 1809620604, 133234795 }, .{ 1724676296, 1025497116, 1070889488, 1519302703, 435561409, 1202815977 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Lookup/SharedTable" + +// expression: "z-recurrence-b0-k0" +const system_63_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "T" + .{ .op = .{ .operator = .add, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 7 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 8 } } }, +}; + +const system_63_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 9, .cancelled_positions = &.{0} }, +}; + +const system_63_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_63_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b1-k0" +const system_63_module_1_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b1-k0" + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 2 }, // col: "S1" + .{ .op = .{ .operator = .add, .operands = &.{ 4, 5 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 7 } } }, +}; + +const system_63_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_63_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_63_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +// expression: "z-recurrence-b2-k0" +const system_63_module_2_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b2-k0" + .{ .column_claim = 1 }, // col: "z-b2-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 2 }, // col: "S2" + .{ .op = .{ .operator = .add, .operands = &.{ 4, 5 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 7 } } }, +}; + +const system_63_module_2_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b2-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_63_module_2_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_63_module_2_bucket_0_vanishings, .quotient_claim_offset = 2 }, +}; + +const system_63_modules = [_]vanishing.Module{ + // module: "modT" + .{ .size = .{ .static = 4 }, .expressions = &system_63_module_0_expressions, .buckets = &system_63_module_0_buckets, .witness_claim_offset = 0 }, + // module: "modS1" + .{ .size = .{ .static = 4 }, .expressions = &system_63_module_1_expressions, .buckets = &system_63_module_1_buckets, .witness_claim_offset = 4 }, + // module: "modS2" + .{ .size = .{ .static = 2 }, .expressions = &system_63_module_2_expressions, .buckets = &system_63_module_2_buckets, .witness_claim_offset = 7 }, +}; + +const system_63_round_coin_counts = [_]usize{ 0, 1, 0, 3, 3 }; +const system_63_round_coin_offsets = [_]usize{ 0, 0, 1, 1, 4 }; + +// system: "lk-shared" +const system_63 = vanishing.System{ + .modules = &system_63_modules, + .round_coin_counts = &system_63_round_coin_counts, + .round_coin_offsets = &system_63_round_coin_offsets, + .max_round_coins = 3, + .total_round_coins = 7, + .dynamic_module_count = 0, + .total_witness_claims = 10, + .total_quotient_claims = 3, +}; + +const vanishing_scenario_63 = VanishingScenario{ + .name = "Lookup/SharedTable", + .system = system_63, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 10, 20, 30, 40 } }, + .{ .public_base = &.{ 10, 20, 10, 30 } }, + .{ .public_base = &.{ 40, 30 } }, + .{ .public_base = &.{ 2, 1, 2, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1119366008, 930683448, 941715293, 1968166572, 330671172, 1467393065 }, .{ 915176143, 769629701, 822617985, 253879930, 1665279414, 1193003194 }, .{ 1331569925, 886960455, 713693650, 1882365088, 1286702088, 1274345553 }, .{ 1818807424, 404693244, 1589151372, 816465045, 682705604, 731139669 } } }, + .{ .public_ext = &.{ .{ 1571023429, 1665364709, 594495570, 1146623147, 1965370847, 331656684 }, .{ 1775213294, 1826418456, 713592878, 730203356, 630762605, 606046555 }, .{ 1215530290, 1361076732, 1308088448, 1876826503, 465427019, 937703239 }, .{ 1007333399, 1302411355, 297197399, 1062583924, 654715682, 1962385276 } } }, + .{ .public_ext = &.{ .{ 1643468934, 482267211, 1255248711, 1065900043, 603996484, 543205884 }, .{ 1435272043, 423601834, 244357662, 251657464, 793285147, 1567887921 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 1119366008, 930683448, 941715293, 1968166572, 330671172, 1467393065 } }, + .{ .ext = .{ 1818807424, 404693244, 1589151372, 816465045, 682705604, 731139669 } }, + .{ .ext = .{ 1571023429, 1665364709, 594495570, 1146623147, 1965370847, 331656684 } }, + .{ .ext = .{ 1007333399, 1302411355, 297197399, 1062583924, 654715682, 1962385276 } }, + .{ .ext = .{ 1643468934, 482267211, 1255248711, 1065900043, 603996484, 543205884 } }, + .{ .ext = .{ 1435272043, 423601834, 244357662, 251657464, 793285147, 1567887921 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 100990591, 1302278247, 668551329, 941481488, 955633222, 1157247363 }, .{ 1321723818, 2078758051, 2054922508, 2064176250, 57577551, 420911492 }, .{ 86554624, 190296133, 564469792, 1062444530, 803531857, 1072985434 }, .{ 621437394, 690080435, 973469237, 193310598, 313963803, 1610268577 } } }, + .{ .public_ext = &.{ .{ 1595863010, 956045734, 495299109, 1916202723, 259370857, 1648087653 }, .{ 1221283078, 662182609, 1253269668, 1474459315, 2083240438, 1686685018 }, .{ 1966049406, 416340051, 1800016389, 1286270630, 2007381714, 777347081 }, .{ 1608923809, 96138039, 712827700, 1715186631, 2042126290, 149293114 } } }, + .{ .public_ext = &.{ .{ 1089721979, 1837379548, 1337664054, 190199971, 946443315, 861997319 }, .{ 1040984456, 293326885, 793042379, 1940506462, 1184263118, 1268709114 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 619659888, 924896008, 999647075, 1871116017, 28052564, 253861961 }, .{ 179637763, 1585908915, 2035064471, 1972880750, 1545997388, 1475947675 }, .{ 1092662164, 699757308, 622849630, 830607619, 1841555002, 2099525945 }, .{ 318678213, 1388875072, 611997334, 935773159, 1167930033, 591476711 }, .{ 596503628, 1030225685, 329223422, 1163073457, 623547817, 1503731304 }, .{ 1923940930, 279706166, 1914793367, 1963135273, 1910712190, 1604533500 }, .{ 141269961, 42435485, 1442611867, 1833825796, 708294459, 835385285 }, .{ 525713650, 2040135962, 1086537525, 653424131, 677051925, 693204929 }, .{ 422320894, 996439516, 413068848, 664133376, 720229706, 1417888876 }, .{ 241990855, 779148185, 243369406, 1114553750, 1781348519, 1386235486 } }, + .quotient_claims = &.{ .{ 1667254416, 1413910019, 1271130542, 1248924433, 979948431, 251693332 }, .{ 633070469, 1318982090, 1133885389, 1948362949, 1458572814, 669134388 }, .{ 1613742654, 1173637069, 894069481, 53546225, 215888905, 1492713302 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Lookup/DistinctTables" + +// expression: "z-recurrence-b0-k0" +const system_64_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "T1" + .{ .op = .{ .operator = .add, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 7 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 8 } } }, +}; + +const system_64_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 9, .cancelled_positions = &.{0} }, +}; + +const system_64_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_64_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b2-k0" +const system_64_module_1_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b2-k0" + .{ .column_claim = 2 }, // col: "z-b2-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "T2" + .{ .op = .{ .operator = .add, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 7 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 8 } } }, +}; + +const system_64_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b2-k0" + .{ .expression = 9, .cancelled_positions = &.{0} }, +}; + +const system_64_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_64_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +// expression: "z-recurrence-b1-k0" +const system_64_module_2_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b1-k0" + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 2 }, // col: "S1" + .{ .op = .{ .operator = .add, .operands = &.{ 4, 5 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 7 } } }, +}; + +const system_64_module_2_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_64_module_2_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_64_module_2_bucket_0_vanishings, .quotient_claim_offset = 2 }, +}; + +// expression: "z-recurrence-b3-k0" +const system_64_module_3_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b3-k0" + .{ .column_claim = 1 }, // col: "z-b3-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 2 }, // col: "S2" + .{ .op = .{ .operator = .add, .operands = &.{ 4, 5 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 7 } } }, +}; + +const system_64_module_3_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b3-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_64_module_3_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_64_module_3_bucket_0_vanishings, .quotient_claim_offset = 3 }, +}; + +const system_64_modules = [_]vanishing.Module{ + // module: "modT1" + .{ .size = .{ .static = 4 }, .expressions = &system_64_module_0_expressions, .buckets = &system_64_module_0_buckets, .witness_claim_offset = 0 }, + // module: "modT2" + .{ .size = .{ .static = 2 }, .expressions = &system_64_module_1_expressions, .buckets = &system_64_module_1_buckets, .witness_claim_offset = 4 }, + // module: "modS1" + .{ .size = .{ .static = 2 }, .expressions = &system_64_module_2_expressions, .buckets = &system_64_module_2_buckets, .witness_claim_offset = 8 }, + // module: "modS2" + .{ .size = .{ .static = 2 }, .expressions = &system_64_module_3_expressions, .buckets = &system_64_module_3_buckets, .witness_claim_offset = 11 }, +}; + +const system_64_round_coin_counts = [_]usize{ 0, 1, 0, 4, 4 }; +const system_64_round_coin_offsets = [_]usize{ 0, 0, 1, 1, 5 }; + +// system: "lk-distinct" +const system_64 = vanishing.System{ + .modules = &system_64_modules, + .round_coin_counts = &system_64_round_coin_counts, + .round_coin_offsets = &system_64_round_coin_offsets, + .max_round_coins = 4, + .total_round_coins = 9, + .dynamic_module_count = 0, + .total_witness_claims = 14, + .total_quotient_claims = 4, +}; + +const vanishing_scenario_64 = VanishingScenario{ + .name = "Lookup/DistinctTables", + .system = system_64, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 10, 20, 30, 40 } }, + .{ .public_base = &.{ 100, 200 } }, + .{ .public_base = &.{ 10, 30 } }, + .{ .public_base = &.{ 100, 200 } }, + .{ .public_base = &.{ 1, 0, 1, 0 } }, + .{ .public_base = &.{ 1, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1117269927, 751389444, 1576800088, 1732238085, 2111147884, 727893784 }, .{ 1117269927, 751389444, 1576800088, 1732238085, 2111147884, 727893784 }, .{ 583745741, 1362147359, 178096287, 187299710, 452592515, 2107969908 }, .{ 583745741, 1362147359, 178096287, 187299710, 452592515, 2107969908 } } }, + .{ .public_ext = &.{ .{ 1013436506, 1379316989, 553906345, 398468348, 19558549, 1402812649 }, .{ 1546960692, 768559074, 1952610146, 1943406723, 1678113918, 22736525 } } }, + .{ .public_ext = &.{ .{ 455492021, 767279438, 743578096, 1549953234, 1654089737, 109494779 }, .{ 1225227377, 1416373615, 512588332, 1836129192, 809258643, 1613781984 } } }, + .{ .public_ext = &.{ .{ 1675214412, 1363426995, 1387128337, 580753199, 476616696, 2021211654 }, .{ 905479056, 714332818, 1618118101, 294577241, 1321447790, 516924449 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 1117269927, 751389444, 1576800088, 1732238085, 2111147884, 727893784 } }, + .{ .ext = .{ 583745741, 1362147359, 178096287, 187299710, 452592515, 2107969908 } }, + .{ .ext = .{ 1013436506, 1379316989, 553906345, 398468348, 19558549, 1402812649 } }, + .{ .ext = .{ 1546960692, 768559074, 1952610146, 1943406723, 1678113918, 22736525 } }, + .{ .ext = .{ 455492021, 767279438, 743578096, 1549953234, 1654089737, 109494779 } }, + .{ .ext = .{ 1225227377, 1416373615, 512588332, 1836129192, 809258643, 1613781984 } }, + .{ .ext = .{ 1675214412, 1363426995, 1387128337, 580753199, 476616696, 2021211654 } }, + .{ .ext = .{ 905479056, 714332818, 1618118101, 294577241, 1321447790, 516924449 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1602267713, 1207623291, 601399706, 1332572576, 1900657546, 1622445112 }, .{ 692144940, 268476901, 1690934877, 965553951, 562067315, 137470523 }, .{ 1811769768, 1593752631, 879543112, 199598531, 1006571803, 1855765387 }, .{ 155230443, 1191560043, 1089535171, 1763687808, 792116202, 645731844 } } }, + .{ .public_ext = &.{ .{ 1996654426, 1636594078, 895956035, 606147131, 1758132473, 1491071338 }, .{ 134052005, 494112355, 1234750398, 1524559302, 372573960, 639635095 } } }, + .{ .public_ext = &.{ .{ 1056877440, 1846166284, 927907021, 1596267714, 460097774, 1016522642 }, .{ 1073828995, 284540149, 1202799412, 534438719, 1670608659, 1114183791 } } }, + .{ .public_ext = &.{ .{ 134052007, 494112355, 1234750398, 1524559302, 372573960, 639635095 }, .{ 1996654428, 1636594078, 895956035, 606147131, 1758132473, 1491071338 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 958494033, 976435456, 1413139175, 499406994, 693323572, 313224202 }, .{ 321686215, 1883334864, 1749513660, 713092618, 65338431, 83277416 }, .{ 486784476, 866636711, 151405206, 428994857, 1350454107, 318215314 }, .{ 1371444463, 1273442108, 1497758804, 2075842789, 1441230828, 585127068 }, .{ 1, 0, 0, 0, 0, 0 }, .{ 1614073870, 753512277, 2094561301, 1652989049, 47859460, 1319672960 }, .{ 66645528, 1430140776, 1292311560, 1733093377, 284782487, 403603803 }, .{ 360223954, 1476468978, 614673568, 1830533637, 1779735960, 1375450352 }, .{ 877379418, 1516932894, 2015361385, 537585615, 1369729353, 697662905 }, .{ 1683017780, 630943169, 491155106, 1804289456, 327943114, 727886269 }, .{ 1746439520, 1495620852, 901919027, 1802914776, 1087122646, 1399600833 }, .{ 1557475808, 145094924, 1203293092, 1311000685, 327121191, 403744961 }, .{ 1023217660, 1932664889, 1801953346, 1695036188, 1470943295, 3684709 }, .{ 545382057, 451778701, 72487912, 1481728332, 1991832353, 1929812427 } }, + .quotient_claims = &.{ .{ 1232834157, 388769993, 343868081, 904234896, 686746440, 439802588 }, .{ 665985511, 259877978, 1759771256, 256196466, 938087248, 1058622757 }, .{ 466442113, 337071518, 327117759, 117200188, 1895036658, 1828472793 }, .{ 1144430205, 111171936, 2027583795, 2105289180, 337968491, 826654703 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Lookup/MultiColumnFilterOnIncluding" + +// expression: "z-recurrence-b0-k0" +const system_65_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .coin_value = 1 }, // coin: "alpha" + .{ .coin_value = 1 }, // coin: "alpha" + .{ .column_claim = 3 }, // col: "Ty" + .{ .op = .{ .operator = .mul, .operands = &.{ 7, 8 } } }, + .{ .column_claim = 4 }, // col: "Tx" + .{ .op = .{ .operator = .add, .operands = &.{ 9, 10 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 6, 11 } } }, + .{ .column_claim = 5 }, // col: "filterT" + .{ .op = .{ .operator = .add, .operands = &.{ 12, 13 } } }, + .{ .op = .{ .operator = .add, .operands = &.{ 5, 14 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 15 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 16 } } }, +}; + +const system_65_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 17, .cancelled_positions = &.{0} }, +}; + +const system_65_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_65_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b1-k0" +const system_65_module_1_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b1-k0" + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .coin_value = 1 }, // coin: "alpha" + .{ .coin_value = 1 }, // coin: "alpha" + .{ .column_claim = 2 }, // col: "Sy" + .{ .op = .{ .operator = .mul, .operands = &.{ 6, 7 } } }, + .{ .column_claim = 3 }, // col: "Sx" + .{ .op = .{ .operator = .add, .operands = &.{ 8, 9 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 5, 10 } } }, + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .add, .operands = &.{ 11, 12 } } }, + .{ .op = .{ .operator = .add, .operands = &.{ 4, 13 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 14 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 15 } } }, +}; + +const system_65_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 16, .cancelled_positions = &.{0} }, +}; + +const system_65_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_65_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +const system_65_modules = [_]vanishing.Module{ + // module: "modT" + .{ .size = .{ .static = 4 }, .expressions = &system_65_module_0_expressions, .buckets = &system_65_module_0_buckets, .witness_claim_offset = 0 }, + // module: "modS" + .{ .size = .{ .static = 4 }, .expressions = &system_65_module_1_expressions, .buckets = &system_65_module_1_buckets, .witness_claim_offset = 6 }, +}; + +const system_65_round_coin_counts = [_]usize{ 0, 2, 0, 2, 2 }; +const system_65_round_coin_offsets = [_]usize{ 0, 0, 2, 2, 4 }; + +// system: "lk-multi-filterT" +const system_65 = vanishing.System{ + .modules = &system_65_modules, + .round_coin_counts = &system_65_round_coin_counts, + .round_coin_offsets = &system_65_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 6, + .dynamic_module_count = 0, + .total_witness_claims = 10, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_65 = VanishingScenario{ + .name = "Lookup/MultiColumnFilterOnIncluding", + .system = system_65, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 1, 99, 2, 3 } }, + .{ .public_base = &.{ 10, 99, 20, 30 } }, + .{ .public_base = &.{ 1, 0, 1, 1 } }, + .{ .public_base = &.{ 1, 2, 3, 3 } }, + .{ .public_base = &.{ 10, 20, 30, 30 } }, + .{ .public_base = &.{ 1, 0, 1, 2 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1191516755, 891176661, 900206011, 889480708, 666288167, 776200391 }, .{ 1191516755, 891176661, 900206011, 889480708, 666288167, 776200391 }, .{ 824065663, 1589528304, 1932812334, 482130810, 416912745, 1111518387 }, .{ 2048487900, 885168531, 1260828113, 521256174, 1431865434, 1211438616 } } }, + .{ .public_ext = &.{ .{ 939189678, 1239529772, 1230500422, 1241225725, 1464418266, 1354506042 }, .{ 1306640770, 541178129, 197894099, 1648575623, 1713793688, 1019188046 }, .{ 1759782868, 1958711232, 1599239426, 1629012941, 140964127, 2034581148 }, .{ 82218533, 1245537902, 869878320, 1609450259, 698840999, 919267817 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 1191516755, 891176661, 900206011, 889480708, 666288167, 776200391 } }, + .{ .ext = .{ 2048487900, 885168531, 1260828113, 521256174, 1431865434, 1211438616 } }, + .{ .ext = .{ 939189678, 1239529772, 1230500422, 1241225725, 1464418266, 1354506042 } }, + .{ .ext = .{ 82218533, 1245537902, 869878320, 1609450259, 698840999, 919267817 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 953100902, 678351780, 912104123, 1858809279, 2018542147, 529118670 }, .{ 314527673, 1155521684, 1036251556, 892217072, 185519675, 1960292820 }, .{ 1453267372, 132409446, 1592353571, 1226336868, 106845806, 1705532271 }, .{ 1540516915, 164423523, 720703616, 284049647, 1950505238, 66469105 } } }, + .{ .public_ext = &.{ .{ 1177605531, 1452354653, 1218602310, 271897154, 112164286, 1601587763 }, .{ 1421540210, 1188634447, 1545130223, 1325530578, 681216653, 1067411205 }, .{ 140897000, 1711246436, 1476799518, 681320218, 686963159, 1856479252 }, .{ 1521370129, 2039883763, 20880815, 1982664916, 650362335, 1866641079 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 747928817, 1624803472, 830000232, 690006455, 2103221305, 563407052 }, .{ 1539899725, 826601082, 323923830, 1375757071, 1590916094, 1420348808 }, .{ 478544244, 347410830, 56414318, 1158667330, 1612603059, 997068065 }, .{ 966076587, 445168121, 773062826, 449115333, 1787586145, 1189152302 }, .{ 1018788177, 254261265, 982353288, 181793001, 2064036661, 77476625 }, .{ 348354838, 440048536, 267240714, 1512197932, 1054955235, 2016385981 }, .{ 186229828, 119496047, 1107245790, 1226618613, 775365522, 414682532 }, .{ 880471540, 628794641, 642954360, 1066175270, 1726506782, 1817841711 }, .{ 417602912, 1476449684, 1398242726, 851717800, 1523646952, 1852358955 }, .{ 1320184151, 573786255, 1844389419, 85171780, 1430788555, 1250589112 } }, + .quotient_claims = &.{ .{ 2114120142, 842428066, 845470639, 1113034227, 5499584, 464880250 }, .{ 932793044, 253514625, 367327939, 1712551146, 269457479, 1689363281 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Lookup/RepeatedValueInTable" + +// expression: "z-recurrence-b0-k0" +const system_66_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "T" + .{ .op = .{ .operator = .add, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 7 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 8 } } }, +}; + +const system_66_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 9, .cancelled_positions = &.{0} }, +}; + +const system_66_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_66_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b1-k0" +const system_66_module_1_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b1-k0" + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 2 }, // col: "S" + .{ .op = .{ .operator = .add, .operands = &.{ 4, 5 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 7 } } }, +}; + +const system_66_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_66_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_66_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +const system_66_modules = [_]vanishing.Module{ + // module: "modT" + .{ .size = .{ .static = 4 }, .expressions = &system_66_module_0_expressions, .buckets = &system_66_module_0_buckets, .witness_claim_offset = 0 }, + // module: "modS" + .{ .size = .{ .static = 4 }, .expressions = &system_66_module_1_expressions, .buckets = &system_66_module_1_buckets, .witness_claim_offset = 4 }, +}; + +const system_66_round_coin_counts = [_]usize{ 0, 1, 0, 2, 2 }; +const system_66_round_coin_offsets = [_]usize{ 0, 0, 1, 1, 3 }; + +// system: "lk-repeated" +const system_66 = vanishing.System{ + .modules = &system_66_modules, + .round_coin_counts = &system_66_round_coin_counts, + .round_coin_offsets = &system_66_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 5, + .dynamic_module_count = 0, + .total_witness_claims = 7, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_66 = VanishingScenario{ + .name = "Lookup/RepeatedValueInTable", + .system = system_66, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 10, 20, 10, 30 } }, + .{ .public_base = &.{ 10, 20, 10, 30 } }, + .{ .public_base = &.{ 0, 1, 2, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 495979900, 766046258, 886198614, 2118761613, 350844490, 1548471135 }, .{ 2110463201, 1796284634, 189247542, 1274520175, 450433941, 800386556 }, .{ 230934858, 2092297613, 481340094, 638848993, 520685285, 701533128 } } }, + .{ .public_ext = &.{ .{ 258111566, 1615587245, 348475536, 422120719, 1015558491, 1439395506 }, .{ 1892838099, 849540987, 1592983355, 434065539, 664714001, 2021630804 }, .{ 20243232, 334421799, 1941458891, 856186258, 1680272492, 1330319877 }, .{ 1899771575, 38408820, 1649366339, 1491857440, 1610021148, 1429173305 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 230934858, 2092297613, 481340094, 638848993, 520685285, 701533128 } }, + .{ .ext = .{ 258111566, 1615587245, 348475536, 422120719, 1015558491, 1439395506 } }, + .{ .ext = .{ 1899771575, 38408820, 1649366339, 1491857440, 1610021148, 1429173305 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1765572665, 866232326, 585453571, 1077511527, 902338488, 1949855385 }, .{ 709485603, 63442964, 639507549, 1899640209, 1716518758, 1868739410 }, .{ 174529161, 938456343, 1797186133, 999943504, 350949291, 600464037 }, .{ 1611825433, 262574800, 1239265613, 284317626, 1291606329, 1973060467 } } }, + .{ .public_ext = &.{ .{ 365133768, 1264474107, 1545252862, 1053194906, 1228367945, 180851048 }, .{ 2109311096, 1311279299, 1295453590, 525647130, 1341370325, 154696117 }, .{ 963970332, 1677193339, 1491823933, 1385138159, 78286104, 901981519 }, .{ 822997674, 8466121, 2059588914, 1297432671, 1613388492, 893177749 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1205005842, 1608475755, 1910550169, 1469068299, 631408014, 267858030 }, .{ 119658876, 1630259706, 1284904228, 592976003, 72143869, 1229076730 }, .{ 659415778, 792365506, 631354846, 126668656, 1779720322, 1437042475 }, .{ 1334643869, 139981757, 865974645, 707890761, 811700670, 321882636 }, .{ 1371089383, 1568036602, 567936521, 1995872498, 1183061332, 155324058 }, .{ 1486823496, 667212072, 1350776784, 1489818591, 384890419, 1552194628 }, .{ 1672621991, 1110604728, 166485265, 673294644, 847142739, 842903821 } }, + .quotient_claims = &.{ .{ 1788930017, 456467605, 769132236, 926821841, 1605809599, 742381766 }, .{ 1496057622, 1246002100, 1175597075, 360234179, 501297149, 51840246 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Lookup/ShiftedAColumn" + +// expression: "z-recurrence-b0-k0" +const system_67_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "T" + .{ .op = .{ .operator = .add, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 7 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 8 } } }, +}; + +const system_67_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 9, .cancelled_positions = &.{0} }, +}; + +const system_67_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_67_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b1-k0" +const system_67_module_1_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b1-k0" + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 2 }, // col: "S" + .{ .op = .{ .operator = .add, .operands = &.{ 4, 5 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 7 } } }, +}; + +const system_67_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 8, .cancelled_positions = &.{ -1, 0 } }, +}; + +const system_67_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 2, .vanishings = &system_67_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +const system_67_modules = [_]vanishing.Module{ + // module: "modT" + .{ .size = .{ .static = 4 }, .expressions = &system_67_module_0_expressions, .buckets = &system_67_module_0_buckets, .witness_claim_offset = 0 }, + // module: "modS" + .{ .size = .{ .static = 4 }, .expressions = &system_67_module_1_expressions, .buckets = &system_67_module_1_buckets, .witness_claim_offset = 4 }, +}; + +const system_67_round_coin_counts = [_]usize{ 0, 1, 0, 2, 2 }; +const system_67_round_coin_offsets = [_]usize{ 0, 0, 1, 1, 3 }; + +// system: "lk-shift-a" +const system_67 = vanishing.System{ + .modules = &system_67_modules, + .round_coin_counts = &system_67_round_coin_counts, + .round_coin_offsets = &system_67_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 5, + .dynamic_module_count = 0, + .total_witness_claims = 7, + .total_quotient_claims = 3, +}; + +const vanishing_scenario_67 = VanishingScenario{ + .name = "Lookup/ShiftedAColumn", + .system = system_67, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 10, 20, 30, 40 } }, + .{ .public_base = &.{ 40, 10, 20, 30 } }, + .{ .public_base = &.{ 1, 1, 1, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 319703494, 614348285, 181600425, 1631800591, 1328994516, 325251117 }, .{ 2046705253, 755169666, 43930746, 409354579, 504473870, 1824893588 }, .{ 1831697354, 1632741062, 1051060429, 127065484, 948561551, 1632617361 }, .{ 1908128692, 2084464376, 1252625230, 2107916360, 849575935, 352318985 } } }, + .{ .public_ext = &.{ .{ 1811002939, 1516358148, 1949106008, 498905842, 801711917, 1805455316 }, .{ 84001180, 1375536767, 2086775687, 1721351854, 1626232563, 305812845 }, .{ 299009079, 497965371, 1079646004, 2003640949, 1182144882, 498089072 }, .{ 222577741, 46242057, 878081203, 22790073, 1281130498, 1778387448 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 319703494, 614348285, 181600425, 1631800591, 1328994516, 325251117 } }, + .{ .ext = .{ 1908128692, 2084464376, 1252625230, 2107916360, 849575935, 352318985 } }, + .{ .ext = .{ 1811002939, 1516358148, 1949106008, 498905842, 801711917, 1805455316 } }, + .{ .ext = .{ 222577741, 46242057, 878081203, 22790073, 1281130498, 1778387448 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1511066144, 1460343661, 188909074, 264711100, 583255330, 1487746695 }, .{ 914667457, 377960991, 252152934, 1729140113, 1499445861, 98738616 }, .{ 925050145, 506287043, 819981885, 1942776770, 1657367394, 516192939 }, .{ 910629116, 1916821171, 869662540, 324784883, 521344281, 28028183 } } }, + .{ .public_ext = &.{ .{ 1363497984, 591671174, 590047124, 181624729, 1427286934, 874434432 }, .{ 500556213, 885993474, 1287756770, 1901877311, 2031200118, 1264935945 }, .{ 984386161, 1215726719, 523889941, 227730163, 249145727, 348750527 }, .{ 1346125792, 1568021499, 1859719031, 1950180663, 553780087, 1773291962 } } }, + .{ .public_ext = &.{ .{ 784580641, 562684934, 270987402, 180525770, 1576926346, 357414471 }, .{ 784580641, 562684934, 270987402, 180525770, 1576926346, 357414471 }, .{ 784580641, 562684934, 270987402, 180525770, 1576926346, 357414471 }, .{ 784580641, 562684934, 270987402, 180525770, 1576926346, 357414471 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1, 0, 0, 0, 0, 0 }, .{ 1166880682, 1088207716, 966638433, 1973677160, 171093703, 1656712774 }, .{ 983359844, 567773943, 1187772925, 1834738982, 768703633, 716944714 }, .{ 975069855, 922567774, 1359888897, 646353296, 527369123, 1200427797 }, .{ 107163853, 1569691424, 1488165657, 1991314498, 879872145, 1046591445 }, .{ 1425220319, 841244057, 1139740245, 559666169, 946906495, 2038100020 }, .{ 180569376, 478653228, 1258414198, 884631942, 1072481767, 233304616 } }, + .quotient_claims = &.{ .{ 702642712, 1747455588, 504539883, 454850292, 99564324, 1032013071 }, .{ 1132770249, 1796583015, 2003671330, 1498745362, 1889221477, 1399700381 }, .{ 784580641, 562684934, 270987402, 180525770, 1576926346, 357414471 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Lookup/ShiftedBColumn" + +// expression: "z-recurrence-b0-k0" +const system_68_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "T" + .{ .op = .{ .operator = .add, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 7 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 8 } } }, +}; + +const system_68_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 9, .cancelled_positions = &.{0} }, +}; + +const system_68_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_68_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b1-k0" +const system_68_module_1_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b1-k0" + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 2 }, // col: "S" + .{ .op = .{ .operator = .add, .operands = &.{ 4, 5 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 7 } } }, +}; + +const system_68_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_68_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_68_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +const system_68_modules = [_]vanishing.Module{ + // module: "modT" + .{ .size = .{ .static = 4 }, .expressions = &system_68_module_0_expressions, .buckets = &system_68_module_0_buckets, .witness_claim_offset = 0 }, + // module: "modS" + .{ .size = .{ .static = 4 }, .expressions = &system_68_module_1_expressions, .buckets = &system_68_module_1_buckets, .witness_claim_offset = 4 }, +}; + +const system_68_round_coin_counts = [_]usize{ 0, 1, 0, 2, 2 }; +const system_68_round_coin_offsets = [_]usize{ 0, 0, 1, 1, 3 }; + +// system: "lk-shift-b" +const system_68 = vanishing.System{ + .modules = &system_68_modules, + .round_coin_counts = &system_68_round_coin_counts, + .round_coin_offsets = &system_68_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 5, + .dynamic_module_count = 0, + .total_witness_claims = 7, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_68 = VanishingScenario{ + .name = "Lookup/ShiftedBColumn", + .system = system_68, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 20, 30, 40, 10 } }, + .{ .public_base = &.{ 10, 20, 30, 40 } }, + .{ .public_base = &.{ 1, 1, 1, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 28105771, 1994689310, 1021857722, 1774838401, 1383526752, 1345601509 }, .{ 912004325, 985497565, 137640217, 1268535525, 695967421, 412869602 }, .{ 1243802094, 162987039, 1886021465, 967340413, 1056535181, 1497018692 }, .{ 1650825906, 2063186318, 1113450477, 615069191, 337578103, 1367955890 } } }, + .{ .public_ext = &.{ .{ 2102600662, 136017123, 1108848711, 355868032, 747179681, 785104924 }, .{ 1218702108, 1145208868, 1993066216, 862170908, 1434739012, 1717836831 }, .{ 886904339, 1967719394, 244684968, 1163366020, 1074171252, 633687741 }, .{ 479880527, 67520115, 1017255956, 1515637242, 1793128330, 762750543 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 28105771, 1994689310, 1021857722, 1774838401, 1383526752, 1345601509 } }, + .{ .ext = .{ 1650825906, 2063186318, 1113450477, 615069191, 337578103, 1367955890 } }, + .{ .ext = .{ 2102600662, 136017123, 1108848711, 355868032, 747179681, 785104924 } }, + .{ .ext = .{ 479880527, 67520115, 1017255956, 1515637242, 1793128330, 762750543 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1601411911, 906863132, 328273149, 1152354049, 2112177963, 1075114982 }, .{ 722590797, 1215418819, 1950290726, 26163776, 641080960, 75497675 }, .{ 522049779, 1088018375, 560312908, 274394328, 2128327671, 319894915 }, .{ 1415360375, 1051112540, 1422536083, 677794280, 1510532705, 660198861 } } }, + .{ .public_ext = &.{ .{ 529294522, 1223843301, 1802433284, 978352384, 18528470, 1055591451 }, .{ 1408115636, 915287614, 180415707, 2104542657, 1489625473, 2055208758 }, .{ 1608656654, 1042688058, 1570393525, 1856312105, 2378762, 1810811518 }, .{ 715346058, 1079593893, 708170350, 1452912153, 620173728, 1470507572 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1, 0, 0, 0, 0, 0 }, .{ 1637587396, 1971702345, 1669293668, 418095685, 98704679, 1323424925 }, .{ 48132411, 102154124, 357942545, 1381043083, 1830865798, 223197449 }, .{ 769967052, 1275905959, 1867895917, 2015248986, 1257044065, 1217372025 }, .{ 276309352, 1751584607, 1410570326, 1778392977, 361873396, 878392685 }, .{ 420279220, 1937631480, 309960790, 1499568164, 1759081709, 1822775561 }, .{ 1973541577, 733133577, 1563560574, 135454261, 650357166, 1187720780 } }, + .quotient_claims = &.{ .{ 54811241, 1931824376, 1895367118, 1012436279, 1882262524, 1579424636 }, .{ 1169179922, 1287351204, 357020390, 504685457, 1434587006, 286566210 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Lookup/MultipleAFragments" + +// expression: "z-recurrence-b0-k0" +const system_69_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "T" + .{ .op = .{ .operator = .add, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 7 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 8 } } }, +}; + +const system_69_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 9, .cancelled_positions = &.{0} }, +}; + +const system_69_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_69_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b1-k0" +const system_69_module_1_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b1-k0" + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 2 }, // col: "S1" + .{ .op = .{ .operator = .add, .operands = &.{ 4, 5 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 7 } } }, +}; + +const system_69_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_69_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_69_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +// expression: "z-recurrence-b2-k0" +const system_69_module_2_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b2-k0" + .{ .column_claim = 1 }, // col: "z-b2-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 2 }, // col: "S2" + .{ .op = .{ .operator = .add, .operands = &.{ 4, 5 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 7 } } }, +}; + +const system_69_module_2_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b2-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_69_module_2_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_69_module_2_bucket_0_vanishings, .quotient_claim_offset = 2 }, +}; + +const system_69_modules = [_]vanishing.Module{ + // module: "modT" + .{ .size = .{ .static = 4 }, .expressions = &system_69_module_0_expressions, .buckets = &system_69_module_0_buckets, .witness_claim_offset = 0 }, + // module: "modS1" + .{ .size = .{ .static = 4 }, .expressions = &system_69_module_1_expressions, .buckets = &system_69_module_1_buckets, .witness_claim_offset = 4 }, + // module: "modS2" + .{ .size = .{ .static = 2 }, .expressions = &system_69_module_2_expressions, .buckets = &system_69_module_2_buckets, .witness_claim_offset = 7 }, +}; + +const system_69_round_coin_counts = [_]usize{ 0, 1, 0, 3, 3 }; +const system_69_round_coin_offsets = [_]usize{ 0, 0, 1, 1, 4 }; + +// system: "lk-multi-A" +const system_69 = vanishing.System{ + .modules = &system_69_modules, + .round_coin_counts = &system_69_round_coin_counts, + .round_coin_offsets = &system_69_round_coin_offsets, + .max_round_coins = 3, + .total_round_coins = 7, + .dynamic_module_count = 0, + .total_witness_claims = 10, + .total_quotient_claims = 3, +}; + +const vanishing_scenario_69 = VanishingScenario{ + .name = "Lookup/MultipleAFragments", + .system = system_69, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 10, 20, 30, 40 } }, + .{ .public_base = &.{ 10, 10, 20, 30 } }, + .{ .public_base = &.{ 30, 40 } }, + .{ .public_base = &.{ 2, 1, 2, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1836738795, 1436044252, 2097790235, 1847251732, 254814936, 873171268 }, .{ 177096660, 629891714, 941483755, 942954914, 31674763, 1685069986 }, .{ 1862789258, 607191090, 1201032256, 252958857, 796494402, 255105108 }, .{ 382262924, 1649330937, 1061167707, 1201203953, 1477747883, 35617407 } } }, + .{ .public_ext = &.{ .{ 146983819, 1412684307, 16458099, 1207080567, 2003298965, 1694120799 }, .{ 293967638, 694662181, 32916198, 283454701, 1875891497, 1257535165 }, .{ 1953609773, 1500814719, 1189222678, 1187751519, 2099031670, 445636447 }, .{ 1110763474, 1512165031, 2124801644, 467396331, 651268634, 1160618886 } } }, + .{ .public_ext = &.{ .{ 1287860134, 11350312, 935578966, 1410351245, 682943397, 714982439 }, .{ 637680035, 1099916898, 1075443515, 462106149, 1689916, 934470140 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 1836738795, 1436044252, 2097790235, 1847251732, 254814936, 873171268 } }, + .{ .ext = .{ 382262924, 1649330937, 1061167707, 1201203953, 1477747883, 35617407 } }, + .{ .ext = .{ 146983819, 1412684307, 16458099, 1207080567, 2003298965, 1694120799 } }, + .{ .ext = .{ 1110763474, 1512165031, 2124801644, 467396331, 651268634, 1160618886 } }, + .{ .ext = .{ 1287860134, 11350312, 935578966, 1410351245, 682943397, 714982439 } }, + .{ .ext = .{ 637680035, 1099916898, 1075443515, 462106149, 1689916, 934470140 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 432470552, 1770308128, 1576654596, 729590543, 147176862, 1439469270 }, .{ 207677464, 1450147401, 1599728582, 991880664, 1325527647, 1963658200 }, .{ 571141826, 1389970573, 131437754, 1973447910, 1722297642, 939560824 }, .{ 919416585, 1781693197, 953591934, 566493749, 1066410715, 2049431005 } } }, + .{ .public_ext = &.{ .{ 1130479375, 58573528, 954164702, 1341033895, 1354198665, 585541033 }, .{ 1497299848, 1808915393, 1083021488, 1686117462, 1244054401, 1800074183 }, .{ 1682462106, 655691393, 983303632, 183989477, 877275608, 414576818 }, .{ 2081877974, 1738232552, 1240923044, 1050272032, 785884192, 1461220832 } } }, + .{ .public_ext = &.{ .{ 1120194063, 949286369, 1431383688, 479812614, 1275560972, 1033267928 }, .{ 1010512372, 1181420064, 699322745, 1650893819, 855145461, 1097438505 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1150621304, 1539515641, 559905314, 622307091, 1768436747, 1511210866 }, .{ 1411130109, 682312984, 424726368, 1089171321, 185264521, 189930345 }, .{ 1453732855, 2020101330, 1590936865, 1175645463, 483313901, 1704518710 }, .{ 1276361672, 714076865, 881485550, 1007489931, 860624728, 190226621 }, .{ 1559354853, 1860035, 2087876958, 433630536, 1796844573, 462297179 }, .{ 2039987887, 1121736469, 583812976, 120707875, 728119449, 1183415761 }, .{ 2114038443, 2101562446, 998430011, 228126104, 1640650892, 853952750 }, .{ 1947670395, 1325569537, 1210486832, 37457425, 1194313088, 573835921 }, .{ 2108576207, 1916404106, 800535649, 1834999969, 1621026658, 1075616658 }, .{ 1072312269, 2083421126, 1009673475, 791626552, 141395006, 1176929507 } }, + .quotient_claims = &.{ .{ 468643805, 861283288, 1568284012, 46082280, 1941052183, 854984265 }, .{ 1067918597, 1761666704, 878487444, 755562004, 834731978, 199383987 }, .{ 1326177374, 1307240021, 2049755915, 1665819445, 2127845016, 1752509181 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Lookup/WidthThree" + +// expression: "z-recurrence-b0-k0" +const system_70_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .coin_value = 1 }, // coin: "alpha" + .{ .coin_value = 1 }, // coin: "alpha" + .{ .column_claim = 3 }, // col: "Tz" + .{ .op = .{ .operator = .mul, .operands = &.{ 7, 8 } } }, + .{ .column_claim = 4 }, // col: "Ty" + .{ .op = .{ .operator = .add, .operands = &.{ 9, 10 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 6, 11 } } }, + .{ .column_claim = 5 }, // col: "Tx" + .{ .op = .{ .operator = .add, .operands = &.{ 12, 13 } } }, + .{ .op = .{ .operator = .add, .operands = &.{ 5, 14 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 15 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 16 } } }, +}; + +const system_70_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 17, .cancelled_positions = &.{0} }, +}; + +const system_70_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_70_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b1-k0" +const system_70_module_1_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b1-k0" + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .coin_value = 1 }, // coin: "alpha" + .{ .coin_value = 1 }, // coin: "alpha" + .{ .column_claim = 2 }, // col: "Sz" + .{ .op = .{ .operator = .mul, .operands = &.{ 6, 7 } } }, + .{ .column_claim = 3 }, // col: "Sy" + .{ .op = .{ .operator = .add, .operands = &.{ 8, 9 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 5, 10 } } }, + .{ .column_claim = 4 }, // col: "Sx" + .{ .op = .{ .operator = .add, .operands = &.{ 11, 12 } } }, + .{ .op = .{ .operator = .add, .operands = &.{ 4, 13 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 14 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 15 } } }, +}; + +const system_70_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 16, .cancelled_positions = &.{0} }, +}; + +const system_70_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_70_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +const system_70_modules = [_]vanishing.Module{ + // module: "modT" + .{ .size = .{ .static = 4 }, .expressions = &system_70_module_0_expressions, .buckets = &system_70_module_0_buckets, .witness_claim_offset = 0 }, + // module: "modS" + .{ .size = .{ .static = 2 }, .expressions = &system_70_module_1_expressions, .buckets = &system_70_module_1_buckets, .witness_claim_offset = 6 }, +}; + +const system_70_round_coin_counts = [_]usize{ 0, 2, 0, 2, 2 }; +const system_70_round_coin_offsets = [_]usize{ 0, 0, 2, 2, 4 }; + +// system: "lk-w3" +const system_70 = vanishing.System{ + .modules = &system_70_modules, + .round_coin_counts = &system_70_round_coin_counts, + .round_coin_offsets = &system_70_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 6, + .dynamic_module_count = 0, + .total_witness_claims = 11, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_70 = VanishingScenario{ + .name = "Lookup/WidthThree", + .system = system_70, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 1, 2, 3, 4 } }, + .{ .public_base = &.{ 10, 20, 30, 40 } }, + .{ .public_base = &.{ 100, 200, 300, 400 } }, + .{ .public_base = &.{ 2, 3 } }, + .{ .public_base = &.{ 20, 30 } }, + .{ .public_base = &.{ 200, 300 } }, + .{ .public_base = &.{ 0, 1, 1, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 866594679, 301291959, 1716634635, 1309523850, 1955858074, 651577024 }, .{ 1415296264, 1525280697, 405206608, 742615906, 1990570108, 913896313 }, .{ 1415296264, 1525280697, 405206608, 742615906, 1990570108, 913896313 } } }, + .{ .public_ext = &.{ .{ 1264111754, 1829414474, 414071798, 821182583, 174848359, 1479129409 }, .{ 715410169, 605425736, 1725499825, 1388090527, 140136325, 1216810120 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 1415296264, 1525280697, 405206608, 742615906, 1990570108, 913896313 } }, + .{ .ext = .{ 1264111754, 1829414474, 414071798, 821182583, 174848359, 1479129409 } }, + .{ .ext = .{ 715410169, 605425736, 1725499825, 1388090527, 140136325, 1216810120 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1491750707, 276262385, 535142929, 998404006, 1358288377, 1299640218 }, .{ 266572641, 754844963, 94396585, 1381233056, 690893360, 1938978698 }, .{ 309202311, 1353660447, 2050429716, 1536418076, 1888358979, 833580293 }, .{ 63180772, 1876645071, 1581443636, 345357728, 323872150, 189213657 } } }, + .{ .public_ext = &.{ .{ 1345794588, 430629471, 549299106, 973492348, 448513583, 227812360 }, .{ 784911847, 1700076962, 1581407327, 1157214085, 1682192850, 1902894073 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 622646764, 629722598, 1175414988, 558240812, 154307140, 142322931 }, .{ 1700929398, 1899834918, 1246763111, 1887980619, 1635452091, 1021587657 }, .{ 1347360168, 1349334185, 1555201461, 400411900, 2104305925, 1017769903 }, .{ 1304493507, 298867660, 1235440178, 1965856013, 739104897, 1417606182 }, .{ 343519994, 29886766, 975826591, 2114221391, 286981133, 1420184478 }, .{ 460493286, 1707553823, 736794589, 850634069, 1946333903, 994301021 }, .{ 1982225268, 174373811, 949538561, 651776949, 284743567, 2032030212 }, .{ 2128003088, 129759966, 1190033062, 1557496161, 30241117, 663909317 }, .{ 1000475555, 1365890033, 861260228, 1114944214, 682401023, 1490619654 }, .{ 1165400772, 2054224793, 938408596, 537635708, 1985875892, 575203252 }, .{ 1394963937, 2123058269, 1798406006, 906046144, 1477011449, 1335944185 } }, + .quotient_claims = &.{ .{ 1137524644, 1514905902, 106763816, 1087919554, 711882611, 1105249009 }, .{ 1010365003, 748789065, 1841365540, 2072627629, 566502225, 1850914326 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Lookup/PrecomputedTable" + +// expression: "z-recurrence-b0-k0" +const system_71_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "T" + .{ .op = .{ .operator = .add, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 7 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 8 } } }, +}; + +const system_71_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 9, .cancelled_positions = &.{0} }, +}; + +const system_71_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_71_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b1-k0" +const system_71_module_1_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b1-k0" + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 2 }, // col: "S" + .{ .op = .{ .operator = .add, .operands = &.{ 4, 5 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 7 } } }, +}; + +const system_71_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_71_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_71_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +const system_71_modules = [_]vanishing.Module{ + // module: "modT" + .{ .size = .{ .static = 4 }, .expressions = &system_71_module_0_expressions, .buckets = &system_71_module_0_buckets, .witness_claim_offset = 0 }, + // module: "modS" + .{ .size = .{ .static = 4 }, .expressions = &system_71_module_1_expressions, .buckets = &system_71_module_1_buckets, .witness_claim_offset = 4 }, +}; + +const system_71_round_coin_counts = [_]usize{ 0, 1, 0, 2, 2 }; +const system_71_round_coin_offsets = [_]usize{ 0, 0, 1, 1, 3 }; + +// system: "lk-precomp" +const system_71 = vanishing.System{ + .modules = &system_71_modules, + .round_coin_counts = &system_71_round_coin_counts, + .round_coin_offsets = &system_71_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 5, + .dynamic_module_count = 0, + .total_witness_claims = 7, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_71 = VanishingScenario{ + .name = "Lookup/PrecomputedTable", + .system = system_71, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 10, 20, 30, 40 } }, + .{ .public_base = &.{ 1, 1, 1, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 965153727, 1201009949, 1834687783, 1372279394, 968419923, 1474515577 }, .{ 1284207331, 1281249017, 628803563, 827046955, 650696670, 595424523 }, .{ 1550335141, 2074403650, 282352266, 150576265, 1316080553, 1429170465 }, .{ 1994496010, 540737400, 1553865964, 2007943262, 1097178214, 2107758021 } } }, + .{ .public_ext = &.{ .{ 1165552706, 929696484, 296018650, 758427039, 1162286510, 656190856 }, .{ 846499102, 849457416, 1501902870, 1303659478, 1480009763, 1535281910 }, .{ 580371292, 56302783, 1848354167, 1980130168, 814625880, 701535968 }, .{ 136210423, 1589969033, 576840469, 122763171, 1033528219, 22948412 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 965153727, 1201009949, 1834687783, 1372279394, 968419923, 1474515577 } }, + .{ .ext = .{ 1994496010, 540737400, 1553865964, 2007943262, 1097178214, 2107758021 } }, + .{ .ext = .{ 1165552706, 929696484, 296018650, 758427039, 1162286510, 656190856 } }, + .{ .ext = .{ 136210423, 1589969033, 576840469, 122763171, 1033528219, 22948412 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1997992937, 944006741, 1602733599, 1468714235, 1239862693, 1462416987 }, .{ 1722026305, 1060528513, 1893256847, 1440267928, 2002720648, 1183007319 }, .{ 974386458, 807607856, 1930507803, 1811049468, 1325523438, 946473125 }, .{ 1697713595, 1449269756, 965621050, 1672087668, 1824012520, 669515435 } } }, + .{ .public_ext = &.{ .{ 132713496, 1186699692, 527972834, 661992198, 890843740, 668289446 }, .{ 408680128, 1070177920, 237449586, 690438505, 127985785, 947699114 }, .{ 1156319975, 1323098577, 200198630, 319656965, 805182995, 1184233308 }, .{ 432992838, 681436677, 1165085383, 458618765, 306693913, 1461190998 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1, 0, 0, 0, 0, 0 }, .{ 612734184, 461599829, 994746633, 1461688337, 1022427293, 335580811 }, .{ 388359684, 1757119264, 847976342, 771893488, 1814733637, 2085017380 }, .{ 2104816025, 1152581356, 1993000406, 1887529473, 788138757, 187901415 }, .{ 2073329183, 673512808, 1706966131, 1291712814, 1998107063, 1928606441 }, .{ 2128694099, 649815955, 1811002145, 929242039, 391472198, 1553660558 }, .{ 169277735, 1371439716, 1212521799, 664977185, 750443936, 1153573317 } }, + .quotient_claims = &.{ .{ 972881531, 1800541319, 1899507054, 869768099, 279967025, 1225185912 }, .{ 1603565802, 28960043, 114945582, 1310863417, 295953337, 108760670 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Lookup/RepeatedSValues" + +// expression: "z-recurrence-b0-k0" +const system_72_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "T" + .{ .op = .{ .operator = .add, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 7 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 8 } } }, +}; + +const system_72_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 9, .cancelled_positions = &.{0} }, +}; + +const system_72_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_72_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b1-k0" +const system_72_module_1_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b1-k0" + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 2 }, // col: "S" + .{ .op = .{ .operator = .add, .operands = &.{ 4, 5 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 7 } } }, +}; + +const system_72_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_72_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_72_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +const system_72_modules = [_]vanishing.Module{ + // module: "modT" + .{ .size = .{ .static = 4 }, .expressions = &system_72_module_0_expressions, .buckets = &system_72_module_0_buckets, .witness_claim_offset = 0 }, + // module: "modS" + .{ .size = .{ .static = 4 }, .expressions = &system_72_module_1_expressions, .buckets = &system_72_module_1_buckets, .witness_claim_offset = 4 }, +}; + +const system_72_round_coin_counts = [_]usize{ 0, 1, 0, 2, 2 }; +const system_72_round_coin_offsets = [_]usize{ 0, 0, 1, 1, 3 }; + +// system: "lk-rep-s" +const system_72 = vanishing.System{ + .modules = &system_72_modules, + .round_coin_counts = &system_72_round_coin_counts, + .round_coin_offsets = &system_72_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 5, + .dynamic_module_count = 0, + .total_witness_claims = 7, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_72 = VanishingScenario{ + .name = "Lookup/RepeatedSValues", + .system = system_72, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 10, 20, 30, 40 } }, + .{ .public_base = &.{ 10, 10, 10, 10 } }, + .{ .public_base = &.{ 4, 0, 0, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 408095546, 863147637, 481534414, 1399441247, 269421149, 177918836 }, .{ 408095546, 863147637, 481534414, 1399441247, 269421149, 177918836 }, .{ 408095546, 863147637, 481534414, 1399441247, 269421149, 177918836 }, .{ 408095546, 863147637, 481534414, 1399441247, 269421149, 177918836 } } }, + .{ .public_ext = &.{ .{ 963329330, 316889699, 944969613, 1248169513, 465321321, 2086226724 }, .{ 1926658660, 633779398, 1889939226, 365632593, 930642642, 2041747015 }, .{ 759281557, 950669097, 704202406, 1613802106, 1395963963, 1997267306 }, .{ 1722610887, 1267558796, 1649172019, 731265186, 1861285284, 1952787597 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 408095546, 863147637, 481534414, 1399441247, 269421149, 177918836 } }, + .{ .ext = .{ 408095546, 863147637, 481534414, 1399441247, 269421149, 177918836 } }, + .{ .ext = .{ 963329330, 316889699, 944969613, 1248169513, 465321321, 2086226724 } }, + .{ .ext = .{ 1722610887, 1267558796, 1649172019, 731265186, 1861285284, 1952787597 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 2130706432, 0, 0, 0, 0, 0 }, .{ 2130706432, 0, 0, 0, 0, 0 }, .{ 2130706432, 0, 0, 0, 0, 0 }, .{ 2130706432, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 1, 0, 0, 0, 0, 0 }, .{ 1, 0, 0, 0, 0, 0 }, .{ 1, 0, 0, 0, 0, 0 }, .{ 1, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 124511401, 1116771864, 1452129558, 1925718330, 90463714, 310614051 }, .{ 408095546, 863147637, 481534414, 1399441247, 269421149, 177918836 }, .{ 408095546, 863147637, 481534414, 1399441247, 269421149, 177918836 }, .{ 656873300, 5029382, 229786979, 512310558, 570645076, 1030117594 }, .{ 432513994, 735694101, 970483514, 490061949, 124667971, 538005106 }, .{ 190234883, 604525503, 649749842, 469878462, 1534523892, 191318208 }, .{ 10, 0, 0, 0, 0, 0 } }, + .quotient_claims = &.{ .{ 2130706432, 0, 0, 0, 0, 0 }, .{ 1, 0, 0, 0, 0, 0 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "Lookup/EmptySelected" + +// expression: "z-recurrence-b0-k0" +const system_73_module_0_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "T" + .{ .op = .{ .operator = .add, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 7 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 8 } } }, +}; + +const system_73_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 9, .cancelled_positions = &.{0} }, +}; + +const system_73_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_73_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b1-k0" +const system_73_module_1_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "filterS" + .{ .constant = field.Element.init(1) }, + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 1 } } }, + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .column_claim = 2 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 3, 4 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "S" + .{ .op = .{ .operator = .add, .operands = &.{ 6, 7 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 5, 8 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 9 } } }, +}; + +const system_73_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 10, .cancelled_positions = &.{0} }, +}; + +const system_73_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_73_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +const system_73_modules = [_]vanishing.Module{ + // module: "modT" + .{ .size = .{ .static = 4 }, .expressions = &system_73_module_0_expressions, .buckets = &system_73_module_0_buckets, .witness_claim_offset = 0 }, + // module: "modS" + .{ .size = .{ .static = 4 }, .expressions = &system_73_module_1_expressions, .buckets = &system_73_module_1_buckets, .witness_claim_offset = 4 }, +}; + +const system_73_round_coin_counts = [_]usize{ 0, 1, 0, 2, 2 }; +const system_73_round_coin_offsets = [_]usize{ 0, 0, 1, 1, 3 }; + +// system: "lk-empty" +const system_73 = vanishing.System{ + .modules = &system_73_modules, + .round_coin_counts = &system_73_round_coin_counts, + .round_coin_offsets = &system_73_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 5, + .dynamic_module_count = 0, + .total_witness_claims = 8, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_73 = VanishingScenario{ + .name = "Lookup/EmptySelected", + .system = system_73, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 10, 20, 30, 40 } }, + .{ .public_base = &.{ 7, 99, 0, 42 } }, + .{ .public_base = &.{ 0, 0, 0, 0 } }, + .{ .public_base = &.{ 0, 0, 0, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 107453247, 797876016, 989154522, 1390776063, 993006569, 1826923324 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 915440958, 528046309, 1878834217, 1132327511, 1685431025, 998936590 } }, + .quotient_claims = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "RangeCheckCompiler/Basic" + +// expression: "z-recurrence-b1-k0" +const system_74_module_0_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b1-k0" + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 2 }, // col: "col" + .{ .op = .{ .operator = .add, .operands = &.{ 4, 5 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 7 } } }, +}; + +const system_74_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_74_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_74_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b0-k0" +const system_74_module_1_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "range-col-b8" + .{ .op = .{ .operator = .add, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 7 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 8 } } }, +}; + +const system_74_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 9, .cancelled_positions = &.{0} }, +}; + +const system_74_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_74_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +const system_74_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 8 }, .expressions = &system_74_module_0_expressions, .buckets = &system_74_module_0_buckets, .witness_claim_offset = 0 }, + // module: "range-mod-b8" + .{ .size = .{ .static = 8 }, .expressions = &system_74_module_1_expressions, .buckets = &system_74_module_1_buckets, .witness_claim_offset = 3 }, +}; + +const system_74_round_coin_counts = [_]usize{ 0, 1, 0, 2, 2 }; +const system_74_round_coin_offsets = [_]usize{ 0, 0, 1, 1, 3 }; + +// system: "rc-basic" +const system_74 = vanishing.System{ + .modules = &system_74_modules, + .round_coin_counts = &system_74_round_coin_counts, + .round_coin_offsets = &system_74_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 5, + .dynamic_module_count = 0, + .total_witness_claims = 7, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_74 = VanishingScenario{ + .name = "RangeCheckCompiler/Basic", + .system = system_74, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 2, 3, 4, 5, 6, 7 } }, + .{ .public_base = &.{ 1, 1, 1, 1, 1, 1, 1, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 146752040, 153079954, 1878594761, 50690945, 592516937, 1100413783 }, .{ 617673068, 584765821, 750248938, 1129603739, 1207409856, 1789699464 }, .{ 318653261, 1565997141, 1456238589, 559069706, 1899312080, 1414709567 }, .{ 1889832564, 1268947982, 805949805, 702787842, 1505065170, 115682203 }, .{ 36196041, 75845210, 1607167203, 537946933, 1150660712, 2031130746 }, .{ 1466987024, 1892571255, 821273510, 168974514, 2093801595, 959962112 }, .{ 1647642278, 737541784, 537889805, 1417955606, 1206575617, 856005337 }, .{ 876746253, 1564493981, 1213272472, 1025356894, 1817203812, 2057387083 } } }, + .{ .public_ext = &.{ .{ 1983954393, 1977626479, 252111672, 2080015488, 1538189496, 1030292650 }, .{ 1513033365, 1545940612, 1380457495, 1001102694, 923296577, 341006969 }, .{ 1812053172, 564709292, 674467844, 1571636727, 231394353, 715996866 }, .{ 240873869, 861758451, 1324756628, 1427918591, 625641263, 2015024230 }, .{ 2094510392, 2054861223, 523539230, 1592759500, 980045721, 99575687 }, .{ 663719409, 238135178, 1309432923, 1961731919, 36904838, 1170744321 }, .{ 483064155, 1393164649, 1592816628, 712750827, 924130816, 1274701096 }, .{ 1253960180, 566212452, 917433961, 1105349539, 313502621, 73319350 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 146752040, 153079954, 1878594761, 50690945, 592516937, 1100413783 } }, + .{ .ext = .{ 876746253, 1564493981, 1213272472, 1025356894, 1817203812, 2057387083 } }, + .{ .ext = .{ 1983954393, 1977626479, 252111672, 2080015488, 1538189496, 1030292650 } }, + .{ .ext = .{ 1253960180, 566212452, 917433961, 1105349539, 313502621, 73319350 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 268024242, 584088590, 878457999, 1125323534, 1182150502, 500424992 }, .{ 1916356962, 1667474064, 1737678702, 552518979, 612865874, 636846099 }, .{ 1541526334, 471451171, 1919891545, 879038108, 1301495575, 1528954824 }, .{ 1518969305, 1570017825, 85006322, 472502420, 185528965, 3786410 }, .{ 917517352, 218767901, 780067349, 714785029, 1957008218, 1307914522 }, .{ 1101672842, 1813865140, 422082249, 2111978710, 923166815, 2057071313 }, .{ 864157845, 952022392, 289572489, 191747832, 911645055, 1502541491 }, .{ 394600858, 1245138649, 279362644, 344224687, 1448964728, 985286081 } } }, + .{ .public_ext = &.{ .{ 1862682191, 1546617843, 1252248434, 1005382899, 948555931, 1630281441 }, .{ 214349471, 463232369, 393027731, 1578187454, 1517840559, 1493860334 }, .{ 589180099, 1659255262, 210814888, 1251668325, 829210858, 601751609 }, .{ 611737128, 560688608, 2045700111, 1658204013, 1945177468, 2126920023 }, .{ 1213189081, 1911938532, 1350639084, 1415921404, 173698215, 822791911 }, .{ 1029033591, 316841293, 1708624184, 18727723, 1207539618, 73635120 }, .{ 1266548588, 1178684041, 1841133944, 1938958601, 1219061378, 628164942 }, .{ 1736105575, 885567784, 1851343789, 1786481746, 681741705, 1145420352 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 772882558, 425600865, 1717219044, 646457931, 568473320, 1330617392 }, .{ 722196891, 605912798, 202364944, 2037945885, 1553143826, 985048288 }, .{ 1266101506, 78431951, 1980414339, 1892626064, 2040051872, 827970558 }, .{ 1, 0, 0, 0, 0, 0 }, .{ 1056526827, 1419035700, 537635768, 880620640, 1998657294, 1057904455 }, .{ 1349439772, 1637204840, 610104358, 773955948, 1746352860, 832944687 }, .{ 1299797778, 1575083329, 748167684, 1624860039, 1231942287, 9343125 } }, + .quotient_claims = &.{ .{ 1964074936, 1171884120, 376301121, 24805349, 1796151973, 1933893137 }, .{ 378549771, 773784203, 1399207819, 1940395118, 899314058, 417587788 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "RangeCheckCompiler/SharedBound" + +// expression: "z-recurrence-b1-k0" +const system_75_module_0_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 0 }, // col: "colB" + .{ .op = .{ .operator = .add, .operands = &.{ 1, 2 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 3 } } }, + .{ .constant = field.Element.init(1) }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 1 }, // col: "colA" + .{ .op = .{ .operator = .add, .operands = &.{ 6, 7 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 5, 8 } } }, + .{ .op = .{ .operator = .add, .operands = &.{ 4, 9 } } }, + .{ .column_claim = 2 }, // col: "z-b1-k0" + .{ .column_claim = 3 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 11, 12 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 1 }, // col: "colA" + .{ .op = .{ .operator = .add, .operands = &.{ 14, 15 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 0 }, // col: "colB" + .{ .op = .{ .operator = .add, .operands = &.{ 17, 18 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 16, 19 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 13, 20 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 10, 21 } } }, +}; + +const system_75_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 22, .cancelled_positions = &.{0} }, +}; + +const system_75_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 2, .vanishings = &system_75_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b0-k0" +const system_75_module_1_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "range-col-b4" + .{ .op = .{ .operator = .add, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 7 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 8 } } }, +}; + +const system_75_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 9, .cancelled_positions = &.{0} }, +}; + +const system_75_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_75_module_1_bucket_0_vanishings, .quotient_claim_offset = 2 }, +}; + +const system_75_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_75_module_0_expressions, .buckets = &system_75_module_0_buckets, .witness_claim_offset = 0 }, + // module: "range-mod-b4" + .{ .size = .{ .static = 4 }, .expressions = &system_75_module_1_expressions, .buckets = &system_75_module_1_buckets, .witness_claim_offset = 4 }, +}; + +const system_75_round_coin_counts = [_]usize{ 0, 1, 0, 2, 2 }; +const system_75_round_coin_offsets = [_]usize{ 0, 0, 1, 1, 3 }; + +// system: "rc-shared" +const system_75 = vanishing.System{ + .modules = &system_75_modules, + .round_coin_counts = &system_75_round_coin_counts, + .round_coin_offsets = &system_75_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 5, + .dynamic_module_count = 0, + .total_witness_claims = 8, + .total_quotient_claims = 3, +}; + +const vanishing_scenario_75 = VanishingScenario{ + .name = "RangeCheckCompiler/SharedBound", + .system = system_75, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 2, 3 } }, + .{ .public_base = &.{ 3, 0, 2, 1 } }, + .{ .public_base = &.{ 2, 2, 2, 2 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1474670890, 1499766615, 264008049, 600452102, 385839688, 567426019 }, .{ 458347610, 895059488, 832529886, 289368190, 1625029533, 1559551509 }, .{ 1364951523, 2001258965, 1936913791, 527449197, 207285979, 684515954 }, .{ 154577905, 340358420, 64899070, 412585116, 562886263, 132307029 } } }, + .{ .public_ext = &.{ .{ 1998557797, 80566965, 804003336, 822559206, 1759986447, 2123097886 }, .{ 1769383992, 1763743654, 387738393, 677875111, 2012824897, 277968915 }, .{ 862780079, 657544177, 1414060921, 439794104, 1299862018, 1153004470 }, .{ 1976128528, 1790348013, 2065807363, 1718121317, 1567820170, 1998399404 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 1474670890, 1499766615, 264008049, 600452102, 385839688, 567426019 } }, + .{ .ext = .{ 154577905, 340358420, 64899070, 412585116, 562886263, 132307029 } }, + .{ .ext = .{ 1998557797, 80566965, 804003336, 822559206, 1759986447, 2123097886 } }, + .{ .ext = .{ 1976128528, 1790348013, 2065807363, 1718121317, 1567820170, 1998399404 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 400093994, 369110736, 971939309, 712540022, 689841153, 1791196144 }, .{ 797497428, 1846962823, 1251364558, 1481051741, 1686848121, 1250579709 }, .{ 263187746, 157737982, 1166965256, 1977341288, 2086485444, 73761000 }, .{ 1849961578, 694240849, 1655468717, 1335883946, 345112727, 973671773 } } }, + .{ .public_ext = &.{ .{ 372731509, 1714001753, 1125948022, 1160339383, 955630462, 1420357413 }, .{ 275117419, 1981704592, 674678311, 1199190552, 1674462318, 674677105 }, .{ 1809488161, 1167670958, 453425235, 1230369715, 1940170858, 141511993 }, .{ 1885410060, 2090970768, 1370318707, 1370171302, 81722733, 259527323 } } }, + .{ .public_ext = &.{ .{ 708559075, 843752452, 709688629, 1642908360, 665050711, 1136319707 }, .{ 176302996, 1226204464, 1102677472, 212647668, 846443938, 1946773015 }, .{ 1185266071, 1292917295, 188650449, 1190293100, 211386779, 649173065 }, .{ 60578283, 898538655, 129689883, 1215563738, 407825005, 529147079 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1795007850, 505919044, 586461051, 1212723903, 1286476564, 1444273103 }, .{ 1582065880, 417638171, 971069099, 1737606124, 175728171, 149767406 }, .{ 264487324, 1187039651, 1169012105, 1796443305, 803736943, 1034482043 }, .{ 116558829, 895951699, 724246158, 396533370, 1392210372, 861377986 }, .{ 2, 0, 0, 0, 0, 0 }, .{ 1821107494, 89342396, 1329131826, 748758250, 116937704, 1334226255 }, .{ 311537309, 652106690, 1963767090, 2067916266, 1596069814, 1721454687 }, .{ 653239254, 1442448287, 1681878269, 1394824560, 673974588, 784644875 } }, + .quotient_claims = &.{ .{ 2125918153, 631110159, 193966681, 1573239027, 662163544, 92719685 }, .{ 1113260692, 1865114326, 1535968733, 222938895, 1353009446, 852981831 }, .{ 253289668, 1187926539, 1733300259, 1721030268, 972550661, 805369520 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "RangeCheckCompiler/DistinctBounds" + +// expression: "z-recurrence-b1-k0" +const system_76_module_0_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 0 }, // col: "colB" + .{ .op = .{ .operator = .add, .operands = &.{ 1, 2 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 0, 3 } } }, + .{ .constant = field.Element.init(1) }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 1 }, // col: "colA" + .{ .op = .{ .operator = .add, .operands = &.{ 6, 7 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 5, 8 } } }, + .{ .op = .{ .operator = .add, .operands = &.{ 4, 9 } } }, + .{ .column_claim = 2 }, // col: "z-b1-k0" + .{ .column_claim = 3 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 11, 12 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 1 }, // col: "colA" + .{ .op = .{ .operator = .add, .operands = &.{ 14, 15 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 0 }, // col: "colB" + .{ .op = .{ .operator = .add, .operands = &.{ 17, 18 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 16, 19 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 13, 20 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 10, 21 } } }, +}; + +const system_76_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 22, .cancelled_positions = &.{0} }, +}; + +const system_76_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 2, .vanishings = &system_76_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b0-k0" +const system_76_module_1_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "range-col-b4" + .{ .op = .{ .operator = .add, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 7 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 8 } } }, +}; + +const system_76_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 9, .cancelled_positions = &.{0} }, +}; + +const system_76_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_76_module_1_bucket_0_vanishings, .quotient_claim_offset = 2 }, +}; + +// expression: "z-recurrence-b2-k0" +const system_76_module_2_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b2-k0" + .{ .column_claim = 2 }, // col: "z-b2-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "range-col-b8" + .{ .op = .{ .operator = .add, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 7 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 8 } } }, +}; + +const system_76_module_2_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b2-k0" + .{ .expression = 9, .cancelled_positions = &.{0} }, +}; + +const system_76_module_2_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_76_module_2_bucket_0_vanishings, .quotient_claim_offset = 3 }, +}; + +const system_76_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_76_module_0_expressions, .buckets = &system_76_module_0_buckets, .witness_claim_offset = 0 }, + // module: "range-mod-b4" + .{ .size = .{ .static = 4 }, .expressions = &system_76_module_1_expressions, .buckets = &system_76_module_1_buckets, .witness_claim_offset = 4 }, + // module: "range-mod-b8" + .{ .size = .{ .static = 8 }, .expressions = &system_76_module_2_expressions, .buckets = &system_76_module_2_buckets, .witness_claim_offset = 8 }, +}; + +const system_76_round_coin_counts = [_]usize{ 0, 1, 0, 3, 3 }; +const system_76_round_coin_offsets = [_]usize{ 0, 0, 1, 1, 4 }; + +// system: "rc-distinct" +const system_76 = vanishing.System{ + .modules = &system_76_modules, + .round_coin_counts = &system_76_round_coin_counts, + .round_coin_offsets = &system_76_round_coin_offsets, + .max_round_coins = 3, + .total_round_coins = 7, + .dynamic_module_count = 0, + .total_witness_claims = 12, + .total_quotient_claims = 4, +}; + +const vanishing_scenario_76 = VanishingScenario{ + .name = "RangeCheckCompiler/DistinctBounds", + .system = system_76, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 2, 3 } }, + .{ .public_base = &.{ 5, 6, 7, 4 } }, + .{ .public_base = &.{ 1, 1, 1, 1 } }, + .{ .public_base = &.{ 0, 0, 0, 0, 1, 1, 1, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 872919895, 814732905, 1856410856, 161704826, 1433165866, 1402601001 }, .{ 1125317980, 1429377717, 249300506, 67398807, 437247081, 1752366102 }, .{ 146842818, 1945540937, 1770093631, 199857191, 286504408, 2046523720 }, .{ 134492006, 305886348, 289706477, 1004563629, 1278698, 831756166 } } }, + .{ .public_ext = &.{ .{ 1601370913, 343842151, 1154915674, 153152063, 277643207, 1493924965 }, .{ 1327208113, 1544209438, 215638372, 1081008416, 53325340, 1942610929 }, .{ 1772171670, 948533037, 1771413604, 1112242442, 1004867742, 1051691653 }, .{ 1920605343, 2045246210, 1241229290, 327576047, 1684361535, 1449756043 } } }, + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 1994623572, 542941416, 2010571468, 2110666390, 1736438350, 816703164 }, .{ 1651039197, 1515072793, 1129951371, 1795809501, 25629277, 50883631 }, .{ 1672803912, 1830767127, 1545632590, 962259167, 1245865929, 1383138999 }, .{ 75609084, 1910280308, 599770666, 798566757, 445066200, 1979900657 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 872919895, 814732905, 1856410856, 161704826, 1433165866, 1402601001 } }, + .{ .ext = .{ 134492006, 305886348, 289706477, 1004563629, 1278698, 831756166 } }, + .{ .ext = .{ 1601370913, 343842151, 1154915674, 153152063, 277643207, 1493924965 } }, + .{ .ext = .{ 1920605343, 2045246210, 1241229290, 327576047, 1684361535, 1449756043 } }, + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 75609084, 1910280308, 599770666, 798566757, 445066200, 1979900657 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 783804138, 1847591285, 386342192, 1026747977, 124934199, 1454512033 }, .{ 790810784, 1534199807, 1114030504, 726217619, 1831442498, 225773001 }, .{ 1460041280, 1838276538, 1216937536, 1437672664, 462605127, 1088734773 }, .{ 118077723, 951016469, 503485001, 568115453, 973239284, 1813544295 } } }, + .{ .public_ext = &.{ .{ 463254170, 1079074321, 906538555, 364207517, 1782132142, 716399581 }, .{ 1509896087, 1933121638, 46184189, 489367134, 629427217, 2112960894 }, .{ 1446825899, 1969228913, 289688605, 776757197, 1164159438, 1917357176 }, .{ 992346894, 672288533, 2039775743, 1914931236, 595907306, 951131316 } } }, + .{ .public_ext = &.{ .{ 968077776, 1350674737, 1817024607, 951847309, 5593707, 143878973 }, .{ 540658586, 1912836658, 376001049, 1730793909, 1449172429, 1227303577 }, .{ 929101435, 1051586231, 2084124089, 1101077761, 1058772669, 1361441214 }, .{ 1823575065, 2077021673, 2114969554, 477693887, 1747874061, 1528789102 } } }, + .{ .public_ext = &.{ .{ 332312082, 2010662047, 327308400, 176184274, 1051911986, 2011325603 }, .{ 1836706362, 597436850, 857764987, 138025140, 410305831, 388227373 }, .{ 1143901490, 464419534, 1771271959, 2036424679, 1014692953, 1269809537 }, .{ 88030665, 1076710448, 2082979348, 1169554627, 1884949622, 985389062 }, .{ 1524079008, 737910722, 1394190927, 1060501253, 1419796839, 121198912 }, .{ 1678306436, 1634186695, 1052070782, 2120378463, 1664581934, 1931561764 }, .{ 1123358962, 782153746, 1730639741, 469581124, 2029246535, 78342302 }, .{ 796130723, 1219345690, 1437306021, 1352176172, 1178046465, 1736971179 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1232084012, 581836858, 1711243452, 756456912, 878777260, 345797341 }, .{ 1277092110, 313357143, 485083034, 1938585959, 1260889468, 836474164 }, .{ 1841541762, 155260541, 246078208, 594673075, 465157968, 1771362422 }, .{ 35873606, 815946146, 1430354326, 1198189369, 1889455732, 678030921 }, .{ 1, 0, 0, 0, 0, 0 }, .{ 1575711648, 1942082661, 109784277, 898513230, 1391060649, 1569015434 }, .{ 1862564463, 1631073326, 370465073, 1222497356, 1923269833, 787265038 }, .{ 2104831958, 1150892276, 523113623, 325019928, 848734683, 1586423012 }, .{ 579553668, 552468664, 2067858864, 1391031864, 20033875, 1767044222 }, .{ 1463215885, 1305471500, 1822541116, 1847319535, 589542668, 1017343353 }, .{ 766696777, 491013529, 1261010869, 1803110474, 219909566, 381886768 }, .{ 1029521159, 1508175068, 393103626, 589555626, 2094169286, 1449663968 } }, + .quotient_claims = &.{ .{ 802298102, 1572918488, 294934810, 2119083740, 2079866512, 867054235 }, .{ 140519088, 1899162085, 1444359993, 1903647232, 776925311, 1661973663 }, .{ 374801483, 785717020, 751116134, 535993010, 1028592555, 1838351994 }, .{ 1138779091, 1272452581, 1461981262, 864496535, 876227812, 1273334958 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "RangeCheckCompiler/BoundIsPowerOfTwo" + +// expression: "z-recurrence-b1-k0" +const system_77_module_0_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b1-k0" + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 2 }, // col: "col" + .{ .op = .{ .operator = .add, .operands = &.{ 4, 5 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 7 } } }, +}; + +const system_77_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_77_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_77_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b0-k0" +const system_77_module_1_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "range-col-b16" + .{ .op = .{ .operator = .add, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 7 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 8 } } }, +}; + +const system_77_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 9, .cancelled_positions = &.{0} }, +}; + +const system_77_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_77_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +const system_77_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_77_module_0_expressions, .buckets = &system_77_module_0_buckets, .witness_claim_offset = 0 }, + // module: "range-mod-b16" + .{ .size = .{ .static = 16 }, .expressions = &system_77_module_1_expressions, .buckets = &system_77_module_1_buckets, .witness_claim_offset = 3 }, +}; + +const system_77_round_coin_counts = [_]usize{ 0, 1, 0, 2, 2 }; +const system_77_round_coin_offsets = [_]usize{ 0, 0, 1, 1, 3 }; + +// system: "rc-pow2" +const system_77 = vanishing.System{ + .modules = &system_77_modules, + .round_coin_counts = &system_77_round_coin_counts, + .round_coin_offsets = &system_77_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 5, + .dynamic_module_count = 0, + .total_witness_claims = 7, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_77 = VanishingScenario{ + .name = "RangeCheckCompiler/BoundIsPowerOfTwo", + .system = system_77, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 8, 15, 1 } }, + .{ .public_base = &.{ 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1109386831, 507811609, 609305132, 152776637, 133463774, 1223716504 }, .{ 78083582, 1427329459, 1270209829, 1455093702, 2032782590, 357065853 }, .{ 78083582, 1427329459, 1270209829, 1455093702, 2032782590, 357065853 }, .{ 78083582, 1427329459, 1270209829, 1455093702, 2032782590, 357065853 }, .{ 78083582, 1427329459, 1270209829, 1455093702, 2032782590, 357065853 }, .{ 78083582, 1427329459, 1270209829, 1455093702, 2032782590, 357065853 }, .{ 78083582, 1427329459, 1270209829, 1455093702, 2032782590, 357065853 }, .{ 78083582, 1427329459, 1270209829, 1455093702, 2032782590, 357065853 }, .{ 475639748, 544775384, 742664759, 370383697, 1374334533, 1105322862 }, .{ 475639748, 544775384, 742664759, 370383697, 1374334533, 1105322862 }, .{ 475639748, 544775384, 742664759, 370383697, 1374334533, 1105322862 }, .{ 475639748, 544775384, 742664759, 370383697, 1374334533, 1105322862 }, .{ 475639748, 544775384, 742664759, 370383697, 1374334533, 1105322862 }, .{ 475639748, 544775384, 742664759, 370383697, 1374334533, 1105322862 }, .{ 475639748, 544775384, 742664759, 370383697, 1374334533, 1105322862 }, .{ 1765991064, 916554948, 2064237694, 1996362655, 1678714425, 303445160 } } }, + .{ .public_ext = &.{ .{ 1021319602, 1622894824, 1521401301, 1977929796, 1997242659, 906989929 }, .{ 623763436, 374742466, 2048946371, 931933368, 524984283, 158732920 }, .{ 1464118553, 2962902, 727373436, 1436660843, 220604391, 960610622 }, .{ 364715369, 1214151485, 66468739, 134343778, 451992008, 1827261273 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 1109386831, 507811609, 609305132, 152776637, 133463774, 1223716504 } }, + .{ .ext = .{ 1765991064, 916554948, 2064237694, 1996362655, 1678714425, 303445160 } }, + .{ .ext = .{ 1021319602, 1622894824, 1521401301, 1977929796, 1997242659, 906989929 } }, + .{ .ext = .{ 364715369, 1214151485, 66468739, 134343778, 451992008, 1827261273 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1647367698, 924297894, 869974891, 524844091, 299358185, 936193014 }, .{ 1585699533, 619276747, 407330335, 1718968990, 1184742577, 1047283293 }, .{ 255671643, 1607188866, 721813616, 477369465, 635443097, 1583808102 }, .{ 772673996, 1110649359, 131587591, 1540230320, 11162574, 694128457 } } }, + .{ .public_ext = &.{ .{ 653511292, 834278743, 1380536102, 1466818802, 457837062, 831304963 }, .{ 1333012207, 918467401, 1969217513, 2077006762, 1365241823, 491278121 }, .{ 12054679, 1374701898, 35604709, 458707352, 1412801813, 1944466279 }, .{ 941141292, 176899700, 1759906946, 1227940502, 1878296852, 83701032 }, .{ 605586480, 2125604637, 757513297, 1017290332, 167688906, 1119681628 }, .{ 264087611, 1505500405, 1163224677, 1630468745, 253806159, 864066133 }, .{ 175525905, 87322204, 358528204, 1787806810, 1876605154, 1509739827 }, .{ 1913163638, 631627677, 624905508, 810307380, 1440026186, 1370259289 }, .{ 867483417, 1702191731, 566143337, 446649208, 1058716908, 908344123 }, .{ 594393800, 1717898458, 1302451454, 979038969, 1252103617, 1785350486 }, .{ 1463132421, 2023656933, 1402001396, 1451820470, 629550055, 336563278 }, .{ 1884013712, 1552501078, 736942426, 926564811, 1657214214, 510769943 }, .{ 853053203, 864054507, 154321692, 555802515, 1949364189, 480611019 }, .{ 573934057, 716478680, 2061636224, 13485377, 1225466269, 564513222 }, .{ 1057208481, 999984354, 921778194, 1762772341, 908931222, 298006255 }, .{ 1723642832, 1945189491, 1850939785, 433171088, 1642707468, 1816289433 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1587484073, 831343249, 1188787422, 446356632, 1525002369, 813884586 }, .{ 1329007080, 1194306089, 1704302197, 1965999663, 476297583, 732202888 }, .{ 1979640870, 1495525224, 1276377320, 1314119068, 937563501, 798635335 }, .{ 1052611515, 731738250, 1342622129, 745142932, 1369663045, 1951015132 }, .{ 197399917, 1032888881, 253403743, 1530092029, 684147661, 69886432 }, .{ 1614816878, 2054415566, 527726073, 372923619, 1210174391, 1126417775 }, .{ 177876110, 1270099904, 1404396669, 1682823929, 1059679609, 675796004 } }, + .quotient_claims = &.{ .{ 1562332556, 1769900397, 911121956, 1323803612, 1883913512, 1871001112 }, .{ 1630691588, 526636097, 1287569082, 730430336, 1049439672, 25462557 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "RangeCheckCompiler/BoundIsOne" + +// expression: "z-recurrence-b1-k0" +const system_78_module_0_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b1-k0" + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 2 }, // col: "col" + .{ .op = .{ .operator = .add, .operands = &.{ 4, 5 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 7 } } }, +}; + +const system_78_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_78_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_78_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +const system_78_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_78_module_0_expressions, .buckets = &system_78_module_0_buckets, .witness_claim_offset = 0 }, +}; + +const system_78_round_coin_counts = [_]usize{ 0, 1, 0, 1, 1 }; +const system_78_round_coin_offsets = [_]usize{ 0, 0, 1, 1, 2 }; + +// system: "rc-bound1" +const system_78 = vanishing.System{ + .modules = &system_78_modules, + .round_coin_counts = &system_78_round_coin_counts, + .round_coin_offsets = &system_78_round_coin_offsets, + .max_round_coins = 1, + .total_round_coins = 3, + .dynamic_module_count = 0, + .total_witness_claims = 3, + .total_quotient_claims = 1, +}; + +const vanishing_scenario_78 = VanishingScenario{ + .name = "RangeCheckCompiler/BoundIsOne", + .system = system_78, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 0, 0, 0 } }, + .{ .public_base = &.{4} }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{.{ 743396439, 1432119499, 714639985, 1041050886, 1982879710, 58466990 }} }, + .{ .public_ext = &.{ .{ 1412180715, 1239999950, 354016612, 805090495, 569633289, 1050736469 }, .{ 693654997, 349293467, 708033224, 1610180990, 1139266578, 2101472938 }, .{ 2105835712, 1589293417, 1062049836, 284565052, 1708899867, 1021502974 }, .{ 1387309994, 698586934, 1416066448, 1089655547, 147826723, 2072239443 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 743396439, 1432119499, 714639985, 1041050886, 1982879710, 58466990 } }, + .{ .ext = .{ 743396439, 1432119499, 714639985, 1041050886, 1982879710, 58466990 } }, + .{ .ext = .{ 1412180715, 1239999950, 354016612, 805090495, 569633289, 1050736469 } }, + .{ .ext = .{ 1387309994, 698586934, 1416066448, 1089655547, 147826723, 2072239443 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1, 0, 0, 0, 0, 0 }, .{ 1, 0, 0, 0, 0, 0 }, .{ 1, 0, 0, 0, 0, 0 }, .{ 1, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1952053860, 415344618, 309818277, 629037418, 1920741710, 1025954329 }, .{ 596632180, 493488426, 390967599, 471418264, 777974930, 265762222 }, .{ 0, 0, 0, 0, 0, 0 } }, + .quotient_claims = &.{.{ 1, 0, 0, 0, 0, 0 }}, + .module_sizes = &.{}, + }, +}; + +// scenario: "RangeCheckCompiler/MultiModule" + +// expression: "z-recurrence-b1-k0" +const system_79_module_0_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b1-k0" + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 2 }, // col: "colA" + .{ .op = .{ .operator = .add, .operands = &.{ 4, 5 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 7 } } }, +}; + +const system_79_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_79_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_79_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b2-k0" +const system_79_module_1_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b2-k0" + .{ .column_claim = 1 }, // col: "z-b2-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 2 }, // col: "colB" + .{ .op = .{ .operator = .add, .operands = &.{ 4, 5 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 7 } } }, +}; + +const system_79_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b2-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_79_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_79_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +// expression: "z-recurrence-b0-k0" +const system_79_module_2_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "range-col-b4" + .{ .op = .{ .operator = .add, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 7 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 8 } } }, +}; + +const system_79_module_2_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 9, .cancelled_positions = &.{0} }, +}; + +const system_79_module_2_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_79_module_2_bucket_0_vanishings, .quotient_claim_offset = 2 }, +}; + +const system_79_modules = [_]vanishing.Module{ + // module: "modA" + .{ .size = .{ .static = 4 }, .expressions = &system_79_module_0_expressions, .buckets = &system_79_module_0_buckets, .witness_claim_offset = 0 }, + // module: "modB" + .{ .size = .{ .static = 4 }, .expressions = &system_79_module_1_expressions, .buckets = &system_79_module_1_buckets, .witness_claim_offset = 3 }, + // module: "range-mod-b4" + .{ .size = .{ .static = 4 }, .expressions = &system_79_module_2_expressions, .buckets = &system_79_module_2_buckets, .witness_claim_offset = 6 }, +}; + +const system_79_round_coin_counts = [_]usize{ 0, 1, 0, 3, 3 }; +const system_79_round_coin_offsets = [_]usize{ 0, 0, 1, 1, 4 }; + +// system: "rc-cross-mod" +const system_79 = vanishing.System{ + .modules = &system_79_modules, + .round_coin_counts = &system_79_round_coin_counts, + .round_coin_offsets = &system_79_round_coin_offsets, + .max_round_coins = 3, + .total_round_coins = 7, + .dynamic_module_count = 0, + .total_witness_claims = 10, + .total_quotient_claims = 3, +}; + +const vanishing_scenario_79 = VanishingScenario{ + .name = "RangeCheckCompiler/MultiModule", + .system = system_79, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 2, 3 } }, + .{ .public_base = &.{ 3, 2, 1, 0 } }, + .{ .public_base = &.{ 2, 2, 2, 2 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1390875160, 441017653, 506945804, 1762748250, 1877980481, 1310329035 }, .{ 40939435, 124622162, 735406760, 1797632264, 692713355, 1919350568 }, .{ 442639694, 268296581, 1940640831, 1822403942, 1877234677, 1789813589 }, .{ 1499628269, 1297569668, 1099511529, 918345273, 696718625, 186324079 } } }, + .{ .public_ext = &.{ .{ 1435268853, 844844390, 1877233531, 1249332308, 126362976, 410188699 }, .{ 1044883499, 2068395352, 1763003053, 1231890301, 718996539, 1171031149 }, .{ 1909386586, 931204926, 95032801, 1219504462, 126735878, 170446422 }, .{ 315539082, 1481921599, 515597452, 606180580, 716993904, 972191177 } } }, + .{ .public_ext = &.{ .{ 536858929, 550716673, 420564651, 1517382551, 590258026, 801744755 }, .{ 1401362016, 1544232680, 883300832, 1504996712, 2128703798, 1931866461 }, .{ 1010976662, 637077209, 769070354, 1487554705, 590630928, 562002478 }, .{ 315539082, 1481921599, 515597452, 606180580, 716993904, 972191177 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 1390875160, 441017653, 506945804, 1762748250, 1877980481, 1310329035 } }, + .{ .ext = .{ 1499628269, 1297569668, 1099511529, 918345273, 696718625, 186324079 } }, + .{ .ext = .{ 1435268853, 844844390, 1877233531, 1249332308, 126362976, 410188699 } }, + .{ .ext = .{ 315539082, 1481921599, 515597452, 606180580, 716993904, 972191177 } }, + .{ .ext = .{ 536858929, 550716673, 420564651, 1517382551, 590258026, 801744755 } }, + .{ .ext = .{ 315539082, 1481921599, 515597452, 606180580, 716993904, 972191177 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 860730424, 382346576, 14442649, 1003222941, 1303308245, 241449793 }, .{ 2119943048, 1808492541, 776285491, 1168974917, 884767907, 350176761 }, .{ 688233955, 1141156946, 666500861, 1282675124, 681565489, 453778815 }, .{ 592505443, 929416803, 673477432, 806539884, 1391771225, 1085301064 } } }, + .{ .public_ext = &.{ .{ 32031519, 961111167, 401140738, 1457858376, 1841053673, 1503269784 }, .{ 1451161986, 728603883, 19533502, 644967463, 2016824598, 1434306179 }, .{ 1834215689, 1245637445, 671949874, 622036448, 1634187253, 882054969 }, .{ 944003676, 1326060371, 1038082319, 1536550579, 900053775, 441781934 } } }, + .{ .public_ext = &.{ .{ 409245585, 1366013281, 2101821135, 124260551, 1654796376, 1647806847 }, .{ 21526770, 644427784, 578135451, 1923463032, 361170619, 1430352911 }, .{ 754238523, 1979098974, 797704711, 1696062618, 767575455, 1223148803 }, .{ 945695547, 271872827, 783751569, 517626665, 1477870416, 2090810738 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1430394595, 258526498, 85101284, 1016380976, 1683322293, 484122645 }, .{ 707028360, 1892968133, 589531546, 174432696, 402930621, 64176390 }, .{ 1422735290, 2092912277, 1845854659, 1971766738, 1593282554, 1770933562 }, .{ 1346381614, 1871785429, 1465919271, 1219140933, 724435320, 58509070 }, .{ 380403795, 360290870, 467342361, 240046274, 1112979430, 1537556129 }, .{ 1982432410, 1508908534, 1232911802, 909959982, 1513249997, 381510484 }, .{ 2, 0, 0, 0, 0, 0 }, .{ 1418222037, 512753051, 601825619, 287204893, 356410914, 397454829 }, .{ 1051289062, 636608846, 517959550, 611232095, 288094328, 1805919520 }, .{ 1102183484, 813139724, 370371124, 239123948, 1300635911, 1907679172 } }, + .quotient_claims = &.{ .{ 887923209, 1646556279, 1221539953, 1359551340, 406337609, 1144110475 }, .{ 181640722, 570261428, 158606499, 420395183, 542245047, 1762835477 }, .{ 2029085349, 1540473856, 714417711, 1931550892, 865724273, 603089724 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "RangeCheckCompiler/LargeBound" + +// expression: "z-recurrence-b1-k0" +const system_80_module_0_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b1-k0" + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 2 }, // col: "col" + .{ .op = .{ .operator = .add, .operands = &.{ 4, 5 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 7 } } }, +}; + +const system_80_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_80_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_80_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b0-k0" +const system_80_module_1_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "range-col-b128" + .{ .op = .{ .operator = .add, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 7 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 8 } } }, +}; + +const system_80_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 9, .cancelled_positions = &.{0} }, +}; + +const system_80_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_80_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +const system_80_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 8 }, .expressions = &system_80_module_0_expressions, .buckets = &system_80_module_0_buckets, .witness_claim_offset = 0 }, + // module: "range-mod-b128" + .{ .size = .{ .static = 128 }, .expressions = &system_80_module_1_expressions, .buckets = &system_80_module_1_buckets, .witness_claim_offset = 3 }, +}; + +const system_80_round_coin_counts = [_]usize{ 0, 1, 0, 2, 2 }; +const system_80_round_coin_offsets = [_]usize{ 0, 0, 1, 1, 3 }; + +// system: "rc-large" +const system_80 = vanishing.System{ + .modules = &system_80_modules, + .round_coin_counts = &system_80_round_coin_counts, + .round_coin_offsets = &system_80_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 5, + .dynamic_module_count = 0, + .total_witness_claims = 7, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_80 = VanishingScenario{ + .name = "RangeCheckCompiler/LargeBound", + .system = system_80, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 1, 63, 127, 50, 100, 7, 99 } }, + .{ .public_base = &.{ 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1290368958, 725597307, 567579372, 965771204, 930139559, 2080609301 }, .{ 1808723692, 1148375161, 1828273086, 1592174548, 1839441761, 682270128 }, .{ 1808723692, 1148375161, 1828273086, 1592174548, 1839441761, 682270128 }, .{ 1808723692, 1148375161, 1828273086, 1592174548, 1839441761, 682270128 }, .{ 1808723692, 1148375161, 1828273086, 1592174548, 1839441761, 682270128 }, .{ 1808723692, 1148375161, 1828273086, 1592174548, 1839441761, 682270128 }, .{ 1808723692, 1148375161, 1828273086, 1592174548, 1839441761, 682270128 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 1249342481, 1704766916, 1799638496, 1876076028, 1179081638, 1622626585 }, .{ 228828970, 1371003610, 864212578, 728386202, 1017294063, 426741558 }, .{ 228828970, 1371003610, 864212578, 728386202, 1017294063, 426741558 }, .{ 228828970, 1371003610, 864212578, 728386202, 1017294063, 426741558 }, .{ 228828970, 1371003610, 864212578, 728386202, 1017294063, 426741558 }, .{ 228828970, 1371003610, 864212578, 728386202, 1017294063, 426741558 }, .{ 228828970, 1371003610, 864212578, 728386202, 1017294063, 426741558 }, .{ 228828970, 1371003610, 864212578, 728386202, 1017294063, 426741558 }, .{ 228828970, 1371003610, 864212578, 728386202, 1017294063, 426741558 }, .{ 228828970, 1371003610, 864212578, 728386202, 1017294063, 426741558 }, .{ 228828970, 1371003610, 864212578, 728386202, 1017294063, 426741558 }, .{ 228828970, 1371003610, 864212578, 728386202, 1017294063, 426741558 }, .{ 228828970, 1371003610, 864212578, 728386202, 1017294063, 426741558 }, .{ 228828970, 1371003610, 864212578, 728386202, 1017294063, 426741558 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 842429741, 687257254, 1965878205, 1644320501, 1457678242, 878772818 }, .{ 304141860, 1148786512, 1981460466, 100767840, 702411431, 486409239 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 2099650784, 1036479706, 670610167, 1038398505, 1386799992, 1965757602 }, .{ 84749978, 1118333306, 1591535540, 485906780, 22798771, 850820321 } } }, + .{ .public_ext = &.{ .{ 840337475, 1405109126, 1563127061, 1164935229, 1200566874, 50097132 }, .{ 321982741, 982331272, 302433347, 538531885, 291264672, 1448436305 }, .{ 1839088403, 1666077628, 1331474153, 1753304019, 1981586926, 996405045 }, .{ 1723282776, 1584224028, 410548780, 175089311, 1214881714, 2111342326 }, .{ 613089854, 1917987334, 1345974698, 1322779137, 1376669289, 1176520920 }, .{ 948287363, 2030294140, 526118564, 385148472, 692280728, 1827878990 }, .{ 1507668574, 1473902385, 554753154, 101246992, 1352640851, 887522533 }, .{ 2045956455, 1012373127, 539170893, 1644799653, 2107907662, 1279886112 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 1290368958, 725597307, 567579372, 965771204, 930139559, 2080609301 } }, + .{ .ext = .{ 84749978, 1118333306, 1591535540, 485906780, 22798771, 850820321 } }, + .{ .ext = .{ 840337475, 1405109126, 1563127061, 1164935229, 1200566874, 50097132 } }, + .{ .ext = .{ 2045956455, 1012373127, 539170893, 1644799653, 2107907662, 1279886112 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 202574123, 540550323, 1654966616, 461384955, 1920029123, 127682684 }, .{ 271116088, 632624646, 122283840, 1725319681, 255470290, 501818600 }, .{ 331383021, 1357665968, 767519741, 1167802090, 262881303, 1386830798 }, .{ 1157666575, 2059160892, 1158581643, 2037163908, 1580476951, 1068655236 }, .{ 974201279, 386132317, 1045795875, 1412803878, 150428818, 10142514 }, .{ 165954471, 1233598900, 1763048284, 909133034, 1194595649, 1362434400 }, .{ 1793629126, 144575798, 1456186204, 1610749147, 561619865, 1594152128 }, .{ 1495594624, 37810455, 554443529, 1329175472, 466617300, 340402939 } } }, + .{ .public_ext = &.{ .{ 1452199790, 365723061, 961917803, 1436024113, 279505636, 1590049657 }, .{ 542523146, 247523578, 1419347294, 1738044036, 459922051, 494764235 }, .{ 1934253969, 1827669830, 840002275, 1387718835, 1963881653, 157875331 }, .{ 1588329056, 1292075589, 1815899484, 183503115, 1126199785, 329496037 }, .{ 1638747373, 2049475510, 1773757966, 1333608723, 804172898, 521119965 }, .{ 353566795, 1763801259, 1399225742, 416811713, 1854850705, 55012200 }, .{ 475026059, 1159641250, 658283184, 2065218072, 179129064, 72555441 }, .{ 20250187, 925600944, 1733762764, 753902560, 650477323, 1756256534 }, .{ 46423697, 1872520131, 719383762, 1803788715, 353931180, 1887383426 }, .{ 1201810537, 806620359, 557808410, 1646086947, 1448136311, 829483036 }, .{ 594624459, 672566305, 91545763, 493913616, 1831770288, 396124516 }, .{ 1239341404, 872049493, 145276690, 241802485, 1655043614, 1129454608 }, .{ 1971180210, 914502761, 41969366, 819661281, 2026091532, 1765581424 }, .{ 1953299165, 605033894, 1416120862, 858210106, 1454249358, 238378737 }, .{ 1764000680, 77771438, 1167261598, 1686563683, 781964997, 951008850 }, .{ 802570316, 1972406702, 1621414798, 582350458, 359111932, 2021465699 }, .{ 366539011, 1408286343, 2051140211, 1646784569, 1083600364, 1010364934 }, .{ 1298911564, 2122988757, 1242436906, 1125150015, 743859782, 889560167 }, .{ 2018895854, 1916016787, 552825079, 484029793, 1767154823, 137172241 }, .{ 3254885, 1930609830, 2085832789, 1489465403, 1359608557, 1141939279 }, .{ 1142552023, 2008754334, 832848993, 1248924820, 878978010, 1502677244 }, .{ 901266236, 930081536, 2128373846, 1614238273, 1117028984, 2084678538 }, .{ 169660440, 2108617067, 1273049463, 1648735310, 526026451, 612510186 }, .{ 1104532303, 536201535, 558779733, 557961485, 1886221576, 1614996062 }, .{ 98807379, 453633513, 1720018075, 2022947057, 993985996, 2029248713 }, .{ 1408652915, 1041440795, 285927053, 1754351064, 570741922, 200564883 }, .{ 1753337356, 1650251047, 194717557, 1166084290, 456051055, 1847066106 }, .{ 1985294408, 532870018, 1089650815, 1763702703, 572650512, 2025817177 }, .{ 941027523, 1434690692, 54324768, 1205807381, 328638236, 1291658566 }, .{ 950959398, 754563202, 1369874453, 577653208, 258940644, 1901553690 }, .{ 2053810973, 1068243197, 142029650, 1696370793, 1014179876, 729156882 }, .{ 1190648261, 1931568002, 663646217, 1182931406, 48734587, 394108307 }, .{ 885357732, 1968302890, 1772076866, 1315573959, 1804920039, 866820518 }, .{ 209372716, 690018469, 102337501, 1736991309, 1537381741, 1894846456 }, .{ 101390215, 309548199, 807803236, 1743708225, 756579721, 1935075429 }, .{ 939111452, 521205297, 1651682213, 1726992831, 260736744, 1425228828 }, .{ 1445036450, 1265476268, 493915501, 1805856122, 520085248, 541562104 }, .{ 171740714, 1038245802, 507392996, 1549438809, 772191402, 1832486349 }, .{ 850464092, 192187124, 208504061, 1910904287, 428913248, 464527948 }, .{ 1048120246, 295977582, 1661078791, 2017263904, 43181983, 1778960609 }, .{ 375795124, 526778970, 1529475822, 101871743, 1785159202, 1116621957 }, .{ 1490490924, 1575025236, 1609903141, 999463914, 1586642588, 1929153610 }, .{ 1468036933, 1522646966, 2071281897, 1499018373, 1191081858, 1587447257 }, .{ 544501399, 911573597, 471460415, 1876318571, 286201005, 418885955 }, .{ 1089632601, 207772627, 1131087428, 238038024, 1985285892, 1399833003 }, .{ 1853589229, 1570027852, 1241437300, 142981236, 1223593671, 1583487810 }, .{ 507012080, 1360281557, 1529070118, 979382904, 1775122147, 443660198 }, .{ 1955970687, 2112186314, 672307642, 1436429220, 1121676523, 934235766 }, .{ 860414275, 815227968, 1184588905, 791285527, 704516664, 954068959 }, .{ 1500407694, 1989436497, 233020693, 981285830, 1647558931, 1678019628 }, .{ 1248047577, 618386267, 520406217, 945172883, 2023378370, 83016880 }, .{ 1232426862, 1903502397, 1465244506, 573419148, 1558410790, 1105696542 }, .{ 1400651082, 1171471952, 257940474, 1631378529, 420804265, 342896570 }, .{ 183712536, 946828505, 1021603372, 2128653752, 1600523883, 1076647454 }, .{ 2061399755, 1874686316, 356352380, 1047427696, 63433068, 1964805867 }, .{ 1178493170, 1445791006, 1595971422, 873823807, 1261486157, 162398818 }, .{ 1173367245, 1639548712, 1863887926, 1424764918, 1487872834, 1246034854 }, .{ 226880148, 1651801430, 1114326778, 1800513298, 2107714565, 1969266038 }, .{ 1708021751, 960212531, 952750040, 1540473716, 1352486885, 2005698441 }, .{ 2068692891, 1874866815, 987528492, 1545098390, 1041962104, 1517599169 }, .{ 1914374799, 1376634525, 1223641467, 234579499, 836475071, 1526996321 }, .{ 2121816614, 1545731737, 1100943584, 944159003, 1382266086, 1591554360 }, .{ 601226556, 952744972, 647660561, 677080720, 1288180331, 1753054880 }, .{ 514888469, 433979442, 632911568, 77168210, 1263656492, 2025895609 }, .{ 605792835, 1021171045, 52663197, 912510693, 2099088354, 1261895630 }, .{ 1597959712, 1515472972, 1084965080, 567166178, 93111878, 1519601883 }, .{ 658036677, 1541632732, 1247460451, 401545945, 682795823, 268541323 }, .{ 2088137265, 1417834697, 317278944, 1383604574, 2113189903, 1081687147 }, .{ 16009323, 1028436667, 206576808, 1062206650, 805692457, 1319233917 }, .{ 548938777, 1418404990, 1770256056, 1317054661, 875212509, 2124320416 }, .{ 669069819, 678417811, 1163352467, 1543691140, 1995526859, 822181646 }, .{ 1285900688, 1763464175, 1319685981, 1988135997, 274392477, 982359847 }, .{ 543485726, 1598323265, 868104516, 1486768554, 2090439132, 373355988 }, .{ 1802019494, 172682993, 387838954, 696269103, 1622837070, 544610633 }, .{ 802853328, 1873914906, 1608576432, 193868454, 1903576028, 735324020 }, .{ 812120833, 1325430520, 626177840, 1068607193, 538119024, 1396255411 }, .{ 606446921, 1631710575, 1525851366, 354011019, 292633361, 752252216 }, .{ 2050795789, 205684437, 1689018223, 932228147, 1868580156, 887413167 }, .{ 1479376215, 882166024, 1496539382, 958601871, 1788704502, 654727805 }, .{ 534386658, 1939645965, 1211443530, 637815679, 213742348, 373706135 }, .{ 1365978015, 1142530960, 1016053983, 2062220402, 1138310371, 1825484464 }, .{ 1771675269, 1291406733, 474755479, 1378916272, 869903215, 741976959 }, .{ 812179622, 831202936, 1510373215, 1662354208, 1835618405, 1771045046 }, .{ 1632354376, 414777355, 424681869, 2063572547, 824633073, 1742587565 }, .{ 1002759787, 1562601386, 1333828982, 570490207, 551990548, 2121799862 }, .{ 1122475146, 1918105107, 585172132, 1920971146, 1934522789, 869577953 }, .{ 338602229, 1766907832, 1176281189, 1405519102, 2038985463, 1635002557 }, .{ 1531592668, 1043848873, 776473752, 1546298058, 473208684, 1456998933 }, .{ 1250108660, 563476845, 233460623, 1340536956, 1651382381, 771483983 }, .{ 545400822, 917173318, 2048299211, 1490922677, 784795378, 343953285 }, .{ 941605422, 104215918, 1799715100, 2028600185, 1860441209, 156480017 }, .{ 1557870543, 42588618, 1749745435, 366343670, 2039985203, 1513073747 }, .{ 752846835, 47969112, 667666614, 2076575174, 913697137, 130742832 }, .{ 109280243, 1804736114, 929384081, 351903541, 668229395, 266793042 }, .{ 517152226, 2105953253, 1340589177, 593292111, 2066886576, 661092458 }, .{ 1896102602, 1216760039, 1100429868, 1585015412, 1836636698, 670907420 }, .{ 818204784, 54008512, 444591650, 522868342, 175755656, 1146316445 }, .{ 848300248, 636535467, 1963613446, 494540985, 1030246791, 407548568 }, .{ 712338938, 670016615, 626146094, 1740180532, 574034079, 35572112 }, .{ 1320127947, 803167140, 1474581550, 1773568881, 689621734, 1770516683 }, .{ 1970268947, 1975028386, 715894709, 105413974, 1620513609, 835204987 }, .{ 62190762, 1424939979, 1162983706, 328753866, 1581695531, 1645304092 }, .{ 1437401206, 599046641, 313041226, 649423230, 862269737, 1399974932 }, .{ 740697963, 1377665258, 176874783, 1362448510, 174360675, 670395949 }, .{ 799563068, 2100130916, 854490826, 541365492, 517453824, 627784557 }, .{ 1710004462, 314442747, 1473777734, 989128723, 432090924, 245571900 }, .{ 1017700384, 851764613, 2066561580, 1591827804, 177874309, 1033131818 }, .{ 985842786, 1169379841, 882118793, 1761108892, 1026226235, 722383373 }, .{ 1596363892, 1746470789, 1021724039, 6207446, 1841283702, 330669177 }, .{ 1623343356, 302003806, 1857216682, 1516713693, 1820095660, 1171417021 }, .{ 1284830774, 610586070, 739107965, 917657403, 1722253985, 1146297309 }, .{ 650511694, 1049000384, 665203550, 516420963, 1932238091, 1320765832 }, .{ 2098322281, 2090053632, 350945496, 1438717111, 1528875911, 1050286152 }, .{ 1756083810, 1797302601, 1809182976, 1369564593, 1463647670, 135848974 }, .{ 99653050, 1916396961, 1038401666, 1888741354, 314099050, 494507869 }, .{ 1914173983, 454136035, 1167865274, 1305568307, 1545563057, 1721085539 }, .{ 1052469771, 1382962136, 1913197956, 1907367302, 307993487, 1745061370 }, .{ 1136816862, 806766920, 953103358, 1316310872, 965090736, 424865782 }, .{ 919059530, 1898350398, 69130062, 661815978, 1451916114, 646388798 }, .{ 650357509, 411451353, 1051227641, 1659225389, 622425733, 1717630384 }, .{ 490080904, 2072725940, 1316326491, 1310774230, 645417684, 275653787 }, .{ 432534277, 1687201586, 641100166, 858053610, 16406362, 1638765512 }, .{ 1331121594, 1444756274, 1489279695, 544473433, 2062085443, 1884031933 }, .{ 517514576, 843003283, 573226870, 306178921, 1156832941, 1155142703 }, .{ 418855484, 557193080, 1345081440, 444737233, 123710007, 664375728 }, .{ 1267683014, 1144972959, 728364935, 1592851711, 1278051443, 445704747 }, .{ 1455253396, 876838130, 1746034016, 628357154, 1518680548, 781807179 }, .{ 101484537, 770599104, 502655852, 91896032, 746626234, 533166335 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1620905848, 861491794, 1409701471, 1246914004, 1419589457, 205294469 }, .{ 1295745548, 1195735867, 716413928, 2106144769, 1107550331, 696651908 }, .{ 820920160, 1342091032, 1417796845, 548021970, 727479888, 509084857 }, .{ 416562440, 876923603, 682763080, 1386384443, 2089868411, 636875401 }, .{ 684149225, 192442201, 575348021, 1646389074, 341192983, 616580898 }, .{ 623392707, 995805182, 544325313, 2065130312, 1559516273, 441272669 }, .{ 197928268, 1979102105, 768543885, 1855821384, 595012839, 1516832268 } }, + .quotient_claims = &.{ .{ 1587682297, 1957918073, 150632765, 861106021, 1620372568, 1518906703 }, .{ 1204318650, 1406137395, 1362571429, 1683386622, 172265352, 1024641714 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "RangeCheckCompiler/NonPowerOfTwoBound" + +// expression: "z-recurrence-b1-k0" +const system_81_module_0_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b1-k0" + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 2 }, // col: "col" + .{ .op = .{ .operator = .add, .operands = &.{ 4, 5 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 7 } } }, +}; + +const system_81_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_81_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_81_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b0-k0" +const system_81_module_1_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "range-col-b5" + .{ .op = .{ .operator = .add, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 7 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 8 } } }, +}; + +const system_81_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 9, .cancelled_positions = &.{0} }, +}; + +const system_81_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_81_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +const system_81_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_81_module_0_expressions, .buckets = &system_81_module_0_buckets, .witness_claim_offset = 0 }, + // module: "range-mod-b5" + .{ .size = .{ .static = 8 }, .expressions = &system_81_module_1_expressions, .buckets = &system_81_module_1_buckets, .witness_claim_offset = 3 }, +}; + +const system_81_round_coin_counts = [_]usize{ 0, 1, 0, 2, 2 }; +const system_81_round_coin_offsets = [_]usize{ 0, 0, 1, 1, 3 }; + +// system: "rc-np2" +const system_81 = vanishing.System{ + .modules = &system_81_modules, + .round_coin_counts = &system_81_round_coin_counts, + .round_coin_offsets = &system_81_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 5, + .dynamic_module_count = 0, + .total_witness_claims = 7, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_81 = VanishingScenario{ + .name = "RangeCheckCompiler/NonPowerOfTwoBound", + .system = system_81, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 4, 2, 1 } }, + .{ .public_base = &.{ 0, 1, 1, 0, 1, 0, 0, 1 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 0, 0, 0, 0, 0, 0 }, .{ 57836437, 2011096881, 1070815184, 956761548, 593033238, 1098834017 }, .{ 755710522, 1525665308, 1517862377, 1596915749, 2013936855, 688408168 }, .{ 755710522, 1525665308, 1517862377, 1596915749, 2013936855, 688408168 }, .{ 894937294, 1235960914, 1533680703, 1622839221, 741419675, 1162174104 }, .{ 894937294, 1235960914, 1533680703, 1622839221, 741419675, 1162174104 }, .{ 894937294, 1235960914, 1533680703, 1622839221, 741419675, 1162174104 }, .{ 554824180, 1755348024, 1710475121, 1570037434, 1084372469, 1641554151 } } }, + .{ .public_ext = &.{ .{ 340113114, 1611319323, 1953912015, 52801787, 1787753639, 1651326386 }, .{ 200886342, 1901023717, 1938093689, 26878315, 929564386, 1177560450 }, .{ 1633718690, 255748857, 1491046496, 1517430547, 1639367202, 1587986299 }, .{ 1575882253, 375358409, 420231312, 560668999, 1046333964, 489152282 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 554824180, 1755348024, 1710475121, 1570037434, 1084372469, 1641554151 } }, + .{ .ext = .{ 340113114, 1611319323, 1953912015, 52801787, 1787753639, 1651326386 } }, + .{ .ext = .{ 1575882253, 375358409, 420231312, 560668999, 1046333964, 489152282 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1035299533, 503030648, 1572398935, 1650544176, 1716899371, 1075938124 }, .{ 1740933287, 1299580073, 1418396142, 1078161837, 489055379, 343138537 }, .{ 696948559, 2019923521, 371200552, 1701805115, 881991330, 175726065 }, .{ 788231491, 438878624, 899417237, 1961608171, 1173466786, 535903707 } } }, + .{ .public_ext = &.{ .{ 547703450, 1879191109, 279153749, 1305434345, 206903531, 1592737371 }, .{ 25727549, 1985144172, 1763185272, 1758850712, 475036735, 687479554 }, .{ 1702925897, 381539236, 306953628, 2005065722, 924161933, 471164907 }, .{ 26886844, 1421005490, 1186642942, 2042989889, 2127968569, 1804264861 }, .{ 1382447952, 990313670, 244428739, 998697632, 563406014, 1711439693 }, .{ 1364794509, 653984698, 1897224487, 481187028, 1130479212, 72032861 }, .{ 1228607419, 1205375901, 1700293116, 48404245, 1847830476, 211496657 }, .{ 113025675, 6271456, 1144943799, 2012902592, 1247039262, 1972209828 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 1020060403, 223658764, 676978197, 1572244035, 1266584374, 594853038 }, .{ 756876196, 1411801056, 776856396, 1282831797, 1549206983, 1128285391 }, .{ 1829059843, 1036356443, 1069036780, 57160583, 1104607080, 268728282 }, .{ 588213167, 91564647, 559719392, 1163353339, 714887034, 798306432 }, .{ 456371739, 549246258, 854765760, 1355083035, 239481022, 347543223 }, .{ 1605842177, 1718774917, 829039033, 70998221, 445937717, 132593310 }, .{ 285260742, 1558956757, 1970296271, 257400123, 1775101214, 211691280 } }, + .quotient_claims = &.{ .{ 1068081313, 942207039, 582959613, 1443346601, 299676925, 917335817 }, .{ 1271695966, 985981691, 78364014, 577450384, 2214088, 1261627374 } }, + .module_sizes = &.{}, + }, +}; + +// scenario: "RangeCheckCompiler/AllZeros" + +// expression: "z-recurrence-b1-k0" +const system_82_module_0_expressions = [_]vanishing.ExprNode{ + .{ .constant = field.Element.init(1) }, + .{ .column_claim = 0 }, // col: "z-b1-k0" + .{ .column_claim = 1 }, // col: "z-b1-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 2 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 2 }, // col: "col" + .{ .op = .{ .operator = .add, .operands = &.{ 4, 5 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 3, 6 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 0, 7 } } }, +}; + +const system_82_module_0_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b1-k0" + .{ .expression = 8, .cancelled_positions = &.{0} }, +}; + +const system_82_module_0_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_82_module_0_bucket_0_vanishings, .quotient_claim_offset = 0 }, +}; + +// expression: "z-recurrence-b0-k0" +const system_82_module_1_expressions = [_]vanishing.ExprNode{ + .{ .column_claim = 0 }, // col: "M" + .{ .op = .{ .operator = .negate, .operands = &.{0} } }, + .{ .column_claim = 1 }, // col: "z-b0-k0" + .{ .column_claim = 2 }, // col: "z-b0-k0" + .{ .op = .{ .operator = .sub, .operands = &.{ 2, 3 } } }, + .{ .coin_value = 0 }, // coin: "gamma" + .{ .column_claim = 3 }, // col: "range-col-b8" + .{ .op = .{ .operator = .add, .operands = &.{ 5, 6 } } }, + .{ .op = .{ .operator = .mul, .operands = &.{ 4, 7 } } }, + .{ .op = .{ .operator = .sub, .operands = &.{ 1, 8 } } }, +}; + +const system_82_module_1_bucket_0_vanishings = [_]vanishing.Vanishing{ + // expression: "z-recurrence-b0-k0" + .{ .expression = 9, .cancelled_positions = &.{0} }, +}; + +const system_82_module_1_buckets = [_]vanishing.Bucket{ + .{ .ratio = 1, .vanishings = &system_82_module_1_bucket_0_vanishings, .quotient_claim_offset = 1 }, +}; + +const system_82_modules = [_]vanishing.Module{ + // module: "mod" + .{ .size = .{ .static = 4 }, .expressions = &system_82_module_0_expressions, .buckets = &system_82_module_0_buckets, .witness_claim_offset = 0 }, + // module: "range-mod-b8" + .{ .size = .{ .static = 8 }, .expressions = &system_82_module_1_expressions, .buckets = &system_82_module_1_buckets, .witness_claim_offset = 3 }, +}; + +const system_82_round_coin_counts = [_]usize{ 0, 1, 0, 2, 2 }; +const system_82_round_coin_offsets = [_]usize{ 0, 0, 1, 1, 3 }; + +// system: "rc-zeros" +const system_82 = vanishing.System{ + .modules = &system_82_modules, + .round_coin_counts = &system_82_round_coin_counts, + .round_coin_offsets = &system_82_round_coin_offsets, + .max_round_coins = 2, + .total_round_coins = 5, + .dynamic_module_count = 0, + .total_witness_claims = 7, + .total_quotient_claims = 2, +}; + +const vanishing_scenario_82 = VanishingScenario{ + .name = "RangeCheckCompiler/AllZeros", + .system = system_82, + .honest = .{ + .rounds = &.{ + .{ + .columns = &.{ + .{ .public_base = &.{ 0, 0, 0, 0 } }, + .{ .public_base = &.{ 4, 0, 0, 0, 0, 0, 0, 0 } }, + }, + .cells = &.{}, + }, + .{ + .columns = &.{}, + .cells = &.{}, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 364727690, 1074043933, 1259384264, 2049291895, 281275567, 388854691 }, .{ 364727690, 1074043933, 1259384264, 2049291895, 281275567, 388854691 }, .{ 364727690, 1074043933, 1259384264, 2049291895, 281275567, 388854691 }, .{ 364727690, 1074043933, 1259384264, 2049291895, 281275567, 388854691 }, .{ 364727690, 1074043933, 1259384264, 2049291895, 281275567, 388854691 }, .{ 364727690, 1074043933, 1259384264, 2049291895, 281275567, 388854691 }, .{ 364727690, 1074043933, 1259384264, 2049291895, 281275567, 388854691 }, .{ 364727690, 1074043933, 1259384264, 2049291895, 281275567, 388854691 } } }, + .{ .public_ext = &.{ .{ 974171294, 264165625, 1815860367, 1085706851, 1527710933, 1500816152 }, .{ 1948342588, 528331250, 1501014301, 40707269, 924715433, 870925871 }, .{ 791807449, 792496875, 1186168235, 1126414120, 321719933, 241035590 }, .{ 1765978743, 1056662500, 871322169, 81414538, 1849430866, 1741851742 } } }, + }, + .cells = &.{ + .{ .ext = .{ 0, 0, 0, 0, 0, 0 } }, + .{ .ext = .{ 364727690, 1074043933, 1259384264, 2049291895, 281275567, 388854691 } }, + .{ .ext = .{ 364727690, 1074043933, 1259384264, 2049291895, 281275567, 388854691 } }, + .{ .ext = .{ 974171294, 264165625, 1815860367, 1085706851, 1527710933, 1500816152 } }, + .{ .ext = .{ 1765978743, 1056662500, 871322169, 81414538, 1849430866, 1741851742 } }, + }, + }, + .{ + .columns = &.{ + .{ .public_ext = &.{ .{ 1, 0, 0, 0, 0, 0 }, .{ 1, 0, 0, 0, 0, 0 }, .{ 1, 0, 0, 0, 0, 0 }, .{ 1, 0, 0, 0, 0, 0 } } }, + .{ .public_ext = &.{ .{ 1065353216, 0, 0, 0, 0, 0 }, .{ 1065353216, 0, 0, 0, 0, 0 }, .{ 1065353216, 0, 0, 0, 0, 0 }, .{ 1065353216, 0, 0, 0, 0, 0 }, .{ 1065353216, 0, 0, 0, 0, 0 }, .{ 1065353216, 0, 0, 0, 0, 0 }, .{ 1065353216, 0, 0, 0, 0, 0 }, .{ 1065353216, 0, 0, 0, 0, 0 } } }, + }, + .cells = &.{}, + }, + }, + .witness_claims = &.{ .{ 736523180, 1698113251, 28999249, 869027631, 610666230, 184699866 }, .{ 1799295141, 429915307, 1531226743, 220540568, 255464110, 1022756052 }, .{ 0, 0, 0, 0, 0, 0 }, .{ 1265928543, 2117275145, 2071957232, 363352292, 1250262031, 1822527311 }, .{ 364727690, 1074043933, 1259384264, 2049291895, 281275567, 388854691 }, .{ 364727690, 1074043933, 1259384264, 2049291895, 281275567, 388854691 }, .{ 545328470, 862990839, 1450760917, 1467107319, 754190356, 1168002455 } }, + .quotient_claims = &.{ .{ 1, 0, 0, 0, 0, 0 }, .{ 1065353216, 0, 0, 0, 0, 0 } }, + .module_sizes = &.{}, + }, +}; + +pub const scenarios = [_]VanishingScenario{ + vanishing_scenario_0, + vanishing_scenario_1, + vanishing_scenario_2, + vanishing_scenario_3, + vanishing_scenario_4, + vanishing_scenario_5, + vanishing_scenario_6, + vanishing_scenario_7, + vanishing_scenario_8, + vanishing_scenario_9, + vanishing_scenario_10, + vanishing_scenario_11, + vanishing_scenario_12, + vanishing_scenario_13, + vanishing_scenario_14, + vanishing_scenario_15, + vanishing_scenario_16, + vanishing_scenario_17, + vanishing_scenario_18, + vanishing_scenario_19, + vanishing_scenario_20, + vanishing_scenario_21, + vanishing_scenario_22, + vanishing_scenario_23, + vanishing_scenario_24, + vanishing_scenario_25, + vanishing_scenario_26, + vanishing_scenario_27, + vanishing_scenario_28, + vanishing_scenario_29, + vanishing_scenario_30, + vanishing_scenario_31, + vanishing_scenario_32, + vanishing_scenario_33, + vanishing_scenario_34, + vanishing_scenario_35, + vanishing_scenario_36, + vanishing_scenario_37, + vanishing_scenario_38, + vanishing_scenario_39, + vanishing_scenario_40, + vanishing_scenario_41, + vanishing_scenario_42, + vanishing_scenario_43, + vanishing_scenario_44, + vanishing_scenario_45, + vanishing_scenario_46, + vanishing_scenario_47, + vanishing_scenario_48, + vanishing_scenario_49, + vanishing_scenario_50, + vanishing_scenario_51, + vanishing_scenario_52, + vanishing_scenario_53, + vanishing_scenario_54, + vanishing_scenario_55, + vanishing_scenario_56, + vanishing_scenario_57, + vanishing_scenario_58, + vanishing_scenario_59, + vanishing_scenario_60, + vanishing_scenario_61, + vanishing_scenario_62, + vanishing_scenario_63, + vanishing_scenario_64, + vanishing_scenario_65, + vanishing_scenario_66, + vanishing_scenario_67, + vanishing_scenario_68, + vanishing_scenario_69, + vanishing_scenario_70, + vanishing_scenario_71, + vanishing_scenario_72, + vanishing_scenario_73, + vanishing_scenario_74, + vanishing_scenario_75, + vanishing_scenario_76, + vanishing_scenario_77, + vanishing_scenario_78, + vanishing_scenario_79, + vanishing_scenario_80, + vanishing_scenario_81, + vanishing_scenario_82, +}; From 758ad3bd3efe794362e1d3fb69acef4ce0fe234c Mon Sep 17 00:00:00 2001 From: Ivo Kubjas Date: Thu, 4 Jun 2026 10:31:13 +0000 Subject: [PATCH 06/13] ci: check that vanishing testdata is up-to-date --- verifier-ray/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/verifier-ray/Makefile b/verifier-ray/Makefile index b472f504d95..85b5f5ae8a7 100644 --- a/verifier-ray/Makefile +++ b/verifier-ray/Makefile @@ -112,7 +112,7 @@ generate-testdata: cd testdata/generate && go run . verify-testdata: generate-testdata - git diff --exit-code -- testdata/generated/vectors.zig + git diff --exit-code -- testdata/generated/*.zig prepare-zkc-input: @# The ELF-to-JSON helper treats 0x input as a big-endian integer and reverses it From 151d59188e4dee3464011fc256db0ab4437fb3be Mon Sep 17 00:00:00 2001 From: Ivo Kubjas Date: Thu, 4 Jun 2026 10:32:38 +0000 Subject: [PATCH 07/13] test: add vanishing tests --- verifier-ray/build.zig | 9 ++ verifier-ray/test/all.zig | 1 + verifier-ray/test/vanishing_test.zig | 160 +++++++++++++++++++++++++++ 3 files changed, 170 insertions(+) create mode 100644 verifier-ray/test/vanishing_test.zig diff --git a/verifier-ray/build.zig b/verifier-ray/build.zig index 87962c9a6d5..3a248049dd5 100644 --- a/verifier-ray/build.zig +++ b/verifier-ray/build.zig @@ -33,6 +33,14 @@ pub fn build(b: *std.Build) void { .target = target, .optimize = optimize, }); + const test_vanishing_mod = b.addModule("test_vanishing", .{ + .root_source_file = b.path("testdata/generated/vanishing.zig"), + .target = target, + .optimize = optimize, + .imports = &.{ + .{ .name = "verifier_ray", .module = verifier_mod }, + }, + }); const exe = b.addExecutable(.{ .name = "verifier-ray", @@ -77,6 +85,7 @@ pub fn build(b: *std.Build) void { .imports = &.{ .{ .name = "verifier_ray", .module = verifier_mod }, .{ .name = "test_vectors", .module = test_vectors_mod }, + .{ .name = "test_vanishing", .module = test_vanishing_mod }, }, }), }); diff --git a/verifier-ray/test/all.zig b/verifier-ray/test/all.zig index 5f6462fad65..ce42e269f83 100644 --- a/verifier-ray/test/all.zig +++ b/verifier-ray/test/all.zig @@ -3,5 +3,6 @@ comptime { _ = @import("golden_test.zig"); _ = @import("transcript_test.zig"); _ = @import("vortex_test.zig"); + _ = @import("vanishing_test.zig"); _ = @import("generated_stub_test.zig"); } diff --git a/verifier-ray/test/vanishing_test.zig b/verifier-ray/test/vanishing_test.zig new file mode 100644 index 00000000000..66e4a5b1020 --- /dev/null +++ b/verifier-ray/test/vanishing_test.zig @@ -0,0 +1,160 @@ +const std = @import("std"); +const verifier_ray = @import("verifier_ray"); +const fixtures = @import("test_vanishing"); + +const field = verifier_ray.field.koalabear; +const ext = verifier_ray.field.koalabear_ext; +const runtime = verifier_ray.runtime; +const vanishing = verifier_ray.query.vanishing; + +test "vanishing quotient honest scenarios match prover-ray" { + try std.testing.expect(fixtures.scenarios.len > 0); + inline for (fixtures.scenarios) |case| { + const system = case.system; + var arena = std.heap.ArenaAllocator.init(std.testing.allocator); + defer arena.deinit(); + const input = try proofInput(arena.allocator(), case.honest); + try vanishing.verify(system, input); + } +} + +test "vanishing quotient invalid scenarios fail identity" { + var invalid_case_count: usize = 0; + inline for (fixtures.scenarios) |case| { + const invalid = case.invalid orelse continue; + invalid_case_count += 1; + const system = case.system; + var arena = std.heap.ArenaAllocator.init(std.testing.allocator); + defer arena.deinit(); + const input = try proofInput(arena.allocator(), invalid); + try std.testing.expectError(error.QuotientIdentityMismatch, vanishing.verify(system, input)); + } + try std.testing.expect(invalid_case_count > 0); +} + +test "dynamic vanishing module sizes are required and validated" { + comptime var dynamic_case_count: usize = 0; + var wrong_size_failures: usize = 0; + inline for (fixtures.scenarios) |case| { + const system = case.system; + if (system.dynamic_module_count == 0) continue; + dynamic_case_count += 1; + + var arena = std.heap.ArenaAllocator.init(std.testing.allocator); + defer arena.deinit(); + + const valid = try proofInput(arena.allocator(), case.honest); + try vanishing.verify(system, valid); + + var missing = valid; + missing.module_sizes = &.{}; + try std.testing.expectError(error.MissingDynamicModuleSize, vanishing.verify(system, missing)); + + var zero_sizes = try arena.allocator().dupe(usize, valid.module_sizes); + zero_sizes[0] = 0; + var zero = valid; + zero.module_sizes = zero_sizes; + try std.testing.expectError(error.InvalidModuleSize, vanishing.verify(system, zero)); + + var non_power_sizes = try arena.allocator().dupe(usize, valid.module_sizes); + non_power_sizes[0] = 7; + var non_power = valid; + non_power.module_sizes = non_power_sizes; + try std.testing.expectError(error.InvalidModuleSize, vanishing.verify(system, non_power)); + + var wrong_sizes = try arena.allocator().dupe(usize, valid.module_sizes); + wrong_sizes[0] = if (wrong_sizes[0] == 16) 8 else 16; + var wrong = valid; + wrong.module_sizes = wrong_sizes; + vanishing.verify(system, wrong) catch |err| { + if (err == error.QuotientIdentityMismatch) wrong_size_failures += 1 else return err; + }; + } + try std.testing.expect(dynamic_case_count > 0); + try std.testing.expect(wrong_size_failures > 0); +} + +fn proofInput(allocator: std.mem.Allocator, proof: fixtures.VanishingProofView) !vanishing.CheckInput { + const witness_claims = try allocator.alloc(ext.Ext, proof.witness_claims.len); + for (proof.witness_claims, 0..) |claim, i| { + witness_claims[i] = uintsToExt(claim); + } + + const quotient_claims = try allocator.alloc(ext.Ext, proof.quotient_claims.len); + for (proof.quotient_claims, 0..) |claim, i| { + quotient_claims[i] = uintsToExt(claim); + } + + const rounds = try allocator.alloc(runtime.RoundMessage, proof.rounds.len); + for (proof.rounds, 0..) |round, i| { + rounds[i] = try roundMessage(allocator, round); + } + + return .{ + .rounds = rounds, + .witness_claims = witness_claims, + .quotient_claims = quotient_claims, + .module_sizes = proof.module_sizes, + }; +} + +fn roundMessage(allocator: std.mem.Allocator, round: fixtures.RuntimeTraceRound) !runtime.RoundMessage { + var column_count: usize = 0; + for (round.columns) |column| { + column_count += switch (column) { + .oracle => |commitments| commitments.len, + .public_base, .public_ext => 1, + }; + } + + const columns = try allocator.alloc(runtime.ColumnMessage, column_count); + var next_column: usize = 0; + for (round.columns) |column| { + switch (column) { + .oracle => |commitments| { + for (commitments) |commitment| { + columns[next_column] = .{ .oracle_commitment = uintsToCommitment(commitment) }; + next_column += 1; + } + }, + .public_base => |values| { + const converted = try allocator.alloc(field.Element, values.len); + for (values, 0..) |value, i| { + converted[i] = field.Element.init(value); + } + columns[next_column] = .{ .public_column = .{ .base = converted } }; + next_column += 1; + }, + .public_ext => |values| { + const converted = try allocator.alloc(ext.Ext, values.len); + for (values, 0..) |value, i| { + converted[i] = uintsToExt(value); + } + columns[next_column] = .{ .public_column = .{ .ext = converted } }; + next_column += 1; + }, + } + } + + const cells = try allocator.alloc(runtime.Scalar, round.cells.len); + for (round.cells, 0..) |cell, i| { + cells[i] = switch (cell) { + .base => |value| .{ .base = field.Element.init(value) }, + .ext => |value| .{ .ext = uintsToExt(value) }, + }; + } + + return .{ .columns = columns, .cells = cells }; +} + +fn uintsToExt(limbs: [6]u32) ext.Ext { + return ext.Ext.fromUints(limbs[0], limbs[1], limbs[2], limbs[3], limbs[4], limbs[5]); +} + +fn uintsToCommitment(limbs: [8]u32) runtime.Commitment { + var out: runtime.Commitment = undefined; + for (&out, limbs) |*dst, limb| { + dst.* = field.Element.init(limb); + } + return out; +} From bb962d9af3f3df835201e3a11eccce452c191b17 Mon Sep 17 00:00:00 2001 From: Ivo Kubjas Date: Thu, 4 Jun 2026 10:58:59 +0000 Subject: [PATCH 08/13] docs: add some documentation notes --- verifier-ray/docs/global-constraint.md | 37 +++++++ verifier-ray/docs/system-codegen.md | 133 +++++++++++++++++++++++++ 2 files changed, 170 insertions(+) create mode 100644 verifier-ray/docs/global-constraint.md create mode 100644 verifier-ray/docs/system-codegen.md diff --git a/verifier-ray/docs/global-constraint.md b/verifier-ray/docs/global-constraint.md new file mode 100644 index 00000000000..392fbf855ce --- /dev/null +++ b/verifier-ray/docs/global-constraint.md @@ -0,0 +1,37 @@ +# Global Constraint: What the Verifier Checks + +**Inputs (trusted after PCS):** +``` +witness_claims[i] = C_i(r) // each unique column, evaluated at r +quotient_claims[k] = Q_k(r) // each quotient share, evaluated at r +merge_coin, r // Fiat-Shamir coins +n // module size +``` + +**Step 1 — evaluate each vanishing expression at r:** +``` +V_j(r) = eval_expression(V_j, witness_claims) + +// e.g. V = A·B → V(r) = witness_claims[A] * witness_claims[B] +// e.g. V = C·(C−1) → V(r) = witness_claims[C] * (witness_claims[C] − 1) +``` + +**Step 2 — apply cancellation:** +``` +P_j(r) = V_j(r) · ∏_{k ∈ cancelled_j} (r − ω^k) +``` + +**Step 3 — aggregate with merge coin:** +``` +P_agg(r) = Σ_j merge_coin^j · P_j(r) +``` + +**Step 4 — reconstruct Q(r) from shares:** +``` +Q(r) = Q_0(r) + r^n·Q_1(r) + r^{2n}·Q_2(r) + … +``` + +**Step 5 — identity check:** +``` +assert P_agg(r) == (r^n − 1) · Q(r) +``` \ No newline at end of file diff --git a/verifier-ray/docs/system-codegen.md b/verifier-ray/docs/system-codegen.md new file mode 100644 index 00000000000..d1881c343f1 --- /dev/null +++ b/verifier-ray/docs/system-codegen.md @@ -0,0 +1,133 @@ +# System Code Generation + +`verifier-ray` is built around dedicated verifier programs. The Zig verifier does not load and interpret a prover system at runtime. Instead, prover-ray compiles a WIOP `System`, verifier-ray extracts the compiled verifier metadata it needs, and the build/test flow emits Zig constants that are passed to verifier functions at comptime. + +This keeps the production shape aligned with the eventual verifier application: one compiled prover system produces one dedicated verifier binary. + +## Source Of Truth + +`prover-ray` remains the source of truth for circuit compilation. For vanishing quotient checks, the important compiler pass is: + +```text +prover-ray/wiop/compilers/global/global.go +``` + +That pass lowers module vanishing constraints into global quotient verifier actions. Each compiled `global.Verifier` contains the metadata needed by the Zig checker: + +- the module being checked +- module size mode, from `Verifier.Module` +- witness column views and their evaluation claim cells +- quotient buckets, ratios, quotient claim cells, and vanishing expressions +- merge and evaluation coins + +`verifier-ray/codegen` walks `System.Rounds[*].VerifierActions`, selects actions of type `*global.Verifier`, and converts them into a compact `vanishing.System` description for Zig. + +## Extraction And Rendering + +The codegen package is split by responsibility: + +- `verifier-ray/codegen/vanishing.go` extracts prover-ray objects into Go structs used by verifier-ray. +- `verifier-ray/codegen/vanishing_zig.go` renders those structs as Zig source using `text/template`. + +The generated Zig describes data, not executable polynomial code. The evaluator in `src/query/vanishing.zig` consumes this data at comptime: + +```zig +pub fn verify(comptime system: System, input: CheckInput) Error!void +``` + +For tests, generated prover scenarios live in: + +```text +verifier-ray/testdata/generated/vanishing.zig +``` + +The generated file contains the extracted `vanishing.System` values and matching proof views side by side. This file is test fixture data for prover-ray scenarios; it is not part of the verifier library API. + +## Static And Dynamic Module Sizes + +Module size is part of the generated system whenever prover-ray knows it at compile time: + +```zig +pub const ModuleSize = union(enum) { + static: usize, + dynamic: usize, +}; +``` + +Static modules use `.static = n`. Dynamic modules use `.dynamic = i`, where `i` indexes `CheckInput.module_sizes`: + +```zig +pub const CheckInput = struct { + ... + module_sizes: []const usize = &.{}, +}; +``` + +The static path lets Zig specialize operations such as `r^n`, cancellation roots, and quotient recombination for a concrete domain size. Dynamic modules still validate the supplied size at runtime and use runtime exponentiation/root lookup. + +## Why Comptime Matters + +The vanishing checker intentionally uses `inline for` only for loops over generated metadata: modules, buckets, vanishings, and cancellation positions. Those loops keep expression indices and static module metadata comptime-known. Data loops, such as quotient-share recombination, remain ordinary `for` loops. + +This distinction is important. If the generated `System` is traversed as ordinary runtime data, Zig can leave a VM-like expression evaluator in the compiled program. A small `ReleaseFast` experiment with one static module and expression `claim[0] + 7` showed the difference. + +With comptime traversal and inline metadata loops, the exported function compiled to direct arithmetic: + +```asm +: + mov rax, QWORD PTR [rdi] + add rax, 0xb + ret +``` + +The equivalent plain-loop version still materialized metadata and called a runtime evaluator: + +```asm +: + ... + call +``` + +`evalExprPlain` contained runtime expression-node dispatch over the expression array. That is exactly what the generated verifier is trying to avoid, especially for zkVM execution where verifier step count matters. + +The rule for this package is therefore: + +- use comptime parameters for the generated verifier system +- use inline metadata loops when their loop variables feed comptime-only expression or static-size helpers +- keep ordinary loops for proof data and other runtime input + +## Test Scenario Generation + +The testdata generator imports prover-ray, builds each `wioptest.VanishingScenario`, runs the global quotient compiler, and extracts the resulting `global.Verifier` actions through `verifier-ray/codegen`. + +The generator also runs prover-ray runtimes for honest and invalid assignments, then writes: + +- verifier-visible initial round messages +- quotient round messages +- witness evaluation claims +- quotient evaluation claims +- dynamic module sizes, when required + +These fixtures are regenerated with: + +```bash +cd verifier-ray +make generate-testdata +``` + +The Zig tests consume `testdata/generated/vanishing.zig` and call `vanishing.verify` with the generated system at comptime. + +## Production Direction + +The test suite currently generates many systems because it covers many prover-ray scenarios. A real verifier application should normally have one serialized prover-ray compiled system. The expected build flow is: + +1. prover-ray compiles and serializes the final system metadata +2. verifier-ray codegen renders one Zig `vanishing.System` for that metadata +3. the Zig build includes that generated file +4. the output binary is dedicated to that concrete system + +Polynomial commitment verification is still out of scope for the current vanishing compatibility tests. PCS/FRI integration notes live in: + +```text +verifier-ray/docs/vanishing-pcs-integration-notes.md +``` From bb8f81b37fb0859c9a738ac2152f899fcb995c29 Mon Sep 17 00:00:00 2001 From: Ivo Kubjas Date: Thu, 4 Jun 2026 10:59:16 +0000 Subject: [PATCH 09/13] docs: add later integration notes --- .../docs/vanishing-pcs-integration-notes.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 verifier-ray/docs/vanishing-pcs-integration-notes.md diff --git a/verifier-ray/docs/vanishing-pcs-integration-notes.md b/verifier-ray/docs/vanishing-pcs-integration-notes.md new file mode 100644 index 00000000000..6fe735683ad --- /dev/null +++ b/verifier-ray/docs/vanishing-pcs-integration-notes.md @@ -0,0 +1,13 @@ +# Vanishing PCS Integration Notes + +These notes track assumptions in the current vanishing quotient compatibility tests that must be revisited when PCS verification is wired in. + +- Dynamic `module_sizes` are trusted fixture inputs for now. PCS integration must authenticate or cross-check every dynamic size against commitment/proof metadata before `vanishing.verify` consumes it; the quotient identity alone can be size-independent when the evaluated numerator and quotient are both zero. +- Static module sizes are generated into `vanishing.System` and use a comptime-specialized path. The static path must remain semantically equivalent to the dynamic fallback for the same `n`. +- Current vanishing fixtures feed raw prover-ray oracle and quotient vectors into the transcript because prover-ray currently derives the corresponding coins from those vectors. PCS integration should replace those raw oracle/quotient transcript messages with authenticated commitments/openings while keeping coin derivation compatible. +- `vanishing.verify` currently owns a fixed three-round transcript: initial/witness messages, quotient messages, then evaluation checks. PCS/FRI integration will likely add more transcript rounds, so the full verifier should own the round schedule or receive generated proof metadata instead of baking the round count into the vanishing query checker. +- Merge and evaluation coins are currently sampled one per module in generated module order. PCS integration must preserve that deterministic ordering, or make the ordering explicit in generated metadata, so prover-ray and verifier-ray derive the same coins after additional PCS rounds are inserted. +- Shifted openings for `ColumnView.Shift` must be checked against the same module size/domain used by cancellation roots and quotient recombination. This is especially important for dynamic modules, where the size is supplied at proof time. +- Witness and quotient evaluations are trusted fixture inputs in this phase. PCS integration must authenticate those claimed evaluations before the quotient identity checker accepts them. +- Some full-pipeline prover scenarios can compile to no `global.Verifier` modules while still having cell-only verifier actions, such as `lookuptologderivsum.resultIsZeroVerifierAction` and `logderivativesum.verifierAction`. Current vanishing fixture generation skips those systems because verifier-ray only generates `global.Verifier` quotient checks; revisit this when adding compatibility support for those verifier action types. +- Any future FRI-backed PCS metadata that implies a domain size must be reconciled with `CheckInput.module_sizes`; disagreement should be a verifier error, not an unchecked assumption. From 5967d8f3e1efb570c9ee5d27b53b4020974451cd Mon Sep 17 00:00:00 2001 From: Ivo Kubjas Date: Fri, 5 Jun 2026 12:16:23 +0200 Subject: [PATCH 10/13] fix: ensure cancellation points are in allowed ranges Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Ivo Kubjas --- verifier-ray/src/query/vanishing.zig | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/verifier-ray/src/query/vanishing.zig b/verifier-ray/src/query/vanishing.zig index 517b42eebda..385203be38e 100644 --- a/verifier-ray/src/query/vanishing.zig +++ b/verifier-ray/src/query/vanishing.zig @@ -258,8 +258,17 @@ fn cancellationAtPoint( inline for (positions) |position| { // Cancellation polynomial for openings already enforced elsewhere: // C(r) = product_{k in cancelled} (r - omega_n^norm(k)). - const root = if (static_n != 0) comptime staticRootPower(static_n, normalizePosition(position, static_n, 0)) else omega.pow(@as(u64, @intCast(normalizePosition(position, 0, dynamic_n)))); - result = result.mul(r.sub(ext.Ext.lift(root))); + if (static_n != 0) { + const k = normalizePosition(position, static_n, 0); + comptime if (k >= static_n) @compileError("cancelled position out of range for static module"); + const root = comptime staticRootPower(static_n, k); + result = result.mul(r.sub(ext.Ext.lift(root))); + } else { + const k = normalizePosition(position, 0, dynamic_n); + if (k >= dynamic_n) return error.InvalidModuleSize; + const root = omega.pow(@as(u64, @intCast(k))); + result = result.mul(r.sub(ext.Ext.lift(root))); + } } return result; } From 242959e7a723e273de3d5f87ee03d2f4196b67fe Mon Sep 17 00:00:00 2001 From: Ivo Kubjas Date: Fri, 5 Jun 2026 12:31:28 +0200 Subject: [PATCH 11/13] fix: check that no coins in round 0 Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Ivo Kubjas --- verifier-ray/src/query/vanishing.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/verifier-ray/src/query/vanishing.zig b/verifier-ray/src/query/vanishing.zig index 385203be38e..af90e7c5c07 100644 --- a/verifier-ray/src/query/vanishing.zig +++ b/verifier-ray/src/query/vanishing.zig @@ -88,8 +88,8 @@ pub fn verify(comptime system: System, input: CheckInput) Error!void { if (system.round_coin_counts.len < 3) return error.InvalidRoundCount; if (system.round_coin_offsets.len != system.round_coin_counts.len) return error.InvalidRoundCount; if (input.rounds.len + 1 != system.round_coin_counts.len) return error.InvalidRoundCount; + if (system.round_coin_counts[0] != 0) return error.InvalidCoinCount; if (system.max_round_coins < system.modules.len) return error.InvalidCoinCount; - var rt = runtime.Runtime.initWithRoundCount(system.round_coin_counts.len); var all_coins: [system.total_round_coins]runtime.Coin = undefined; var round_coins: [system.max_round_coins]runtime.Coin = undefined; From a8777194f9bf8441569ccf801d26a6f5e7525666 Mon Sep 17 00:00:00 2001 From: Ivo Kubjas Date: Fri, 5 Jun 2026 12:31:47 +0200 Subject: [PATCH 12/13] fix: explicit error on too large module Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Ivo Kubjas --- verifier-ray/src/query/vanishing.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/verifier-ray/src/query/vanishing.zig b/verifier-ray/src/query/vanishing.zig index af90e7c5c07..66cfa119716 100644 --- a/verifier-ray/src/query/vanishing.zig +++ b/verifier-ray/src/query/vanishing.zig @@ -149,8 +149,9 @@ fn verifyModule( // dispatch. Data loops, such as quotient-share recombination, remain plain // for loops. comptime { - if (static_n != 0 and !validModuleSize(static_n)) { - @compileError("static vanishing module size must be a non-zero power of two"); + if (static_n != 0) { + if (!validModuleSize(static_n)) @compileError("static vanishing module size must be a non-zero power of two"); + _ = field.rootOfUnityBy(static_n) catch @compileError("static vanishing module size exceeds supported KoalaBear root-of-unity order"); } } if (static_n == 0 and !validModuleSize(dynamic_n)) return error.InvalidModuleSize; From 2ecc01ad56116fc347999d5b8c183fecb381f740 Mon Sep 17 00:00:00 2001 From: Ivo Kubjas Date: Fri, 5 Jun 2026 10:44:37 +0000 Subject: [PATCH 13/13] Revert "fix: ensure cancellation points are in allowed ranges" This reverts commit 5967d8f3e1efb570c9ee5d27b53b4020974451cd. --- verifier-ray/src/query/vanishing.zig | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/verifier-ray/src/query/vanishing.zig b/verifier-ray/src/query/vanishing.zig index 66cfa119716..7244b39cdae 100644 --- a/verifier-ray/src/query/vanishing.zig +++ b/verifier-ray/src/query/vanishing.zig @@ -259,17 +259,8 @@ fn cancellationAtPoint( inline for (positions) |position| { // Cancellation polynomial for openings already enforced elsewhere: // C(r) = product_{k in cancelled} (r - omega_n^norm(k)). - if (static_n != 0) { - const k = normalizePosition(position, static_n, 0); - comptime if (k >= static_n) @compileError("cancelled position out of range for static module"); - const root = comptime staticRootPower(static_n, k); - result = result.mul(r.sub(ext.Ext.lift(root))); - } else { - const k = normalizePosition(position, 0, dynamic_n); - if (k >= dynamic_n) return error.InvalidModuleSize; - const root = omega.pow(@as(u64, @intCast(k))); - result = result.mul(r.sub(ext.Ext.lift(root))); - } + const root = if (static_n != 0) comptime staticRootPower(static_n, normalizePosition(position, static_n, 0)) else omega.pow(@as(u64, @intCast(normalizePosition(position, 0, dynamic_n)))); + result = result.mul(r.sub(ext.Ext.lift(root))); } return result; }