openAI-math-dataset / lean /OAI /Algebra /AuslanderReiten /Tensor /BalancedTensorUnit.lean
roseking's picture
Add lean source and binary files (part 6)
2c7d975 verified
Raw History Blame Contribute Delete
3.59 kB
14
def leftAction : R →ₗ[k] M →ₗ[k] M where
body · 6 lines
  toFun r :=
    { toFun := fun m => r • m
      map_add' := smul_add r
      map_smul' := fun c m => smul_comm r c m }
  map_add' r s := by ext m; exact add_smul r s m
  map_smul' c r := by ext m; exact smul_assoc c r m
22
def lunitMap : BalancedTensor k R R M →ₗ[R] M :=
body · 2 lines
  liftLeft leftAction (by intro x r m; exact mul_smul x r m)
    (by intro s r m; exact mul_smul s r m)
26
@[simp] theorem lunitMap_tmul (r : R) (m : M) :
    lunitMap (tmul r m : BalancedTensor k R R M) = r • m := rfl
29
def lunitInv : M →ₗ[R] BalancedTensor k R R M where
body · 6 lines
  toFun m := tmul 1 m
  map_add' := tmul_add 1
  map_smul' r m := by
    change tmul (k := k) (R := R) 1 (r • m) = tmul (r * 1) m
    rw [mul_one]
    simpa using (balance (k := k) (R := R) (1 : R) r m).symm
37
def lunit : BalancedTensor k R R M ≃ₗ[R] M where
body · 11 lines
  __ := lunitMap (k := k) (R := R) (M := M)
  invFun := lunitInv
  right_inv m := by simp [lunitInv]
  left_inv z := by
    change lunitInv (lunitMap z) = z
    induction z using induction_on with
    | zero => simp
    | tmul r m =>
      change tmul (k := k) (R := R) 1 (r • m) = tmul r m
      simpa using (balance (k := k) (R := R) (1 : R) r m).symm
    | add x y hx hy => simp only [map_add, hx, hy]
50
@[simp] theorem lunit_tmul (r : R) (m : M) :
    lunit (tmul r m : BalancedTensor k R R M) = r • m := rfl
60
def rightAction : F →ₗ[k] R →ₗ[k] F where
body · 6 lines
  toFun f :=
    { toFun := fun r => MulOpposite.op r • f
      map_add' r s := by simp [add_smul]
      map_smul' c r := by simp [MulOpposite.op_smul, smul_assoc] }
  map_add' f g := by ext r; exact smul_add _ _ _
  map_smul' c f := by ext r; exact smul_comm _ _ _
68
def runitMap : BalancedTensor k R F R →ₗ[k] F :=
body · 4 lines
  lift rightAction (by
    intro f r s
    change MulOpposite.op s • MulOpposite.op r • f = MulOpposite.op (r * s) • f
    rw [MulOpposite.op_mul, mul_smul])
74
@[simp] theorem runitMap_tmul (f : F) (r : R) :
    runitMap (tmul f r : BalancedTensor k R F R) = MulOpposite.op r • f := rfl
77
def runit : BalancedTensor k R F R ≃ₗ[k] F where
body · 9 lines
  __ := runitMap (k := k) (R := R) (F := F)
  invFun f := tmul f 1
  right_inv f := by simp [runitMap_tmul]
  left_inv z := by
    change tmul (runitMap z) 1 = z
    induction z using induction_on with
    | zero => simp
    | tmul f r => simpa using (balance (k := k) (R := R) f r (1 : R))
    | add x y hx hy => simpa only [map_add, add_tmul] using congrArg₂ (· + ·) hx hy
88
@[simp] theorem runit_tmul (f : F) (r : R) :
    runit (tmul f r : BalancedTensor k R F R) = MulOpposite.op r • f := rfl
94
def runitLeft : BalancedTensor k R F R ≃ₗ[S] F where
body · 7 lines
  __ := (runit (k := k) (R := R) (F := F)).toAddEquiv
  map_smul' s z := by
    change runit (s • z) = s • runit z
    induction z using induction_on with
    | zero => simp
    | tmul f r => simpa only [smul_tmul, runit_tmul] using (smul_comm s (MulOpposite.op r) f).symm
    | add x y hx hy => simp only [smul_add, map_add] at *; rw [hx, hy]