File size: 21,082 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
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
import OAI.AlgebraicGeometry.ComplexMultiplication.PointBettiBridge
import OAI.AlgebraicGeometry.ComplexMultiplication.IntrinsicRegularCoordinates
import OAI.AlgebraicGeometry.ComplexPoints.Analytic.IntrinsicSmoothSchemeManifold
import OAI.AlgebraicGeometry.ComplexPoints.Analytic.AffineOverlap

/-! # Analytic Intrinsic Atlas Regular -/

namespace OAI.AlgebraicGeometry.ComplexMultiplication.AnalyticIntrinsicAtlasRegular

noncomputable section

section

/-! # Analytic transitions from the original atlas to the actual native atlas

The point comparison is the identity on the unchanged scheme-valued points.
The transitions use the actual ambient sections defining the native coordinates.
-/

open _root_.CategoryTheory _root_.AlgebraicGeometry ComplexPoint _root_.TopologicalSpace
open scoped ContDiff

attribute [-instance] ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.instTopologicalSpace

/-- The existing identity point comparison, as a homeomorphism of the actual spaces. -/
def complexPointIdentityHomeomorph (X : Over (Spec (.of β„‚))) :
    Betti.Scheme.schemePointSpace X β‰ƒβ‚œ ComplexPoint.Basic.ComplexSchemePoint X :=
  TopCat.homeoOfIso (PointBettiBridge.complexPointSpaceIso X)

/-- A genuine native chart transported along the identity point homeomorphism. -/
def nativeChartOnOriginal (X : Over (Spec (.of β„‚))) {n : β„•}
    (c : OpenPartialHomeomorph (Betti.Scheme.schemePointSpace X) (Fin n β†’ β„‚)) :
    OpenPartialHomeomorph (ComplexPoint.Basic.ComplexSchemePoint X) (Fin n β†’ β„‚) :=
  (complexPointIdentityHomeomorph X).symm.transOpenPartialHomeomorph c

@[simp]
theorem nativeChartOnOriginal_apply (X : Over (Spec (.of β„‚))) {n : β„•}
    (c : OpenPartialHomeomorph (Betti.Scheme.schemePointSpace X) (Fin n β†’ β„‚))
    (q : ComplexPoint.Basic.ComplexSchemePoint X) : nativeChartOnOriginal X c q = c q := rfl

@[simp]
theorem nativeChartOnOriginal_symm_apply (X : Over (Spec (.of β„‚))) {n : β„•}
    (c : OpenPartialHomeomorph (Betti.Scheme.schemePointSpace X) (Fin n β†’ β„‚))
    (w : Fin n β†’ β„‚) : (nativeChartOnOriginal X c).symm w = c.symm w := rfl

@[simp]
theorem nativeChartOnOriginal_source (X : Over (Spec (.of β„‚))) {n : β„•}
    (c : OpenPartialHomeomorph (Betti.Scheme.schemePointSpace X) (Fin n β†’ β„‚)) :
    (nativeChartOnOriginal X c).source = c.source := by
  ext q
  rfl

/-- A point in an actual affine-open chart belongs to the original ambient open. -/
theorem nativeAffineChart_source_mem (X : Over (Spec (.of β„‚)))
    (U : X.left.Opens) (hU : IsAffineOpen U) {n : β„•}
    (e : OpenPartialHomeomorph
      (Foundations.Scheme.AffineComplexPoints.affineComplexPoints
        (ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affineOpenAlgebra X U)) (Fin n β†’ β„‚))
    (q : Betti.Scheme.schemePointSpace X)
    (hq : q ∈ (ComplexPoints.Analytic.SmoothSchemeManifold.affineChartOnScheme
      (ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affineOpenAlgebra X U)
      (ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affineOpenSchemeMap X U hU) e).source) :
    q ∈ ComplexPoint.Basic.Point.overOpen U := by
  obtain ⟨x, _, rfl⟩ := hq
  change (ComplexPoint.Basic.Point.map (ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affineOpenSchemeMap X U hU)
    (ComplexPoints.Analytic.SchemePointHomeomorphs.affineSchemePointEquiv
      (ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affineOpenAlgebra X U) x)).underlying ∈ U
  rw [ComplexPoint.Basic.Point.underlying_map]
  have hmem (p : Spec (.of Ξ“(X.left, U))) : hU.fromSpec p ∈ U := by
    have hp : p ∈ hU.fromSpec ⁻¹ᡁ U := by
      rw [hU.fromSpec_preimage_self]
      trivial
    exact hp
  exact hmem _

/-- Transitions from the unchanged original charts to genuine native regular charts are analytic. -/
theorem contDiffOn_original_to_nativeChart
    (X : Over (Spec (.of β„‚))) [IsIntegral X.left] [Smooth X.hom] {n : β„•}
    (z : ComplexPoint.Basic.ComplexSchemePoint X)
    (c : OpenPartialHomeomorph (Betti.Scheme.schemePointSpace X) (Fin n β†’ β„‚))
    (hc : c ∈ ComplexPoints.Analytic.IntrinsicSmoothSchemeManifold.schemeRegularAtlas X n) :
    ContDiffOn β„‚ Ο‰ ((ComplexPoint.Basic.ComplexSchemePoint.localChart X (Topology.Dimension.Basic.TopologicalSpace.dim X.left) z).symm.trans (nativeChartOnOriginal X c))
      ((ComplexPoint.Basic.ComplexSchemePoint.localChart X (Topology.Dimension.Basic.TopologicalSpace.dim X.left) z).symm.trans (nativeChartOnOriginal X c)).source := by
  obtain ⟨U, hU, e, he, rfl⟩ := hc
  let c := ComplexPoints.Analytic.SmoothSchemeManifold.affineChartOnScheme
    (ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affineOpenAlgebra X U)
    (ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affineOpenSchemeMap X U hU) e
  obtain ⟨g, hg, hcoords⟩ := IntrinsicRegularCoordinates.nativeAffineChart_regularCoordinates X U hU e he
  apply contDiffOn_pi.mpr
  intro i
  obtain ⟨a, k, hcoord⟩ := hcoords i
  have hr := IntrinsicRegularCoordinates.contDiffOn_originalChart_regularRatio X z U a g k
  have hdom : ((ComplexPoint.Basic.ComplexSchemePoint.localChart X (Topology.Dimension.Basic.TopologicalSpace.dim X.left) z).symm.trans
      (nativeChartOnOriginal X c)).source βŠ†
      {w | w ∈ (ComplexPoint.Basic.ComplexSchemePoint.localChart X (Topology.Dimension.Basic.TopologicalSpace.dim X.left) z).target ∧
        (ComplexPoint.Basic.ComplexSchemePoint.localChart X (Topology.Dimension.Basic.TopologicalSpace.dim X.left) z).symm w ∈ ComplexPoint.Basic.Point.overOpen U ∧
        ComplexPoint.Basic.Point.evaluate U g ((ComplexPoint.Basic.ComplexSchemePoint.localChart X (Topology.Dimension.Basic.TopologicalSpace.dim X.left) z).symm w) β‰  0} := by
    intro w hw
    have hq : (ComplexPoint.Basic.ComplexSchemePoint.localChart X (Topology.Dimension.Basic.TopologicalSpace.dim X.left) z).symm w ∈ c.source := hw.2
    exact ⟨hw.1, nativeAffineChart_source_mem X U hU e _ hq, hg _ hq⟩
  apply (hr.mono hdom).congr
  intro w hw
  have hq : (ComplexPoint.Basic.ComplexSchemePoint.localChart X (Topology.Dimension.Basic.TopologicalSpace.dim X.left) z).symm w ∈ c.source := hw.2
  exact hcoord _ hq

end

section

/-! # Original regular sections are analytic in actual native affine charts

The formula is the original stalk evaluation. Local affine factorizations
express it as fractions of actual source regular-function evaluations.
-/

open _root_.CategoryTheory _root_.AlgebraicGeometry ComplexPoint _root_.TopologicalSpace
open scoped ContDiff _root_.Topology

attribute [-instance] ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.instTopologicalSpace

/-- Both actual point conventions send the unique point of Spec β„‚ to the same scheme point. -/
theorem nativeUnderlying_eq_original (X : Over (Spec (.of β„‚))) (q : ComplexPoint.Basic.ComplexSchemePoint X) :
    ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.underlying q = ComplexPoint.Basic.Point.underlying q := by
  change q.left ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.basePoint = q.left _
  exact congrArg q.left (Subsingleton.elim (Ξ± := PrimeSpectrum β„‚) _ _)

/-- Original evaluation on an affine open is analytic in genuine native affine coordinates. -/
theorem contDiffAt_nativeAffineChart_evaluate_affine
    (X : Over (Spec (.of β„‚))) (U V : X.left.Opens)
    (hU : IsAffineOpen U) (hV : IsAffineOpen V) {n : β„•}
    (e : OpenPartialHomeomorph
      (Foundations.Scheme.AffineComplexPoints.affineComplexPoints
        (ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affineOpenAlgebra X U)) (Fin n β†’ β„‚))
    (he : e ∈ ComplexPoints.Analytic.SmoothSchemeManifold.affineRegularAtlas
      (ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affineOpenAlgebra X U) n)
    (s : Ξ“(X.left, V)) (w : Fin n β†’ β„‚) (hw : w ∈ e.target)
    (hv : ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affineOpenPointMap X U hU (e.symm w) ∈
      ComplexPoint.Basic.Point.overOpen V) :
    ContDiffAt β„‚ Ο‰
      (fun v => ComplexPoint.Basic.Point.evaluate V s
        (ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affineOpenPointMap X U hU (e.symm v))) w := by
  let A := ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affineOpenAlgebra X U
  let B := ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affineOpenAlgebra X V
  let i := ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affineOpenSchemeMap X U hU
  let j := ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affineOpenSchemeMap X V hV
  have hq : ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affinePointMap A i (e.symm w) ∈
      Set.range (ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affinePointMap B j) := by
    change ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affineOpenPointMap X U hU (e.symm w) ∈
      Set.range (ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affineOpenPointMap X V hV)
    rw [ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.range_affineOpenPointMap]
    change ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.underlying _ ∈ V
    rw [nativeUnderlying_eq_original]
    exact hv
  obtain ⟨a, ha, h, _hfac, hpoint⟩ :=
    ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.exists_affineLocalizationTransition A B i j (e.symm w) hq
  let v : (Fin n β†’ β„‚) β†’ B β†’ β„‚ := fun z b =>
    e.symm z (IsLocalization.Away.sec a (h b)).1 /
      (e.symm z a) ^ (IsLocalization.Away.sec a (h b)).2
  have hval (z : Fin n β†’ β„‚) (hz : e.symm z a β‰  0) (b : B) :
      ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affineLocalizationTransition A B a h
        ⟨e.symm z, hz⟩ b = v z b :=
    ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affineLocalizationTransition_eval A B a h
      ⟨e.symm z, hz⟩ b
  have hvat (b : B) : ContDiffAt β„‚ Ο‰ (fun z => v z b) w :=
    ((he.1 (IsLocalization.Away.sec a (h b)).1).contDiffAt
      (e.open_target.mem_nhds hw)).div
      (((he.1 a).contDiffAt (e.open_target.mem_nhds hw)).pow
        (IsLocalization.Away.sec a (h b)).2)
      (pow_ne_zero _ ha)
  apply (hvat s).congr_of_eventuallyEq
  have hna : βˆ€αΆ  z in 𝓝 w, e.symm z a β‰  0 :=
    ((he.1 a).contDiffAt (e.open_target.mem_nhds hw)).continuousAt.eventually_ne ha
  filter_upwards [hna] with z hz
  have hp := hpoint ⟨e.symm z, hz⟩
  have hvz : ComplexPoint.Basic.Point.evaluate V s
      (ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affinePointMap A i (e.symm z)) =
      ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affineLocalizationTransition A B a h
        ⟨e.symm z, hz⟩ s := by
    rw [← hp]
    exact RegularSectionBridge.evaluate_nativeAffineOpenPoint X V hV _ s
  exact hvz.trans (hval z hz s)

end

section

/-! # Arbitrary original regular sections in the actual native atlas

An affine neighborhood of the evaluation point suffices. Restriction of the
original section preserves its stalk evaluation on that neighborhood.
-/

open _root_.CategoryTheory _root_.AlgebraicGeometry ComplexPoint _root_.TopologicalSpace
open scoped ContDiff _root_.Topology

attribute [-instance] ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.instTopologicalSpace

/-- The original evaluation of any regular section is analytic in actual native coordinates. -/
theorem contDiffAt_nativeChartOnOriginal_evaluate
    (X : Over (Spec (.of β„‚))) (V : X.left.Opens) (s : Ξ“(X.left, V)) {n : β„•}
    (c : OpenPartialHomeomorph (Betti.Scheme.schemePointSpace X) (Fin n β†’ β„‚))
    (hc : c ∈ ComplexPoints.Analytic.IntrinsicSmoothSchemeManifold.schemeRegularAtlas X n)
    (w : Fin n β†’ β„‚) (hw : w ∈ (nativeChartOnOriginal X c).target)
    (hv : (nativeChartOnOriginal X c).symm w ∈ ComplexPoint.Basic.Point.overOpen V) :
    ContDiffAt β„‚ Ο‰
      (fun v => ComplexPoint.Basic.Point.evaluate V s ((nativeChartOnOriginal X c).symm v)) w := by
  obtain ⟨U, hU, e, he, rfl⟩ := hc
  let c := ComplexPoints.Analytic.SmoothSchemeManifold.affineChartOnScheme
    (ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affineOpenAlgebra X U)
    (ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.affineOpenSchemeMap X U hU) e
  let cβ‚€ := nativeChartOnOriginal X c
  obtain ⟨W, hW, hqW, hWV⟩ := exists_isAffineOpen_mem_and_subset
    (show (cβ‚€.symm w).underlying ∈ V from hv)
  let t := X.left.presheaf.map (homOfLE (show W ≀ V from hWV)).op s
  let D := cβ‚€.target ∩ {v | cβ‚€.symm v ∈ ComplexPoint.Basic.Point.overOpen W}
  have hD : IsOpen D := cβ‚€.isOpen_inter_preimage_symm (ComplexPoint.Basic.Point.isOpen_overOpen (X := X) W)
  have hwD : w ∈ D := ⟨hw, hqW⟩
  have ht : ContDiffAt β„‚ Ο‰
      (fun v => ComplexPoint.Basic.Point.evaluate W t (cβ‚€.symm v)) w :=
    contDiffAt_nativeAffineChart_evaluate_affine X U W hU hW e he t w hw hqW
  apply ht.congr_of_eventuallyEq
  filter_upwards [hD.mem_nhds hwD] with v hvD
  exact ComplexPoint.Basic.Point.evaluate_res (show W ≀ V from hWV) s (cβ‚€.symm v) hvD.2

end

section

/-! # Analytic transitions from the actual native atlas to the original atlas

The original coordinates are evaluations of their unchanged actual ambient
regular sections. Those evaluations are analytic in every native regular chart.
-/

open _root_.CategoryTheory _root_.AlgebraicGeometry ComplexPoint _root_.TopologicalSpace
open scoped ContDiff _root_.Topology

attribute [-instance] ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.instTopologicalSpace

/-- Transitions from genuine native regular charts to unchanged original charts are analytic. -/
theorem contDiffOn_native_to_originalChart
    (X : Over (Spec (.of β„‚))) [IsIntegral X.left] [Smooth X.hom] {n : β„•}
    (z : ComplexPoint.Basic.ComplexSchemePoint X)
    (c : OpenPartialHomeomorph (Betti.Scheme.schemePointSpace X) (Fin n β†’ β„‚))
    (hc : c ∈ ComplexPoints.Analytic.IntrinsicSmoothSchemeManifold.schemeRegularAtlas X n) :
    ContDiffOn β„‚ Ο‰ ((nativeChartOnOriginal X c).symm.trans (ComplexPoint.Basic.ComplexSchemePoint.localChart X (Topology.Dimension.Basic.TopologicalSpace.dim X.left) z))
      ((nativeChartOnOriginal X c).symm.trans (ComplexPoint.Basic.ComplexSchemePoint.localChart X (Topology.Dimension.Basic.TopologicalSpace.dim X.left) z)).source := by
  let D := ((nativeChartOnOriginal X c).symm.trans (ComplexPoint.Basic.ComplexSchemePoint.localChart X (Topology.Dimension.Basic.TopologicalSpace.dim X.left) z)).source
  have hD : IsOpen D :=
    ((nativeChartOnOriginal X c).symm.trans (ComplexPoint.Basic.ComplexSchemePoint.localChart X (Topology.Dimension.Basic.TopologicalSpace.dim X.left) z)).open_source
  let E := ComplexPoint.Basic.ComplexSchemePoint.localEtaleCoordinates X (Topology.Dimension.Basic.TopologicalSpace.dim X.left) z
  apply contDiffOn_pi.mpr
  intro i w hw
  have hV : (nativeChartOnOriginal X c).symm w ∈ ComplexPoint.Basic.Point.overOpen E.ambientCoordinateOpen := by
    have hmem := ComplexPoint.Basic.ComplexSchemePoint.mem_coordinateNeighborhood_of_mem_localChart_source X (Topology.Dimension.Basic.TopologicalSpace.dim X.left)
      z ((nativeChartOnOriginal X c).symm w) hw.2
    simpa only [E, ComplexPoint.SmoothCoordinates.LocalEtaleCoordinates.ambientCoordinateOpen,
      Scheme.Opens.ΞΉ_image_top] using hmem
  have hi := contDiffAt_nativeChartOnOriginal_evaluate X E.ambientCoordinateOpen
    (E.ambientCoordinateSection i) c hc w hw.1 hV
  apply ContDiffAt.contDiffWithinAt
  apply hi.congr_of_eventuallyEq
  filter_upwards [hD.mem_nhds hw] with v hv
  exact ComplexPoint.Basic.ComplexSchemePoint.localChart_apply_component_eq_evaluate X (Topology.Dimension.Basic.TopologicalSpace.dim X.left) z
    ((nativeChartOnOriginal X c).symm v) hv.2 i

end

/-! # The identity between the two actual complex manifolds is analytic

A copy of the unchanged point carrier keeps the two charted-space instances
explicit. Its topology and atlas are precisely the existing native ones.
-/

open _root_.CategoryTheory _root_.AlgebraicGeometry ComplexPoint _root_.TopologicalSpace ChartedSpace
open scoped ContDiff _root_.Manifold

attribute [-instance] ComplexPoints.Analytic.SchemePointHomeomorphs.schemeComplexPoints.instTopologicalSpace

/-- The unchanged actual point carrier, carrying the actual native manifold structure. -/
def NativePointManifold (X : Over (Spec (.of β„‚))) : Type := Betti.Scheme.schemePointSpace X

instance nativePointManifoldTopology (X : Over (Spec (.of β„‚))) :
    TopologicalSpace (NativePointManifold X) := (Betti.Scheme.schemePointSpace X).str

variable (X : Over (Spec (.of β„‚))) [IsIntegral X.left] [Smooth X.hom]

local notation "NativeModel" =>
  (Fin (Betti.AffineDimension.Realization.functionFieldDifferentialDimension X.hom) β†’ β„‚)
local notation "OriginalModel" => (Fin (OAI.Topology.Dimension.Basic.TopologicalSpace.dim X.left) β†’ β„‚)

instance nativePointManifoldChartedSpace : ChartedSpace NativeModel (NativePointManifold X) :=
  ComplexPoints.Analytic.IntrinsicSmoothSchemeManifold.nativeSmoothSchemeChartedSpace X

instance nativePointManifoldIsManifold (r : β„•βˆžΟ‰) :
    IsManifold π“˜(β„‚, NativeModel) r (NativePointManifold X) :=
  ComplexPoints.Analytic.IntrinsicSmoothSchemeManifold.nativeSmoothSchemeComplexIsManifold X r

omit [IsIntegral X.left] [Smooth X.hom] in
/-- The actual identity point comparison with both topologies explicitly retained. -/
def nativePointManifoldHomeomorph : NativePointManifold X β‰ƒβ‚œ ComplexPoint.Basic.ComplexSchemePoint X :=
  complexPointIdentityHomeomorph X

/-- The actual identity from the native complex manifold to the original one is analytic. -/
theorem contMDiff_nativePointManifoldHomeomorph (r : β„•βˆžΟ‰) :
    ContMDiff π“˜(β„‚, NativeModel) π“˜(β„‚, OriginalModel) r
      (nativePointManifoldHomeomorph X) := by
  apply contMDiff_iff.mpr
  refine ⟨(nativePointManifoldHomeomorph X).continuous, ?_⟩
  intro x y
  let c : OpenPartialHomeomorph (Betti.Scheme.schemePointSpace X) NativeModel :=
    (ComplexPoints.Analytic.IntrinsicSmoothSchemeManifold.nativeSmoothSchemeChartedSpace X).chartAt x
  have hc : c ∈ ComplexPoints.Analytic.IntrinsicSmoothSchemeManifold.schemeRegularAtlas X
      (Betti.AffineDimension.Realization.functionFieldDifferentialDimension X.hom) :=
    (ComplexPoints.Analytic.IntrinsicSmoothSchemeManifold.nativeSmoothSchemeChartedSpace X).chart_mem_atlas x
  have h := (contDiffOn_native_to_originalChart X y c hc).of_le
    (show r ≀ Ο‰ from le_top)
  simp only [extChartAt_coe, extChartAt_coe_symm, extChartAt_source,
    extChartAt_target, modelWithCornersSelf_coe, modelWithCornersSelf_coe_symm,
    Function.comp_def, Set.preimage, Set.mem_ofPred_eq, Set.ofPred_mem_eq,
    id_eq, Set.range_id, Set.inter_univ]
  change ContDiffOn β„‚ r
    ((nativeChartOnOriginal X c).symm.trans (ComplexPoint.Basic.ComplexSchemePoint.localChart X (Topology.Dimension.Basic.TopologicalSpace.dim X.left) y))
    ((nativeChartOnOriginal X c).symm.trans (ComplexPoint.Basic.ComplexSchemePoint.localChart X (Topology.Dimension.Basic.TopologicalSpace.dim X.left) y)).source
  exact h

/-- The inverse actual identity from the original manifold to the native one is analytic. -/
theorem contMDiff_nativePointManifoldHomeomorph_symm (r : β„•βˆžΟ‰) :
    ContMDiff π“˜(β„‚, OriginalModel) π“˜(β„‚, NativeModel) r
      (nativePointManifoldHomeomorph X).symm := by
  apply contMDiff_iff.mpr
  refine ⟨(nativePointManifoldHomeomorph X).continuous_invFun, ?_⟩
  intro x y
  let c : OpenPartialHomeomorph (Betti.Scheme.schemePointSpace X) NativeModel :=
    (ComplexPoints.Analytic.IntrinsicSmoothSchemeManifold.nativeSmoothSchemeChartedSpace X).chartAt y
  have hc : c ∈ ComplexPoints.Analytic.IntrinsicSmoothSchemeManifold.schemeRegularAtlas X
      (Betti.AffineDimension.Realization.functionFieldDifferentialDimension X.hom) :=
    (ComplexPoints.Analytic.IntrinsicSmoothSchemeManifold.nativeSmoothSchemeChartedSpace X).chart_mem_atlas y
  have h := (contDiffOn_original_to_nativeChart X x c hc).of_le
    (show r ≀ Ο‰ from le_top)
  simp only [extChartAt_coe, extChartAt_coe_symm, extChartAt_source,
    extChartAt_target, modelWithCornersSelf_coe, modelWithCornersSelf_coe_symm,
    Function.comp_def, Set.preimage, Set.mem_ofPred_eq, Set.ofPred_mem_eq,
    id_eq, Set.range_id, Set.inter_univ]
  change ContDiffOn β„‚ r
    ((ComplexPoint.Basic.ComplexSchemePoint.localChart X (Topology.Dimension.Basic.TopologicalSpace.dim X.left) x).symm.trans (nativeChartOnOriginal X c))
    ((ComplexPoint.Basic.ComplexSchemePoint.localChart X (Topology.Dimension.Basic.TopologicalSpace.dim X.left) x).symm.trans (nativeChartOnOriginal X c)).source
  exact h

end

end OAI.AlgebraicGeometry.ComplexMultiplication.AnalyticIntrinsicAtlasRegular