roseking's picture
Add lean source and binary files (part 6)
2c7d975 verified
Raw History Blame Contribute Delete
4.71 kB
18
def hom (a : M →ₗ[R] M') (b : N →ₗ[R] N')
    (h : ∀ f m, b (φ (BalancedTensor.tmul f m)) = ψ (BalancedTensor.tmul f (a m))) :
    TriangularModule k R F M N φ →ₗ[Triangular R F] TriangularModule k R F M' N' ψ where
body · 6 lines
  toFun x := ⟨a x.top, b x.bottom⟩
  map_add' x y := by ext <;> simp
  map_smul' t x := by
    ext
    · exact a.map_smul t.top x.top
    · simp only [bottom_smul, map_add, h, map_smul, RingHom.id_apply]
28
@[simp] theorem hom_top (a : M →ₗ[R] M') (b : N →ₗ[R] N')
    (h : ∀ f m, b (φ (BalancedTensor.tmul f m)) = ψ (BalancedTensor.tmul f (a m)))
    (x : TriangularModule k R F M N φ) : (hom a b h x).top = a x.top := rfl
32
@[simp] theorem hom_bottom (a : M →ₗ[R] M') (b : N →ₗ[R] N')
    (h : ∀ f m, b (φ (BalancedTensor.tmul f m)) = ψ (BalancedTensor.tmul f (a m)))
    (x : TriangularModule k R F M N φ) : (hom a b h x).bottom = b x.bottom := rfl
38
theorem top_of_map (x : TriangularModule k R F M N φ) :
    (g ⟨x.top, 0⟩).top = (g x).top := by
proof · 4 lines
  have h := congrArg TriangularModule.top (g.map_smul (⟨1, 0, 0⟩ : Triangular R F) x)
  have he : (⟨1, 0, 0⟩ : Triangular R F) • x = ⟨x.top, 0⟩ := by ext <;> simp
  rw [he] at h
  simpa using h
45
theorem bottom_of_map (x : TriangularModule k R F M N φ) :
    (g ⟨0, x.bottom⟩).bottom = (g x).bottom := by
proof · 4 lines
  have h := congrArg TriangularModule.bottom (g.map_smul (⟨0, 1, 0⟩ : Triangular R F) x)
  have he : (⟨0, 1, 0⟩ : Triangular R F) • x = ⟨0, x.bottom⟩ := by ext <;> simp
  rw [he] at h
  simpa using h
52
def topMap : M →ₗ[R] M' where
body · 14 lines
  toFun m := (g ⟨m, 0⟩).top
  map_add' m n := by
    have h : (⟨m + n, 0⟩ : TriangularModule k R F M N φ) = ⟨m, 0⟩ + ⟨n, 0⟩ := by
      ext <;> simp
    rw [h]
    rw [g.map_add]
    rfl
  map_smul' r m := by
    have h := congrArg TriangularModule.top
      (g.map_smul (⟨r, 0, 0⟩ : Triangular R F) ⟨m, 0⟩)
    have he : (⟨r, 0, 0⟩ : Triangular R F) •
        (⟨m, 0⟩ : TriangularModule k R F M N φ) = ⟨r • m, 0⟩ := by ext <;> simp
    rw [he] at h
    exact h
68
def bottomMap : N →ₗ[R] N' where
body · 14 lines
  toFun n := (g ⟨0, n⟩).bottom
  map_add' m n := by
    have h : (⟨0, m + n⟩ : TriangularModule k R F M N φ) = ⟨0, m⟩ + ⟨0, n⟩ := by
      ext <;> simp
    rw [h]
    rw [g.map_add]
    rfl
  map_smul' r n := by
    have h := congrArg TriangularModule.bottom
      (g.map_smul (⟨0, r, 0⟩ : Triangular R F) ⟨0, n⟩)
    have he : (⟨0, r, 0⟩ : Triangular R F) •
        (⟨0, n⟩ : TriangularModule k R F M N φ) = ⟨0, r • n⟩ := by ext <;> simp
    rw [he] at h
    simpa using h
84
@[simp] theorem topMap_apply (m : M) : topMap g m = (g ⟨m, 0⟩).top := rfl
85
@[simp] theorem bottomMap_apply (n : N) : bottomMap g n = (g ⟨0, n⟩).bottom := rfl
87
theorem compatibility (f : F) (m : M) :
    bottomMap g (φ (BalancedTensor.tmul f m)) = ψ (BalancedTensor.tmul f (topMap g m)) := by
proof · 7 lines
  have h := congrArg TriangularModule.bottom
    (g.map_smul (⟨0, 0, f⟩ : Triangular R F) ⟨m, 0⟩)
  have he : (⟨0, 0, f⟩ : Triangular R F) •
      (⟨m, 0⟩ : TriangularModule k R F M N φ) = ⟨0, φ (BalancedTensor.tmul f m)⟩ := by
    ext <;> simp
  rw [he] at h
  simpa using h
97
theorem hom_topMap_bottomMap : hom (topMap g) (bottomMap g) (compatibility g) = g := by
proof · 5 lines
  apply LinearMap.ext
  intro x
  ext
  · exact top_of_map g x
  · exact bottom_of_map g x
104
@[ext] theorem hom_ext
    (g' : TriangularModule k R F M N φ →ₗ[Triangular R F] TriangularModule k R F M' N' ψ)
    (ht : topMap g = topMap g') (hb : bottomMap g = bottomMap g') : g = g' := by
proof · 7 lines
  apply LinearMap.ext
  intro x
  ext
  · rw [← top_of_map g x, ← top_of_map g' x]
    exact congrArg (fun a : M →ₗ[R] M' => a x.top) ht
  · rw [← bottom_of_map g x, ← bottom_of_map g' x]
    exact congrArg (fun b : N →ₗ[R] N' => b x.bottom) hb