Nimber polynomials #
This file contains multiple auxiliary results and definitions for working with nimber polynomials:
IsField.embed: embeds a polynomialp : Nimber[X]into the subfieldIio x, forIsField x.Lex.instLinearOrderPolynomial: a linear order instance on nimber polynomials, defined as the colexicographic ordering.leastNoRoots x: the smallest non-constant polynomial inxwithout roots less thanx.
For Mathlib #
Basic results #
Embedding in a subfield #
Reinterpret a polynomial in the nimbers as a polynomial in the subfield x.
We could define this under the weaker assumption IsRing, but due to proof erasure, this leads to
issues where Field (h.toSubring ⋯) can't be inferred, even if h : IsField x.
Equations
Instances For
Lexicographic ordering on polynomials #
Equations
- Nimber.Lex.instOrderBotPolynomial = { bot := 0, bot_le := Nimber.Lex.instOrderBotPolynomial._proof_1 }
Equations
- One or more equations did not get rendered due to their size.
Evaluate a nimber polynomial using ordinal arithmetic.
TODO: once the Ordinal.CNF API is more developed, use it to redefine this.
Equations
- x.oeval p = Nimber.of (List.map (fun (k : ℕ) => Nimber.val x ^ k * Nimber.val (p.coeff k)) (List.range (p.natDegree + 1)).reverse).sum
Instances For
Least irreducible polynomial #
Returns the lexicographically earliest non-constant polynomial, all of whose coefficients are
less than x, without any roots less than x. If none exists, returns ⊤.
This function takes values on WithTop (Nimber[X]), which is a well-ordered complete lattice (the
order on Nimber[X] is the lexicographic order).
Equations
- x.leastNoRoots = sInf (WithTop.some '' {p : Polynomial Nimber | 0 < p.degree ∧ (∀ (k : ℕ), p.coeff k < x) ∧ ∀ r < x, Polynomial.eval r p ≠ 0})