Theorem: IsMulFreimanHom.prod
File: Mathlib/Combinatorics/Additive/FreimanHom.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
α₁ : Type u_5
α₂ : Type u_6
β₁ : Type u_7
β₂ : Type u_8
inst✝³ : CommMonoid α₁
inst✝² : CommMonoid α₂
inst✝¹ : CommMonoid β₁
inst✝ : CommMonoid β₂
A₁ : Set α₁
A₂ : Set α₂
B₁ : Set β₁
B₂ : Set β₂
f₁ : α₁ → β₁
f₂ : α₂ → β₂
n : ℕ
h₁ : IsMulFreimanHom n A₁ B₁ f₁
h₂ : IsMulFreimanHom n A₂ B₂ f₂
s t : Multiset (α₁ × α₂)
hsA : ∀ ⦃x : α₁ × α₂⦄, x ∈ s → x ∈ A₁ ×ˢ A₂
htA : ∀ ⦃x : α₁ × α₂⦄, x ∈ t → x ∈ A₁ ×ˢ A₂
hs : card s = n
ht : card t = n
h : s.prod = t.prod
⊢ (map (Prod.map f₁ f₂) s).prod = (map (Prod.map f₁ f₂) t).prod
state_after: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
α₁ : Type u_5
α₂ : Type u_6
β₁ : Type u_7
β₂ : Type u_8
inst✝³ : CommMonoid α₁
inst✝² : CommMonoid α₂
inst✝¹ : CommMonoid β₁
inst✝ : CommMonoid β₂
A₁ : Set α₁
A₂ : Set α₂
B₁ : Set β₁
B₂ : Set β₂
f₁ : α₁ → β₁
f₂ : α₂ → β₂
n : ℕ
h₁ : IsMulFreimanHom n A₁ B₁ f₁
h₂ : IsMulFreimanHom n A₂ B₂ f₂
s t : Multiset (α₁ × α₂)
hs : card s = n
ht : card t = n
h : s.prod = t.prod
hsA : (∀ (a : α₁) (b : α₂), (a, b) ∈ s → a ∈ A₁) ∧ ∀ (a : α₁) (b : α₂), (a, b) ∈ s → b ∈ A₂
htA : (∀ (a : α₁) (b : α₂), (a, b) ∈ t → a ∈ A₁) ∧ ∀ (a : α₁) (b : α₂), (a, b) ∈ t → b ∈ A₂
⊢ (map (Prod.map f₁ f₂) s).prod = (map (Prod.map f₁ f₂) t).prod
tactic: simp only [mem_prod, forall_and, Prod.forall] at hsA htA
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
α₁ : Type u_5
α₂ : Type u_6
β₁ : Type u_7
β₂ : Type u_8
inst✝³ : CommMonoid α₁
inst✝² : CommMonoid α₂
inst✝¹ : CommMonoid β₁
inst✝ : CommMonoid β₂
A₁ : Set α₁
A₂ : Set α₂
B₁ : Set β₁
B₂ : Set β₂
f₁ : α₁ → β₁
f₂ : α₂ → β₂
n : ℕ
h₁ : IsMulFreimanHom n A₁ B₁ f₁
h₂ : IsMulFreimanHom n A₂ B₂ f₂
s t : Multiset (α₁ × α₂)
hs : card s = n
ht : card t = n
h : s.prod = t.prod
hsA : (∀ (a : α₁) (b : α₂), (a, b) ∈ s → a ∈ A₁) ∧ ∀ (a : α₁) (b : α₂), (a, b) ∈ s → b ∈ A₂
htA : (∀ (a : α₁) (b : α₂), (a, b) ∈ t → a ∈ A₁) ∧ ∀ (a : α₁) (b : α₂), (a, b) ∈ t → b ∈ A₂
⊢ (map (Prod.map f₁ f₂) s).prod = (map (Prod.map f₁ f₂) t).prod
state_after: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
α₁ : Type u_5
α₂ : Type u_6
β₁ : Type u_7
β₂ : Type u_8
inst✝³ : CommMonoid α₁
inst✝² : CommMonoid α₂
inst✝¹ : CommMonoid β₁
inst✝ : CommMonoid β₂
A₁ : Set α₁
A₂ : Set α₂
B₁ : Set β₁
B₂ : Set β₂
f₁ : α₁ → β₁
f₂ : α₂ → β₂
n : ℕ
h₁ : IsMulFreimanHom n A₁ B₁ f₁
h₂ : IsMulFreimanHom n A₂ B₂ f₂
s t : Multiset (α₁ × α₂)
hs : card s = n
ht : card t = n
hsA : (∀ (a : α₁) (b : α₂), (a, b) ∈ s → a ∈ A₁) ∧ ∀ (a : α₁) (b : α₂), (a, b) ∈ s → b ∈ A₂
htA : (∀ (a : α₁) (b : α₂), (a, b) ∈ t → a ∈ A₁) ∧ ∀ (a : α₁) (b : α₂), (a, b) ∈ t → b ∈ A₂
h : (map Prod.fst s).prod = (map Prod.fst t).prod ∧ (map Prod.snd s).prod = (map Prod.snd t).prod
⊢ (map (fun x => f₁ x.1) s).prod = (map (fun x => f₁ x.1) t).prod ∧
    (map (fun x => f₂ x.2) s).prod = (map (fun x => f₂ x.2) t).prod
tactic: simp only [Prod.ext_iff, fst_prod, snd_prod, map_map, Function.comp_apply, Prod.map_fst,
      Prod.map_snd] at h ⊢
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
α₁ : Type u_5
α₂ : Type u_6
β₁ : Type u_7
β₂ : Type u_8
inst✝³ : CommMonoid α₁
inst✝² : CommMonoid α₂
inst✝¹ : CommMonoid β₁
inst✝ : CommMonoid β₂
A₁ : Set α₁
A₂ : Set α₂
B₁ : Set β₁
B₂ : Set β₂
f₁ : α₁ → β₁
f₂ : α₂ → β₂
n : ℕ
h₁ : IsMulFreimanHom n A₁ B₁ f₁
h₂ : IsMulFreimanHom n A₂ B₂ f₂
s t : Multiset (α₁ × α₂)
hs : card s = n
ht : card t = n
hsA : (∀ (a : α₁) (b : α₂), (a, b) ∈ s → a ∈ A₁) ∧ ∀ (a : α₁) (b : α₂), (a, b) ∈ s → b ∈ A₂
htA : (∀ (a : α₁) (b : α₂), (a, b) ∈ t → a ∈ A₁) ∧ ∀ (a : α₁) (b : α₂), (a, b) ∈ t → b ∈ A₂
h : (map Prod.fst s).prod = (map Prod.fst t).prod ∧ (map Prod.snd s).prod = (map Prod.snd t).prod
⊢ (map (fun x => f₁ x.1) s).prod = (map (fun x => f₁ x.1) t).prod ∧
    (map (fun x => f₂ x.2) s).prod = (map (fun x => f₂ x.2) t).prod
state_after: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
α₁ : Type u_5
α₂ : Type u_6
β₁ : Type u_7
β₂ : Type u_8
inst✝³ : CommMonoid α₁
inst✝² : CommMonoid α₂
inst✝¹ : CommMonoid β₁
inst✝ : CommMonoid β₂
A₁ : Set α₁
A₂ : Set α₂
B₁ : Set β₁
B₂ : Set β₂
f₁ : α₁ → β₁
f₂ : α₂ → β₂
n : ℕ
h₁ : IsMulFreimanHom n A₁ B₁ f₁
h₂ : IsMulFreimanHom n A₂ B₂ f₂
s t : Multiset (α₁ × α₂)
hs : card s = n
ht : card t = n
hsA : (∀ (a : α₁) (b : α₂), (a, b) ∈ s → a ∈ A₁) ∧ ∀ (a : α₁) (b : α₂), (a, b) ∈ s → b ∈ A₂
htA : (∀ (a : α₁) (b : α₂), (a, b) ∈ t → a ∈ A₁) ∧ ∀ (a : α₁) (b : α₂), (a, b) ∈ t → b ∈ A₂
h : (map Prod.fst s).prod = (map Prod.fst t).prod ∧ (map Prod.snd s).prod = (map Prod.snd t).prod
⊢ (map f₁ (map Prod.fst s)).prod = (map f₁ (map Prod.fst t)).prod ∧
    (map f₂ (map Prod.snd s)).prod = (map f₂ (map Prod.snd t)).prod
tactic: rw [← Function.comp_def, ← map_map, ← map_map, ← Function.comp_def f₂, ← map_map, ← map_map]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
α₁ : Type u_5
α₂ : Type u_6
β₁ : Type u_7
β₂ : Type u_8
inst✝³ : CommMonoid α₁
inst✝² : CommMonoid α₂
inst✝¹ : CommMonoid β₁
inst✝ : CommMonoid β₂
A₁ : Set α₁
A₂ : Set α₂
B₁ : Set β₁
B₂ : Set β₂
f₁ : α₁ → β₁
f₂ : α₂ → β₂
n : ℕ
h₁ : IsMulFreimanHom n A₁ B₁ f₁
h₂ : IsMulFreimanHom n A₂ B₂ f₂
s t : Multiset (α₁ × α₂)
hs : card s = n
ht : card t = n
hsA : (∀ (a : α₁) (b : α₂), (a, b) ∈ s → a ∈ A₁) ∧ ∀ (a : α₁) (b : α₂), (a, b) ∈ s → b ∈ A₂
htA : (∀ (a : α₁) (b : α₂), (a, b) ∈ t → a ∈ A₁) ∧ ∀ (a : α₁) (b : α₂), (a, b) ∈ t → b ∈ A₂
h : (map Prod.fst s).prod = (map Prod.fst t).prod ∧ (map Prod.snd s).prod = (map Prod.snd t).prod
⊢ (map f₁ (map Prod.fst s)).prod = (map f₁ (map Prod.fst t)).prod ∧
    (map f₂ (map Prod.snd s)).prod = (map f₂ (map Prod.snd t)).prod
state_after: no goals
tactic: exact ⟨h₁.map_prod_eq_map_prod (by simpa using hsA.1) (by simpa using htA.1) (by simpa)
      (by simpa) h.1, h₂.map_prod_eq_map_prod (by simpa [@forall_swap α₁] using hsA.2)
      (by simpa [@forall_swap α₁] using htA.2) (by simpa) (by simpa) h.2⟩