import Mathlib import Definitions.Def_AlgebraicGeometry_OrderedAffineCoverCech import Definitions.Def_AlgebraicGeometry_OrderedAffineCoverComap import Definitions.Def_AlgebraicGeometry_RelativePicardFunctor set_option autoImplicit false noncomputable section universe u namespace AlgebraicGeometry open CategoryTheory CategoryTheory.Limits Opposite TopologicalSpace namespace Scheme.Modules variable {Y : Scheme.{u}} def unitAutSection (W : Y.Opens) (e : SheafOfModules.unit (W : Scheme.{u}).ringCatSheaf β‰… SheafOfModules.unit (W : Scheme.{u}).ringCatSheaf) : Ξ“(Y, W) := W.topIso.hom ((e.hom.val.app (op ⊀)).hom (1 : (W : Scheme.{u}).presheaf.obj (op ⊀))) abbrev CechTrivialisation (𝒱 : Y.OrderedAffineCover) (π“œ : Y.Modules) : Type u := βˆ€ a : 𝒱.ΞΉ, (Scheme.Modules.pullback (𝒱.U a).ΞΉ).obj π“œ β‰… SheafOfModules.unit ((𝒱.U a : Scheme.{u})).ringCatSheaf namespace CechTrivialisation variable {𝒱 : Y.OrderedAffineCover} {π“œ : Y.Modules} def restrict (Ο„ : CechTrivialisation 𝒱 π“œ) {a : 𝒱.ΞΉ} {W : Y.Opens} (h : W ≀ 𝒱.U a) : (Scheme.Modules.pullback W.ΞΉ).obj π“œ β‰… SheafOfModules.unit ((W : Scheme.{u})).ringCatSheaf := ((Scheme.Modules.pullbackCongr (Y.homOfLE_ΞΉ h)).app π“œ).symm β‰ͺ≫ ((Scheme.Modules.pullbackComp (Y.homOfLE h) (𝒱.U a).ΞΉ).app π“œ).symm β‰ͺ≫ (Scheme.Modules.pullback (Y.homOfLE h)).mapIso (Ο„ a) β‰ͺ≫ Scheme.Modules.pullbackUnitIso (Y.homOfLE h) def transition (Ο„ : CechTrivialisation 𝒱 π“œ) (s : 𝒱.Idx 1) : Ξ“(Y, 𝒱.inter s) := unitAutSection (𝒱.inter s) ((Ο„.restrict (𝒱.inter_le s 0)).symm β‰ͺ≫ Ο„.restrict (𝒱.inter_le s 1)) def comap (Ο„ : CechTrivialisation 𝒱 π“œ) {Y' : Scheme.{u}} (h : Y' ⟢ Y) [IsAffineHom h] : CechTrivialisation (𝒱.comap h) ((Scheme.Modules.pullback h).obj π“œ) := fun a => ((Scheme.Modules.pullbackComp (h ⁻¹ᡁ 𝒱.U a).ΞΉ h).app π“œ) β‰ͺ≫ ((Scheme.Modules.pullbackCongr (morphismRestrict_ΞΉ h (𝒱.U a)).symm).app π“œ) β‰ͺ≫ ((Scheme.Modules.pullbackComp (h ∣_ 𝒱.U a) (𝒱.U a).ΞΉ).app π“œ).symm β‰ͺ≫ (Scheme.Modules.pullback (h ∣_ 𝒱.U a)).mapIso (Ο„ a) β‰ͺ≫ Scheme.Modules.pullbackUnitIso (h ∣_ 𝒱.U a) end CechTrivialisation end Scheme.Modules namespace SmallExtension open Scheme.TwoAffineOpenCover variable {B₁ : Type u} [CommRing B₁] {k : Type u} [Field k] variable (V : Type u) [AddCommGroup V] [Module k V] [Module B₁ V] (ΞΉJ : V β†’β‚—[B₁] B₁) variable {X : Scheme.{u}} (f : X ⟢ Spec (CommRingCat.of B₁)) variable {Xk : Scheme.{u}} (fk : Xk ⟢ Spec (CommRingCat.of k)) (i : Xk ⟢ X) def IsFibreReading (U : X.Opens) (W : Xk.Opens) (hW : W ≀ i ⁻¹ᡁ U) (Ξ΄ : Ξ“(X, U)) (w : Module.Dual k V β†’β‚—[k] (OModulePresheaf.unit fk).obj W) : Prop := letI := algebraOfHom f U βˆƒ (n : β„•) (v : Fin n β†’ V) (s : Fin n β†’ Ξ“(X, U)), (βˆ‘ j, algebraMap B₁ (X.presheaf.obj (op U)) (ΞΉJ (v j)) * s j) = Ξ΄ ∧ βˆ€ ΞΎ : Module.Dual k V, w ΞΎ = βˆ‘ j, ΞΎ (v j) β€’ (OModulePresheaf.unit fk).res hW (show (OModulePresheaf.unit fk).obj (i ⁻¹ᡁ U) from (i.app U).hom (s j)) variable {Xβ‚€ : Scheme.{u}} (g : Xβ‚€ ⟢ X) [IsAffineHom g] [IsAffineHom i] variable (𝒰 : X.OrderedAffineCover) def IsPicObstructionCocycle (𝓛₀ : Xβ‚€.Modules) (c : Module.Dual k V β†’β‚—[k] (OModulePresheaf.unit fk).cochain (𝒰.comap i) 2) : Prop := βˆƒ (Ο„ : Scheme.Modules.CechTrivialisation (𝒰.comap g) 𝓛₀) (u u' : βˆ€ s : 𝒰.Idx 1, Ξ“(X, 𝒰.inter s)), (βˆ€ s : 𝒰.Idx 1, (Xβ‚€.presheaf.map (homOfLE (𝒰.comap_inter_le g s)).op).hom ((g.app (𝒰.inter s)).hom (u s)) = Ο„.transition s) ∧ (βˆ€ s : 𝒰.Idx 1, u s * u' s = 1) ∧ βˆ€ r : 𝒰.Idx 2, IsFibreReading V ΞΉJ f fk i (𝒰.inter r) ((𝒰.comap i).inter r) (𝒰.comap_inter_le i r) ((X.presheaf.map (homOfLE (𝒰.inter_le_inter_face r 2)).op).hom (u (𝒰.face r 2)) * (X.presheaf.map (homOfLE (𝒰.inter_le_inter_face r 0)).op).hom (u (𝒰.face r 0)) * (X.presheaf.map (homOfLE (𝒰.inter_le_inter_face r 1)).op).hom (u' (𝒰.face r 1)) - 1) ((LinearMap.proj r).comp c) def IsPicDeformationCocycle (M : X.Modules) (Ο†β‚€ : (Scheme.Modules.pullback g).obj M β‰… SheafOfModules.unit Xβ‚€.ringCatSheaf) (w : Module.Dual k V β†’β‚—[k] (OModulePresheaf.unit fk).cochain (𝒰.comap i) 1) : Prop := βˆƒ (Ο„ : Scheme.Modules.CechTrivialisation 𝒰 M) (e e' : βˆ€ a : 𝒰.ΞΉ, Ξ“(X, 𝒰.U a)), (βˆ€ a : 𝒰.ΞΉ, e a * e' a = 1) ∧ (βˆ€ a : 𝒰.ΞΉ, (g.app (𝒰.U a)).hom (e a) = Scheme.Modules.unitAutSection ((𝒰.comap g).U a) ((Ο„.comap g a).symm β‰ͺ≫ ((Scheme.Modules.pullback ((𝒰.comap g).U a).ΞΉ).mapIso Ο†β‚€ β‰ͺ≫ Scheme.Modules.pullbackUnitIso ((𝒰.comap g).U a).ΞΉ))) ∧ βˆ€ s : 𝒰.Idx 1, IsFibreReading V ΞΉJ f fk i (𝒰.inter s) ((𝒰.comap i).inter s) (𝒰.comap_inter_le i s) (Ο„.transition s * (X.presheaf.map (homOfLE (𝒰.inter_le s 0)).op).hom (e' (s.1 0)) * (X.presheaf.map (homOfLE (𝒰.inter_le s 1)).op).hom (e (s.1 1)) - 1) ((LinearMap.proj s).comp w) end SmallExtension end AlgebraicGeometry end