Module

NatPolynomialEvalEqEqMacaulayPow.lean

Nyll.SchemeTheory.RingTheory.Polynomial.NatPolynomialEvalEqEqMacaulayPow
12 declarations indexed from sourceView source ↗

Nat exists polynomial forall eval eq of forall eq macaulay Pow

Imports24
  • Batteries.Tactic.Init
  • Mathlib.Algebra.CharZero.Defs
  • Mathlib.Algebra.Field.Rat
  • Mathlib.Algebra.Group.Monoid
  • Mathlib.Algebra.Group.Nat.Defs
  • Mathlib.Algebra.Group.Semigroup
  • Mathlib.Algebra.Polynomial.Basic
  • Mathlib.Algebra.Polynomial.Eval.Defs
  • Mathlib.Algebra.Ring.Rat
  • Mathlib.Data.Nat.Basic
  • Mathlib.Data.Nat.Cast.Basic
  • Mathlib.Data.Nat.Cast.Defs
  • Mathlib.Data.Nat.Choose.Basic
  • Mathlib.Data.Nat.Factorial.Basic
  • Mathlib.Data.Nat.Find
  • Mathlib.Order.Basic
  • Mathlib.Order.Defs.LinearOrder
  • Mathlib.Order.Defs.PartialOrder
  • Mathlib.RingTheory.Polynomial.Pochhammer
  • Mathlib.Tactic.FieldSimp
  • Mathlib.Tactic.Push
  • Mathlib.Tactic.Ring.RingNF
  • Mathlib.Tactic.Set
  • Nyll.SchemeTheory.RingTheory.Polynomial.Macaulay
Imported by3

Declarations

AlgebraicCurves.Foundations.Polynomial.Proofs.Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow.PolyMaxSol.G

The sequence obtained by iterating Macaulay powers with successively increasing degrees.

Source context 6 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
open _root_.Nat.Macaulay
namespace AlgebraicCurves.Foundations.Polynomial.Proofs
namespace Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow
namespace PolyMaxSol
def G (d a : ℕ) : ℕ → ℕ
  | 0 => a
  | j + 1 => Nat.macaulayPow (d + j + 1) (G d a j)
AlgebraicCurves.Foundations.Polynomial.Proofs.Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow.PolyMaxSol.G_zero
Source context 6 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
open _root_.Nat.Macaulay
namespace AlgebraicCurves.Foundations.Polynomial.Proofs
namespace Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow
namespace PolyMaxSol
theorem G_zero (d a : ℕ) : G d a 0 = a
AlgebraicCurves.Foundations.Polynomial.Proofs.Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow.PolyMaxSol.G_succ
Source context 6 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
open _root_.Nat.Macaulay
namespace AlgebraicCurves.Foundations.Polynomial.Proofs
namespace Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow
namespace PolyMaxSol
theorem G_succ (d a j : ℕ) : G d a (j + 1) = Nat.macaulayPow (d + j + 1) (G d a j)
AlgebraicCurves.Foundations.Polynomial.Proofs.Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow.PolyMaxSol.G_zero_mid
Source context 6 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
open _root_.Nat.Macaulay
namespace AlgebraicCurves.Foundations.Polynomial.Proofs
namespace Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow
namespace PolyMaxSol
theorem G_zero_mid : ∀ (d j : ℕ), G d 0 j = 0
  | d, 0 => rfl
  | d, j + 1 => by rw [G_succ, G_zero_mid d j, macaulayPow_zero_right]
AlgebraicCurves.Foundations.Polynomial.Proofs.Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow.PolyMaxSol.top_G
Source context 6 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
open _root_.Nat.Macaulay
namespace AlgebraicCurves.Foundations.Polynomial.Proofs
namespace Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow
namespace PolyMaxSol
theorem top_G (d a : ℕ) : ∀ j : ℕ, top (d + j) (G d a j) = top d a + j
  | 0 => rfl
  | j + 1 => by
      rw [G_succ, show d + (j + 1) = (d + j) + 1 from rfl, top_macaulayPow, top_G d a j]; omega
AlgebraicCurves.Foundations.Polynomial.Proofs.Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow.PolyMaxSol.tail

The auxiliary Macaulay-growth sequence, with the degree-zero case set to zero.

Source context 6 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
open _root_.Nat.Macaulay
namespace AlgebraicCurves.Foundations.Polynomial.Proofs
namespace Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow
namespace PolyMaxSol
def tail : ℕ → ℕ → ℕ → ℕ
  | 0, _, _ => 0
  | d + 1, r, j => G d r j
AlgebraicCurves.Foundations.Polynomial.Proofs.Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow.PolyMaxSol.rem_G
Source context 6 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
open _root_.Nat.Macaulay
namespace AlgebraicCurves.Foundations.Polynomial.Proofs
namespace Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow
namespace PolyMaxSol
theorem rem_G : ∀ (d a j : ℕ), rem (d + j) (G d a j) = tail d (rem d a) j
  | 0, a, 0 => by simp only [Nat.add_zero, tail, G_zero, rem_zero_left]
  | 0, a, j + 1 => by
      rw [G_succ, show 0 + (j + 1) = (0 + j) + 1 from rfl, rem_macaulayPow, rem_G 0 a j]
      simp only [tail, macaulayPow_zero_right]
  | d + 1, a, 0 => by simp only [Nat.add_zero, tail, G_zero]
  | d + 1, a, j + 1 => by
      rw [G_succ, show d + 1 + (j + 1) = (d + 1 + j) + 1 from rfl, rem_macaulayPow, rem_G (d + 1) a
        j]
      simp only [tail]
      rw [G_succ, show d + 1 + j = d + j + 1 by omega]
AlgebraicCurves.Foundations.Polynomial.Proofs.Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow.PolyMaxSol.G_eq
Source context 6 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
open _root_.Nat.Macaulay
namespace AlgebraicCurves.Foundations.Polynomial.Proofs
namespace Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow
namespace PolyMaxSol
theorem G_eq (d a j : ℕ) : G d a j = (top d a + j).choose (d + j + 1) + tail d (rem d a) j
AlgebraicCurves.Foundations.Polynomial.Proofs.Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow.PolyMaxSol.exists_poly_choose
Source context 6 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
open _root_.Nat.Macaulay
namespace AlgebraicCurves.Foundations.Polynomial.Proofs
namespace Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow
namespace PolyMaxSol
theorem exists_poly_choose (t d : ℕ) (ht : d ≤ t) :
    ∃ P : Polynomial ℚ, ∀ j : ℕ, (((t + j).choose (d + j + 1) : ℕ) : ℚ) = P.eval (j : ℚ)
AlgebraicCurves.Foundations.Polynomial.Proofs.Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow.PolyMaxSol.exists_poly_tail_zero
Source context 6 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
open _root_.Nat.Macaulay
namespace AlgebraicCurves.Foundations.Polynomial.Proofs
namespace Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow
namespace PolyMaxSol
theorem exists_poly_tail_zero (r : ℕ) : ∃ P : Polynomial ℚ, ∀ j : ℕ, ((tail 0 r j : ℕ) : ℚ) =
  P.eval (j : ℚ)
AlgebraicCurves.Foundations.Polynomial.Proofs.Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow.PolyMaxSol.exists_poly_G
Source context 6 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
open _root_.Nat.Macaulay
namespace AlgebraicCurves.Foundations.Polynomial.Proofs
namespace Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow
namespace PolyMaxSol
theorem exists_poly_G : ∀ (d a : ℕ), ∃ P : Polynomial ℚ, ∀ j : ℕ, ((G d a j : ℕ) : ℚ) = P.eval (j :
  ℚ)
  | 0, a => by
      obtain ⟨P, hP⟩ := exists_poly_choose (top 0 a) 0 (d_le_top 0 a)
      refine ⟨P, fun j => ?_⟩
      rw [G_eq]; simp only [tail, add_zero]; rw [← hP]
  | d + 1, a => by
      obtain ⟨P, hP⟩ := exists_poly_choose (top (d + 1) a) (d + 1) (d_le_top (d + 1) a)
      obtain ⟨Q, hQ⟩ := exists_poly_G d (rem (d + 1) a)
      refine ⟨P + Q, fun j => ?_⟩
      rw [G_eq, Polynomial.eval_add, ← hP, ← hQ]
      simp only [tail]; push_cast; rfl
Nat.exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow
Source context 6 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section ProofImplementation
open _root_.Nat.Macaulay
namespace AlgebraicCurves.Foundations.Polynomial.Proofs
namespace Nat_exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow
open PolyMaxSol in
theorem _root_.Nat.exists_polynomial_forall_eval_eq_of_forall_eq_macaulayPow
    (H : ℕ → ℕ) (D₀ : ℕ) (hD₀ : 1 ≤ D₀)
    (hH : ∀ e, D₀ ≤ e → H (e + 1) = Nat.macaulayPow e (H e)) :
    ∃ P : Polynomial ℚ, ∀ e, D₀ ≤ e → (H e : ℚ) = P.eval (e : ℚ)