roseking's picture
Add lean source and binary files (part 6)
2c7d975 verified
Raw History Blame Contribute Delete
3.38 kB
16
def balancingRelations : Submodule k (F ⊗[k] M) :=
body · 2 lines
  Submodule.span k {z | ∃ (f : F) (r : R) (m : M),
    z = (MulOpposite.op r • f) ⊗ₜ[k] m - f ⊗ₜ[k] (r • m)}
20
abbrev BalancedTensor := (F ⊗[k] M) ⧸ balancingRelations k R F M
26
def tmul (f : F) (m : M) : BalancedTensor k R F M :=
body · 1 line
  (balancingRelations k R F M).mkQ (f ⊗ₜ[k] m)
29
@[simp] theorem zero_tmul (m : M) : tmul (k := k) (R := R) (0 : F) m = 0 := by
proof · 1 line
  simp [tmul]
32
@[simp] theorem tmul_zero (f : F) : tmul (k := k) (R := R) f (0 : M) = 0 := by
proof · 1 line
  simp [tmul]
35
theorem add_tmul (f g : F) (m : M) :
    tmul (k := k) (R := R) (f + g) m = tmul f m + tmul g m := by simp [tmul, TensorProduct.add_tmul]
38
theorem tmul_add (f : F) (m n : M) :
    tmul (k := k) (R := R) f (m + n) = tmul f m + tmul f n := by simp [tmul, TensorProduct.tmul_add]
41
theorem scalar_tmul (c : k) (f : F) (m : M) :
    tmul (k := k) (R := R) (c • f) m = c • tmul f m := by
proof · 1 line
  exact (balancingRelations k R F M).mkQ.map_smul c (f ⊗ₜ[k] m)
45
theorem tmul_scalar (c : k) (f : F) (m : M) :
    tmul (k := k) (R := R) f (c • m) = c • tmul f m := by simp [tmul]
48
theorem balance (f : F) (r : R) (m : M) :
    tmul (k := k) (R := R) (MulOpposite.op r • f) m = tmul f (r • m) := by
proof · 2 lines
  apply (Submodule.Quotient.eq (balancingRelations k R F M)).mpr
  exact Submodule.subset_span ⟨f, r, m, rfl⟩
53
def mk : F →ₗ[k] M →ₗ[k] BalancedTensor k R F M where
body · 6 lines
  toFun f :=
    { toFun := tmul f
      map_add' := tmul_add f
      map_smul' := fun c m => tmul_scalar c f m }
  map_add' f g := by ext m; exact add_tmul f g m
  map_smul' c f := by ext m; exact scalar_tmul c f m
63
def lift (b : F →ₗ[k] M →ₗ[k] N)
    (hb : ∀ (f : F) (r : R) (m : M), b (MulOpposite.op r • f) m = b f (r • m)) :
    BalancedTensor k R F M →ₗ[k] N :=
body · 5 lines
  (balancingRelations k R F M).liftQ (TensorProduct.lift b) (by
    apply Submodule.span_le.mpr
    rintro z ⟨f, r, m, rfl⟩
    change TensorProduct.lift b ((MulOpposite.op r • f) ⊗ₜ[k] m - f ⊗ₜ[k] (r • m)) = 0
    simp only [map_sub, TensorProduct.lift.tmul, hb, sub_self])
72
@[simp] theorem lift_tmul (b : F →ₗ[k] M →ₗ[k] N)
    (hb : ∀ (f : F) (r : R) (m : M), b (MulOpposite.op r • f) m = b f (r • m)) (f : F) (m : M) :
    lift b hb (tmul f m) = b f m := rfl
76
@[ext] theorem hom_ext (f g : BalancedTensor k R F M →ₗ[k] N)
    (h : ∀ x y, f (tmul x y) = g (tmul x y)) : f = g := by
proof · 11 lines
  apply LinearMap.ext
  intro z
  induction z using Submodule.Quotient.induction_on with
  | H z =>
      induction z using TensorProduct.inductionOn with
      | tmul x y => exact h x y
      | add z z' hz hz' =>
          change f ((balancingRelations k R F M).mkQ (z + z')) =
            g ((balancingRelations k R F M).mkQ (z + z'))
          simp only [map_add]
          exact congrArg₂ (· + ·) hz hz'