l3lab/ntp-mathlib huggingface dataset:
/-- Infinite sums commute with scalar multiplication. Version for scalars living in a
  `DivisionRing`; no summability hypothesis. This could be made to work for a
  `[GroupWithZero γ]` if there was such a thing as `DistribMulActionWithZero`. -/
lemma tsum_const_smul'' {γ : Type*} [DivisionRing γ] [Module γ α] [ContinuousConstSMul γ α]
    [T2Space α] (g : γ) : ∑' (i : β), g • f i = g • ∑' (i : β), f i := by
  by_cases hf : Summable f
  · exact tsum_const_smul g hf
  rw [tsum_eq_zero_of_not_summable hf]
  simp only [smul_zero]
  by_cases hg : g = 0
  · simp [hg]
  let mul_g : α ≃+ α := DistribMulAction.toAddEquiv₀ α g hg
  apply tsum_eq_zero_of_not_summable
  change ¬ Summable (mul_g ∘ f)
  rwa [Summable.map_iff_of_equiv] <;> 

Proof state:
case neg.h.hg
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : DivisionRing γ
inst✝² : Module γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
hf : ¬Summable f
hg : ¬g = 0
mul_g : α ≃+ α := DistribMulAction.toAddEquiv₀ α g hg
⊢ Continuous ⇑mul_g

Next tactic:
apply continuous_const_smul
/-- Infinite sums commute with scalar multiplication. Version for scalars living in a
  `DivisionRing`; no summability hypothesis. This could be made to work for a
  `[GroupWithZero γ]` if there was such a thing as `DistribMulActionWithZero`. -/
lemma tsum_const_smul'' {γ : Type*} [DivisionRing γ] [Module γ α] [ContinuousConstSMul γ α]
    [T2Space α] (g : γ) : ∑' (i : β), g • f i = g • ∑' (i : β), f i := by
  by_cases hf : Summable f
  · exact tsum_const_smul g hf
  rw [tsum_eq_zero_of_not_summable hf]
  simp only [smul_zero]
  by_cases hg : g = 0
  · simp [hg]
  let mul_g : α ≃+ α := DistribMulAction.toAddEquiv₀ α g hg
  apply tsum_eq_zero_of_not_summable
  change ¬ Summable (mul_g ∘ f)
  rwa [Summable.map_iff_of_equiv] <;> 

Proof state:
case neg.h.hg'
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : DivisionRing γ
inst✝² : Module γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
hf : ¬Summable f
hg : ¬g = 0
mul_g : α ≃+ α := DistribMulAction.toAddEquiv₀ α g hg
⊢ Continuous (EquivLike.inv mul_g)

Next tactic:
apply continuous_const_smul
theorem HasSum.prod_mk {f : β → α} {g : β → γ} {a : α} {b : γ} (hf : HasSum f a) (hg : HasSum g b) :
    HasSum (fun x => (⟨f x, g x⟩ : α × γ)) ⟨a, b⟩ := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝³ : AddCommMonoid α
inst✝² : TopologicalSpace α
inst✝¹ : AddCommMonoid γ
inst✝ : TopologicalSpace γ
f : β → α
g : β → γ
a : α
b : γ
hf : HasSum f a
hg : HasSum g b
⊢ HasSum (fun x => (f x, g x)) (a, b)

Next tactic:
simp [HasSum, ← prod_mk_sum, Filter.Tendsto.prod_mk_nhds hf hg]
theorem Pi.hasSum {f : ι → ∀ x, π x} {g : ∀ x, π x} :
    HasSum f g ↔ ∀ x, HasSum (fun i => f i x) (g x) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
π : α → Type u_6
inst✝¹ : (x : α) → AddCommMonoid (π x)
inst✝ : (x : α) → TopologicalSpace (π x)
f : ι → (x : α) → π x
g : (x : α) → π x
⊢ HasSum f g ↔ ∀ (x : α), HasSum (fun i => f i x) (g x)

Next tactic:
simp only [HasSum, tendsto_pi_nhds, sum_apply]
theorem Pi.summable {f : ι → ∀ x, π x} : Summable f ↔ ∀ x, Summable fun i => f i x := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
π : α → Type u_6
inst✝¹ : (x : α) → AddCommMonoid (π x)
inst✝ : (x : α) → TopologicalSpace (π x)
f : ι → (x : α) → π x
⊢ Summable f ↔ ∀ (x : α), Summable fun i => f i x

Next tactic:
simp only [Summable, Pi.hasSum, Classical.skolem]
theorem tsum_op : ∑' x, MulOpposite.op (f x) = MulOpposite.op (∑' x, f x) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
f : β → α
a : α
inst✝ : T2Space α
⊢ ∑' (x : β), op (f x) = op (∑' (x : β), f x)

Next tactic:
by_cases h : Summable f
theorem tsum_op : ∑' x, MulOpposite.op (f x) = MulOpposite.op (∑' x, f x) := by
  by_cases h : Summable f
  · 

Proof state:
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
f : β → α
a : α
inst✝ : T2Space α
h : Summable f
⊢ ∑' (x : β), op (f x) = op (∑' (x : β), f x)

Next tactic:
exact h.hasSum.op.tsum_eq
theorem tsum_op : ∑' x, MulOpposite.op (f x) = MulOpposite.op (∑' x, f x) := by
  by_cases h : Summable f
  · exact h.hasSum.op.tsum_eq
  · 

Proof state:
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
f : β → α
a : α
inst✝ : T2Space α
h : ¬Summable f
⊢ ∑' (x : β), op (f x) = op (∑' (x : β), f x)

Next tactic:
have ho := summable_op.not.mpr h
theorem tsum_op : ∑' x, MulOpposite.op (f x) = MulOpposite.op (∑' x, f x) := by
  by_cases h : Summable f
  · exact h.hasSum.op.tsum_eq
  · have ho := summable_op.not.mpr h
    

Proof state:
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
f : β → α
a : α
inst✝ : T2Space α
h : ¬Summable f
ho : ¬Summable fun a => op (f a)
⊢ ∑' (x : β), op (f x) = op (∑' (x : β), f x)

Next tactic:
rw [tsum_eq_zero_of_not_summable h, tsum_eq_zero_of_not_summable ho, MulOpposite.op_zero]
theorem HasSum.star (h : HasSum f a) : HasSum (fun b => star (f b)) (star a) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝³ : AddCommMonoid α
inst✝² : TopologicalSpace α
inst✝¹ : StarAddMonoid α
inst✝ : ContinuousStar α
f : β → α
a : α
h : HasSum f a
⊢ HasSum (fun b => Star.star (f b)) (Star.star a)

Next tactic:
simpa only using h.map (starAddEquiv : α ≃+ α) continuous_star
theorem Summable.ofStar (hf : Summable fun b => Star.star (f b)) : Summable f := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝³ : AddCommMonoid α
inst✝² : TopologicalSpace α
inst✝¹ : StarAddMonoid α
inst✝ : ContinuousStar α
f : β → α
a : α
hf : Summable fun b => Star.star (f b)
⊢ Summable f

Next tactic:
simpa only [star_star] using hf.star
theorem tsum_star : star (∑' b, f b) = ∑' b, star (f b) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : AddCommMonoid α
inst✝³ : TopologicalSpace α
inst✝² : StarAddMonoid α
inst✝¹ : ContinuousStar α
f : β → α
a : α
inst✝ : T2Space α
⊢ star (∑' (b : β), f b) = ∑' (b : β), star (f b)

Next tactic:
by_cases hf : Summable f
theorem tsum_star : star (∑' b, f b) = ∑' b, star (f b) := by
  by_cases hf : Summable f
  · 

Proof state:
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : AddCommMonoid α
inst✝³ : TopologicalSpace α
inst✝² : StarAddMonoid α
inst✝¹ : ContinuousStar α
f : β → α
a : α
inst✝ : T2Space α
hf : Summable f
⊢ star (∑' (b : β), f b) = ∑' (b : β), star (f b)

Next tactic:
exact hf.hasSum.star.tsum_eq.symm
theorem tsum_star : star (∑' b, f b) = ∑' b, star (f b) := by
  by_cases hf : Summable f
  · exact hf.hasSum.star.tsum_eq.symm
  · 

Proof state:
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : AddCommMonoid α
inst✝³ : TopologicalSpace α
inst✝² : StarAddMonoid α
inst✝¹ : ContinuousStar α
f : β → α
a : α
inst✝ : T2Space α
hf : ¬Summable f
⊢ star (∑' (b : β), f b) = ∑' (b : β), star (f b)

Next tactic:
rw [tsum_eq_zero_of_not_summable hf, tsum_eq_zero_of_not_summable (mt Summable.ofStar hf),
      star_zero]
/-- Given a group `α` acting on a type `β`, and a function `f : β → M`, we "automorphize" `f` to a
  function `β ⧸ α → M` by summing over `α` orbits, `b ↦ ∑' (a : α), f(a • b)`. -/
@[to_additive "Given an additive group `α` acting on a type `β`, and a function `f : β → M`,
  we automorphize `f` to a function `β ⧸ α → M` by summing over `α` orbits,
  `b ↦ ∑' (a : α), f(a • b)`."]
noncomputable def MulAction.automorphize [Group α] [MulAction α β] (f : β → M) :
    Quotient (MulAction.orbitRel α β) → M := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
M : Type u_5
inst✝⁷ : TopologicalSpace M
inst✝⁶ : AddCommMonoid M
inst✝⁵ : T2Space M
R : Type u_6
inst✝⁴ : DivisionRing R
inst✝³ : Module R M
inst✝² : ContinuousConstSMul R M
inst✝¹ : Group α
inst✝ : MulAction α β
f : β → M
⊢ Quotient (orbitRel α β) → M

Next tactic:
refine @Quotient.lift _ _ (_) (fun b ↦ ∑' (a : α), f (a • b)) ?_
/-- Given a group `α` acting on a type `β`, and a function `f : β → M`, we "automorphize" `f` to a
  function `β ⧸ α → M` by summing over `α` orbits, `b ↦ ∑' (a : α), f(a • b)`. -/
@[to_additive "Given an additive group `α` acting on a type `β`, and a function `f : β → M`,
  we automorphize `f` to a function `β ⧸ α → M` by summing over `α` orbits,
  `b ↦ ∑' (a : α), f(a • b)`."]
noncomputable def MulAction.automorphize [Group α] [MulAction α β] (f : β → M) :
    Quotient (MulAction.orbitRel α β) → M := by
  refine @Quotient.lift _ _ (_) (fun b ↦ ∑' (a : α), f (a • b)) ?_
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
M : Type u_5
inst✝⁷ : TopologicalSpace M
inst✝⁶ : AddCommMonoid M
inst✝⁵ : T2Space M
R : Type u_6
inst✝⁴ : DivisionRing R
inst✝³ : Module R M
inst✝² : ContinuousConstSMul R M
inst✝¹ : Group α
inst✝ : MulAction α β
f : β → M
⊢ ∀ (a b : β), a ≈ b → (fun b => ∑' (a : α), f (a • b)) a = (fun b => ∑' (a : α), f (a • b)) b

Next tactic:
intro b₁ b₂ ⟨a, (ha : a • b₂ = b₁)⟩
/-- Given a group `α` acting on a type `β`, and a function `f : β → M`, we "automorphize" `f` to a
  function `β ⧸ α → M` by summing over `α` orbits, `b ↦ ∑' (a : α), f(a • b)`. -/
@[to_additive "Given an additive group `α` acting on a type `β`, and a function `f : β → M`,
  we automorphize `f` to a function `β ⧸ α → M` by summing over `α` orbits,
  `b ↦ ∑' (a : α), f(a • b)`."]
noncomputable def MulAction.automorphize [Group α] [MulAction α β] (f : β → M) :
    Quotient (MulAction.orbitRel α β) → M := by
  refine @Quotient.lift _ _ (_) (fun b ↦ ∑' (a : α), f (a • b)) ?_
  intro b₁ b₂ ⟨a, (ha : a • b₂ = b₁)⟩
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
M : Type u_5
inst✝⁷ : TopologicalSpace M
inst✝⁶ : AddCommMonoid M
inst✝⁵ : T2Space M
R : Type u_6
inst✝⁴ : DivisionRing R
inst✝³ : Module R M
inst✝² : ContinuousConstSMul R M
inst✝¹ : Group α
inst✝ : MulAction α β
f : β → M
b₁ b₂ : β
a : α
ha : a • b₂ = b₁
⊢ (fun b => ∑' (a : α), f (a • b)) b₁ = (fun b => ∑' (a : α), f (a • b)) b₂

Next tactic:
simp only
/-- Given a group `α` acting on a type `β`, and a function `f : β → M`, we "automorphize" `f` to a
  function `β ⧸ α → M` by summing over `α` orbits, `b ↦ ∑' (a : α), f(a • b)`. -/
@[to_additive "Given an additive group `α` acting on a type `β`, and a function `f : β → M`,
  we automorphize `f` to a function `β ⧸ α → M` by summing over `α` orbits,
  `b ↦ ∑' (a : α), f(a • b)`."]
noncomputable def MulAction.automorphize [Group α] [MulAction α β] (f : β → M) :
    Quotient (MulAction.orbitRel α β) → M := by
  refine @Quotient.lift _ _ (_) (fun b ↦ ∑' (a : α), f (a • b)) ?_
  intro b₁ b₂ ⟨a, (ha : a • b₂ = b₁)⟩
  simp only
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
M : Type u_5
inst✝⁷ : TopologicalSpace M
inst✝⁶ : AddCommMonoid M
inst✝⁵ : T2Space M
R : Type u_6
inst✝⁴ : DivisionRing R
inst✝³ : Module R M
inst✝² : ContinuousConstSMul R M
inst✝¹ : Group α
inst✝ : MulAction α β
f : β → M
b₁ b₂ : β
a : α
ha : a • b₂ = b₁
⊢ ∑' (a : α), f (a • b₁) = ∑' (a : α), f (a • b₂)

Next tactic:
rw [← ha]
/-- Given a group `α` acting on a type `β`, and a function `f : β → M`, we "automorphize" `f` to a
  function `β ⧸ α → M` by summing over `α` orbits, `b ↦ ∑' (a : α), f(a • b)`. -/
@[to_additive "Given an additive group `α` acting on a type `β`, and a function `f : β → M`,
  we automorphize `f` to a function `β ⧸ α → M` by summing over `α` orbits,
  `b ↦ ∑' (a : α), f(a • b)`."]
noncomputable def MulAction.automorphize [Group α] [MulAction α β] (f : β → M) :
    Quotient (MulAction.orbitRel α β) → M := by
  refine @Quotient.lift _ _ (_) (fun b ↦ ∑' (a : α), f (a • b)) ?_
  intro b₁ b₂ ⟨a, (ha : a • b₂ = b₁)⟩
  simp only
  rw [← ha]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
M : Type u_5
inst✝⁷ : TopologicalSpace M
inst✝⁶ : AddCommMonoid M
inst✝⁵ : T2Space M
R : Type u_6
inst✝⁴ : DivisionRing R
inst✝³ : Module R M
inst✝² : ContinuousConstSMul R M
inst✝¹ : Group α
inst✝ : MulAction α β
f : β → M
b₁ b₂ : β
a : α
ha : a • b₂ = b₁
⊢ ∑' (a_1 : α), f (a_1 • a • b₂) = ∑' (a : α), f (a • b₂)

Next tactic:
convert (Equiv.mulRight a).tsum_eq (fun a' ↦ f (a' • b₂)) using 1
/-- Given a group `α` acting on a type `β`, and a function `f : β → M`, we "automorphize" `f` to a
  function `β ⧸ α → M` by summing over `α` orbits, `b ↦ ∑' (a : α), f(a • b)`. -/
@[to_additive "Given an additive group `α` acting on a type `β`, and a function `f : β → M`,
  we automorphize `f` to a function `β ⧸ α → M` by summing over `α` orbits,
  `b ↦ ∑' (a : α), f(a • b)`."]
noncomputable def MulAction.automorphize [Group α] [MulAction α β] (f : β → M) :
    Quotient (MulAction.orbitRel α β) → M := by
  refine @Quotient.lift _ _ (_) (fun b ↦ ∑' (a : α), f (a • b)) ?_
  intro b₁ b₂ ⟨a, (ha : a • b₂ = b₁)⟩
  simp only
  rw [← ha]
  convert (Equiv.mulRight a).tsum_eq (fun a' ↦ f (a' • b₂)) using 1
  

Proof state:
case h.e'_2
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
M : Type u_5
inst✝⁷ : TopologicalSpace M
inst✝⁶ : AddCommMonoid M
inst✝⁵ : T2Space M
R : Type u_6
inst✝⁴ : DivisionRing R
inst✝³ : Module R M
inst✝² : ContinuousConstSMul R M
inst✝¹ : Group α
inst✝ : MulAction α β
f : β → M
b₁ b₂ : β
a : α
ha : a • b₂ = b₁
⊢ ∑' (a_1 : α), f (a_1 • a • b₂) = ∑' (c : α), f ((Equiv.mulRight a) c • b₂)

Next tactic:
simp only [Equiv.coe_mulRight]
/-- Given a group `α` acting on a type `β`, and a function `f : β → M`, we "automorphize" `f` to a
  function `β ⧸ α → M` by summing over `α` orbits, `b ↦ ∑' (a : α), f(a • b)`. -/
@[to_additive "Given an additive group `α` acting on a type `β`, and a function `f : β → M`,
  we automorphize `f` to a function `β ⧸ α → M` by summing over `α` orbits,
  `b ↦ ∑' (a : α), f(a • b)`."]
noncomputable def MulAction.automorphize [Group α] [MulAction α β] (f : β → M) :
    Quotient (MulAction.orbitRel α β) → M := by
  refine @Quotient.lift _ _ (_) (fun b ↦ ∑' (a : α), f (a • b)) ?_
  intro b₁ b₂ ⟨a, (ha : a • b₂ = b₁)⟩
  simp only
  rw [← ha]
  convert (Equiv.mulRight a).tsum_eq (fun a' ↦ f (a' • b₂)) using 1
  simp only [Equiv.coe_mulRight]
  

Proof state:
case h.e'_2
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
M : Type u_5
inst✝⁷ : TopologicalSpace M
inst✝⁶ : AddCommMonoid M
inst✝⁵ : T2Space M
R : Type u_6
inst✝⁴ : DivisionRing R
inst✝³ : Module R M
inst✝² : ContinuousConstSMul R M
inst✝¹ : Group α
inst✝ : MulAction α β
f : β → M
b₁ b₂ : β
a : α
ha : a • b₂ = b₁
⊢ ∑' (a_1 : α), f (a_1 • a • b₂) = ∑' (c : α), f ((c * a) • b₂)

Next tactic:
congr
/-- Given a group `α` acting on a type `β`, and a function `f : β → M`, we "automorphize" `f` to a
  function `β ⧸ α → M` by summing over `α` orbits, `b ↦ ∑' (a : α), f(a • b)`. -/
@[to_additive "Given an additive group `α` acting on a type `β`, and a function `f : β → M`,
  we automorphize `f` to a function `β ⧸ α → M` by summing over `α` orbits,
  `b ↦ ∑' (a : α), f(a • b)`."]
noncomputable def MulAction.automorphize [Group α] [MulAction α β] (f : β → M) :
    Quotient (MulAction.orbitRel α β) → M := by
  refine @Quotient.lift _ _ (_) (fun b ↦ ∑' (a : α), f (a • b)) ?_
  intro b₁ b₂ ⟨a, (ha : a • b₂ = b₁)⟩
  simp only
  rw [← ha]
  convert (Equiv.mulRight a).tsum_eq (fun a' ↦ f (a' • b₂)) using 1
  simp only [Equiv.coe_mulRight]
  congr
  

Proof state:
case h.e'_2.e_f
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
M : Type u_5
inst✝⁷ : TopologicalSpace M
inst✝⁶ : AddCommMonoid M
inst✝⁵ : T2Space M
R : Type u_6
inst✝⁴ : DivisionRing R
inst✝³ : Module R M
inst✝² : ContinuousConstSMul R M
inst✝¹ : Group α
inst✝ : MulAction α β
f : β → M
b₁ b₂ : β
a : α
ha : a • b₂ = b₁
⊢ (fun a_1 => f (a_1 • a • b₂)) = fun c => f ((c * a) • b₂)

Next tactic:
ext
/-- Given a group `α` acting on a type `β`, and a function `f : β → M`, we "automorphize" `f` to a
  function `β ⧸ α → M` by summing over `α` orbits, `b ↦ ∑' (a : α), f(a • b)`. -/
@[to_additive "Given an additive group `α` acting on a type `β`, and a function `f : β → M`,
  we automorphize `f` to a function `β ⧸ α → M` by summing over `α` orbits,
  `b ↦ ∑' (a : α), f(a • b)`."]
noncomputable def MulAction.automorphize [Group α] [MulAction α β] (f : β → M) :
    Quotient (MulAction.orbitRel α β) → M := by
  refine @Quotient.lift _ _ (_) (fun b ↦ ∑' (a : α), f (a • b)) ?_
  intro b₁ b₂ ⟨a, (ha : a • b₂ = b₁)⟩
  simp only
  rw [← ha]
  convert (Equiv.mulRight a).tsum_eq (fun a' ↦ f (a' • b₂)) using 1
  simp only [Equiv.coe_mulRight]
  congr
  ext
  

Proof state:
case h.e'_2.e_f.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
M : Type u_5
inst✝⁷ : TopologicalSpace M
inst✝⁶ : AddCommMonoid M
inst✝⁵ : T2Space M
R : Type u_6
inst✝⁴ : DivisionRing R
inst✝³ : Module R M
inst✝² : ContinuousConstSMul R M
inst✝¹ : Group α
inst✝ : MulAction α β
f : β → M
b₁ b₂ : β
a : α
ha : a • b₂ = b₁
x✝ : α
⊢ f (x✝ • a • b₂) = f ((x✝ * a) • b₂)

Next tactic:
congr 1
/-- Given a group `α` acting on a type `β`, and a function `f : β → M`, we "automorphize" `f` to a
  function `β ⧸ α → M` by summing over `α` orbits, `b ↦ ∑' (a : α), f(a • b)`. -/
@[to_additive "Given an additive group `α` acting on a type `β`, and a function `f : β → M`,
  we automorphize `f` to a function `β ⧸ α → M` by summing over `α` orbits,
  `b ↦ ∑' (a : α), f(a • b)`."]
noncomputable def MulAction.automorphize [Group α] [MulAction α β] (f : β → M) :
    Quotient (MulAction.orbitRel α β) → M := by
  refine @Quotient.lift _ _ (_) (fun b ↦ ∑' (a : α), f (a • b)) ?_
  intro b₁ b₂ ⟨a, (ha : a • b₂ = b₁)⟩
  simp only
  rw [← ha]
  convert (Equiv.mulRight a).tsum_eq (fun a' ↦ f (a' • b₂)) using 1
  simp only [Equiv.coe_mulRight]
  congr
  ext
  congr 1
  

Proof state:
case h.e'_2.e_f.h.e_a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
M : Type u_5
inst✝⁷ : TopologicalSpace M
inst✝⁶ : AddCommMonoid M
inst✝⁵ : T2Space M
R : Type u_6
inst✝⁴ : DivisionRing R
inst✝³ : Module R M
inst✝² : ContinuousConstSMul R M
inst✝¹ : Group α
inst✝ : MulAction α β
f : β → M
b₁ b₂ : β
a : α
ha : a • b₂ = b₁
x✝ : α
⊢ x✝ • a • b₂ = (x✝ * a) • b₂

Next tactic:
simp only [mul_smul]
/-- Automorphization of a function into an `R`-`module` distributes, that is, commutes with the
`R`-scalar multiplication. -/
lemma MulAction.automorphize_smul_left [Group α] [MulAction α β] (f : β → M)
    (g : Quotient (MulAction.orbitRel α β) → R) :
    MulAction.automorphize ((g ∘ (@Quotient.mk' _ (_))) • f)
      = g • (MulAction.automorphize f : Quotient (MulAction.orbitRel α β) → M) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
M : Type u_5
inst✝⁷ : TopologicalSpace M
inst✝⁶ : AddCommMonoid M
inst✝⁵ : T2Space M
R : Type u_6
inst✝⁴ : DivisionRing R
inst✝³ : Module R M
inst✝² : ContinuousConstSMul R M
inst✝¹ : Group α
inst✝ : MulAction α β
f : β → M
g : Quotient (orbitRel α β) → R
⊢ automorphize (g ∘ Quotient.mk' • f) = g • automorphize f

Next tactic:
ext x
/-- Automorphization of a function into an `R`-`module` distributes, that is, commutes with the
`R`-scalar multiplication. -/
lemma MulAction.automorphize_smul_left [Group α] [MulAction α β] (f : β → M)
    (g : Quotient (MulAction.orbitRel α β) → R) :
    MulAction.automorphize ((g ∘ (@Quotient.mk' _ (_))) • f)
      = g • (MulAction.automorphize f : Quotient (MulAction.orbitRel α β) → M) := by
  ext x
  

Proof state:
case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
M : Type u_5
inst✝⁷ : TopologicalSpace M
inst✝⁶ : AddCommMonoid M
inst✝⁵ : T2Space M
R : Type u_6
inst✝⁴ : DivisionRing R
inst✝³ : Module R M
inst✝² : ContinuousConstSMul R M
inst✝¹ : Group α
inst✝ : MulAction α β
f : β → M
g : Quotient (orbitRel α β) → R
x : Quotient (orbitRel α β)
⊢ automorphize (g ∘ Quotient.mk' • f) x = (g • automorphize f) x

Next tactic:
apply @Quotient.inductionOn' β (MulAction.orbitRel α β) _ x _
/-- Automorphization of a function into an `R`-`module` distributes, that is, commutes with the
`R`-scalar multiplication. -/
lemma MulAction.automorphize_smul_left [Group α] [MulAction α β] (f : β → M)
    (g : Quotient (MulAction.orbitRel α β) → R) :
    MulAction.automorphize ((g ∘ (@Quotient.mk' _ (_))) • f)
      = g • (MulAction.automorphize f : Quotient (MulAction.orbitRel α β) → M) := by
  ext x
  apply @Quotient.inductionOn' β (MulAction.orbitRel α β) _ x _
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
M : Type u_5
inst✝⁷ : TopologicalSpace M
inst✝⁶ : AddCommMonoid M
inst✝⁵ : T2Space M
R : Type u_6
inst✝⁴ : DivisionRing R
inst✝³ : Module R M
inst✝² : ContinuousConstSMul R M
inst✝¹ : Group α
inst✝ : MulAction α β
f : β → M
g : Quotient (orbitRel α β) → R
x : Quotient (orbitRel α β)
⊢ ∀ (a : β), automorphize (g ∘ Quotient.mk' • f) (Quotient.mk'' a) = (g • automorphize f) (Quotient.mk'' a)

Next tactic:
intro b
/-- Automorphization of a function into an `R`-`module` distributes, that is, commutes with the
`R`-scalar multiplication. -/
lemma MulAction.automorphize_smul_left [Group α] [MulAction α β] (f : β → M)
    (g : Quotient (MulAction.orbitRel α β) → R) :
    MulAction.automorphize ((g ∘ (@Quotient.mk' _ (_))) • f)
      = g • (MulAction.automorphize f : Quotient (MulAction.orbitRel α β) → M) := by
  ext x
  apply @Quotient.inductionOn' β (MulAction.orbitRel α β) _ x _
  intro b
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
M : Type u_5
inst✝⁷ : TopologicalSpace M
inst✝⁶ : AddCommMonoid M
inst✝⁵ : T2Space M
R : Type u_6
inst✝⁴ : DivisionRing R
inst✝³ : Module R M
inst✝² : ContinuousConstSMul R M
inst✝¹ : Group α
inst✝ : MulAction α β
f : β → M
g : Quotient (orbitRel α β) → R
x : Quotient (orbitRel α β)
b : β
⊢ automorphize (g ∘ Quotient.mk' • f) (Quotient.mk'' b) = (g • automorphize f) (Quotient.mk'' b)

Next tactic:
simp only [automorphize, Pi.smul_apply', comp_apply]
/-- Automorphization of a function into an `R`-`module` distributes, that is, commutes with the
`R`-scalar multiplication. -/
lemma MulAction.automorphize_smul_left [Group α] [MulAction α β] (f : β → M)
    (g : Quotient (MulAction.orbitRel α β) → R) :
    MulAction.automorphize ((g ∘ (@Quotient.mk' _ (_))) • f)
      = g • (MulAction.automorphize f : Quotient (MulAction.orbitRel α β) → M) := by
  ext x
  apply @Quotient.inductionOn' β (MulAction.orbitRel α β) _ x _
  intro b
  simp only [automorphize, Pi.smul_apply', comp_apply]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
M : Type u_5
inst✝⁷ : TopologicalSpace M
inst✝⁶ : AddCommMonoid M
inst✝⁵ : T2Space M
R : Type u_6
inst✝⁴ : DivisionRing R
inst✝³ : Module R M
inst✝² : ContinuousConstSMul R M
inst✝¹ : Group α
inst✝ : MulAction α β
f : β → M
g : Quotient (orbitRel α β) → R
x : Quotient (orbitRel α β)
b : β
⊢ Quotient.lift (fun b => ∑' (a : α), g (Quotient.mk' (a • b)) • f (a • b))
      (_ :
        ∀ (a b : β),
          a ≈ b →
            (fun b => ∑' (a : α), g (Quotient.mk' (a • b)) • f (a • b)) a =
              (fun b => ∑' (a : α), g (Quotient.mk' (a • b)) • f (a • b)) b)
      (Quotient.mk'' b) =
    g (Quotient.mk'' b) •
      Quotient.lift (fun b => ∑' (a : α), f (a • b))
        (_ : ∀ (b₁ b₂ : β), b₁ ≈ b₂ → (fun b => ∑' (a : α), f (a • b)) b₁ = (fun b => ∑' (a : α), f (a • b)) b₂)
        (Quotient.mk'' b)

Next tactic:
set π : β → Quotient (MulAction.orbitRel α β) := Quotient.mk (MulAction.orbitRel α β)