Theorem: Finset.gcd_eq_zero_iff
File: Mathlib/Algebra/GCDMonoid/Finset.lean

tactic: rw [gcd_def, Multiset.gcd_eq_zero_iff]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
⊢ s.gcd f = 0 ↔ ∀ x ∈ s, f x = 0
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
⊢ (∀ x ∈ Multiset.map f s.val, x = 0) ↔ ∀ x ∈ s, f x = 0

tactic: constructor <;> intro h
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
⊢ (∀ x ∈ Multiset.map f s.val, x = 0) ↔ ∀ x ∈ s, f x = 0
state_after: case mp
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
h : ∀ x ∈ Multiset.map f s.val, x = 0
⊢ ∀ x ∈ s, f x = 0

case mpr
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
h : ∀ x ∈ s, f x = 0
⊢ ∀ x ∈ Multiset.map f s.val, x = 0

tactic: intro b bs
state_before: case mp
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
h : ∀ x ∈ Multiset.map f s.val, x = 0
⊢ ∀ x ∈ s, f x = 0
state_after: case mp
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
h : ∀ x ∈ Multiset.map f s.val, x = 0
b : β
bs : b ∈ s
⊢ f b = 0

tactic: apply h (f b)
state_before: case mp
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
h : ∀ x ∈ Multiset.map f s.val, x = 0
b : β
bs : b ∈ s
⊢ f b = 0
state_after: case mp
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
h : ∀ x ∈ Multiset.map f s.val, x = 0
b : β
bs : b ∈ s
⊢ f b ∈ Multiset.map f s.val

tactic: simp only [Multiset.mem_map, mem_def.1 bs]
state_before: case mp
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
h : ∀ x ∈ Multiset.map f s.val, x = 0
b : β
bs : b ∈ s
⊢ f b ∈ Multiset.map f s.val
state_after: case mp
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
h : ∀ x ∈ Multiset.map f s.val, x = 0
b : β
bs : b ∈ s
⊢ ∃ a ∈ s.val, f a = f b

tactic: use b
state_before: case mp
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
h : ∀ x ∈ Multiset.map f s.val, x = 0
b : β
bs : b ∈ s
⊢ ∃ a ∈ s.val, f a = f b
state_after: case h
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
h : ∀ x ∈ Multiset.map f s.val, x = 0
b : β
bs : b ∈ s
⊢ b ∈ s.val ∧ f b = f b

tactic: simp only [mem_def.1 bs, eq_self_iff_true, and_self]
state_before: case h
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
h : ∀ x ∈ Multiset.map f s.val, x = 0
b : β
bs : b ∈ s
⊢ b ∈ s.val ∧ f b = f b
state_after: no goals

tactic: intro a as
state_before: case mpr
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
h : ∀ x ∈ s, f x = 0
⊢ ∀ x ∈ Multiset.map f s.val, x = 0
state_after: case mpr
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
h : ∀ x ∈ s, f x = 0
a : α
as : a ∈ Multiset.map f s.val
⊢ a = 0

tactic: rw [Multiset.mem_map] at as
state_before: case mpr
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
h : ∀ x ∈ s, f x = 0
a : α
as : a ∈ Multiset.map f s.val
⊢ a = 0
state_after: case mpr
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
h : ∀ x ∈ s, f x = 0
a : α
as : ∃ a_1 ∈ s.val, f a_1 = a
⊢ a = 0

tactic: rcases as with ⟨b, ⟨bs, rfl⟩⟩
state_before: case mpr
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
h : ∀ x ∈ s, f x = 0
a : α
as : ∃ a_1 ∈ s.val, f a_1 = a
⊢ a = 0
state_after: case mpr.intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
h : ∀ x ∈ s, f x = 0
b : β
bs : b ∈ s.val
⊢ f b = 0

tactic: apply h b (mem_def.1 bs)
state_before: case mpr.intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
h : ∀ x ∈ s, f x = 0
b : β
bs : b ∈ s.val
⊢ f b = 0
state_after: no goals