Module

CupExtensionInterchange.lean

Nyll.EtaleCohomology.Classical.CupExtensionInterchange
23 declarations indexed from sourceView source ↗

The actual extension-class interchange in a commutative three-by-three diagram

The two composites of boundary extension classes in a commutative three-by-three diagram add to zero. The proof constructs the actual pullback of the two maps to the lower-right corner. Its two relevant short exact sequences have respectively the upper-left corner and the sum of the other two outer corners as kernels. Naturality of the native Ext class and the native binary-biproduct decomposition then give the sign.

All the auxiliary short exact sequences are proved from the original diagram. This supplies the degree-one interchange used for the actual tensor diagram of two extensions of the constant regular sheaf.

Imports11
  • Mathlib.Algebra.Homology.DerivedCategory.Ext.Basic
  • Mathlib.Algebra.Homology.DerivedCategory.Ext.ExtClass
  • Mathlib.Algebra.Homology.ShortComplex.Basic
  • Mathlib.Algebra.Homology.ShortComplex.Exact
  • Mathlib.Algebra.Homology.ShortComplex.ShortExact
  • Mathlib.CategoryTheory.Abelian.Basic
  • Mathlib.CategoryTheory.Abelian.DiagramLemmas.Four
  • Mathlib.CategoryTheory.Limits.Shapes.BinaryBiproducts
  • Mathlib.CategoryTheory.Limits.Shapes.Kernels
  • Mathlib.CategoryTheory.Limits.Shapes.Pullback.HasPullback
  • Mathlib.CategoryTheory.Preadditive.Basic
Imported by3

Declarations

EtaleCohomology.CupExtensionInterchange.Corner
Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
abbrev Corner (D : ShortComplex (ShortComplex C)) : C
EtaleCohomology.CupExtensionInterchange.middle
Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
def middle (D : ShortComplex (ShortComplex C)) : D.X₂.X₂ ⟶ Corner D
EtaleCohomology.CupExtensionInterchange.middle_fst
Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
theorem middle_fst (D : ShortComplex (ShortComplex C)) :
    middle D ≫ pullback.fst D.g.τ₃ D.X₃.g = D.X₂.g
EtaleCohomology.CupExtensionInterchange.middle_snd
Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
theorem middle_snd (D : ShortComplex (ShortComplex C)) :
    middle D ≫ pullback.snd D.g.τ₃ D.X₃.g = D.g.τ₂
EtaleCohomology.CupExtensionInterchange.fromTop
Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
def fromTop (D : ShortComplex (ShortComplex C)) : D.X₁.X₃ ⟶ Corner D
EtaleCohomology.CupExtensionInterchange.fromLeft
Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
def fromLeft (D : ShortComplex (ShortComplex C)) : D.X₃.X₁ ⟶ Corner D
EtaleCohomology.CupExtensionInterchange.upperSequence
Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
def upperSequence (D : ShortComplex (ShortComplex C)) : ShortComplex C
EtaleCohomology.CupExtensionInterchange.bottomPullback
Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
def bottomPullback (D : ShortComplex (ShortComplex C)) : ShortComplex C
EtaleCohomology.CupExtensionInterchange.bottomPullback_shortExact
Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
theorem bottomPullback_shortExact (D : ShortComplex (ShortComplex C))
    (h₃ : D.X₃.ShortExact) : (bottomPullback D).ShortExact
EtaleCohomology.CupExtensionInterchange.middleToBottomPullback
Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
def middleToBottomPullback (D : ShortComplex (ShortComplex C)) :
    D.X₂ ⟶ bottomPullback D where
  τ₁ := D.g.τ₁
  τ₂ := middle D
  τ₃ := 𝟙 _
  comm₁₂ := by
    apply pullback.hom_ext
    · change (D.g.τ₁ ≫ pullback.lift 0 D.X₃.f _) ≫
        pullback.fst D.g.τ₃ D.X₃.g = (D.X₂.f ≫ middle D) ≫
          pullback.fst D.g.τ₃ D.X₃.g
      rw [Category.assoc, pullback.lift_fst, comp_zero,
        Category.assoc, middle_fst, D.X₂.zero]
    · change (D.g.τ₁ ≫ pullback.lift 0 D.X₃.f _) ≫
        pullback.snd D.g.τ₃ D.X₃.g = (D.X₂.f ≫ middle D) ≫
          pullback.snd D.g.τ₃ D.X₃.g
      rw [Category.assoc, pullback.lift_snd, Category.assoc, middle_snd]
      exact D.g.comm₁₂
  comm₂₃ := by
    change middle D ≫ pullback.fst D.g.τ₃ D.X₃.g = D.X₂.g ≫ 𝟙 _
    rw [middle_fst, Category.comp_id]
EtaleCohomology.CupExtensionInterchange.upperSequence_shortExact
Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
theorem upperSequence_shortExact (D : ShortComplex (ShortComplex C))
    (h₂ : D.X₂.ShortExact) (h₃ : D.X₃.ShortExact)
    (hL : (D.map ShortComplex.π₁).ShortExact) :
    (upperSequence D).ShortExact
EtaleCohomology.CupExtensionInterchange.lowerKernel
Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
def lowerKernel (D : ShortComplex (ShortComplex C)) :
    D.X₁.X₃ ⊞ D.X₃.X₁ ⟶ Corner D
EtaleCohomology.CupExtensionInterchange.lowerKernel_fst
Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
theorem lowerKernel_fst (D : ShortComplex (ShortComplex C)) :
    lowerKernel D ≫ pullback.fst D.g.τ₃ D.X₃.g = biprod.fst ≫ D.f.τ₃
EtaleCohomology.CupExtensionInterchange.lowerKernel_snd
Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
theorem lowerKernel_snd (D : ShortComplex (ShortComplex C)) :
    lowerKernel D ≫ pullback.snd D.g.τ₃ D.X₃.g = biprod.snd ≫ D.X₃.f
EtaleCohomology.CupExtensionInterchange.inl_lowerKernel
Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
theorem inl_lowerKernel (D : ShortComplex (ShortComplex C)) :
    biprod.inl ≫ lowerKernel D = fromTop D
EtaleCohomology.CupExtensionInterchange.inr_lowerKernel
Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
theorem inr_lowerKernel (D : ShortComplex (ShortComplex C)) :
    biprod.inr ≫ lowerKernel D = fromLeft D
EtaleCohomology.CupExtensionInterchange.lowerSequence
Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
def lowerSequence (D : ShortComplex (ShortComplex C)) : ShortComplex C
EtaleCohomology.CupExtensionInterchange.lowerSequence_shortExact
Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
theorem lowerSequence_shortExact (D : ShortComplex (ShortComplex C))
    (h₃ : D.X₃.ShortExact) (hR : (D.map ShortComplex.π₃).ShortExact) :
    (lowerSequence D).ShortExact
EtaleCohomology.CupExtensionInterchange.topToUpper
Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
def topToUpper (D : ShortComplex (ShortComplex C)) :
    D.X₁ ⟶ upperSequence D where
  τ₁ := 𝟙 _
  τ₂ := D.f.τ₂
  τ₃ := fromTop D
  comm₁₂ := by
    change 𝟙 _ ≫ (D.f.τ₁ ≫ D.X₂.f) = D.X₁.f ≫ D.f.τ₂
    rw [Category.id_comp]
    exact D.f.comm₁₂
  comm₂₃ := by
    apply pullback.hom_ext
    · change (D.f.τ₂ ≫ middle D) ≫ pullback.fst D.g.τ₃ D.X₃.g =
        (D.X₁.g ≫ pullback.lift D.f.τ₃ 0 _) ≫ pullback.fst D.g.τ₃ D.X₃.g
      rw [Category.assoc, middle_fst, Category.assoc, pullback.lift_fst]
      exact D.f.comm₂₃
    · change (D.f.τ₂ ≫ middle D) ≫ pullback.snd D.g.τ₃ D.X₃.g =
        (D.X₁.g ≫ pullback.lift D.f.τ₃ 0 _) ≫ pullback.snd D.g.τ₃ D.X₃.g
      have hz₂ : D.f.τ₂ ≫ D.g.τ₂ = 0 := (D.map ShortComplex.π₂).zero
      rw [Category.assoc, middle_snd, hz₂,
        Category.assoc, pullback.lift_snd, comp_zero]
EtaleCohomology.CupExtensionInterchange.leftToUpper
Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
def leftToUpper (D : ShortComplex (ShortComplex C)) :
    D.map ShortComplex.π₁ ⟶ upperSequence D where
  τ₁ := 𝟙 _
  τ₂ := D.X₂.f
  τ₃ := fromLeft D
  comm₁₂ := by
    change 𝟙 _ ≫ (D.f.τ₁ ≫ D.X₂.f) = D.f.τ₁ ≫ D.X₂.f
    exact Category.id_comp _
  comm₂₃ := (middleToBottomPullback D).comm₁₂.symm
EtaleCohomology.CupExtensionInterchange.lowerToRight
Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
def lowerToRight (D : ShortComplex (ShortComplex C)) :
    lowerSequence D ⟶ D.map ShortComplex.π₃ where
  τ₁ := biprod.fst
  τ₂ := pullback.fst D.g.τ₃ D.X₃.g
  τ₃ := 𝟙 _
  comm₁₂ := (lowerKernel_fst D).symm
  comm₂₃ := by
    change pullback.fst D.g.τ₃ D.X₃.g ≫ D.g.τ₃ =
      (pullback.fst D.g.τ₃ D.X₃.g ≫ D.g.τ₃) ≫ 𝟙 _
    exact (Category.comp_id _).symm
EtaleCohomology.CupExtensionInterchange.lowerToBottom
Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
def lowerToBottom (D : ShortComplex (ShortComplex C)) :
    lowerSequence D ⟶ D.X₃ where
  τ₁ := biprod.snd
  τ₂ := pullback.snd D.g.τ₃ D.X₃.g
  τ₃ := 𝟙 _
  comm₁₂ := (lowerKernel_snd D).symm
  comm₂₃ := by
    change pullback.snd D.g.τ₃ D.X₃.g ≫ D.X₃.g =
      (pullback.fst D.g.τ₃ D.X₃.g ≫ D.g.τ₃) ≫ 𝟙 _
    rw [Category.comp_id]
    exact pullback.condition.symm
EtaleCohomology.CupExtensionInterchange.extClass_comp_add_eq_zero

In an actual commutative three-by-three diagram, with short exact rows and outer columns, the two composites of the native boundary extension classes add to zero. The middle column is already a complex by the type of D; its exactness is not needed.

Source context 6 commands

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

@[expose] public section
noncomputable section
universe u v w
open CategoryTheory Limits Abelian Preadditive
namespace EtaleCohomology.CupExtensionInterchange
variable {C : Type u} [Category.{v} C] [Abelian C]
theorem extClass_comp_add_eq_zero [HasExt.{w} C]
    (D : ShortComplex (ShortComplex C))
    (h₁ : D.X₁.ShortExact) (h₂ : D.X₂.ShortExact) (h₃ : D.X₃.ShortExact)
    (hL : (D.map ShortComplex.π₁).ShortExact)
    (hR : (D.map ShortComplex.π₃).ShortExact) :
    let cR : Ext.{w} D.X₃.X₃ D.X₁.X₃ 1 := hR.extClass
    let cL : Ext.{w} D.X₃.X₁ D.X₁.X₁ 1 := hL.extClass
    cR.comp h₁.extClass (show 1 + 1 = 2 from rfl) +
      h₃.extClass.comp cL (show 1 + 1 = 2 from rfl) = 0 := by
  intro cR cL
  have hU := upperSequence_shortExact D h₂ h₃ hL
  have hV := lowerSequence_shortExact D h₃ hR
  let cU : Ext.{w} (Corner D) D.X₁.X₁ 1 := hU.extClass
  let cV : Ext.{w} D.X₃.X₃ (D.X₁.X₃ ⊞ D.X₃.X₁) 1 := hV.extClass
  have htop : (Ext.mk₀ (fromTop D)).comp cU (zero_add 1) = h₁.extClass := by
    have hn := (h₁.extClass_naturality hU (topToUpper D)).symm
    change (Ext.mk₀ (fromTop D)).comp cU (zero_add 1) =
      h₁.extClass.comp (Ext.mk₀ (𝟙 D.X₁.X₁)) (add_zero 1) at hn
    exact hn.trans (Ext.comp_mk₀_id h₁.extClass)
  have hleft : (Ext.mk₀ (fromLeft D)).comp cU (zero_add 1) = cL := by
    have hn := (hL.extClass_naturality hU (leftToUpper D)).symm
    change (Ext.mk₀ (fromLeft D)).comp cU (zero_add 1) =
      cL.comp (Ext.mk₀ (𝟙 D.X₁.X₁)) (add_zero 1) at hn
    exact hn.trans (Ext.comp_mk₀_id cL)
  have hright : cV.comp (Ext.mk₀ biprod.fst) (add_zero 1) = cR := by
    have hn := hV.extClass_naturality hR (lowerToRight D)
    change cV.comp (Ext.mk₀ biprod.fst) (add_zero 1) =
      (Ext.mk₀ (𝟙 D.X₃.X₃)).comp cR (zero_add 1) at hn
    exact hn.trans (Ext.mk₀_id_comp cR)
  have hbottom : cV.comp (Ext.mk₀ biprod.snd) (add_zero 1) = h₃.extClass := by
    have hn := hV.extClass_naturality h₃ (lowerToBottom D)
    change cV.comp (Ext.mk₀ biprod.snd) (add_zero 1) =
      (Ext.mk₀ (𝟙 D.X₃.X₃)).comp h₃.extClass (zero_add 1) at hn
    exact hn.trans (Ext.mk₀_id_comp h₃.extClass)
  have hdecomp :
      (Ext.mk₀ biprod.fst).comp h₁.extClass (zero_add 1) +
        (Ext.mk₀ biprod.snd).comp cL (zero_add 1) =
      (Ext.mk₀ (lowerKernel D)).comp cU (zero_add 1) := by
    have h := Ext.biprodAddEquiv.symm_apply_apply
      ((Ext.mk₀ (lowerKernel D)).comp cU (zero_add 1))
    change
      (Ext.mk₀ biprod.fst).comp
          ((Ext.mk₀ biprod.inl).comp
            ((Ext.mk₀ (lowerKernel D)).comp cU (zero_add 1)) (zero_add 1))
          (zero_add 1) +
        (Ext.mk₀ biprod.snd).comp
          ((Ext.mk₀ biprod.inr).comp
            ((Ext.mk₀ (lowerKernel D)).comp cU (zero_add 1)) (zero_add 1))
          (zero_add 1) = _ at h
    rw [Ext.mk₀_comp_mk₀_assoc biprod.inl (lowerKernel D) cU,
      inl_lowerKernel, htop,
      Ext.mk₀_comp_mk₀_assoc biprod.inr (lowerKernel D) cU,
      inr_lowerKernel, hleft] at h
    exact h
  calc
    cR.comp h₁.extClass rfl + h₃.extClass.comp cL rfl =
        (cV.comp (Ext.mk₀ biprod.fst) (add_zero 1)).comp h₁.extClass rfl +
          (cV.comp (Ext.mk₀ biprod.snd) (add_zero 1)).comp cL rfl := by
      rw [hright, hbottom]
    _ = cV.comp
        ((Ext.mk₀ biprod.fst).comp h₁.extClass (zero_add 1) +
          (Ext.mk₀ biprod.snd).comp cL (zero_add 1)) rfl := by
      rw [Ext.comp_add, Ext.comp_assoc_of_second_deg_zero,
        Ext.comp_assoc_of_second_deg_zero]
    _ = cV.comp ((Ext.mk₀ (lowerKernel D)).comp cU (zero_add 1)) rfl := by
      rw [hdecomp]
    _ = 0 := hV.extClass_comp_assoc hU.extClass