Guruswami-Sudan Backend Contexts #
Explicit executable contexts for the CompPoly Guruswami-Sudan core. The contexts package replaceable operations together with the contracts used by the public correctness theorems.
Instances For
Instances For
Instances For
The GS weighted degree uses weights (1, messageDegree - 1).
Instances For
p.degree < k, treating the zero polynomial as degree bot.
Instances For
Semantic interpolation witness used by backend contracts and core completeness statements.
Instances For
A dense homogeneous linear-kernel backend.
The operation returns a nonzero kernel witness in the backend's chosen normalization when it can find one. Completeness is stated in the negative form needed by dense interpolation systems: if no witness is returned, no nonzero homogeneous solution exists.
- homogeneousWitness : DenseMatrix F → Option (Array F)
- witness_width {M : DenseMatrix F} {v : Array F} : self.homogeneousWitness M = some v → M.VectorWidth v
- witness_sound {M : DenseMatrix F} {v : Array F} : M.WellFormed → self.homogeneousWitness M = some v → M.IsHomogeneousSolution v
- witness_nonzero {M : DenseMatrix F} {v : Array F} : self.homogeneousWitness M = some v → DenseMatrix.NonzeroVector v
- witness_complete {M : DenseMatrix F} : M.WellFormed → self.homogeneousWitness M = none → ∀ (v : Array F), M.VectorWidth v → M.IsHomogeneousSolution v → ¬DenseMatrix.NonzeroVector v
Instances For
The dense Gaussian-elimination homogeneous-kernel backend.
The executable witness is computed by the in-place reduction
DenseMatrix.homogeneousWitnessInPlace, which mutates the matrix array instead of
copying it on every row operation. It returns the same witness as the copying
DenseMatrix.homogeneousWitness (DenseMatrix.homogeneousWitnessInPlace_eq), so the
backend contract is discharged by the copying-kernel correctness lemmas.
Instances For
Guruswami-Sudan-facing interpolation backend.
The backend packages the executable interpolation operation together with the contract fields used by callers, using the explicit context style used by univariate multiplication and remainder backends.
- interpolate : Array (F × F) → GSInterpParams → Option (CBivariate F)
- sound (points : Array (F × F)) (params : GSInterpParams) (Q : CBivariate F) : self.interpolate points params = some Q → ValidInterpolationWitness points params Q
- complete (points : Array (F × F)) (params : GSInterpParams) : DistinctXCoordinates points → (∃ (Q : CBivariate F), ValidInterpolationWitness points params Q) → ∃ (Q : CBivariate F), self.interpolate points params = some Q
Instances For
Executable root finder for univariate field polynomials.
Completeness is only required for nonzero polynomials. A zero univariate polynomial vanishes on every field element, so an unconditional array-valued complete root finder would have to enumerate the whole field.
- rootsInField : CPolynomial F → Array F
- complete (p : CPolynomial F) (a : F) : p ≠ 0 → CPolynomial.eval a p = 0 → a ∈ (self.rootsInField p).toList
Instances For
Guruswami-Sudan-facing bounded-degree root backend.
Completeness is only required for nonzero bivariate input. The zero bivariate polynomial has every degree-bounded univariate polynomial as a root, which is not a finite output contract for large fields.
- rootsYDegreeLt : CBivariate F → ℕ → Array (CPolynomial F)
- sound (Q : CBivariate F) (k : ℕ) (p : CPolynomial F) : p ∈ (self.rootsYDegreeLt Q k).toList → degreeLt p k ∧ Q.composeY p = 0
- complete (Q : CBivariate F) (k : ℕ) (p : CPolynomial F) : Q ≠ 0 → degreeLt p k → Q.composeY p = 0 → p ∈ (self.rootsYDegreeLt Q k).toList