Stafford38/Geometry/GeneralCoordinateAvoidance.lean

This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a

1 module
2 public import Mathlib.RingTheory.Nullstellensatz
3 
4 @[expose] public section
5 
6 /-!
7 # Polynomial inverses from coordinate avoidance
8 
9 A coordinate that never vanishes on an affine zero locus is invertible modulo
10 its defining ideal. The ideal need not be prime or radical.
11 -/
12 
13 namespace Stafford38.Geometry.GeneralCoordinateAvoidance
14 
15 noncomputable section
16 
17 theorem exists_coordinate_inverse_of_avoidance
18     {k : Type*} [Field k] [IsAlgClosed k] {m : ℕ}
19     (I : Ideal (MvPolynomial (Fin m) k)) (i : Fin m)
20     (havoid : ∀ y ∈ MvPolynomial.zeroLocus k I, y i ≠ 0) :
21     ∃ g : MvPolynomial (Fin m) k, MvPolynomial.X i * g - 1 ∈ I := by
22   classical
23   let J := I ⊔ Ideal.span ({MvPolynomial.X i} : Set (MvPolynomial (Fin m) k))
24   have htop : J = ⊤ := by
25     by_contra hne
26     obtain ⟨M, hM, hJM⟩ := Ideal.exists_le_maximal J hne
27     obtain ⟨y, hMy⟩ :=
28       MvPolynomial.isMaximal_iff_eq_vanishingIdeal_singleton.mp hM
29     have hy : y ∈ MvPolynomial.zeroLocus k I := by
30       intro p hp
31       have hpM := hJM (show p ∈ J from Ideal.mem_sup_left hp)
32       rw [hMy, MvPolynomial.mem_vanishingIdeal_singleton_iff] at hpM
33       exact hpM
34     have hxM : MvPolynomial.X i ∈ M :=
35       hJM (Ideal.mem_sup_right (Ideal.mem_span_singleton_self _))
36     rw [hMy, MvPolynomial.mem_vanishingIdeal_singleton_iff] at hxM
37     exact havoid y hy (by simpa using hxM)
38   have hone : (1 : MvPolynomial (Fin m) k) ∈ J := by simp [htop]
39   obtain ⟨b, hb, z, hz, hbz⟩ := Submodule.mem_sup.mp hone
40   obtain ⟨g, hg⟩ := Ideal.mem_span_singleton.mp hz
41   refine ⟨g, ?_⟩
42   have heq : MvPolynomial.X i * g - 1 = -b := by
43     rw [← hg]
44     rw [← hbz]
45     ring
46   rw [heq]
47   exact I.neg_mem hb
48 
49 #print axioms exists_coordinate_inverse_of_avoidance
50 
51 end
52 end Stafford38.Geometry.GeneralCoordinateAvoidance
53