Documentation

HexNumberFieldTowerMathlib.NormCore.Quadratic

The quadratic norm identity, with formal degrees so the linear coefficient may vanish.

theorem Hex.NumberTower.Norm.quadratic_congr (a b p q : ) (g : Polynomial ) (n : ) (hn : g.natDegree n) (heval : ∀ (z : ), z * z + b * z + a = 0Polynomial.eval z g = p + q * z) :
(Polynomial.X ^ 2 + Polynomial.C b * Polynomial.X + Polynomial.C a).resultant g 2 n = p * p - b * p * q + a * q * q

Replacing a polynomial by a linear expression with the same values on the roots of a monic quadratic preserves its resultant, including repeated roots and a vanishing linear coefficient.

theorem Hex.NumberTower.Norm.quadratic_eq_resultant (level : Level) (lower : List Level) (hdegree : level.degree = 2) (hlower : LevelsValid lower) (hinjective : LevelSemantics.DenoteInjective lower) (hinv : ∀ (a : Arithmetic.Coeff lower), LevelSemantics.coeffDenote lower a⁻¹ = (LevelSemantics.coeffDenote lower a)⁻¹) (f : Array (Array )) (c : ) :
quadratic level lower f c = Array.map Arithmetic.Coeff.data ((definingOuter level lower).resultant (shiftedOuter level lower f c)).toArray

The bounded quadratic computation returns exactly the encoded resultant. Only the lower tower must be a field; the top quadratic may have repeated roots or a nonzero linear coefficient.

theorem Hex.NumberTower.Norm.oneLevel_eq (level : Level) (lower : List Level) (hlower : LevelsValid lower) (hinjective : LevelSemantics.DenoteInjective lower) (hinv : ∀ (a : Arithmetic.Coeff lower), LevelSemantics.coeffDenote lower a⁻¹ = (LevelSemantics.coeffDenote lower a)⁻¹) (f : Array (Array )) (c : ) :
oneLevel level lower f c = Array.map Arithmetic.Coeff.data ((definingOuter level lower).resultant (shiftedOuter level lower f c)).toArray

The quadratic dispatch and the general fallback compute the same encoded one-level resultant over every validated lower tower.