import OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.GradedIdealReconstruction import Mathlib.RingTheory.Finiteness.Basic /-! # Graded Relations -/ namespace OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction noncomputable section /-! If variable multiplication generates every degree above a bound, the reconstructed ideal is generated by the relations in degrees up to that bound. The generation hypothesis is explicit; no uniform bound is asserted here. -/ universe u v variable {R : Type u} [CommRing R] {σ : Type v} variable (D : GradedIdealReconstruction.GradedIdealRelations R σ) def GradedIdealReconstruction.GradedIdealRelations.lowDegreeRelations (B : ℕ) : Submodule R (MvPolynomial σ R) := ⨆ d : Fin (B + 1), (D.piece d).map (MvPolynomial.homogeneousSubmodule σ R d).subtype def GradedIdealReconstruction.GradedIdealRelations.lowDegreeIdeal (B : ℕ) : Ideal (MvPolynomial σ R) := Ideal.span (D.lowDegreeRelations B : Set (MvPolynomial σ R)) theorem GradedIdealReconstruction.GradedIdealRelations.lowDegreeIdeal_le (B : ℕ) : D.lowDegreeIdeal B ≤ D.toIdeal := by apply Ideal.span_le.mpr change D.lowDegreeRelations B ≤ D.toIdeal.restrictScalars R apply iSup_le intro d rintro _ ⟨p, hp, rfl⟩ exact (DegreewiseRelations.degreewiseRelations_mem_homogeneous D.piece p).mpr hp theorem GradedIdealReconstruction.GradedIdealRelations.piece_le_lowDegreeIdeal (B : ℕ) (hgen : ∀ d, B ≤ d → D.piece (d + 1) = ⨆ i : σ, (D.piece d).map (Homogeneous.MultiplicationMatrices.homogeneousMultiplyX R σ d i)) (d : ℕ) : D.piece d ≤ ((D.lowDegreeIdeal B).restrictScalars R).comap (MvPolynomial.homogeneousSubmodule σ R d).subtype := by induction d using Nat.strong_induction_on with | h d ih => by_cases hd : d ≤ B · intro p hp apply Ideal.subset_span exact (le_iSup (fun e : Fin (B + 1) => (D.piece e).map (MvPolynomial.homogeneousSubmodule σ R e).subtype) ⟨d, Nat.lt_succ_of_le hd⟩) ⟨p, hp, rfl⟩ · obtain ⟨e, rfl⟩ := Nat.exists_eq_succ_of_ne_zero (show d ≠ 0 by omega) rw [hgen e (by omega)] apply iSup_le intro i rintro _ ⟨p, hp, rfl⟩ exact (D.lowDegreeIdeal B).mul_mem_left (MvPolynomial.X i) (ih e (Nat.lt_succ_self e) hp) theorem GradedIdealReconstruction.GradedIdealRelations.lowDegreeIdeal_eq (B : ℕ) (hgen : ∀ d, B ≤ d → D.piece (d + 1) = ⨆ i : σ, (D.piece d).map (Homogeneous.MultiplicationMatrices.homogeneousMultiplyX R σ d i)) : D.lowDegreeIdeal B = D.toIdeal := by apply le_antisymm (D.lowDegreeIdeal_le B) intro p hp rw [← MvPolynomial.sum_homogeneousComponent p] apply Ideal.sum_mem intro d _hd exact D.piece_le_lowDegreeIdeal B hgen d (hp d) theorem GradedIdealReconstruction.GradedIdealRelations.lowDegreeRelations_fg (B : ℕ) (hfg : ∀ d ≤ B, (D.piece d).FG) : (D.lowDegreeRelations B).FG := by apply Submodule.fg_iSup intro d exact (hfg d (Nat.le_of_lt_succ d.isLt)).map _ theorem GradedIdealReconstruction.GradedIdealRelations.lowDegreeIdeal_fg (B : ℕ) (hfg : ∀ d ≤ B, (D.piece d).FG) : (D.lowDegreeIdeal B).FG := (D.lowDegreeRelations_fg B hfg).span theorem GradedIdealReconstruction.GradedIdealRelations.toIdeal_fg_of_generated (B : ℕ) (hgen : ∀ d, B ≤ d → D.piece (d + 1) = ⨆ i : σ, (D.piece d).map (Homogeneous.MultiplicationMatrices.homogeneousMultiplyX R σ d i)) (hfg : ∀ d ≤ B, (D.piece d).FG) : D.toIdeal.FG := by rw [← D.lowDegreeIdeal_eq B hgen] exact D.lowDegreeIdeal_fg B hfg end end OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction