import Mathlib.RingTheory.Finiteness.Ideal /-! # Ideal Generators -/ namespace OAI.AlgebraicGeometry.HilbertScheme.Presentations.Finite.IdealGenerators noncomputable section /-! Finitely generated images of an ideal span are generated by the images of finitely many elements of the original specified generating set. -/ universe u v variable {R : Type u} [CommRing R] theorem fg_span_finite_subset (s : Set R) (h : (Ideal.span s).FG) : ∃ t : Finset R, (↑t : Set R) ⊆ s ∧ Ideal.span (↑t : Set R) = Ideal.span s := by classical obtain ⟨v, hv⟩ := h have hx (x : v) : (x : R) ∈ Ideal.span s := hv ▸ Ideal.subset_span x.property choose t ht hm using fun x : v => Submodule.mem_span_finite_of_mem_span (hx x) let w := v.attach.biUnion t have hw : (↑w : Set R) ⊆ s := by intro x hxw obtain ⟨y, _, hxy⟩ := Finset.mem_biUnion.mp hxw exact ht y hxy refine ⟨w, hw, le_antisymm (Ideal.span_mono hw) ?_⟩ rw [← hv] apply Ideal.span_le.mpr intro x hxv apply (Ideal.span_mono (show (↑(t ⟨x, hxv⟩) : Set R) ⊆ ↑w from ?_)) (hm ⟨x, hxv⟩) intro y hy exact Finset.mem_biUnion.mpr ⟨⟨x, hxv⟩, Finset.mem_attach _ _, hy⟩ theorem fg_map_span_finite_subset {A : Type v} [CommRing A] (φ : R →+* A) (s : Set R) (h : ((Ideal.span s).map φ).FG) : ∃ t : Finset R, (↑t : Set R) ⊆ s ∧ (Ideal.span (↑t : Set R)).map φ = (Ideal.span s).map φ := by classical rw [Ideal.map_span] at h obtain ⟨v, hv, he⟩ := fg_span_finite_subset (φ '' s) h obtain ⟨t, ht, htv⟩ := Finset.subset_set_image_iff.mp hv refine ⟨t, ht, ?_⟩ rw [Ideal.map_span, Ideal.map_span, ← he, ← htv, Finset.coe_image] end end OAI.AlgebraicGeometry.HilbertScheme.Presentations.Finite.IdealGenerators