Module

TwoChartCech_gluedLinesSections_nonempty_linearEquiv_structureSheaf_iff.lean

Nyll.AlgebraicCurves.Cohomology.Cech.TwoChartCech_gluedLinesSections_nonempty_linearEquiv_structureSheaf_iff
33 declarations indexed from sourceView source ↗

Two Chart Cech glued Lines Sections nonempty linear Equiv structure Sheaf iff

Imports11
  • Mathlib.Algebra.Polynomial.Laurent
  • Mathlib.Algebra.Polynomial.Degree.Units
  • Mathlib.Algebra.GroupWithZero.Associated
  • Mathlib.Algebra.Algebra.Subalgebra.Prod
  • Mathlib.LinearAlgebra.Lagrange
  • Mathlib.Tactic.Abel
  • Mathlib.Tactic.ByContra
  • Mathlib.Tactic.Ext
  • Mathlib.Tactic.Push
  • Mathlib.Tactic.Ring
  • Nyll.AlgebraicCurves.Cohomology.Cech.TwoChartCech_GluedLines
Imported by1

Declarations

AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.LaurentAux.exists_toLaurent_of_support_nonneg
Source context 10 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
section LAURsec
open Polynomial
namespace LaurentAux
variable {k : Type*} [Field k]
theorem exists_toLaurent_of_support_nonneg (f : k[T;T⁻¹]) (hf : ∀ n ∈ f.coeff.support, 0 ≤ n) :
    ∃ P : k[X], toLaurent P = f
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.LaurentAux.exists_eq_C_mul_T_of_isUnit
Source context 10 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
section LAURsec
open Polynomial
namespace LaurentAux
variable {k : Type*} [Field k]
theorem exists_eq_C_mul_T_of_isUnit {f : k[T;T⁻¹]} (hf : IsUnit f) :
    ∃ (c : k) (d : ℤ), c ≠ 0 ∧ f = LaurentPolynomial.C c * T d
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.LaurentAux.eval₂_invert
Source context 10 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
section LAURsec
open Polynomial
namespace LaurentAux
variable {k : Type*} [Field k]
theorem eval₂_invert (u : kˣ) (f : k[T;T⁻¹]) :
    eval₂ (RingHom.id k) u (invert f) = eval₂ (RingHom.id k) u⁻¹ f
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.LaurentAux.mem_support_invert_iff
Source context 10 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
section LAURsec
open Polynomial
namespace LaurentAux
variable {k : Type*} [Field k]
theorem mem_support_invert_iff (f : k[T;T⁻¹]) (n : ℤ) : n ∈ (invert f).coeff.support ↔ -n ∈
  f.coeff.support
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.levalUnit_smul
Source context 10 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
variable {k : Type u} [Field k] {s : ℕ} (a b : Fin s → kˣ) {lam : Fin s → kˣ} (c : kˣ)
theorem levalUnit_smul (u : kˣ) (r : k) (q : k[T;T⁻¹]) : levalUnit k u (r • q) = r * levalUnit k u
  q
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.smul_mem_polyPart
Source context 10 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
variable {k : Type u} [Field k] {s : ℕ} (a b : Fin s → kˣ) {lam : Fin s → kˣ} (c : kˣ)
theorem smul_mem_polyPart {r : k} {q : k[T;T⁻¹]} (hq : q ∈ polyPart k) : r • q ∈ polyPart k
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.smul_mem_invPolyPart
Source context 10 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
variable {k : Type u} [Field k] {s : ℕ} (a b : Fin s → kˣ) {lam : Fin s → kˣ} (c : kˣ)
theorem smul_mem_invPolyPart {r : k} {q : k[T;T⁻¹]} (hq : q ∈ invPolyPart k) : r • q ∈ invPolyPart
  k
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.mem_overlap_of_gluedCond
Source context 12 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
variable {k : Type u} [Field k] {s : ℕ} (a b : Fin s → kˣ) {lam : Fin s → kˣ} (c : kˣ)
variable (hc : ∀ i, lam i = c)
include hc
theorem mem_overlap_of_gluedCond {f : k[T;T⁻¹] × k[T;T⁻¹]} (hf : GluedCond a b lam f) :
    (f.1, (c : k) • f.2) ∈ gluedLinesOverlap k a b
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.gluedCond_of_mem_overlap
Source context 12 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
variable {k : Type u} [Field k] {s : ℕ} (a b : Fin s → kˣ) {lam : Fin s → kˣ} (c : kˣ)
variable (hc : ∀ i, lam i = c)
include hc
theorem gluedCond_of_mem_overlap {g : k[T;T⁻¹] × k[T;T⁻¹]} (hg : g ∈ gluedLinesOverlap k a b) :
    GluedCond a b lam (g.1, ((c⁻¹ : kˣ) : k) • g.2)
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.e01

Identify the overlap module with the overlap algebra by rescaling the second component by c.

Source context 12 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
variable {k : Type u} [Field k] {s : ℕ} (a b : Fin s → kˣ) {lam : Fin s → kˣ} (c : kˣ)
variable (hc : ∀ i, lam i = c)
include hc
def e01 : ↥(gluedLinesM01 k a b lam) ≃ₗ[↥(gluedLinesOverlap k a b)]
  ↥(gluedLinesOverlap k a b) where
  toFun f := ⟨(f.1.1, (c : k) • f.1.2), mem_overlap_of_gluedCond a b c hc f.2⟩
  invFun g := ⟨(g.1.1, ((c⁻¹ : kˣ) : k) • g.1.2), gluedCond_of_mem_overlap a b c hc g.2⟩
  map_add' f g := by
    apply Subtype.ext
    simp only [Submodule.coe_add, Prod.fst_add, Prod.snd_add, smul_add, Subalgebra.coe_add,
      Prod.mk_add_mk]
  map_smul' φ f := by
    apply Subtype.ext
    change (((φ : k[T;T⁻¹] × k[T;T⁻¹]) * f).1, (c : k) • ((φ : k[T;T⁻¹] × k[T;T⁻¹]) * f).2) =
      (φ : k[T;T⁻¹] × k[T;T⁻¹]) * ((f : k[T;T⁻¹] × k[T;T⁻¹]).1, (c : k) • (f : k[T;T⁻¹] ×
        k[T;T⁻¹]).2)
    rw [Prod.fst_mul, Prod.snd_mul, Prod.mk_mul_mk, mul_smul_comm]
  left_inv f := by
    apply Subtype.ext
    simp only [smul_smul, Units.inv_mul, one_smul, Prod.mk.eta]
  right_inv g := by
    apply Subtype.ext
    simp only [smul_smul, Units.mul_inv, one_smul, Prod.mk.eta]
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.e01_apply_coe
Source context 12 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
variable {k : Type u} [Field k] {s : ℕ} (a b : Fin s → kˣ) {lam : Fin s → kˣ} (c : kˣ)
variable (hc : ∀ i, lam i = c)
include hc
theorem e01_apply_coe (f : ↥(gluedLinesM01 k a b lam)) :
    ((e01 a b c hc f : ↥(gluedLinesOverlap k a b)) : k[T;T⁻¹] × k[T;T⁻¹]) = (f.1.1, (c : k) •
      f.1.2)
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.e0

Trivialise the polynomial-chart module when all gluing factors equal c.

Source context 12 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
variable {k : Type u} [Field k] {s : ℕ} (a b : Fin s → kˣ) {lam : Fin s → kˣ} (c : kˣ)
variable (hc : ∀ i, lam i = c)
include hc
def e0 : ↥(gluedLinesM0 k a b lam) ≃ₗ[↥(gluedLinesOverlap k a b ⊓ (polyPart k).prod
  (polyPart k))]
    ↥(gluedLinesOverlap k a b ⊓ (polyPart k).prod (polyPart k)) where
  toFun f := ⟨(f.1.1, (c : k) • f.1.2), ⟨mem_overlap_of_gluedCond a b c hc f.2.1,
    Subalgebra.mem_prod.mpr ⟨(Subalgebra.mem_prod.mp f.2.2).1, smul_mem_polyPart
      (Subalgebra.mem_prod.mp f.2.2).2⟩⟩⟩
  invFun g := ⟨(g.1.1, ((c⁻¹ : kˣ) : k) • g.1.2), ⟨gluedCond_of_mem_overlap a b c hc g.2.1,
    Subalgebra.mem_prod.mpr ⟨(Subalgebra.mem_prod.mp g.2.2).1, smul_mem_polyPart
      (Subalgebra.mem_prod.mp g.2.2).2⟩⟩⟩
  map_add' f g := by
    apply Subtype.ext
    simp only [Submodule.coe_add, Prod.fst_add, Prod.snd_add, smul_add, Subalgebra.coe_add,
      Prod.mk_add_mk]
  map_smul' φ f := by
    apply Subtype.ext
    change (((φ : k[T;T⁻¹] × k[T;T⁻¹]) * f).1, (c : k) • ((φ : k[T;T⁻¹] × k[T;T⁻¹]) * f).2) =
      (φ : k[T;T⁻¹] × k[T;T⁻¹]) * ((f : k[T;T⁻¹] × k[T;T⁻¹]).1, (c : k) • (f : k[T;T⁻¹] ×
        k[T;T⁻¹]).2)
    rw [Prod.fst_mul, Prod.snd_mul, Prod.mk_mul_mk, mul_smul_comm]
  left_inv f := by
    apply Subtype.ext
    simp only [smul_smul, Units.inv_mul, one_smul, Prod.mk.eta]
  right_inv g := by
    apply Subtype.ext
    simp only [smul_smul, Units.mul_inv, one_smul, Prod.mk.eta]
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.fst_mem_invPolyPart_of_mem_M1_zero
Source context 13 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
variable {k : Type u} [Field k] {s : ℕ} (a b : Fin s → kˣ) {lam : Fin s → kˣ} (c : kˣ)
variable (hc : ∀ i, lam i = c)
include hc
omit hc in
theorem fst_mem_invPolyPart_of_mem_M1_zero {f : k[T;T⁻¹] × k[T;T⁻¹]} (hf : f ∈ gluedLinesM1 k a b
  lam 0 0) :
    f.1 ∈ invPolyPart k ∧ f.2 ∈ invPolyPart k
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.e1

Trivialise the inverse-polynomial-chart module with zero twists when all gluing factors equal c.

Source context 12 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
variable {k : Type u} [Field k] {s : ℕ} (a b : Fin s → kˣ) {lam : Fin s → kˣ} (c : kˣ)
variable (hc : ∀ i, lam i = c)
include hc
def e1 : ↥(gluedLinesM1 k a b lam 0 0) ≃ₗ[↥(gluedLinesOverlap k a b ⊓ (invPolyPart
  k).prod (invPolyPart k))]
    ↥(gluedLinesOverlap k a b ⊓ (invPolyPart k).prod (invPolyPart k)) where
  toFun f := ⟨(f.1.1, (c : k) • f.1.2), ⟨mem_overlap_of_gluedCond a b c hc f.2.1,
    Subalgebra.mem_prod.mpr ⟨(fst_mem_invPolyPart_of_mem_M1_zero a b f.2).1,
      smul_mem_invPolyPart (fst_mem_invPolyPart_of_mem_M1_zero a b f.2).2⟩⟩⟩
  invFun g := ⟨(g.1.1, ((c⁻¹ : kˣ) : k) • g.1.2), ⟨gluedCond_of_mem_overlap a b c hc g.2.1, by
    rw [neg_zero, T_zero, mul_one]; exact (Subalgebra.mem_prod.mp g.2.2).1, by
    rw [neg_zero, T_zero, mul_one]; exact smul_mem_invPolyPart (Subalgebra.mem_prod.mp g.2.2).2⟩⟩
  map_add' f g := by
    apply Subtype.ext
    simp only [Submodule.coe_add, Prod.fst_add, Prod.snd_add, smul_add, Subalgebra.coe_add,
      Prod.mk_add_mk]
  map_smul' φ f := by
    apply Subtype.ext
    change (((φ : k[T;T⁻¹] × k[T;T⁻¹]) * f).1, (c : k) • ((φ : k[T;T⁻¹] × k[T;T⁻¹]) * f).2) =
      (φ : k[T;T⁻¹] × k[T;T⁻¹]) * ((f : k[T;T⁻¹] × k[T;T⁻¹]).1, (c : k) • (f : k[T;T⁻¹] ×
        k[T;T⁻¹]).2)
    rw [Prod.fst_mul, Prod.snd_mul, Prod.mk_mul_mk, mul_smul_comm]
  left_inv f := by
    apply Subtype.ext
    simp only [smul_smul, Units.inv_mul, one_smul, Prod.mk.eta]
  right_inv g := by
    apply Subtype.ext
    simp only [smul_smul, Units.mul_inv, one_smul, Prod.mk.eta]
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.backward
Source context 13 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
variable {k : Type u} [Field k] {s : ℕ} (a b : Fin s → kˣ) {lam : Fin s → kˣ} (c : kˣ)
variable (hc : ∀ i, lam i = c)
include hc
omit hc in
theorem backward (hlam : ∀ i j, lam i = lam j) :
    letI := (gluedLinesSections k a b lam 0 0).M0_moduleA
    letI := (gluedLinesSections k a b lam 0 0).M1_moduleA
    letI := (gluedLinesSections k a b lam 0 0).M01_moduleA
    ∃ (g₀ : (gluedLinesSections k a b lam 0 0).M0 ≃ₗ[(gluedLinesCover k a b).A0] (gluedLinesCover k
      a b).structureSheaf.M0)
       (g₁ : (gluedLinesSections k a b lam 0 0).M1 ≃ₗ[(gluedLinesCover k a b).A1] (gluedLinesCover
         k a b).structureSheaf.M1)
       (g₀₁ : (gluedLinesSections k a b lam 0 0).M01 ≃ₗ[(gluedLinesCover k a b).A01]
         (gluedLinesCover k a b).structureSheaf.M01),
       (∀ t, g₀₁ ((gluedLinesSections k a b lam 0 0).r0 t) = (gluedLinesCover k a
         b).structureSheaf.r0 (g₀ t)) ∧
       (∀ t, g₀₁ ((gluedLinesSections k a b lam 0 0).r1 t) = (gluedLinesCover k a
         b).structureSheaf.r1 (g₁ t)) := by
  obtain ⟨c, hc⟩ : ∃ c : kˣ, ∀ i, lam i = c := by
    rcases Nat.eq_zero_or_pos s with hs | hs
    · subst hs; exact ⟨1, fun i => i.elim0⟩
    · exact ⟨lam ⟨0, hs⟩, fun i => hlam i _⟩
  refine ⟨e0 a b c hc, e1 a b c hc, e01 a b c hc, fun t => rfl, fun t => ?_⟩
  apply Subtype.ext
  change ((t.1.1, (c : k) • t.1.2) : k[T;T⁻¹] × k[T;T⁻¹]) = (1 : k[T;T⁻¹] × k[T;T⁻¹]) * (t.1.1, (c
    : k) • t.1.2)
  rw [one_mul]
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.support_C_mul_T
Source context 11 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
section Support
variable {k : Type u} [Field k]
theorem support_C_mul_T {c : k} (hc : c ≠ 0) (d : ℤ) : (LaurentPolynomial.C c * T d).coeff.support
  = {d}
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.support_mul_T
Source context 11 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
section Support
variable {k : Type u} [Field k]
theorem support_mul_T (f : k[T;T⁻¹]) (d : ℤ) : (f * T d).coeff.support = f.coeff.support.map
  (addRightEmbedding d)
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.mem_support_mul_T_iff
Source context 11 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
section Support
variable {k : Type u} [Field k]
theorem mem_support_mul_T_iff (f : k[T;T⁻¹]) (d e : ℤ) : e ∈ (f * T d).coeff.support ↔ e - d ∈
  f.coeff.support
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.support_smul_of_ne_zero
Source context 11 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
section Support
variable {k : Type u} [Field k]
theorem support_smul_of_ne_zero {c : k} (hc : c ≠ 0) (f : k[T;T⁻¹]) : (c • f).coeff.support =
  f.coeff.support
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.C_mul_eq_smul
Source context 11 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
section Support
variable {k : Type u} [Field k]
theorem C_mul_eq_smul (c : k) (f : k[T;T⁻¹]) : LaurentPolynomial.C c * f = c • f
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.toLaurent_mem_polyPart
Source context 11 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
section Support
variable {k : Type u} [Field k]
theorem toLaurent_mem_polyPart (Q : k[X]) : Polynomial.toLaurent Q ∈ polyPart k
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.toLaurent_apply_zero
Source context 11 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
section Support
variable {k : Type u} [Field k]
theorem toLaurent_apply_zero (Q : k[X]) : (Polynomial.toLaurent Q : k[T;T⁻¹]).coeff 0 = Q.coeff 0
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.zero_mem_support_toLaurent
Source context 11 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
section Support
variable {k : Type u} [Field k]
theorem zero_mem_support_toLaurent {Q : k[X]} (hQ : Q.coeff 0 ≠ 0) : (0 : ℤ) ∈
  (Polynomial.toLaurent Q : k[T;T⁻¹]).coeff.support
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.invert_mem_invPolyPart
Source context 11 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
section Support
variable {k : Type u} [Field k]
theorem invert_mem_invPolyPart {f : k[T;T⁻¹]} (hf : f ∈ polyPart k) : invert f ∈ invPolyPart k
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.C_mem_polyPart
Source context 11 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
section Support
variable {k : Type u} [Field k]
theorem C_mem_polyPart (c : k) : LaurentPolynomial.C c ∈ polyPart k
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.levalUnit_toLaurent
Source context 11 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
section Eval
variable {k : Type u} [Field k]
theorem levalUnit_toLaurent (u : kˣ) (Q : Polynomial k) : levalUnit k u (Polynomial.toLaurent Q) =
  Q.eval (u : k)
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.levalUnit_T
Source context 11 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
section Eval
variable {k : Type u} [Field k]
theorem levalUnit_T (u : kˣ) (n : ℤ) : levalUnit k u (T n) = ((u ^ n : kˣ) : k)
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.levalUnit_C
Source context 11 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
section Eval
variable {k : Type u} [Field k]
theorem levalUnit_C (u : kˣ) (c : k) : levalUnit k u (LaurentPolynomial.C c) = c
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.levalUnit_invert
Source context 11 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
section Eval
variable {k : Type u} [Field k]
theorem levalUnit_invert (u : kˣ) (f : k[T;T⁻¹]) : levalUnit k u (invert f) = levalUnit k u⁻¹ f
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.exists_poly_eval_eq_and_eval_zero
Source context 12 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
section Lagrange
variable {k : Type u} [Field k] {s : ℕ} (b : Fin s → kˣ) (hb : Function.Injective b)
include hb
theorem exists_poly_eval_eq_and_eval_zero (v : Fin s → k) (v₀ : k) :
    ∃ Q : Polynomial k, (∀ i, Q.eval (b i : k) = v i) ∧ Q.eval 0 = v₀
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.exists_poly_eval_inv_eq
Source context 12 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
section Lagrange
variable {k : Type u} [Field k] {s : ℕ} (b : Fin s → kˣ) (hb : Function.Injective b)
include hb
theorem exists_poly_eval_inv_eq (v : Fin s → k) :
    ∃ Q : Polynomial k, ∀ i, Q.eval ((((b i)⁻¹ : kˣ)) : k) = v i
AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech.GluedLinesTriv.forward
Source context 12 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
namespace TwoChartCech
open _root_.TwoChartCech
namespace GluedLinesTriv
section Forward
variable {k : Type u} [Field k] {s : ℕ} (a b : Fin s → kˣ) (hb : Function.Injective b) (lam : Fin s
  → kˣ)
  (n m : ℤ)
include hb
theorem forward
    (g₀ : letI := (gluedLinesSections k a b lam n m).M0_moduleA
      (gluedLinesSections k a b lam n m).M0 ≃ₗ[(gluedLinesCover k a b).A0] (gluedLinesCover k a
        b).structureSheaf.M0)
    (g₁ : letI := (gluedLinesSections k a b lam n m).M1_moduleA
      (gluedLinesSections k a b lam n m).M1 ≃ₗ[(gluedLinesCover k a b).A1] (gluedLinesCover k a
        b).structureSheaf.M1)
    (g₀₁ : letI := (gluedLinesSections k a b lam n m).M01_moduleA
      (gluedLinesSections k a b lam n m).M01 ≃ₗ[(gluedLinesCover k a b).A01] (gluedLinesCover k a
        b).structureSheaf.M01)
    (h₀ : ∀ t, g₀₁ ((gluedLinesSections k a b lam n m).r0 t) = (gluedLinesCover k a
      b).structureSheaf.r0 (g₀ t))
    (h₁ : ∀ t, g₀₁ ((gluedLinesSections k a b lam n m).r1 t) = (gluedLinesCover k a
      b).structureSheaf.r1 (g₁ t)) :
    n = 0 ∧ m = 0 ∧ ∀ i j, lam i = lam j := by
  classical
  let := (gluedLinesSections k a b lam n m).M0_moduleA
  let := (gluedLinesSections k a b lam n m).M1_moduleA
  let := (gluedLinesSections k a b lam n m).M01_moduleA
  set w : ↥(gluedLinesM01 k a b lam) := g₀₁.symm 1 with hw
  have hmul : ∀ f : ↥(gluedLinesM01 k a b lam),
      (f : k[T;T⁻¹] × k[T;T⁻¹]) = ((g₀₁ f : ↥(gluedLinesOverlap k a b)) : k[T;T⁻¹] × k[T;T⁻¹]) * w
        := by
    intro f
    have hf : f = (g₀₁ f) • w := by
      let r : ↥(gluedLinesOverlap k a b) := g₀₁ f
      have hr : r • (1 : ↥(gluedLinesOverlap k a b)) = r :=
        (smul_eq_mul r 1).trans (mul_one r)
      have hs : g₀₁.symm r = r • g₀₁.symm 1 :=
        (congrArg (fun x : ↥(gluedLinesOverlap k a b) => g₀₁.symm x) hr.symm).trans
          (g₀₁.symm.map_smul r 1)
      exact (g₀₁.symm_apply_apply f).symm.trans hs
    exact congrArg Subtype.val hf
  set t₀ : ↥(gluedLinesM0 k a b lam) := g₀.symm 1 with ht₀
  set t₁ : ↥(gluedLinesM1 k a b lam n m) := g₁.symm 1 with ht₁
  have hwt₀ : (w : k[T;T⁻¹] × k[T;T⁻¹]) = (t₀ : k[T;T⁻¹] × k[T;T⁻¹]) := by
    have h := h₀ t₀
    rw [ht₀, LinearEquiv.apply_symm_apply] at h
    have h1 : (gluedLinesCover k a b).structureSheaf.r0 (1 : (gluedLinesCover k a b).A0) = 1 := by
      change (gluedLinesCover k a b).ρ0 1 = 1; exact map_one _
    rw [h1] at h
    have h2 : (gluedLinesSections k a b lam n m).r0 (g₀.symm 1) = w := by
      rw [hw, ← h, LinearEquiv.symm_apply_apply]
    rw [← ht₀] at h2
    exact (congrArg Subtype.val h2).symm
  have hwt₁ : (w : k[T;T⁻¹] × k[T;T⁻¹]) = (t₁ : k[T;T⁻¹] × k[T;T⁻¹]) := by
    have h := h₁ t₁
    rw [ht₁, LinearEquiv.apply_symm_apply] at h
    have h1 : (gluedLinesCover k a b).structureSheaf.r1 (1 : (gluedLinesCover k a b).A1) = 1 := by
      change (1 : (gluedLinesCover k a b).A01) * (gluedLinesCover k a b).ρ1 1 = 1
      rw [map_one, one_mul]
    rw [h1] at h
    have h2 : (gluedLinesSections k a b lam n m).r1 (g₁.symm 1) = w := by
      rw [hw, ← h, LinearEquiv.symm_apply_apply]
    rw [← ht₁] at h2
    exact (congrArg Subtype.val h2).symm
  have hmul₀ : ∀ t : ↥(gluedLinesM0 k a b lam),
      (t : k[T;T⁻¹] × k[T;T⁻¹]) = ((g₀ t : (gluedLinesCover k a b).A0) : k[T;T⁻¹] × k[T;T⁻¹]) * w
        := by
    intro t
    have h := hmul ((gluedLinesSections k a b lam n m).r0 t)
    rw [h₀ t] at h
    exact h
  have hmul₁ : ∀ t : ↥(gluedLinesM1 k a b lam n m),
      (t : k[T;T⁻¹] × k[T;T⁻¹]) = ((g₁ t : (gluedLinesCover k a b).A1) : k[T;T⁻¹] × k[T;T⁻¹]) * w
        := by
    intro t
    have h := hmul ((gluedLinesSections k a b lam n m).r1 t)
    rw [h₁ t] at h
    have h' : (((gluedLinesCover k a b).structureSheaf.r1 (g₁ t) : (gluedLinesCover k a b).A01) :
        k[T;T⁻¹] × k[T;T⁻¹]) = ((g₁ t : (gluedLinesCover k a b).A1) : k[T;T⁻¹] × k[T;T⁻¹]) := by
      change (((1 : (gluedLinesCover k a b).A01) * (gluedLinesCover k a b).ρ1 (g₁ t) :
        (gluedLinesCover k a b).A01) :
        k[T;T⁻¹] × k[T;T⁻¹]) = _
      rw [one_mul]; rfl
    rw [h'] at h
    exact h
  have hwpoly : (w : k[T;T⁻¹] × k[T;T⁻¹]).1 ∈ polyPart k ∧ (w : k[T;T⁻¹] × k[T;T⁻¹]).2 ∈ polyPart k
    := by
    rw [hwt₀]; exact Subalgebra.mem_prod.mp t₀.2.2
  have hwM1 : (w : k[T;T⁻¹] × k[T;T⁻¹]).1 * T (-n) ∈ invPolyPart k ∧
      (w : k[T;T⁻¹] × k[T;T⁻¹]).2 * T (-m) ∈ invPolyPart k := by
    rw [hwt₁]; exact ⟨t₁.2.2.1, t₁.2.2.2⟩
  have hwcond : GluedCond a b lam (w : k[T;T⁻¹] × k[T;T⁻¹]) := w.2
  obtain ⟨Q, hQb, hQ0⟩ := exists_poly_eval_eq_and_eval_zero b hb (fun i => (((lam i)⁻¹ : kˣ) : k)) 1
  have hf₁mem : ((1 : k[T;T⁻¹]), Polynomial.toLaurent Q) ∈ gluedLinesM0 k a b lam := by
    refine ⟨fun i => ?_, Subalgebra.mem_prod.mpr ⟨Subalgebra.one_mem _, toLaurent_mem_polyPart Q⟩⟩
    change levalUnit k (a i) 1 = lam i * levalUnit k (b i) (Polynomial.toLaurent Q)
    rw [map_one, levalUnit_toLaurent, hQb, Units.mul_inv]
  have hψeq := hmul₀ ⟨_, hf₁mem⟩
  set ψ := ((g₀ ⟨_, hf₁mem⟩ : (gluedLinesCover k a b).A0) : k[T;T⁻¹] × k[T;T⁻¹]) with hψ
  have hψ₁ : (1 : k[T;T⁻¹]) = ψ.1 * (w : k[T;T⁻¹] × k[T;T⁻¹]).1 := congrArg Prod.fst hψeq
  have hQeq : Polynomial.toLaurent Q = ψ.2 * (w : k[T;T⁻¹] × k[T;T⁻¹]).2 := congrArg Prod.snd hψeq
  have hψpoly : ψ.1 ∈ polyPart k ∧ ψ.2 ∈ polyPart k := Subalgebra.mem_prod.mp (g₀ ⟨_, hf₁mem⟩).2.2
  have hw1unit : IsUnit (w : k[T;T⁻¹] × k[T;T⁻¹]).1 :=
    IsUnit.of_mul_eq_one ψ.1 (by rw [mul_comm]; exact hψ₁.symm)
  obtain ⟨c₁, d₁, hc₁, hw1⟩ := LaurentAux.exists_eq_C_mul_T_of_isUnit hw1unit
  have hd₁ : 0 ≤ d₁ := hwpoly.1 d₁
    (by rw [hw1, support_C_mul_T hc₁]; exact Finset.mem_singleton_self _)
  have hCC : ∀ {c : k} (hc : c ≠ 0) (d : ℤ),
      LaurentPolynomial.C c * T d * (LaurentPolynomial.C c⁻¹ * T (-d)) = 1 := by
    intro c hc d
    rw [mul_mul_mul_comm, ← map_mul, mul_inv_cancel₀ hc, map_one, one_mul, ← T_add, add_neg_cancel,
      T_zero]
  have hψ1eq : ψ.1 = LaurentPolynomial.C c₁⁻¹ * T (-d₁) := by
    have h : ψ.1 * (LaurentPolynomial.C c₁ * T d₁) = 1 := by rw [← hw1]; exact hψ₁.symm
    calc ψ.1 = ψ.1 * (LaurentPolynomial.C c₁ * T d₁) * (LaurentPolynomial.C c₁⁻¹ * T (-d₁)) := by
            rw [mul_assoc, hCC hc₁, mul_one]
      _ = LaurentPolynomial.C c₁⁻¹ * T (-d₁) := by rw [h, one_mul]
  have hd₁' : d₁ ≤ 0 := by
    have := hψpoly.1 (-d₁)
      (by rw [hψ1eq, support_C_mul_T (inv_ne_zero hc₁)]; exact Finset.mem_singleton_self _)
    omega
  have hd₁0 : d₁ = 0 := le_antisymm hd₁' hd₁
  rw [hd₁0, T_zero, mul_one] at hw1
  set Pb : k[X] := ∏ i, (Polynomial.X - Polynomial.C (b i : k)) with hPb
  have hPb0 : Pb ≠ 0 := by
    rw [hPb]; exact Finset.prod_ne_zero_iff.mpr (fun i _ => Polynomial.X_sub_C_ne_zero _)
  have hf₂mem : ((0 : k[T;T⁻¹]), Polynomial.toLaurent Pb) ∈ gluedLinesM01 k a b lam := by
    intro i
    change levalUnit k (a i) 0 = lam i * levalUnit k (b i) (Polynomial.toLaurent Pb)
    rw [map_zero, levalUnit_toLaurent, hPb, Polynomial.eval_prod,
      Finset.prod_eq_zero (Finset.mem_univ i) (by simp), mul_zero]
  have hφeq := hmul ⟨_, hf₂mem⟩
  set φ := ((g₀₁ ⟨_, hf₂mem⟩ : (gluedLinesCover k a b).A01) : k[T;T⁻¹] × k[T;T⁻¹]) with hφ
  have hφ1 : (0 : k[T;T⁻¹]) = φ.1 * (w : k[T;T⁻¹] × k[T;T⁻¹]).1 := congrArg Prod.fst hφeq
  have hφ2 : Polynomial.toLaurent Pb = φ.2 * (w : k[T;T⁻¹] × k[T;T⁻¹]).2 := congrArg Prod.snd hφeq
  have hC₁ne : LaurentPolynomial.C c₁ ≠ 0 := fun h => hc₁ (by
    have := congrArg (levalUnit k 1) h; rwa [levalUnit_C, map_zero] at this)
  have hφ1z : φ.1 = 0 := by
    rw [hw1] at hφ1
    rcases mul_eq_zero.mp hφ1.symm with h | h
    · exact h
    · exact absurd h hC₁ne
  have hφroots : ∀ i, levalUnit k (b i) φ.2 = 0 := by
    intro i
    have h := (g₀₁ ⟨_, hf₂mem⟩).2 i
    change levalUnit k (a i) φ.1 = levalUnit k (b i) φ.2 at h
    rw [← h, hφ1z, map_zero]
  obtain ⟨N, Φ, hΦ⟩ := LaurentPolynomial.exists_T_pow φ.2
  have hΦroots : ∀ i, Φ.IsRoot (b i : k) := by
    intro i
    have h := congrArg (levalUnit k (b i)) hΦ
    rw [levalUnit_toLaurent, map_mul, hφroots i, zero_mul] at h
    exact h
  have hdvd : Pb ∣ Φ := by
    rw [hPb]
    apply Finset.prod_dvd_of_coprime
    · intro i _ j _ hij
      exact Polynomial.pairwise_coprime_X_sub_C (fun i j h => hb (Units.ext h)) hij
    · intro i _; exact Polynomial.dvd_iff_isRoot.mpr (hΦroots i)
  obtain ⟨Θ, hΘ⟩ := hdvd
  have hw2unit : IsUnit (w : k[T;T⁻¹] × k[T;T⁻¹]).2 := by
    have h1 : Polynomial.toLaurent Pb * T N =
        Polynomial.toLaurent Pb * (Polynomial.toLaurent Θ * (w : k[T;T⁻¹] × k[T;T⁻¹]).2) := by
      calc Polynomial.toLaurent Pb * T N = φ.2 * (w : k[T;T⁻¹] × k[T;T⁻¹]).2 * T N := by rw [← hφ2]
        _ = (φ.2 * T N) * (w : k[T;T⁻¹] × k[T;T⁻¹]).2 := by ring
        _ = Polynomial.toLaurent Φ * (w : k[T;T⁻¹] × k[T;T⁻¹]).2 := by rw [hΦ]
        _ = Polynomial.toLaurent Pb * (Polynomial.toLaurent Θ * (w : k[T;T⁻¹] × k[T;T⁻¹]).2) := by
            rw [hΘ, map_mul, mul_assoc]
    have h2 : T (N : ℤ) = Polynomial.toLaurent Θ * (w : k[T;T⁻¹] × k[T;T⁻¹]).2 :=
      mul_left_cancel₀ (Polynomial.toLaurent_ne_zero.mpr hPb0) h1
    refine IsUnit.of_mul_eq_one (Polynomial.toLaurent Θ * T (-(N : ℤ))) ?_
    calc (w : k[T;T⁻¹] × k[T;T⁻¹]).2 * (Polynomial.toLaurent Θ * T (-(N : ℤ)))
        = (Polynomial.toLaurent Θ * (w : k[T;T⁻¹] × k[T;T⁻¹]).2) * T (-(N : ℤ)) := by ring
      _ = T N * T (-(N : ℤ)) := by rw [← h2]
      _ = 1 := by rw [← T_add, add_neg_cancel, T_zero]
  obtain ⟨c₂, d₂, hc₂, hw2⟩ := LaurentAux.exists_eq_C_mul_T_of_isUnit hw2unit
  have hd₂ : 0 ≤ d₂ := hwpoly.2 d₂
    (by rw [hw2, support_C_mul_T hc₂]; exact Finset.mem_singleton_self _)
  have hd₂' : d₂ ≤ 0 := by
    have h0 : (0 : ℤ) ∈ (Polynomial.toLaurent Q : k[T;T⁻¹]).coeff.support :=
      zero_mem_support_toLaurent
        (by rw [Polynomial.coeff_zero_eq_eval_zero, hQ0]; exact one_ne_zero)
    rw [hQeq, hw2, ← mul_assoc, mem_support_mul_T_iff, zero_sub] at h0
    have hmem : ψ.2 * LaurentPolynomial.C c₂ ∈ polyPart k := Subalgebra.mul_mem _ hψpoly.2
      (C_mem_polyPart c₂)
    have := hmem (-d₂) h0
    omega
  have hd₂0 : d₂ = 0 := le_antisymm hd₂' hd₂
  rw [hd₂0, T_zero, mul_one] at hw2
  refine ⟨?_, ?_, ?_⟩
  · apply le_antisymm
    · obtain ⟨Q', hQ'⟩ := exists_poly_eval_inv_eq b hb (fun i => (((lam i)⁻¹ * a i ^ n * (b i ^
        m)⁻¹ : kˣ) : k))
      have hmem₃ : (T n, T m * invert (Polynomial.toLaurent Q')) ∈ gluedLinesM1 k a b lam n m := by
        refine ⟨fun i => ?_, ?_, ?_⟩
        · change levalUnit k (a i) (T n) = lam i * levalUnit k (b i) (T m * invert
            (Polynomial.toLaurent Q'))
          rw [levalUnit_T, map_mul, levalUnit_T, levalUnit_invert, levalUnit_toLaurent, hQ']
          have hu : lam i * (b i ^ m * ((lam i)⁻¹ * a i ^ n * (b i ^ m)⁻¹)) = a i ^ n := by
            rw [show (lam i)⁻¹ * a i ^ n * (b i ^ m)⁻¹ = (b i ^ m)⁻¹ * ((lam i)⁻¹ * a i ^ n) from
              by rw [mul_comm]]
            rw [← mul_assoc (b i ^ m), mul_inv_cancel, one_mul, ← mul_assoc, mul_inv_cancel,
              one_mul]
          exact_mod_cast hu.symm
        · change T n * T (-n) ∈ invPolyPart k
          rw [← T_add, add_neg_cancel, T_zero]; exact Subalgebra.one_mem _
        · change T m * invert (Polynomial.toLaurent Q') * T (-m) ∈ invPolyPart k
          rw [mul_comm (T m), mul_assoc, ← T_add, add_neg_cancel, T_zero, mul_one]
          exact invert_mem_invPolyPart (toLaurent_mem_polyPart Q')
      have h := congrArg Prod.fst (hmul₁ ⟨_, hmem₃⟩)
      change T n = ((g₁ ⟨_, hmem₃⟩ : (gluedLinesCover k a b).A1) : k[T;T⁻¹] × k[T;T⁻¹]).1 *
        (w : k[T;T⁻¹] × k[T;T⁻¹]).1 at h
      rw [hw1] at h
      have hψ₃ : ((g₁ ⟨_, hmem₃⟩ : (gluedLinesCover k a b).A1) : k[T;T⁻¹] × k[T;T⁻¹]).1 =
          LaurentPolynomial.C c₁⁻¹ * T n := by
        calc _ = ((g₁ ⟨_, hmem₃⟩ : (gluedLinesCover k a b).A1) : k[T;T⁻¹] × k[T;T⁻¹]).1 *
              LaurentPolynomial.C c₁ * LaurentPolynomial.C c₁⁻¹ := by
                rw [mul_assoc, ← map_mul, mul_inv_cancel₀ hc₁, map_one, mul_one]
          _ = LaurentPolynomial.C c₁⁻¹ * T n := by rw [← h, mul_comm]
      have hinv : ((g₁ ⟨_, hmem₃⟩ : (gluedLinesCover k a b).A1) : k[T;T⁻¹] × k[T;T⁻¹]).1 ∈
        invPolyPart k :=
        (Subalgebra.mem_prod.mp (g₁ ⟨_, hmem₃⟩).2.2).1
      exact hinv n
        (by rw [hψ₃, support_C_mul_T (inv_ne_zero hc₁)]; exact Finset.mem_singleton_self _)
    · have h := hwM1.1
      rw [hw1] at h
      have := h (-n) (by rw [support_C_mul_T hc₁]; exact Finset.mem_singleton_self _)
      omega
  · apply le_antisymm
    · set Pb' : k[X] := ∏ i, (Polynomial.X - Polynomial.C (((b i)⁻¹ : kˣ) : k)) with hPb'
      have hmem₄ : ((0 : k[T;T⁻¹]), T m * invert (Polynomial.toLaurent Pb')) ∈ gluedLinesM1 k a b
        lam n m := by
        refine ⟨fun i => ?_, ?_, ?_⟩
        · change levalUnit k (a i) 0 = lam i * levalUnit k (b i) (T m * invert
            (Polynomial.toLaurent Pb'))
          rw [map_zero, map_mul, levalUnit_invert, levalUnit_toLaurent, hPb', Polynomial.eval_prod,
            Finset.prod_eq_zero (Finset.mem_univ i) (by simp), mul_zero, mul_zero]
        · change (0 : k[T;T⁻¹]) * T (-n) ∈ invPolyPart k
          rw [zero_mul]; exact Subalgebra.zero_mem _
        · change T m * invert (Polynomial.toLaurent Pb') * T (-m) ∈ invPolyPart k
          rw [mul_comm (T m), mul_assoc, ← T_add, add_neg_cancel, T_zero, mul_one]
          exact invert_mem_invPolyPart (toLaurent_mem_polyPart Pb')
      have h := congrArg Prod.snd (hmul₁ ⟨_, hmem₄⟩)
      change T m * invert (Polynomial.toLaurent Pb') =
        ((g₁ ⟨_, hmem₄⟩ : (gluedLinesCover k a b).A1) : k[T;T⁻¹] × k[T;T⁻¹]).2 * (w : k[T;T⁻¹] ×
          k[T;T⁻¹]).2 at h
      rw [hw2] at h
      have hψ₄ : ((g₁ ⟨_, hmem₄⟩ : (gluedLinesCover k a b).A1) : k[T;T⁻¹] × k[T;T⁻¹]).2 =
          c₂⁻¹ • (T m * invert (Polynomial.toLaurent Pb')) := by
        rw [← C_mul_eq_smul]
        calc _ = ((g₁ ⟨_, hmem₄⟩ : (gluedLinesCover k a b).A1) : k[T;T⁻¹] × k[T;T⁻¹]).2 *
              LaurentPolynomial.C c₂ * LaurentPolynomial.C c₂⁻¹ := by
                rw [mul_assoc, ← map_mul, mul_inv_cancel₀ hc₂, map_one, mul_one]
          _ = LaurentPolynomial.C c₂⁻¹ * (T m * invert (Polynomial.toLaurent Pb')) :=
            by rw [← h, mul_comm]
      have hinv : ((g₁ ⟨_, hmem₄⟩ : (gluedLinesCover k a b).A1) : k[T;T⁻¹] × k[T;T⁻¹]).2 ∈
        invPolyPart k :=
        (Subalgebra.mem_prod.mp (g₁ ⟨_, hmem₄⟩).2.2).2
      refine hinv m ?_
      rw [hψ₄, support_smul_of_ne_zero (inv_ne_zero hc₂), mul_comm (T m), mem_support_mul_T_iff,
        sub_self,
        LaurentAux.mem_support_invert_iff, neg_zero]
      apply zero_mem_support_toLaurent
      rw [Polynomial.coeff_zero_eq_eval_zero, hPb', Polynomial.eval_prod]
      exact Finset.prod_ne_zero_iff.mpr (fun i _ => by simp)
    · have h := hwM1.2
      rw [hw2] at h
      have := h (-m) (by rw [support_C_mul_T hc₂]; exact Finset.mem_singleton_self _)
      omega
  · intro i j
    have hi := hwcond i
    have hj := hwcond j
    change levalUnit k (a i) (w : k[T;T⁻¹] × k[T;T⁻¹]).1 = lam i * levalUnit k (b i) (w : k[T;T⁻¹]
      × k[T;T⁻¹]).2 at hi
    change levalUnit k (a j) (w : k[T;T⁻¹] × k[T;T⁻¹]).1 = lam j * levalUnit k (b j) (w : k[T;T⁻¹]
      × k[T;T⁻¹]).2 at hj
    rw [hw1, hw2, levalUnit_C, levalUnit_C] at hi hj
    apply Units.ext
    exact mul_right_cancel₀ hc₂ (hi.symm.trans hj)
TwoChartCech.gluedLinesSections_nonempty_linearEquiv_structureSheaf_iff
Source context 7 commands

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

section ProofImplementation
namespace AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv
open _root_.LaurentPolynomial
open _root_.TwoChartCech
open scoped Polynomial
universe u
open _root_.TwoChartCech
  _root_.AlgebraicCurves.Cohomology.Cech.Proofs.TwoChartGluedLinesSectionsEquiv.TwoChartCech
  TwoChartCech.GluedLinesTriv in
theorem _root_.TwoChartCech.gluedLinesSections_nonempty_linearEquiv_structureSheaf_iff (k : Type u)
  [Field k] {s : ℕ}
    (a b : Fin s → kˣ) (hb : Function.Injective b) (lam : Fin s → kˣ) (n m : ℤ) :
    letI := (gluedLinesSections k a b lam n m).M0_moduleA
    letI := (gluedLinesSections k a b lam n m).M1_moduleA
    letI := (gluedLinesSections k a b lam n m).M01_moduleA
    (∃ (g₀ : (gluedLinesSections k a b lam n m).M0 ≃ₗ[(gluedLinesCover k a b).A0] (gluedLinesCover
      k a b).structureSheaf.M0)
       (g₁ : (gluedLinesSections k a b lam n m).M1 ≃ₗ[(gluedLinesCover k a b).A1] (gluedLinesCover
         k a b).structureSheaf.M1)
       (g₀₁ : (gluedLinesSections k a b lam n m).M01 ≃ₗ[(gluedLinesCover k a b).A01]
         (gluedLinesCover k a b).structureSheaf.M01),
       (∀ t, g₀₁ ((gluedLinesSections k a b lam n m).r0 t) = (gluedLinesCover k a
         b).structureSheaf.r0 (g₀ t)) ∧
       (∀ t, g₀₁ ((gluedLinesSections k a b lam n m).r1 t) = (gluedLinesCover k a
         b).structureSheaf.r1 (g₁ t)))
     ↔ (n = 0 ∧ m = 0 ∧ ∀ i j, lam i = lam j) := by
  constructor
  · rintro ⟨g₀, g₁, g₀₁, h₀, h₁⟩
    exact GluedLinesTriv.forward a b hb lam n m g₀ g₁ g₀₁ h₀ h₁
  · rintro ⟨rfl, rfl, hlam⟩
    exact GluedLinesTriv.backward a b hlam