File size: 14,393 Bytes
4a56cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
/-
Copyright 2026 The Formal Conjectures Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
This file has been modified.
-/
import OAI.AlgebraicGeometry.ComplexPoint.AffineScheme
import Mathlib.RingTheory.Etale.StandardEtale
import Mathlib.Logic.Equiv.PartialEquiv
import Mathlib.Topology.Algebra.MvPolynomial

/-! # Standard Etale -/

namespace OAI.AlgebraicGeometry.ComplexPoint.StandardEtale.ComplexAlgHom

noncomputable section

/-!
# Complex points of standard étale algebras

A complex point of a standard étale algebra over a polynomial ring is a base point together with
a root of the defining polynomial at which the localization polynomial does not vanish. This file
constructs that correspondence as a homeomorphism. The inverse continuity proof evaluates an
arbitrary representative in the explicit bivariate-polynomial quotient presentation.

Like `ComplexPoint.Localization`, this works throughout with `ℂ`-algebra homomorphisms rather
than with complex points of schemes, so it lives in namespace `AlgebraicGeometry.ComplexAlgHom`.
-/

open scoped _root_.Polynomial

open _root_.CategoryTheory _root_.Topology

open ComplexPoint OAI.AlgebraicGeometry.ComplexPoint.Basic.Point

/-- The polynomial coordinate ring of complex affine `n`-space. -/
abbrev complexPolynomialRing (n : ℕ) := MvPolynomial (Fin n) ℂ

/-- A complex algebra homomorphism out of a polynomial ring is determined by the images of its
variables. -/
def mvPolynomialAlgHomEquiv (n : ℕ) :
    (complexPolynomialRing n →ₐ[ℂ] ℂ) ≃ (Fin n → ℂ) where
  toFun φ i := φ (MvPolynomial.X i)
  invFun v := MvPolynomial.aeval v
  left_inv φ := MvPolynomial.algHom_ext fun i ↦ by simp
  right_inv v := funext fun i ↦ by simp

lemma continuous_mvPolynomialAlgHomEquiv (n : ℕ) :
    Continuous (mvPolynomialAlgHomEquiv n) :=
  continuous_pi fun i ↦
    Basic.ComplexSchemePoint.continuous_affineAlgebraHom_apply (complexPolynomialRing n) (MvPolynomial.X i)

lemma continuous_mvPolynomialAlgHomEquiv_symm (n : ℕ) :
    Continuous (mvPolynomialAlgHomEquiv n).symm := by
  rw [continuous_induced_rng]
  refine continuous_pi fun p ↦ ?_
  simpa [mvPolynomialAlgHomEquiv] using p.continuous_eval

/-- Pointwise convergence on complex algebra homomorphisms out of a polynomial ring is the usual
Euclidean topology on the tuple of variable values. -/
def mvPolynomialAlgHomHomeomorph (n : ℕ) :
    (complexPolynomialRing n →ₐ[ℂ] ℂ) ≃ₜ (Fin n → ℂ) where
  toEquiv := mvPolynomialAlgHomEquiv n
  continuous_toFun := continuous_mvPolynomialAlgHomEquiv n
  continuous_invFun := continuous_mvPolynomialAlgHomEquiv_symm n

variable {n : ℕ} (P : StandardEtalePair (complexPolynomialRing n))

/-- The complex algebra structure on a standard étale algebra over a complex polynomial ring. -/
noncomputable instance standardEtaleRingAlgebra : Algebra ℂ P.Ring :=
  ((algebraMap (complexPolynomialRing n) P.Ring).comp
    (algebraMap ℂ (complexPolynomialRing n))).toAlgebra

noncomputable instance standardEtaleRingIsScalarTower :
    IsScalarTower ℂ (complexPolynomialRing n) P.Ring :=
  IsScalarTower.of_algebraMap_eq fun _ ↦ rfl

/-- A base point and a root satisfying the equations represented by a standard étale pair. -/
abbrev standardEtalePointSpace :=
  { vx : ((complexPolynomialRing n →ₐ[ℂ] ℂ) × ℂ) //
    Polynomial.eval₂ vx.1 vx.2 P.f = 0 ∧ Polynomial.eval₂ vx.1 vx.2 P.g ≠ 0 }

/-- Construct a complex algebra homomorphism from the root data of a standard étale point. -/
def standardEtalePointToAlgHom (z : standardEtalePointSpace P) : P.Ring →ₐ[ℂ] ℂ :=
  letI : Algebra (complexPolynomialRing n) ℂ := z.1.1.toRingHom.toAlgebra
  letI : IsScalarTower ℂ (complexPolynomialRing n) ℂ :=
    IsScalarTower.of_algebraMap_eq fun c ↦ (z.1.1.commutes c).symm
  have hz : P.HasMap z.1.2 := by
    rw [StandardEtalePair.HasMap]
    constructor
    · simpa [Polynomial.aeval_def, RingHom.algebraMap_toAlgebra] using z.2.1
    · simpa [Polynomial.aeval_def, RingHom.algebraMap_toAlgebra, isUnit_iff_ne_zero] using z.2.2
  (P.lift z.1.2 hz).restrictScalars ℂ

/-- Read the base point and distinguished root from a complex point of a standard étale algebra. -/
def algHomToStandardEtalePoint (φ : P.Ring →ₐ[ℂ] ℂ) : standardEtalePointSpace P :=
  let v : complexPolynomialRing n →ₐ[ℂ] ℂ :=
    φ.comp (IsScalarTower.toAlgHom ℂ (complexPolynomialRing n) P.Ring)
  let x := φ P.X
  ⟨(v, x), by
    let : Algebra (complexPolynomialRing n) ℂ := v.toRingHom.toAlgebra
    let φB : P.Ring →ₐ[complexPolynomialRing n] ℂ :=
      { toRingHom := φ.toRingHom
        commutes' b := rfl }
    have h := P.hasMap_X.map φB
    constructor
    · simpa [v, x, φB, StandardEtalePair.HasMap, Polynomial.aeval_def,
        RingHom.algebraMap_toAlgebra] using h.1
    · simpa [v, x, φB, StandardEtalePair.HasMap, Polynomial.aeval_def,
        RingHom.algebraMap_toAlgebra, isUnit_iff_ne_zero] using h.2⟩

/-- Complex algebra homomorphisms out of a standard étale algebra are equivalent to its root
data. -/
def standardEtalePointEquiv :
    (P.Ring →ₐ[ℂ] ℂ) ≃ standardEtalePointSpace P where
  toFun := algHomToStandardEtalePoint P
  invFun := standardEtalePointToAlgHom P
  left_inv φ := by
    let v : complexPolynomialRing n →ₐ[ℂ] ℂ :=
      φ.comp (IsScalarTower.toAlgHom ℂ (complexPolynomialRing n) P.Ring)
    let : Algebra (complexPolynomialRing n) ℂ := v.toRingHom.toAlgebra
    let hscalar : IsScalarTower ℂ (complexPolynomialRing n) ℂ :=
      IsScalarTower.of_algebraMap_eq fun c ↦ (v.commutes c).symm
    let := hscalar
    let φB : P.Ring →ₐ[complexPolynomialRing n] ℂ :=
      { toRingHom := φ.toRingHom
        commutes' b := rfl }
    have heq : P.lift (φ P.X) (P.hasMap_X.map φB) = φB :=
      P.hom_ext (by simp [φB])
    have hres := congrArg
      (fun q : P.Ring →ₐ[complexPolynomialRing n] ℂ ↦ q.restrictScalars ℂ) heq
    have hφ : φB.restrictScalars ℂ = φ := AlgHom.ext fun _ ↦ rfl
    change (P.lift (φ P.X) (P.hasMap_X.map φB)).restrictScalars ℂ = φ
    exact hres.trans hφ
  right_inv z := by
    let : Algebra (complexPolynomialRing n) ℂ := z.1.1.toRingHom.toAlgebra
    let hscalar : IsScalarTower ℂ (complexPolynomialRing n) ℂ :=
      IsScalarTower.of_algebraMap_eq fun c ↦ (z.1.1.commutes c).symm
    let := hscalar
    have hz : P.HasMap z.1.2 := by
      rw [StandardEtalePair.HasMap]
      constructor
      · simpa [Polynomial.aeval_def, RingHom.algebraMap_toAlgebra] using z.2.1
      · simpa [Polynomial.aeval_def, RingHom.algebraMap_toAlgebra, isUnit_iff_ne_zero] using z.2.2
    apply Subtype.ext
    apply Prod.ext
    · refine AlgHom.ext fun b ↦ ?_
      change P.lift z.1.2 hz (algebraMap (complexPolynomialRing n) P.Ring b) = z.1.1 b
      exact (P.lift z.1.2 hz).commutes b
    · change P.lift z.1.2 hz P.X = z.1.2
      exact P.lift_X _ _

lemma continuous_algHomToStandardEtalePoint :
    Continuous (algHomToStandardEtalePoint P) := by
  rw [continuous_induced_rng]
  apply Continuous.prodMk
  · rw [continuous_induced_rng]
    refine continuous_pi fun b ↦ ?_
    simpa [algHomToStandardEtalePoint] using
      Basic.ComplexSchemePoint.continuous_affineAlgebraHom_apply P.Ring
        (algebraMap (complexPolynomialRing n) P.Ring b)
  · simpa [algHomToStandardEtalePoint] using
      Basic.ComplexSchemePoint.continuous_affineAlgebraHom_apply P.Ring P.X

/-- Polynomial evaluation is continuous when both the coefficient homomorphism and the argument
vary. -/
lemma continuous_eval₂_varying (p : (complexPolynomialRing n)[X]) :
    Continuous (fun vx : (complexPolynomialRing n →ₐ[ℂ] ℂ) × ℂ ↦
      Polynomial.eval₂ vx.1 vx.2 p) := by
  induction p using Polynomial.induction_on' with
  | add p q hp hq =>
      rw [show (fun vx : (complexPolynomialRing n →ₐ[ℂ] ℂ) × ℂ ↦
          Polynomial.eval₂ vx.1 vx.2 (p + q)) =
          (fun vx ↦ Polynomial.eval₂ vx.1 vx.2 p +
            Polynomial.eval₂ vx.1 vx.2 q) by
        funext vx
        simp]
      exact hp.add hq
  | monomial k a =>
      rw [show (fun vx : (complexPolynomialRing n →ₐ[ℂ] ℂ) × ℂ ↦
          Polynomial.eval₂ vx.1 vx.2 (Polynomial.monomial k a)) =
          (fun vx ↦ vx.1 a * vx.2 ^ k) by
        funext vx
        simp]
      exact
        ((Basic.ComplexSchemePoint.continuous_affineAlgebraHom_apply (complexPolynomialRing n) a).comp continuous_fst).mul
          (continuous_snd.pow k)

/-- Evaluation of a quotient representative under the standard étale point map. -/
lemma standardEtalePointToAlgHom_mk (z : standardEtalePointSpace P)
    (q : (complexPolynomialRing n)[X][X]) :
    standardEtalePointToAlgHom P z (Ideal.Quotient.mk _ q) =
      Polynomial.eval₂
        (Polynomial.eval₂RingHom z.1.1 z.1.2)
        (Polynomial.eval₂ z.1.1 z.1.2 P.g)⁻¹ q := by
  let : Algebra (complexPolynomialRing n) ℂ := z.1.1.toRingHom.toAlgebra
  let hscalar : IsScalarTower ℂ (complexPolynomialRing n) ℂ :=
    IsScalarTower.of_algebraMap_eq fun c ↦ (z.1.1.commutes c).symm
  have hz : P.HasMap z.1.2 := by
    rw [StandardEtalePair.HasMap]
    constructor
    · simpa [Polynomial.aeval_def, RingHom.algebraMap_toAlgebra] using z.2.1
    · simpa [Polynomial.aeval_def, RingHom.algebraMap_toAlgebra, isUnit_iff_ne_zero] using z.2.2
  change P.lift z.1.2 hz (Ideal.Quotient.mk _ q) = _
  change Polynomial.aevalAeval z.1.2 (↑hz.2.unit⁻¹ : ℂ) q = _
  have hinv : (↑hz.2.unit⁻¹ : ℂ) =
      (Polynomial.eval₂ z.1.1 z.1.2 P.g)⁻¹ := by
    calc
      (↑hz.2.unit⁻¹ : ℂ) = (↑hz.2.unit : ℂ)⁻¹ := by simp
      _ = (Polynomial.eval₂ z.1.1 z.1.2 P.g)⁻¹ := by
        congr 1
  rw [hinv]
  have heq :
      (Polynomial.aevalAeval z.1.2
        (Polynomial.eval₂ z.1.1 z.1.2 P.g)⁻¹).toRingHom =
      Polynomial.eval₂RingHom (Polynomial.eval₂RingHom z.1.1.toRingHom z.1.2)
        (Polynomial.eval₂ z.1.1 z.1.2 P.g)⁻¹ := by
    ext b <;> simp [Polynomial.aevalAeval, Polynomial.aevalAevalEquiv,
      Polynomial.aeval_def, RingHom.algebraMap_toAlgebra]
  exact DFunLike.congr_fun heq q

lemma continuous_standardEtale_bivariate_evaluation
    (q : (complexPolynomialRing n)[X][X]) :
    Continuous (fun z : standardEtalePointSpace P ↦
      Polynomial.eval₂
        (Polynomial.eval₂RingHom z.1.1 z.1.2)
        (Polynomial.eval₂ z.1.1 z.1.2 P.g)⁻¹ q) := by
  have hg : Continuous (fun z : standardEtalePointSpace P ↦
      Polynomial.eval₂ z.1.1 z.1.2 P.g) :=
    (continuous_eval₂_varying P.g).comp continuous_subtype_val
  have hginv : Continuous (fun z : standardEtalePointSpace P ↦
      (Polynomial.eval₂ z.1.1 z.1.2 P.g)⁻¹) :=
    hg.inv₀ fun z ↦ z.2.2
  induction q using Polynomial.induction_on' with
  | add q r hq hr =>
      rw [show (fun z : standardEtalePointSpace P ↦
          Polynomial.eval₂ (Polynomial.eval₂RingHom z.1.1 z.1.2)
            (Polynomial.eval₂ z.1.1 z.1.2 P.g)⁻¹ (q + r)) =
          (fun z ↦
            Polynomial.eval₂ (Polynomial.eval₂RingHom z.1.1 z.1.2)
              (Polynomial.eval₂ z.1.1 z.1.2 P.g)⁻¹ q +
            Polynomial.eval₂ (Polynomial.eval₂RingHom z.1.1 z.1.2)
              (Polynomial.eval₂ z.1.1 z.1.2 P.g)⁻¹ r) by
        funext z
        simp]
      exact hq.add hr
  | monomial k a =>
      rw [show (fun z : standardEtalePointSpace P ↦
          Polynomial.eval₂ (Polynomial.eval₂RingHom z.1.1 z.1.2)
            (Polynomial.eval₂ z.1.1 z.1.2 P.g)⁻¹ (Polynomial.monomial k a)) =
          (fun z ↦ Polynomial.eval₂ z.1.1 z.1.2 a *
            (Polynomial.eval₂ z.1.1 z.1.2 P.g)⁻¹ ^ k) by
        funext z
        simp]
      exact ((continuous_eval₂_varying a).comp continuous_subtype_val).mul (hginv.pow k)

lemma continuous_standardEtalePointToAlgHom :
    Continuous (standardEtalePointToAlgHom P) := by
  rw [continuous_induced_rng]
  refine continuous_pi fun r ↦ ?_
  obtain ⟨q, rfl⟩ := Ideal.Quotient.mk_surjective r
  simpa only [Function.comp_apply, standardEtalePointToAlgHom_mk] using
    continuous_standardEtale_bivariate_evaluation P q

/-- The pointwise topology on homomorphisms out of a standard étale algebra is the topology on
its explicit root data. -/
def standardEtalePointHomeomorph :
    (P.Ring →ₐ[ℂ] ℂ) ≃ₜ standardEtalePointSpace P where
  toEquiv := standardEtalePointEquiv P
  continuous_toFun := continuous_algHomToStandardEtalePoint P
  continuous_invFun := continuous_standardEtalePointToAlgHom P

/-- The standard étale equations written in ordinary complex coordinates. -/
abbrev standardEtaleCoordinateSpace :=
  { vx : ((Fin n → ℂ) × ℂ) //
    Polynomial.eval₂ (MvPolynomial.aeval (R := ℂ) vx.1).toRingHom vx.2 P.f = 0 ∧
      Polynomial.eval₂ (MvPolynomial.aeval (R := ℂ) vx.1).toRingHom vx.2 P.g ≠ 0 }

/-- Replace the polynomial-ring homomorphism in standard étale root data by its tuple of variable
values. -/
def standardEtalePointCoordinateHomeomorph :
    standardEtalePointSpace P ≃ₜ standardEtaleCoordinateSpace P :=
  ((mvPolynomialAlgHomHomeomorph n).prodCongr (Homeomorph.refl ℂ)).subtype fun z ↦ by
    have h := (mvPolynomialAlgHomEquiv n).left_inv z.1
    simpa [mvPolynomialAlgHomHomeomorph, mvPolynomialAlgHomEquiv] using
      congrArg (fun φ : complexPolynomialRing n →ₐ[ℂ] ℂ ↦
        (Polynomial.eval₂ φ z.2 P.f = 0 ∧ Polynomial.eval₂ φ z.2 P.g ≠ 0)) h.symm

/-- Complex points of a standard étale algebra as the corresponding equation locus in ordinary
complex coordinates. -/
def standardEtaleCoordinateHomeomorph :
    (P.Ring →ₐ[ℂ] ℂ) ≃ₜ standardEtaleCoordinateSpace P :=
  (standardEtalePointHomeomorph P).trans (standardEtalePointCoordinateHomeomorph P)

end

end OAI.AlgebraicGeometry.ComplexPoint.StandardEtale.ComplexAlgHom