openAI-math-dataset / lean /OAI /Algebra /AuslanderReiten /Tensor /EnvelopingBalancedRegular.lean
roseking's picture
Add lean source and binary files (part 6)
2c7d975 verified
Raw History Blame Contribute Delete
6.22 kB
15
abbrev regularObject : ModuleCat.{u} (R ⊗[k] Rᵐᵒᵖ) :=
body · 1 line
  ModuleCat.of (R ⊗[k] Rᵐᵒᵖ) (R ⊗[k] Rᵐᵒᵖ)
18
private def unopAction : Rᵐᵒᵖ →ₗ[k] X →ₗ[k] X where
body · 9 lines
  toFun b :=
    { toFun := fun x => b.unop • x
      map_add' := smul_add b.unop
      map_smul' := by intros; exact smul_comm _ _ _ }
  map_add' b c := by ext x; exact add_smul b.unop c.unop x
  map_smul' c b := by
    ext x
    change (c • b.unop) • x = c • (b.unop • x)
    exact smul_assoc c b.unop x
29
private def regularRaw : (R ⊗[k] Rᵐᵒᵖ) →ₗ[k] X →ₗ[k] (R ⊗[k] X) :=
body · 7 lines
  TensorProduct.lift
    { toFun := fun a =>
        { toFun := fun b => (TensorProduct.mk k R X a).comp (unopAction k R X b)
          map_add' := by intros; ext x; simp [unopAction, add_smul, TensorProduct.tmul_add]
          map_smul' := by intros; ext x; simp [unopAction] }
      map_add' := by intros; ext b x; simp
      map_smul' := by intros; ext b x; simp }
38
@[simp] private theorem regularRaw_tmul (a : R) (b : Rᵐᵒᵖ) (x : X) :
    regularRaw k R X (a ⊗ₜ[k] b) x = a ⊗ₜ[k] (b.unop • x) := rfl
41
private def regularBilinear : EnvelopingBimodule k R (regularObject k R) →ₗ[k]
    X →ₗ[k] (R ⊗[k] X) :=
body · 1 line
  (regularRaw k R X).comp (scalarEquiv (regularObject k R)).toLinearMap
45
private theorem regularBilinear_balance
    (f : EnvelopingBimodule k R (regularObject k R)) (r : R) (x : X) :
    regularBilinear k R X (MulOpposite.op r • f) x =
      regularBilinear k R X f (r • x) := by
proof · 12 lines
  rcases f with ⟨f⟩
  induction f using TensorProduct.inductionOn with
  | add f g hf hg =>
    change regularRaw k R X (((1 : R) ⊗ₜ[k] MulOpposite.op r) * (f + g)) x =
      regularRaw k R X (f + g) (r • x)
    simp only [mul_add, _root_.map_add, LinearMap.add_apply] at *
    exact congrArg₂ (· + ·) hf hg
  | tmul a b =>
    change regularRaw k R X (((1 : R) ⊗ₜ[k] MulOpposite.op r) * (a ⊗ₜ[k] b)) x =
      regularRaw k R X (a ⊗ₜ[k] b) (r • x)
    simp only [Algebra.TensorProduct.tmul_mul_tmul, one_mul, regularRaw_tmul,
      MulOpposite.unop_mul, MulOpposite.unop_op, mul_smul]
62
private theorem regularBilinear_left
    (r : R) (f : EnvelopingBimodule k R (regularObject k R)) (x : X) :
    regularBilinear k R X (r • f) x = r • regularBilinear k R X f x := by
proof · 12 lines
  rcases f with ⟨f⟩
  induction f using TensorProduct.inductionOn with
  | add f g hf hg =>
    change regularRaw k R X ((r ⊗ₜ[k] (1 : Rᵐᵒᵖ)) * (f + g)) x =
      r • regularRaw k R X (f + g) x
    simp only [mul_add, _root_.map_add, LinearMap.add_apply, smul_add] at *
    exact congrArg₂ (· + ·) hf hg
  | tmul a b =>
    change regularRaw k R X ((r ⊗ₜ[k] (1 : Rᵐᵒᵖ)) * (a ⊗ₜ[k] b)) x =
      r • regularRaw k R X (a ⊗ₜ[k] b) x
    simp only [Algebra.TensorProduct.tmul_mul_tmul, one_mul, regularRaw_tmul,
      TensorProduct.smul_tmul', smul_eq_mul]
78
def regularEvaluation :
    BalancedTensor k R (EnvelopingBimodule k R (regularObject k R)) X →ₗ[R]
      R ⊗[k] X :=
body · 2 lines
  BalancedTensor.liftLeft (regularBilinear k R X)
    (regularBilinear_balance k R X) (regularBilinear_left k R X)
84
@[simp] theorem regularEvaluation_tmul (a : R) (b : Rᵐᵒᵖ) (x : X) :
    regularEvaluation k R X (BalancedTensor.tmul ⟨a ⊗ₜ[k] b⟩ x) =
      a ⊗ₜ[k] (b.unop • x) := rfl
88
private def regularInclusion : R →ₗ[k] EnvelopingBimodule k R (regularObject k R) where
body · 3 lines
  toFun a := ⟨a ⊗ₜ[k] (1 : Rᵐᵒᵖ)⟩
  map_add' a b := by ext; exact TensorProduct.add_tmul a b 1
  map_smul' c a := by ext; exact TensorProduct.smul_tmul' c a 1
93
private def regularInverse : R ⊗[k] X →ₗ[k]
    BalancedTensor k R (EnvelopingBimodule k R (regularObject k R)) X :=
body · 1 line
  TensorProduct.lift ((BalancedTensor.mk (k := k) (R := R)).comp (regularInclusion k R))
98
@[simp] private theorem regularInverse_tmul (a : R) (x : X) :
    regularInverse k R X (a ⊗ₜ[k] x) =
      BalancedTensor.tmul (⟨a ⊗ₜ[k] (1 : Rᵐᵒᵖ)⟩ : EnvelopingBimodule k R (regularObject k R)) x := rfl
102
private theorem regularInverse_evaluation
    (z : BalancedTensor k R (EnvelopingBimodule k R (regularObject k R)) X) :
    regularInverse k R X (regularEvaluation k R X z) = z := by
proof · 17 lines
  induction z using BalancedTensor.induction_on with
  | zero => simp only [_root_.map_zero]
  | add z w hz hw => simp only [_root_.map_add, hz, hw]
  | tmul f x =>
    rcases f with ⟨f⟩
    induction f using TensorProduct.inductionOn with
    | add f g hf hg =>
      change regularInverse k R X (regularEvaluation k R X
        (BalancedTensor.tmul ((⟨f⟩ : EnvelopingBimodule k R (regularObject k R)) + ⟨g⟩) x)) =
          BalancedTensor.tmul ((⟨f⟩ : EnvelopingBimodule k R (regularObject k R)) + ⟨g⟩) x
      simpa only [BalancedTensor.add_tmul, _root_.map_add] using congrArg₂ (· + ·) hf hg
    | tmul a b =>
      rw [regularEvaluation_tmul, regularInverse_tmul, ← BalancedTensor.balance]
      congr 1
      apply EnvelopingBimodule.ext
      change (((1 : R) ⊗ₜ[k] MulOpposite.op b.unop) * (a ⊗ₜ[k] (1 : Rᵐᵒᵖ))) = a ⊗ₜ[k] b
      simp only [MulOpposite.op_unop, Algebra.TensorProduct.tmul_mul_tmul, one_mul, mul_one]
123
private theorem regularEvaluation_inverse (z : R ⊗[k] X) :
    regularEvaluation k R X (regularInverse k R X z) = z := by
proof · 3 lines
  induction z using TensorProduct.inductionOn with
  | add z w hz hw => simp only [_root_.map_add, hz, hw]
  | tmul a x => simp only [regularInverse_tmul, regularEvaluation_tmul, MulOpposite.unop_one, one_smul]
129
def regularEquiv :
    BalancedTensor k R (EnvelopingBimodule k R (regularObject k R)) X ≃ₗ[R] R ⊗[k] X where
body · 4 lines
  __ := regularEvaluation k R X
  invFun := regularInverse k R X
  left_inv := regularInverse_evaluation k R X
  right_inv := regularEvaluation_inverse k R X