Module

NormFrameTransition.lean

Nyll.SchemeTheory.Modules.Norm.NormFrameTransition
4 declarations indexed from sourceView source ↗

Scheme Modules exists is Frame On norm Module forall map eq norm smul of is Frame On

preimage

Declarations

AlgebraicCurves.Geometry.Sheaves.Proofs.NormFrameTransition.AlgebraicGeometry.Scheme.Modules.NormCocycle.wedge

The determinant section obtained by sheafifying the exterior product of local sections.

Source context 17 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section GeneralNormFrameTransition
section ProofImplementation
namespace AlgebraicCurves.Geometry.Sheaves.Proofs.NormFrameTransition
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.MonoidalCategory
open _root_.AlgebraicGeometry
open _root_.Opposite
namespace AlgebraicGeometry
namespace Scheme
namespace Modules
namespace NormCocycle
open _root_.AlgebraicGeometry.Scheme.Modules
open _root_.AlgebraicGeometry.Scheme
open _root_.AlgebraicGeometry
variable {X : Scheme.{u}}
def wedge (M : X.Modules) (V : X.Opens) {d : ℕ} (f : Fin d → Γ(M, V)) :
    Γ(Scheme.Modules.det d M, V)
AlgebraicCurves.Geometry.Sheaves.Proofs.NormFrameTransition.AlgebraicGeometry.Scheme.Modules.NormCocycle.map_wedge
Source context 17 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section GeneralNormFrameTransition
section ProofImplementation
namespace AlgebraicCurves.Geometry.Sheaves.Proofs.NormFrameTransition
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.MonoidalCategory
open _root_.AlgebraicGeometry
open _root_.Opposite
namespace AlgebraicGeometry
namespace Scheme
namespace Modules
namespace NormCocycle
open _root_.AlgebraicGeometry.Scheme.Modules
open _root_.AlgebraicGeometry.Scheme
open _root_.AlgebraicGeometry
variable {X : Scheme.{u}}
theorem map_wedge (M : X.Modules) {V W : X.Opens} (h : W ≤ V) {d : ℕ} (f : Fin d → Γ(M, V)) :
    (Scheme.Modules.det d M).presheaf.map (homOfLE h).op (wedge M V f) =
      wedge M W (fun i => M.presheaf.map (homOfLE h).op (f i)) := by
  unfold wedge
  have nat := PresheafOfModules.naturality_apply
    ((PresheafOfModules.sheafificationAdjunction (𝟙 X.ringCatSheaf.obj)).unit.app
      ((Scheme.Modules.presheafExteriorPower X d).obj M.val)) (homOfLE h).op
    (show ((Scheme.Modules.presheafExteriorPower X d).obj M.val).obj (op V) from
      exteriorPower.ιMulti (M := Γ(M, V)) Γ(X, V) d f)
  erw [← nat]
  congr 1
  exact PresheafOfModules.exteriorPower_map_ιMulti d M.val (homOfLE h).op f
AlgebraicGeometry.Scheme.Modules.exists_isFrameOn_normModule_forall_map_eq_norm_smul_of_isFrameOn_preimage
Source context 12 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section GeneralNormFrameTransition
section ProofImplementation
section
universe u
open _root_.CategoryTheory
open _root_.CategoryTheory.MonoidalCategory
open _root_.AlgebraicGeometry
open _root_.Opposite
open _root_.AlgebraicCurves.Geometry.Sheaves.Proofs.NormFrameTransition
open AlgebraicGeometry.Scheme.Modules.NormCocycle
namespace AlgebraicGeometry
theorem Scheme.Modules.exists_isFrameOn_normModule_forall_map_eq_norm_smul_of_isFrameOn_preimage
    {X Y : Scheme.{u}} (π : Y ⟶ X) (d : ℕ) {ι : Type u} (U : ι → X.Opens)
    (e : ∀ i, Fin d → Γ((Scheme.Modules.pushforward π).obj (𝟙_ Y.Modules), U i))
    (he : ∀ (i : ι) (W : X.Opens) (hW : W ≤ U i),
      ∃ b : Module.Basis (Fin d) Γ(X, W) Γ((Scheme.Modules.pushforward π).obj (𝟙_ Y.Modules), W),
        ∀ k, b k = ((Scheme.Modules.pushforward π).obj (𝟙_ Y.Modules)).presheaf.map (homOfLE
          hW).op (e i k))
    (L : Y.Modules) (s : ∀ i, Γ(L, π ⁻¹ᵁ U i)) (hs : ∀ i, Scheme.Modules.IsFrameOn (s i) (π ⁻¹ᵁ U
      i))
    (u : ∀ i j, Γ(Y, π ⁻¹ᵁ (U i ⊓ U j)))
    (hu : ∀ i j, L.presheaf.map (homOfLE (Scheme.Hom.preimage_mono π inf_le_right)).op (s j) =
      u i j • L.presheaf.map (homOfLE (Scheme.Hom.preimage_mono π inf_le_left)).op (s i)) :
    ∃ Ω : ∀ i, Γ(Scheme.Modules.normModule π d L, U i),
      (∀ i, Scheme.Modules.IsFrameOn (Ω i) (U i)) ∧
      ∀ i j, letI : Algebra Γ(X, U i ⊓ U j) Γ(Y, π ⁻¹ᵁ (U i ⊓ U j)) := (π.app (U i ⊓ U
        j)).hom.toAlgebra
        (Scheme.Modules.normModule π d L).presheaf.map (homOfLE inf_le_right).op (Ω j) =
          (Algebra.norm Γ(X, U i ⊓ U j) (u i j)) •
            (Scheme.Modules.normModule π d L).presheaf.map (homOfLE inf_le_left).op (Ω i) := by
  choose q hq hqev hΩ using fun i =>
    Scheme.Modules.IsFrameOn.exists_isFrameOn_normModule π d (L := L) (e i) (he i) (hs i)
  refine ⟨_, hΩ, ?_⟩
  intro i0 j0
  let : Algebra Γ(X, U i0 ⊓ U j0) Γ(Y, π ⁻¹ᵁ (U i0 ⊓ U j0)) := (π.app (U i0 ⊓ U j0)).hom.toAlgebra
  let E : X.Modules := (Scheme.Modules.pushforward π).obj (𝟙_ Y.Modules)
  let P : X.Modules := (Scheme.Modules.pushforward π).obj L
  have hW0 : (U i0) ⊓ (U j0) ≤ (U i0) := inf_le_left
  have hW1 : (U i0) ⊓ (U j0) ≤ (U j0) := inf_le_right
  let e₀' : Fin d → Γ(E, (U i0) ⊓ (U j0)) := fun i => E.presheaf.map (homOfLE hW0).op ((e i0) i)
  let e₁' : Fin d → Γ(E, (U i0) ⊓ (U j0)) := fun i => E.presheaf.map (homOfLE hW1).op ((e j0) i)
  obtain ⟨b₀, hb₀⟩ := (he i0) ((U i0) ⊓ (U j0)) hW0
  obtain ⟨b₁, hb₁⟩ := (he j0) ((U i0) ⊓ (U j0)) hW1
  have hb₀' : ∀ i, b₀ i = e₀' i := hb₀
  have hb₁' : ∀ i, b₁ i = e₁' i := hb₁
  let a : Matrix (Fin d) (Fin d) Γ(X, (U i0) ⊓ (U j0)) := fun i j => b₀.repr (e₁' j) i
  have ha : ∀ j, e₁' j = ∑ i, a i j • e₀' i := by
    intro j
    conv_lhs => rw [← b₀.sum_repr (e₁' j)]
    exact Finset.sum_congr rfl fun i _ => by rw [hb₀']
  have hadet : IsUnit a.det := by
    have hab : a = b₀.toMatrix b₁ := by
      ext i j
      simp only [a, Module.Basis.toMatrix_apply, hb₁']
    rw [hab, ← Module.Basis.det_apply]
    exact b₀.isUnit_det b₁
  obtain ⟨w, hw⟩ := hadet
  let s₀' : Γ(L, π ⁻¹ᵁ ((U i0) ⊓ (U j0))) := L.presheaf.map (homOfLE (Scheme.Hom.preimage_mono π
    hW0)).op (s i0)
  let s₁' : Γ(L, π ⁻¹ᵁ ((U i0) ⊓ (U j0))) := L.presheaf.map (homOfLE (Scheme.Hom.preimage_mono π
    hW1)).op (s j0)
  have hs' : s₁' = (u i0 j0) • s₀' := (hu i0 j0)
  let f₀ : Fin d → Γ(P, (U i0) ⊓ (U j0)) := fun i =>
    (show Γ(P, (U i0) ⊓ (U j0)) from (show Γ(Y, π ⁻¹ᵁ ((U i0) ⊓ (U j0))) from e₀' i) • s₀')
  let f₁ : Fin d → Γ(P, (U i0) ⊓ (U j0)) := fun i =>
    (show Γ(P, (U i0) ⊓ (U j0)) from (show Γ(Y, π ⁻¹ᵁ ((U i0) ⊓ (U j0))) from e₁' i) • s₁')
  let c : Matrix (Fin d) (Fin d) Γ(X, (U i0) ⊓ (U j0)) := fun i j =>
    b₀.repr (show Γ(E, (U i0) ⊓ (U j0)) from (show Γ(Y, π ⁻¹ᵁ ((U i0) ⊓ (U j0))) from e₁' j) * (u
      i0 j0)) i
  have hc : ∀ j, f₁ j = ∑ i, c i j • f₀ i := by
    intro j
    have hsum : (show Γ(E, (U i0) ⊓ (U j0)) from (show Γ(Y, π ⁻¹ᵁ ((U i0) ⊓ (U j0))) from e₁' j) *
      (u i0 j0)) =
        ∑ i, c i j • e₀' i := by
      conv_lhs => rw [← b₀.sum_repr
        (show Γ(E, (U i0) ⊓ (U j0)) from (show Γ(Y, π ⁻¹ᵁ ((U i0) ⊓ (U j0))) from e₁' j) * (u i0
          j0))]
      exact Finset.sum_congr rfl fun i _ => by rw [hb₀']
    have h1 : f₁ j = (show Γ(P, (U i0) ⊓ (U j0)) from
        ((show Γ(Y, π ⁻¹ᵁ ((U i0) ⊓ (U j0))) from e₁' j) * (u i0 j0)) • s₀') := by
      change (show Γ(Y, π ⁻¹ᵁ ((U i0) ⊓ (U j0))) from e₁' j) • s₁' = _
      rw [hs', smul_smul]
    rw [h1]
    have h2 : (show Γ(P, (U i0) ⊓ (U j0)) from ((show Γ(Y, π ⁻¹ᵁ ((U i0) ⊓ (U j0))) from e₁' j) *
      (u i0 j0)) • s₀') =
        (show Γ(P, (U i0) ⊓ (U j0)) from
          (show Γ(Y, π ⁻¹ᵁ ((U i0) ⊓ (U j0))) from (∑ i, c i j • e₀' i : Γ(E, (U i0) ⊓ (U j0)))) •
            s₀') := by
      rw [← hsum]
    rw [h2]
    change (show Γ(L, π ⁻¹ᵁ ((U i0) ⊓ (U j0))) from
        (show Γ(Y, π ⁻¹ᵁ ((U i0) ⊓ (U j0))) from (∑ i, c i j • e₀' i : Γ(E, (U i0) ⊓ (U j0)))) •
          s₀') =
      ∑ i, (π.app ((U i0) ⊓ (U j0))).hom (c i j) • ((show Γ(Y, π ⁻¹ᵁ ((U i0) ⊓ (U j0))) from e₀'
        i) • s₀')
    have h3 : (show Γ(Y, π ⁻¹ᵁ ((U i0) ⊓ (U j0))) from (∑ i, c i j • e₀' i : Γ(E, (U i0) ⊓ (U
      j0)))) =
        ∑ i, (π.app ((U i0) ⊓ (U j0))).hom (c i j) * (show Γ(Y, π ⁻¹ᵁ ((U i0) ⊓ (U j0))) from e₀'
          i) := rfl
    rw [h3, Finset.sum_smul]
    exact Finset.sum_congr rfl fun i _ => mul_smul _ _ _
  have hcdet : c.det = Algebra.norm Γ(X, (U i0) ⊓ (U j0)) (u i0 j0) * a.det := by
    let bY : Module.Basis (Fin d) Γ(X, (U i0) ⊓ (U j0)) Γ(Y, π ⁻¹ᵁ ((U i0) ⊓ (U j0))) := b₀
    have hcm : c = Algebra.leftMulMatrix bY (u i0 j0) * a := by
      ext i j
      have hv := congrFun (Algebra.leftMulMatrix_mulVec_repr bY (u i0 j0)
        (show Γ(Y, π ⁻¹ᵁ ((U i0) ⊓ (U j0))) from e₁' j)) i
      rw [Matrix.mulVec, dotProduct] at hv
      change bY.repr ((show Γ(Y, π ⁻¹ᵁ ((U i0) ⊓ (U j0))) from e₁' j) * (u i0 j0)) i = _
      rw [mul_comm, ← hv, Matrix.mul_apply]
      rfl
    rw [hcm, Matrix.det_mul, Algebra.norm_eq_matrix_det bY]
  have hdetE : wedge E ((U i0) ⊓ (U j0)) e₁' = a.det • wedge E ((U i0) ⊓ (U j0)) e₀' :=
    Scheme.Modules.sheafificationAdjunction_unit_iotaMulti_eq_det_smul_of_eq_sum_smul e₀' e₁' a ha
  have hdetP : wedge P ((U i0) ⊓ (U j0)) f₁ = c.det • wedge P ((U i0) ⊓ (U j0)) f₀ :=
    Scheme.Modules.sheafificationAdjunction_unit_iotaMulti_eq_det_smul_of_eq_sum_smul f₀ f₁ c hc
  have hΩires : (Scheme.Modules.normModule π d L).presheaf.map (homOfLE hW0).op
      (Scheme.Modules.tensorSections (wedge P (U i0) (fun i =>
        (show Γ(P, (U i0)) from (show Γ(Y, π ⁻¹ᵁ (U i0)) from (e i0) i) • (s i0)))) (q i0)) =
      Scheme.Modules.tensorSections (wedge P ((U i0) ⊓ (U j0)) f₀)
        ((Scheme.Modules.dual (Scheme.Modules.det d E)).presheaf.map (homOfLE hW0).op (q i0)) := by
    change (Scheme.Modules.det d P ⊗ Scheme.Modules.dual (Scheme.Modules.det d E)).presheaf.map
      (homOfLE hW0).op
      (Scheme.Modules.tensorSections (wedge P (U i0) (fun i =>
        (show Γ(P, (U i0)) from (show Γ(Y, π ⁻¹ᵁ (U i0)) from (e i0) i) • (s i0)))) (q i0)) = _
    rw [Scheme.Modules.map_homOfLE_tensorSections, map_wedge]
    congr 2
    funext i
    exact L.val.map_smul (homOfLE (Scheme.Hom.preimage_mono π hW0)).op
      (show Γ(Y, π ⁻¹ᵁ (U i0)) from (e i0) i) (s i0)
  have hΩjres : (Scheme.Modules.normModule π d L).presheaf.map (homOfLE hW1).op
      (Scheme.Modules.tensorSections (wedge P (U j0) (fun i =>
        (show Γ(P, (U j0)) from (show Γ(Y, π ⁻¹ᵁ (U j0)) from (e j0) i) • (s j0)))) (q j0)) =
      Scheme.Modules.tensorSections (wedge P ((U i0) ⊓ (U j0)) f₁)
        ((Scheme.Modules.dual (Scheme.Modules.det d E)).presheaf.map (homOfLE hW1).op (q j0)) := by
    change (Scheme.Modules.det d P ⊗ Scheme.Modules.dual (Scheme.Modules.det d E)).presheaf.map
      (homOfLE hW1).op
      (Scheme.Modules.tensorSections (wedge P (U j0) (fun i =>
        (show Γ(P, (U j0)) from (show Γ(Y, π ⁻¹ᵁ (U j0)) from (e j0) i) • (s j0)))) (q j0)) = _
    rw [Scheme.Modules.map_homOfLE_tensorSections, map_wedge]
    congr 2
    funext i
    exact L.val.map_smul (homOfLE (Scheme.Hom.preimage_mono π hW1)).op
      (show Γ(Y, π ⁻¹ᵁ (U j0)) from (e j0) i) (s j0)
  have hq : (Scheme.Modules.dual (Scheme.Modules.det d E)).presheaf.map (homOfLE hW1).op (q j0) =
      ((↑w⁻¹ : Γ(X, (U i0) ⊓ (U j0)))) •
        (Scheme.Modules.dual (Scheme.Modules.det d E)).presheaf.map (homOfLE hW0).op (q i0) := by
    have hev₀ : Scheme.Modules.ihomEval (Scheme.Modules.det d E) (𝟙_ X.Modules) ((U i0) ⊓ (U j0))
        (wedge E ((U i0) ⊓ (U j0)) e₀')
        ((Scheme.Modules.dual (Scheme.Modules.det d E)).presheaf.map (homOfLE hW0).op (q i0)) =
        Scheme.Modules.unitSection ((U i0) ⊓ (U j0)) := by
      have := congrArg ((𝟙_ X.Modules).presheaf.map (homOfLE hW0).op) (hqev i0)
      erw [Scheme.Modules.map_ihomEval] at this
      rw [Scheme.Modules.map_unitSection] at this
      have hwd : (Scheme.Modules.det d E).presheaf.map (homOfLE hW0).op (wedge E (U i0) (e i0)) =
          wedge E ((U i0) ⊓ (U j0)) e₀' := map_wedge E hW0 (e i0)
      rw [← hwd]
      exact this
    have hev₁ : Scheme.Modules.ihomEval (Scheme.Modules.det d E) (𝟙_ X.Modules) ((U i0) ⊓ (U j0))
        (wedge E ((U i0) ⊓ (U j0)) e₁')
        ((Scheme.Modules.dual (Scheme.Modules.det d E)).presheaf.map (homOfLE hW1).op (q j0)) =
        Scheme.Modules.unitSection ((U i0) ⊓ (U j0)) := by
      have := congrArg ((𝟙_ X.Modules).presheaf.map (homOfLE hW1).op) (hqev j0)
      erw [Scheme.Modules.map_ihomEval] at this
      rw [Scheme.Modules.map_unitSection] at this
      have hwd : (Scheme.Modules.det d E).presheaf.map (homOfLE hW1).op (wedge E (U j0) (e j0)) =
          wedge E ((U i0) ⊓ (U j0)) e₁' := map_wedge E hW1 (e j0)
      rw [← hwd]
      exact this
    have he₁' : ∀ (W' : X.Opens) (hW' : W' ≤ (U i0) ⊓ (U j0)),
        ∃ b : Module.Basis (Fin d) Γ(X, W') Γ(E, W'), ∀ i, b i = E.presheaf.map (homOfLE hW').op
          (e₁' i) := by
      intro W' hW'
      obtain ⟨b, hb⟩ := (he j0) W' (hW'.trans hW1)
      refine ⟨b, fun i => ?_⟩
      rw [hb i]
      change _ = (E.presheaf.map (homOfLE hW1).op ≫ E.presheaf.map (homOfLE hW').op) ((e j0) i)
      rw [← CategoryTheory.Functor.map_comp]
      rfl
    have hfr : Scheme.Modules.IsFrameOn (M := Scheme.Modules.det d E) (wedge E ((U i0) ⊓ (U j0))
      e₁')
        ((U i0) ⊓ (U j0)) :=
      Scheme.Modules.isFrameOn_sheafificationAdjunction_unit_iotaMulti e₁' he₁'
    refine Scheme.Modules.IsFrameOn.dual_eq_of_ihomEval_eq hfr le_rfl ?_
    have hid : (Scheme.Modules.det d E).presheaf.map (homOfLE (le_rfl : (U i0) ⊓ (U j0) ≤ (U i0) ⊓
      (U j0))).op
        (wedge E ((U i0) ⊓ (U j0)) e₁') = wedge E ((U i0) ⊓ (U j0)) e₁' := by
      change (Scheme.Modules.det d E).presheaf.map (𝟙 (op ((U i0) ⊓ (U j0)))) (wedge E ((U i0) ⊓
        (U j0)) e₁') = _
      rw [CategoryTheory.Functor.map_id]
      rfl
    rw [hid, hev₁, Scheme.Modules.ihomEval_smul_right, hdetE, Scheme.Modules.ihomEval_smul_left,
      hev₀,
      smul_smul, ← hw, Units.inv_mul, one_smul]
  change (Scheme.Modules.normModule π d L).presheaf.map (homOfLE hW1).op
      (Scheme.Modules.tensorSections (wedge P (U j0) (fun i =>
        (show Γ(P, (U j0)) from (show Γ(Y, π ⁻¹ᵁ (U j0)) from (e j0) i) • (s j0)))) (q j0)) =
    Algebra.norm Γ(X, (U i0) ⊓ (U j0)) (u i0 j0) •
      (Scheme.Modules.normModule π d L).presheaf.map (homOfLE hW0).op
        (Scheme.Modules.tensorSections (wedge P (U i0) (fun i =>
          (show Γ(P, (U i0)) from (show Γ(Y, π ⁻¹ᵁ (U i0)) from (e i0) i) • (s i0)))) (q i0))
  rw [hΩires, hΩjres, hq, hdetP, Scheme.Modules.tensorSections_smul_left,
    Scheme.Modules.tensorSections_smul_right, smul_smul, hcdet, mul_assoc, hw.symm, Units.mul_inv,
      mul_one]
  rfl
AlgebraicGeometry.Scheme.Modules.exists_isFrameOn_normModule_map_eq_norm_smul_of_isFrameOn_preimage
Source context 5 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section TwoChartNormFrameTransition
universe u
open CategoryTheory MonoidalCategory Opposite
namespace AlgebraicGeometry
theorem Scheme.Modules.exists_isFrameOn_normModule_map_eq_norm_smul_of_isFrameOn_preimage
    {X Y : Scheme.{u}} (π : Y ⟶ X) (d : ℕ) (𝒰 : X.TwoAffineOpenCover)
    (e₀ : Fin d → Γ((Scheme.Modules.pushforward π).obj (𝟙_ Y.Modules), 𝒰.U0))
    (he₀ : ∀ (W : X.Opens) (hW : W ≤ 𝒰.U0),
      ∃ b : Module.Basis (Fin d) Γ(X, W) Γ((Scheme.Modules.pushforward π).obj (𝟙_ Y.Modules), W),
        ∀ i, b i = ((Scheme.Modules.pushforward π).obj (𝟙_ Y.Modules)).presheaf.map (homOfLE hW).op
          (e₀ i))
    (e₁ : Fin d → Γ((Scheme.Modules.pushforward π).obj (𝟙_ Y.Modules), 𝒰.U1))
    (he₁ : ∀ (W : X.Opens) (hW : W ≤ 𝒰.U1),
      ∃ b : Module.Basis (Fin d) Γ(X, W) Γ((Scheme.Modules.pushforward π).obj (𝟙_ Y.Modules), W),
        ∀ i, b i = ((Scheme.Modules.pushforward π).obj (𝟙_ Y.Modules)).presheaf.map (homOfLE hW).op
          (e₁ i))
    (L : Y.Modules) (s₀ : Γ(L, π ⁻¹ᵁ 𝒰.U0)) (s₁ : Γ(L, π ⁻¹ᵁ 𝒰.U1))
    (hs₀ : Scheme.Modules.IsFrameOn s₀ (π ⁻¹ᵁ 𝒰.U0)) (hs₁ : Scheme.Modules.IsFrameOn s₁ (π ⁻¹ᵁ
      𝒰.U1))
    (u : Γ(Y, π ⁻¹ᵁ (𝒰.U0 ⊓ 𝒰.U1)))
    (hs : L.presheaf.map (homOfLE (Scheme.Hom.preimage_mono π inf_le_right)).op s₁ =
      u • L.presheaf.map (homOfLE (Scheme.Hom.preimage_mono π inf_le_left)).op s₀) :
    let : Algebra Γ(X, 𝒰.U0 ⊓ 𝒰.U1) Γ(Y, π ⁻¹ᵁ (𝒰.U0 ⊓ 𝒰.U1)) := (π.app (𝒰.U0 ⊓
      𝒰.U1)).hom.toAlgebra
    ∃ (Ω₀ : Γ(Scheme.Modules.normModule π d L, 𝒰.U0)) (Ω₁ : Γ(Scheme.Modules.normModule π d L,
      𝒰.U1)),
      Scheme.Modules.IsFrameOn Ω₀ 𝒰.U0 ∧ Scheme.Modules.IsFrameOn Ω₁ 𝒰.U1 ∧
      (Scheme.Modules.normModule π d L).presheaf.map (homOfLE inf_le_right).op Ω₁ =
        (Algebra.norm Γ(X, 𝒰.U0 ⊓ 𝒰.U1) u) •
          (Scheme.Modules.normModule π d L).presheaf.map (homOfLE inf_le_left).op Ω₀ := by
  classical
  intro overlapAlgebra
  let U : ULift.{u} Bool → X.Opens
    | ⟨false⟩ => 𝒰.U0
    | ⟨true⟩ => 𝒰.U1
  let e : ∀ i : ULift.{u} Bool,
      Fin d → Γ((Scheme.Modules.pushforward π).obj (𝟙_ Y.Modules), U i)
    | ⟨false⟩ => e₀
    | ⟨true⟩ => e₁
  have he : ∀ (i : ULift.{u} Bool) (W : X.Opens) (hW : W ≤ U i),
      ∃ b : Module.Basis (Fin d) Γ(X, W) Γ((Scheme.Modules.pushforward π).obj (𝟙_ Y.Modules), W),
        ∀ k, b k = ((Scheme.Modules.pushforward π).obj (𝟙_ Y.Modules)).presheaf.map
          (homOfLE hW).op (e i k) := by
    rintro ⟨i⟩ W hW
    cases i with
    | false => exact he₀ W hW
    | true => exact he₁ W hW
  let s : ∀ i : ULift.{u} Bool, Γ(L, π ⁻¹ᵁ U i)
    | ⟨false⟩ => s₀
    | ⟨true⟩ => s₁
  have hf : ∀ i : ULift.{u} Bool, Scheme.Modules.IsFrameOn (s i) (π ⁻¹ᵁ U i) := by
    rintro ⟨i⟩
    cases i with
    | false => exact hs₀
    | true => exact hs₁
  have hcoeff (i j : ULift.{u} Bool) :
      ∃ c : Γ(Y, π ⁻¹ᵁ (U i ⊓ U j)),
        L.presheaf.map (homOfLE (Scheme.Hom.preimage_mono π inf_le_right)).op (s j) =
          c • L.presheaf.map (homOfLE (Scheme.Hom.preimage_mono π inf_le_left)).op (s i) := by
    have hleft : π ⁻¹ᵁ (U i ⊓ U j) ≤ π ⁻¹ᵁ U i :=
      Scheme.Hom.preimage_mono π inf_le_left
    have hright : π ⁻¹ᵁ (U i ⊓ U j) ≤ π ⁻¹ᵁ U j :=
      Scheme.Hom.preimage_mono π inf_le_right
    obtain ⟨c, hc⟩ := (hf i hleft hleft).surjective
      (L.presheaf.map (homOfLE hright).op (s j))
    exact ⟨c, hc.symm⟩
  choose c hc using hcoeff
  have hc01 : c ⟨false⟩ ⟨true⟩ = u := by
    have hleft : π ⁻¹ᵁ (𝒰.U0 ⊓ 𝒰.U1) ≤ π ⁻¹ᵁ 𝒰.U0 :=
      Scheme.Hom.preimage_mono π inf_le_left
    apply (hs₀ hleft hleft).injective
    exact (hc ⟨false⟩ ⟨true⟩).symm.trans hs
  obtain ⟨Ω, hΩ, htrans⟩ :=
    Scheme.Modules.exists_isFrameOn_normModule_forall_map_eq_norm_smul_of_isFrameOn_preimage
      π d U e he L s hf c hc
  refine ⟨Ω ⟨false⟩, Ω ⟨true⟩, hΩ ⟨false⟩, hΩ ⟨true⟩, ?_⟩
  simpa only [hc01] using htrans ⟨false⟩ ⟨true⟩