Download data/lean/OAI/AlgebraicGeometry/Seshadri/Model.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 18.5 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/AlgebraicGeometry/Seshadri/Model.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/AlgebraicGeometry/Seshadri/Model.lean
-
curl -L -o Model.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/AlgebraicGeometry/Seshadri/Model.lean
18.5 kB
| import Mathlib | |
| namespace OAI | |
| namespace MaximalSeshadri.Geometry | |
| noncomputable section | |
| open CategoryTheory AlgebraicGeometry TopologicalSpace | |
| open scoped AlgebraicGeometry | |
| attribute [local instance] MvPolynomial.gradedAlgebra | |
| def complexProjectiveSpace (N : β) : Scheme := | |
| Proj (MvPolynomial.homogeneousSubmodule (Fin (N + 1)) β) | |
| def constantsInDegreeZero (N : β) : | |
| β β+* (MvPolynomial.homogeneousSubmodule (Fin (N + 1)) β 0) := | |
| { toFun := fun c => β¨MvPolynomial.C c, MvPolynomial.isHomogeneous_C _ cβ© | |
| map_one' := Subtype.ext MvPolynomial.C_1 | |
| map_mul' := fun a b => Subtype.ext (MvPolynomial.C_mul (a := a) (a' := b)) | |
| map_zero' := Subtype.ext MvPolynomial.C_0 | |
| map_add' := fun a b => Subtype.ext (MvPolynomial.C_add (a := a) (a' := b)) } | |
| def projectiveSpaceToSpec (N : β) : | |
| complexProjectiveSpace N βΆ Spec (CommRingCat.of β) := | |
| Proj.toSpecZero _ β« Spec.map (CommRingCat.ofHom (constantsInDegreeZero N)) | |
| structure Surface where | |
| scheme : Scheme | |
| structureMap : scheme βΆ Spec (CommRingCat.of β) | |
| integral : IsIntegral scheme | |
| smooth : SmoothOfRelativeDimension 2 structureMap | |
| embeddingDimension : β | |
| embedding : scheme βΆ complexProjectiveSpace embeddingDimension | |
| closedImmersion : IsClosedImmersion embedding | |
| overComplex : embedding β« projectiveSpaceToSpec embeddingDimension = structureMap | |
| attribute [instance] Surface.integral Surface.smooth Surface.closedImmersion | |
| variable (X : Scheme) | |
| structure LineBundle where | |
| sheaf : X.Modules | |
| locallyRankOne : β x : X, β U : X.Opens, x β U β§ | |
| Nonempty (sheaf.restrict U.ΞΉ β SheafOfModules.unit U.toScheme.ringCatSheaf) | |
| def moduleTensor (M N : X.Modules) : X.Modules := | |
| (PresheafOfModules.sheafification (π X.ringCatSheaf.obj)).obj | |
| (PresheafOfModulesOfCommRing.Monoidal.tensorObj (R := X.presheaf) M.val N.val) | |
| def modulePow (M : X.Modules) : β β X.Modules | |
| | 0 => SheafOfModules.unit X.ringCatSheaf | |
| | n + 1 => moduleTensor X M (modulePow M n) | |
| def structureSheaf : X.Modules := SheafOfModules.unit X.ringCatSheaf | |
| abbrev GlobalSections (M : X.Modules) := structureSheaf X βΆ M | |
| def sectionOpen {M : X.Modules} (s : GlobalSections X M) : X.Opens := | |
| β¨ (U : X.Opens) (_ : IsIso ((Scheme.Modules.restrictFunctor U.ΞΉ).map s)), U | |
| def LineBundle.IsAmple (L : LineBundle X) : Prop := | |
| β (x : X) (V : X.Opens), x β V β β n : β, 0 < n β§ | |
| β s : GlobalSections X (modulePow X L.sheaf n), | |
| x β sectionOpen X s β§ sectionOpen X s β€ V β§ IsAffineOpen (sectionOpen X s) | |
| end | |
| end MaximalSeshadri.Geometry | |
| namespace MaximalSeshadri.Geometry | |
| noncomputable section | |
| open CategoryTheory AlgebraicGeometry TopologicalSpace | |
| open scoped AlgebraicGeometry | |
| variable (X : Scheme) | |
| def restrictScalar (U : X.Opens) : Ξ(X, β€) β+* Ξ(X, U) := | |
| (X.presheaf.map (homOfLE le_top).op).hom | |
| lemma restrictScalar_naturality {U V : X.Opens} (i : U βΆ V) (r : Ξ(X, β€)) : | |
| X.presheaf.map i.op (restrictScalar X V r) = restrictScalar X U r := by | |
| change (X.presheaf.map (homOfLE le_top).op β« X.presheaf.map i.op) r = _ | |
| rw [β X.presheaf.map_comp] | |
| rfl | |
| def sheafHomSMul {M N : X.Modules} (r : Ξ(X, β€)) (f : M βΆ N) : M βΆ N where | |
| val := { | |
| app U := by | |
| letI : Module Ξ(X, U.unop) (M.val.obj U) := (M.val.obj U).isModule | |
| letI : Module Ξ(X, U.unop) (N.val.obj U) := (N.val.obj U).isModule | |
| let g : M.val.obj U ββ[Ξ(X, U.unop)] N.val.obj U := (f.val.app U).hom | |
| exact ModuleCat.ofHom ((restrictScalar X U.unop r) β’ g) | |
| naturality {U V} g := by | |
| let : Module (X.presheaf.obj V) (N.presheaf.obj V) := (N.val.obj V).isModule | |
| ext m | |
| change restrictScalar X V.unop r β’ f.app V.unop (M.presheaf.map g m) = | |
| N.presheaf.map g (restrictScalar X U.unop r β’ f.app U.unop m) | |
| have hn := CategoryTheory.congr_fun (f.mapPresheaf.naturality g) m | |
| change f.app V.unop (M.presheaf.map g m) = | |
| N.presheaf.map g (f.app U.unop m) at hn | |
| rw [hn] | |
| calc | |
| _ = X.presheaf.map g (restrictScalar X U.unop r) β’ | |
| N.presheaf.map g (f.app U.unop m) := by | |
| exact congrArg (fun a : X.presheaf.obj V => | |
| a β’ N.presheaf.map g (f.app U.unop m)) | |
| (restrictScalar_naturality X g.unop r).symm | |
| _ = _ := (N.map_smul g.unop (restrictScalar X U.unop r) (f.app U.unop m)).symm } | |
| instance sheafHomModule (M N : X.Modules) : Module Ξ(X, β€) (M βΆ N) where | |
| smul := sheafHomSMul X | |
| one_smul f := by | |
| ext U m | |
| change restrictScalar X U 1 β’ f.app U m = f.app U m | |
| simp | |
| mul_smul r s f := by | |
| ext U m | |
| change restrictScalar X U (r * s) β’ f.app U m = | |
| restrictScalar X U r β’ (restrictScalar X U s β’ f.app U m) | |
| simp [mul_smul] | |
| smul_zero r := by | |
| ext U m | |
| change restrictScalar X U r β’ (0 : Ξ(N, U)) = 0 | |
| exact smul_zero _ | |
| smul_add r f g := by | |
| ext U m | |
| change restrictScalar X U r β’ (f.app U m + g.app U m) = | |
| restrictScalar X U r β’ f.app U m + restrictScalar X U r β’ g.app U m | |
| exact smul_add _ _ _ | |
| zero_smul f := by | |
| ext U m | |
| change restrictScalar X U 0 β’ f.app U m = 0 | |
| simp | |
| add_smul r s f := by | |
| ext U m | |
| change restrictScalar X U (r + s) β’ f.app U m = | |
| restrictScalar X U r β’ f.app U m + restrictScalar X U s β’ f.app U m | |
| simp [add_smul] | |
| instance sheafLinear : Linear Ξ(X, β€) X.Modules where | |
| smul_comp M N P r f g := by | |
| ext U m | |
| change g.app U (restrictScalar X U r β’ f.app U m) = | |
| restrictScalar X U r β’ g.app U (f.app U m) | |
| exact g.app_smul _ _ | |
| comp_smul M N P f r g := by | |
| ext U m | |
| rfl | |
| end | |
| end MaximalSeshadri.Geometry | |
| namespace MaximalSeshadri.Geometry | |
| noncomputable section | |
| open CategoryTheory AlgebraicGeometry TopologicalSpace | |
| open scoped AlgebraicGeometry | |
| variable {X : Scheme.{0}} | |
| instance schemeHasExt : HasExt.{1} X.Modules := HasExt.standard X.Modules | |
| def baseScalars (f : X βΆ Spec (CommRingCat.of β)) : β β+* Ξ(X, β€) := | |
| f.appTop.hom.comp (Scheme.ΞSpecIso (CommRingCat.of β)).inv.hom | |
| abbrev cohomology (M : X.Modules) (n : β) : Type 1 := | |
| Abelian.Ext.{1} (C := X.Modules) (structureSheaf X) M n | |
| def cohomologyDimension (f : X βΆ Spec (CommRingCat.of β)) | |
| (M : X.Modules) (n : β) : β := | |
| letI : Module β (cohomology M n) := | |
| Module.compHom (cohomology M n) (baseScalars f) | |
| Module.finrank β (cohomology M n) | |
| def eulerCharacteristic (f : X βΆ Spec (CommRingCat.of β)) (d : β) | |
| (M : X.Modules) : β€ := | |
| β n β Finset.range (d + 1), (-1 : β€) ^ n * (cohomologyDimension f M n : β€) | |
| def selfIntersection (S : Surface) (L : LineBundle S.scheme) : β€ := | |
| eulerCharacteristic S.structureMap 2 (modulePow S.scheme L.sheaf 2) - | |
| 2 * eulerCharacteristic S.structureMap 2 L.sheaf + | |
| eulerCharacteristic S.structureMap 2 (SheafOfModules.unit S.scheme.ringCatSheaf) | |
| structure IntegralCurve (S : Surface) where | |
| scheme : Scheme | |
| embedding : scheme βΆ S.scheme | |
| closedImmersion : IsClosedImmersion embedding | |
| integral : IsIntegral scheme | |
| dimension : topologicalKrullDim scheme = 1 | |
| attribute [instance] IntegralCurve.closedImmersion IntegralCurve.integral | |
| def curveDegree (S : Surface) (L : LineBundle S.scheme) (C : IntegralCurve S) : β€ := | |
| eulerCharacteristic (C.embedding β« S.structureMap) 1 | |
| ((Scheme.Modules.pullback C.embedding).obj L.sheaf) - | |
| eulerCharacteristic (C.embedding β« S.structureMap) 1 | |
| (SheafOfModules.unit C.scheme.ringCatSheaf) | |
| end | |
| end MaximalSeshadri.Geometry | |
| namespace MaximalSeshadri.Geometry | |
| noncomputable section | |
| open CategoryTheory CategoryTheory.Limits AlgebraicGeometry TopologicalSpace | |
| open scoped AlgebraicGeometry | |
| abbrev complexBase : Scheme := Spec (CommRingCat.of β) | |
| abbrev ComplexPoint (S : Surface) := | |
| Over.mk (π complexBase) βΆ Over.mk S.structureMap | |
| def ComplexPoint.image {S : Surface} (p : ComplexPoint S) : S.scheme := | |
| p.left (β¨β₯, Ideal.isPrime_botβ© : PrimeSpectrum β) | |
| def surfacePower (S : Surface) (r : β) : Over complexBase := | |
| βαΆ (fun _ : Fin r => Over.mk S.structureMap) | |
| def tupleImage (S : Surface) (r : β) (p : Fin r β ComplexPoint S) : | |
| (surfacePower S r).left := | |
| (Limits.Pi.lift p).left (β¨β₯, Ideal.isPrime_botβ© : PrimeSpectrum β) | |
| @[instance_reducible] def tupleZariskiTopology (S : Surface) (r : β) : | |
| TopologicalSpace (Fin r β ComplexPoint S) := | |
| TopologicalSpace.induced (tupleImage S r) inferInstance | |
| def Configuration (S : Surface) (r : β) := | |
| {p : Fin r β ComplexPoint S // Function.Injective (fun i => (p i).image)} | |
| instance configurationTopology (S : Surface) (r : β) : | |
| TopologicalSpace (Configuration S r) := | |
| letI := tupleZariskiTopology S r | |
| inferInstanceAs (TopologicalSpace {p : Fin r β ComplexPoint S // | |
| Function.Injective (fun i => (p i).image)}) | |
| def idealOrder {R : Type} [CommRing R] [IsLocalRing R] (I : Ideal R) : β := | |
| sInf {n : β | Β¬ I β€ IsLocalRing.maximalIdeal R ^ (n + 1)} | |
| def curveMultiplicity (S : Surface) (C : IntegralCurve S) (p : ComplexPoint S) : β := by | |
| classical | |
| exact if h : β q : C.scheme, C.embedding q = p.image then | |
| idealOrder (RingHom.ker (C.embedding.stalkMap h.choose).hom) | |
| else 0 | |
| def totalMultiplicity (S : Surface) (r : β) (C : IntegralCurve S) | |
| (p : Configuration S r) : β := | |
| β i : Fin r, curveMultiplicity S C (p.val i) | |
| def seshadriConstant (S : Surface) (L : LineBundle S.scheme) (r : β) | |
| (p : Configuration S r) : β := | |
| sInf {a : β | β C : IntegralCurve S, 0 < totalMultiplicity S r C p β§ | |
| a = (curveDegree S L C : β) / (totalMultiplicity S r C p : β)} | |
| end | |
| end MaximalSeshadri.Geometry | |
| namespace MaximalSeshadri.Geometry | |
| noncomputable section | |
| open CategoryTheory CategoryTheory.Limits AlgebraicGeometry TopologicalSpace | |
| open scoped AlgebraicGeometry | |
| def moduleCurveDegree (S : Surface) (M : S.scheme.Modules) (C : IntegralCurve S) : β€ := | |
| eulerCharacteristic (C.embedding β« S.structureMap) 1 | |
| ((Scheme.Modules.pullback C.embedding).obj M) - | |
| eulerCharacteristic (C.embedding β« S.structureMap) 1 | |
| (structureSheaf C.scheme) | |
| def sectionImageIdeal {X : Scheme} (J : LineBundle X) | |
| (ΞΉ : J.sheaf βΆ structureSheaf X) (U : X.Opens) : Ideal Ξ(X, U) := by | |
| letI : Module Ξ(X, U) (J.sheaf.val.obj (Opposite.op U)) := | |
| (J.sheaf.val.obj (Opposite.op U)).isModule | |
| let Ο : J.sheaf.val.obj (Opposite.op U) ββ[Ξ(X, U)] Ξ(X, U) := | |
| (ΞΉ.val.app (Opposite.op U)).hom | |
| exact Ο.range | |
| def PresentsPullbackIdeal {X Y : Scheme} (I : X.IdealSheafData) (f : Y βΆ X) | |
| (J : LineBundle Y) (ΞΉ : J.sheaf βΆ structureSheaf Y) : Prop := | |
| Mono ΞΉ β§ β (U : Y.affineOpens) (V : X.affineOpens) | |
| (e : U.1 β€ f β»ΒΉα΅ V.1), | |
| sectionImageIdeal J ΞΉ U.1 = (I.ideal V).map (f.appLE V.1 U.1 e).hom | |
| def InvertiblePullbackIdeal {X Y : Scheme} (I : X.IdealSheafData) (f : Y βΆ X) : Prop := | |
| β (J : LineBundle Y) (ΞΉ : J.sheaf βΆ structureSheaf Y), PresentsPullbackIdeal I f J ΞΉ | |
| def centreIdeal (S : Surface) (r : β) (p : Configuration S r) : S.scheme.IdealSheafData := | |
| β i : Fin r, (p.val i).left.ker | |
| def IsBlowup {X B : Scheme} (I : X.IdealSheafData) (Ο : B βΆ X) : Prop := | |
| InvertiblePullbackIdeal I Ο β§ β (Y : Scheme) (f : Y βΆ X), | |
| InvertiblePullbackIdeal I f β β! h : Y βΆ B, h β« Ο = f | |
| structure PointBlowup (S : Surface) (r : β) (p : Configuration S r) where | |
| surface : Surface | |
| projection : surface.scheme βΆ S.scheme | |
| overComplex : projection β« S.structureMap = surface.structureMap | |
| isBlowup : IsBlowup (centreIdeal S r p) projection | |
| exceptionalIdeal : Fin r β LineBundle surface.scheme | |
| exceptionalInclusion : β i, (exceptionalIdeal i).sheaf βΆ structureSheaf surface.scheme | |
| exceptionalPullback : β i, PresentsPullbackIdeal (p.val i).left.ker projection | |
| (exceptionalIdeal i) (exceptionalInclusion i) | |
| def PointBlowup.BoundaryNef {S : Surface} {r : β} {p : Configuration S r} | |
| (B : PointBlowup S r p) (L : LineBundle S.scheme) : Prop := | |
| β C : IntegralCurve B.surface, | |
| 0 β€ (moduleCurveDegree B.surface | |
| ((Scheme.Modules.pullback B.projection).obj L.sheaf) C : β) + | |
| Real.sqrt ((selfIntersection S L : β) / r) * | |
| β i : Fin r, (curveDegree B.surface (B.exceptionalIdeal i) C : β) | |
| def EventualMaximalSeshadri (S : Surface) (L : LineBundle S.scheme) : Prop := | |
| β rβ : β, 0 < rβ β§ β r : β, rβ β€ r β | |
| β Z : β β Set (Configuration S r), | |
| (β n, IsClosed (Z n) β§ Z n β Set.univ) β§ | |
| (β p : Configuration S r, β n, p β Z n) β§ | |
| β p : Configuration S r, (β n, p β Z n) β | |
| (β B : PointBlowup S r p, B.BoundaryNef L) β§ | |
| seshadriConstant S L r p = Real.sqrt ((selfIntersection S L : β) / r) | |
| end | |
| end MaximalSeshadri.Geometry | |
| end OAI | |