openAI-math-dataset / lean /OAI /Algebra /AuslanderReiten /Tensor /BalancedTensorFunctor.lean
roseking's picture
Add lean source and binary files (part 6)
2c7d975 verified
Raw History Blame Contribute Delete
2.78 kB
14
def mapRight (b : M →ₗ[R] N) : BalancedTensor k R F M →ₗ[S] BalancedTensor k R F N :=
body · 9 lines
  liftLeft
    { toFun := fun f => (mk f).comp (b.restrictScalars k)
      map_add' := by intros; ext m; simp
      map_smul' := by intros; ext m; simp }
    (by
      intro f r m
      change tmul (MulOpposite.op r • f) (b m) = tmul f (b (r • m))
      rw [b.map_smul, balance])
    (by intro s f m; exact (smul_tmul s f (b m)).symm)
25
@[simp] theorem mapRight_tmul (b : M →ₗ[R] N) (f : F) (m : M) :
    mapRight (k := k) (S := S) b (tmul f m) = tmul f (b m) := rfl
29
@[ext] theorem leftHom_ext {Q : Type*} [AddCommGroup Q] [Module S Q]
    (f g : BalancedTensor k R F M →ₗ[S] Q)
    (h : ∀ x y, f (tmul x y) = g (tmul x y)) : f = g := by
proof · 6 lines
  apply LinearMap.ext
  intro z
  induction z using induction_on with
  | zero => simp
  | tmul x y => exact h x y
  | add x y hx hy => simp only [map_add, hx, hy]
39
@[simp] theorem mapRight_id : mapRight (k := k) (S := S) (LinearMap.id : M →ₗ[R] M) =
    (LinearMap.id : BalancedTensor k R F M →ₗ[S] BalancedTensor k R F M) := by
proof · 3 lines
  apply leftHom_ext
  intro f m
  rfl
45
@[simp] theorem mapRight_comp (b : M →ₗ[R] N) (c : N →ₗ[R] L) :
    mapRight (k := k) (F := F) (S := S) (c.comp b) = (mapRight c).comp (mapRight b) := by
proof · 3 lines
  apply leftHom_ext
  intro f m
  rfl
51
@[simp] theorem mapRight_zero : mapRight (k := k) (S := S) (0 : M →ₗ[R] N) =
    (0 : BalancedTensor k R F M →ₗ[S] BalancedTensor k R F N) := by
proof · 3 lines
  apply leftHom_ext
  intro f m
  exact tmul_zero f
57
theorem mapRight_add (b c : M →ₗ[R] N) :
    mapRight (k := k) (F := F) (S := S) (b + c) = mapRight b + mapRight c := by
proof · 3 lines
  apply leftHom_ext
  intro f m
  exact tmul_add f (b m) (c m)
63
theorem mapRight_surjective (b : M →ₗ[R] N) (hb : Function.Surjective b) :
    Function.Surjective (mapRight (k := k) (F := F) (S := S) b) := by
proof · 10 lines
  intro z
  induction z using induction_on with
  | zero => exact ⟨0, map_zero _⟩
  | tmul f n =>
    obtain ⟨m, rfl⟩ := hb n
    exact ⟨tmul f m, rfl⟩
  | add x y hx hy =>
    obtain ⟨x, rfl⟩ := hx
    obtain ⟨y, rfl⟩ := hy
    exact ⟨x + y, map_add _ x y⟩