@@ -3,8 +3,9 @@ import Mathlib.RingTheory.Ideal.Span
33
44open MvPolynomial
55open Ideal
6+ open Classical
67
7- section UPoly
8+ public section UPoly
89
910variable {R σ : Type *} [CommRing R]
1011
@@ -25,7 +26,7 @@ lemma eval_u_poly {i : σ} {A : Finset R} (x : σ → R)
2526
2627/-- A polynomial f is in the ideal generated by the u_polys iff f vanishes on all points
2728 whose coordinates lie in the given finite set A. -/
28- theorem mem_ideal_U_iff [Fintype σ] [IsDomain R] [DecidableEq σ]
29+ theorem mem_ideal_U_iff [Fintype σ] [IsDomain R]
2930 (A : Finset R) (f : MvPolynomial σ R) :
3031 f ∈ ideal_U A ↔ ∀ (x : σ → R), (∀ (i : σ), x i ∈ A) → f.eval x = 0 := by
3132 rw [ideal_U, mem_span_range_iff_exists_fun]
@@ -54,20 +55,52 @@ theorem mem_ideal_U_iff [Fintype σ] [IsDomain R] [DecidableEq σ]
5455 simp [Finsupp.linearCombination_apply, Finsupp.sum_fintype] at h2
5556 exact h2.symm
5657
58+
5759end UPoly
5860
59- section Field
6061
61- variable {K σ : Type *} [Field K] [Fintype K]
62+ variable {K σ : Type *} [Field K] (A : Finset K) (I : Ideal (MvPolynomial σ K))
6263
63- def zeroLocusA (A : Finset K) (I : Ideal (MvPolynomial σ K)) : Set (σ → K) :=
64- zeroLocus K I ∩ {x | ∀ i , x i ∈ A}
6564
65+ def zeroLocusA : Set (σ → K) :=
66+ zeroLocus K I ∩ {x : σ → K | ∀ i , x i ∈ A}
6667
67- example (A : Finset K) (I : Ideal (MvPolynomial σ K)) :
68- vanishingIdeal K (zeroLocusA A I) = I + ideal_U A := by
69- sorry
68+
69+ def zeroLocusACompl : Set (σ → K) :=
70+ {x : σ → K | ∀ i, x i ∈ A} \ (zeroLocusA A I)
7071
7172
73+ lemma zeroLocusACompl_mem
74+ (x : σ → K) (S : Finset (MvPolynomial σ K)) (hI : I = Ideal.span S) :
75+ x ∈ zeroLocusACompl A I → ∃ p ∈ S, p.eval x ≠ 0 := by
76+ intro hx
77+ simp [zeroLocusACompl, zeroLocusA, hI] at hx ⊢
78+ have ⟨hx, ⟨g, ⟨hg, hgx⟩⟩⟩ := hx
79+ induction hg using Submodule.span_induction with
80+ | mem p hp =>
81+ use p; exact ⟨hp, hgx⟩
82+ | zero => aesop
83+ | add p₁ p₂ _ _ ih₁ ih₂ =>
84+ simp at hgx
85+ by_cases h : (p₁.eval x) = 0
86+ . simp [h] at hgx
87+ exact ih₂ hgx
88+ . exact ih₁ h
89+ | smul p₁ p₂ _ ih =>
90+ by_cases h : (p₂.eval x) = 0
91+ . simp [h] at hgx
92+ . exact ih h
7293
73- end Field
94+
95+ example [Fintype σ] [Fintype K] (A : Finset K) (I : Ideal (MvPolynomial σ K)) :
96+ vanishingIdeal K (zeroLocusA A I) = I + ideal_U A := by
97+ ext p
98+ simp [zeroLocusA, Submodule.mem_sup]
99+ constructor <;> intro hp
100+ . sorry
101+ . intro x hx
102+ obtain ⟨f, hf, g, hg, hp⟩ := hp
103+ rw [← hp, eval_add]
104+ simp_all
105+ apply (mem_ideal_U_iff A g).mp
106+ exact hg
0 commit comments