Theorem: Function.Injective.tprod_eq
File: Mathlib/Topology/Algebra/InfiniteSum/Basic.lean

tactic: have : mulSupport f = g '' mulSupport (f ∘ g) := by
  rw [mulSupport_comp_eq_preimage, Set.image_preimage_eq_iff.2 hf]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
g : γ → β
hg : Injective g
f : β → α
hf : mulSupport f ⊆ Set.range g
⊢ ∏' (c : γ), f (g c) = ∏' (b : β), f b
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
g : γ → β
hg : Injective g
f : β → α
hf : mulSupport f ⊆ Set.range g
this : mulSupport f = g '' mulSupport (f ∘ g)
⊢ ∏' (c : γ), f (g c) = ∏' (b : β), f b

tactic: rw [← Function.comp_def]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
g : γ → β
hg : Injective g
f : β → α
hf : mulSupport f ⊆ Set.range g
this : mulSupport f = g '' mulSupport (f ∘ g)
⊢ ∏' (c : γ), f (g c) = ∏' (b : β), f b
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
g : γ → β
hg : Injective g
f : β → α
hf : mulSupport f ⊆ Set.range g
this : mulSupport f = g '' mulSupport (f ∘ g)
⊢ tprod (f ∘ g) = ∏' (b : β), f b

tactic: by_cases hf_fin : (mulSupport f).Finite
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
g : γ → β
hg : Injective g
f : β → α
hf : mulSupport f ⊆ Set.range g
this : mulSupport f = g '' mulSupport (f ∘ g)
⊢ tprod (f ∘ g) = ∏' (b : β), f b
state_after: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
g : γ → β
hg : Injective g
f : β → α
hf : mulSupport f ⊆ Set.range g
this : mulSupport f = g '' mulSupport (f ∘ g)
hf_fin : (mulSupport f).Finite
⊢ tprod (f ∘ g) = ∏' (b : β), f b

case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
g : γ → β
hg : Injective g
f : β → α
hf : mulSupport f ⊆ Set.range g
this : mulSupport f = g '' mulSupport (f ∘ g)
hf_fin : ¬(mulSupport f).Finite
⊢ tprod (f ∘ g) = ∏' (b : β), f b

tactic: rw [mulSupport_comp_eq_preimage, Set.image_preimage_eq_iff.2 hf]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
g : γ → β
hg : Injective g
f : β → α
hf : mulSupport f ⊆ Set.range g
⊢ mulSupport f = g '' mulSupport (f ∘ g)
state_after: no goals

tactic: have hfg_fin : (mulSupport (f ∘ g)).Finite := hf_fin.preimage hg.injOn
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
g : γ → β
hg : Injective g
f : β → α
hf : mulSupport f ⊆ Set.range g
this : mulSupport f = g '' mulSupport (f ∘ g)
hf_fin : (mulSupport f).Finite
⊢ tprod (f ∘ g) = ∏' (b : β), f b
state_after: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
g : γ → β
hg : Injective g
f : β → α
hf : mulSupport f ⊆ Set.range g
this : mulSupport f = g '' mulSupport (f ∘ g)
hf_fin : (mulSupport f).Finite
hfg_fin : (mulSupport (f ∘ g)).Finite
⊢ tprod (f ∘ g) = ∏' (b : β), f b

tactic: lift g to γ ↪ β using hg
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
g : γ → β
hg : Injective g
f : β → α
hf : mulSupport f ⊆ Set.range g
this : mulSupport f = g '' mulSupport (f ∘ g)
hf_fin : (mulSupport f).Finite
hfg_fin : (mulSupport (f ∘ g)).Finite
⊢ tprod (f ∘ g) = ∏' (b : β), f b
state_after: case pos.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
f : β → α
hf_fin : (mulSupport f).Finite
g : γ ↪ β
hf : mulSupport f ⊆ Set.range ⇑g
this : mulSupport f = ⇑g '' mulSupport (f ∘ ⇑g)
hfg_fin : (mulSupport (f ∘ ⇑g)).Finite
⊢ tprod (f ∘ ⇑g) = ∏' (b : β), f b

tactic: simp_rw [tprod_eq_prod' hf_fin.coe_toFinset.ge, tprod_eq_prod' hfg_fin.coe_toFinset.ge,
  comp_apply, ← Finset.prod_map]
state_before: case pos.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
f : β → α
hf_fin : (mulSupport f).Finite
g : γ ↪ β
hf : mulSupport f ⊆ Set.range ⇑g
this : mulSupport f = ⇑g '' mulSupport (f ∘ ⇑g)
hfg_fin : (mulSupport (f ∘ ⇑g)).Finite
⊢ tprod (f ∘ ⇑g) = ∏' (b : β), f b
state_after: case pos.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
f : β → α
hf_fin : (mulSupport f).Finite
g : γ ↪ β
hf : mulSupport f ⊆ Set.range ⇑g
this : mulSupport f = ⇑g '' mulSupport (f ∘ ⇑g)
hfg_fin : (mulSupport (f ∘ ⇑g)).Finite
⊢ ∏ x ∈ Finset.map g hfg_fin.toFinset, f x = ∏ x ∈ hf_fin.toFinset, f x

tactic: refine Finset.prod_congr (Finset.coe_injective ?_) fun _ _ ↦ rfl
state_before: case pos.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
f : β → α
hf_fin : (mulSupport f).Finite
g : γ ↪ β
hf : mulSupport f ⊆ Set.range ⇑g
this : mulSupport f = ⇑g '' mulSupport (f ∘ ⇑g)
hfg_fin : (mulSupport (f ∘ ⇑g)).Finite
⊢ ∏ x ∈ Finset.map g hfg_fin.toFinset, f x = ∏ x ∈ hf_fin.toFinset, f x
state_after: case pos.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
f : β → α
hf_fin : (mulSupport f).Finite
g : γ ↪ β
hf : mulSupport f ⊆ Set.range ⇑g
this : mulSupport f = ⇑g '' mulSupport (f ∘ ⇑g)
hfg_fin : (mulSupport (f ∘ ⇑g)).Finite
⊢ ↑(Finset.map g hfg_fin.toFinset) = ↑hf_fin.toFinset

tactic: simp [this]
state_before: case pos.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
f : β → α
hf_fin : (mulSupport f).Finite
g : γ ↪ β
hf : mulSupport f ⊆ Set.range ⇑g
this : mulSupport f = ⇑g '' mulSupport (f ∘ ⇑g)
hfg_fin : (mulSupport (f ∘ ⇑g)).Finite
⊢ ↑(Finset.map g hfg_fin.toFinset) = ↑hf_fin.toFinset
state_after: no goals

tactic: have hf_fin' : ¬ Set.Finite (mulSupport (f ∘ g)) := by
  rwa [this, Set.finite_image_iff hg.injOn] at hf_fin
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
g : γ → β
hg : Injective g
f : β → α
hf : mulSupport f ⊆ Set.range g
this : mulSupport f = g '' mulSupport (f ∘ g)
hf_fin : ¬(mulSupport f).Finite
⊢ tprod (f ∘ g) = ∏' (b : β), f b
state_after: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
g : γ → β
hg : Injective g
f : β → α
hf : mulSupport f ⊆ Set.range g
this : mulSupport f = g '' mulSupport (f ∘ g)
hf_fin : ¬(mulSupport f).Finite
hf_fin' : ¬(mulSupport (f ∘ g)).Finite
⊢ tprod (f ∘ g) = ∏' (b : β), f b

tactic: simp_rw [tprod_def, if_neg hf_fin, if_neg hf_fin', Multipliable,
  funext fun a => propext <| hg.hasProd_iff (mulSupport_subset_iff'.1 hf) (a := a)]
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
g : γ → β
hg : Injective g
f : β → α
hf : mulSupport f ⊆ Set.range g
this : mulSupport f = g '' mulSupport (f ∘ g)
hf_fin : ¬(mulSupport f).Finite
hf_fin' : ¬(mulSupport (f ∘ g)).Finite
⊢ tprod (f ∘ g) = ∏' (b : β), f b
state_after: no goals

tactic: rwa [this, Set.finite_image_iff hg.injOn] at hf_fin
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
g : γ → β
hg : Injective g
f : β → α
hf : mulSupport f ⊆ Set.range g
this : mulSupport f = g '' mulSupport (f ∘ g)
hf_fin : ¬(mulSupport f).Finite
⊢ ¬(mulSupport (f ∘ g)).Finite
state_after: no goals