l3lab/ntp-mathlib huggingface dataset:
/-- For an s-finite kernel `κ` and a function `f : α → β → ℝ≥0∞` which is everywhere finite,
`withDensity κ f` is s-finite. -/
nonrec theorem IsSFiniteKernel.withDensity (κ : kernel α β) [IsSFiniteKernel κ]
    (hf_ne_top : ∀ a b, f a b ≠ ∞) : IsSFiniteKernel (withDensity κ f) := by
  have h_eq_sum : withDensity κ f = kernel.sum fun i => withDensity (seq κ i) f := by
    rw [← withDensity_kernel_sum _ _]
    congr
    exact (kernel_sum_seq κ).symm
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ✝ : ↥(kernel α β)
f : α → β → ℝ≥0∞
κ : ↥(kernel α β)
inst✝ : IsSFiniteKernel κ
hf_ne_top : ∀ (a : α) (b : β), f a b ≠ ⊤
h_eq_sum : kernel.withDensity κ f = kernel.sum fun i => kernel.withDensity (seq κ i) f
⊢ IsSFiniteKernel (kernel.withDensity κ f)

Next tactic:
rw [h_eq_sum]
/-- For an s-finite kernel `κ` and a function `f : α → β → ℝ≥0∞` which is everywhere finite,
`withDensity κ f` is s-finite. -/
nonrec theorem IsSFiniteKernel.withDensity (κ : kernel α β) [IsSFiniteKernel κ]
    (hf_ne_top : ∀ a b, f a b ≠ ∞) : IsSFiniteKernel (withDensity κ f) := by
  have h_eq_sum : withDensity κ f = kernel.sum fun i => withDensity (seq κ i) f := by
    rw [← withDensity_kernel_sum _ _]
    congr
    exact (kernel_sum_seq κ).symm
  rw [h_eq_sum]
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ✝ : ↥(kernel α β)
f : α → β → ℝ≥0∞
κ : ↥(kernel α β)
inst✝ : IsSFiniteKernel κ
hf_ne_top : ∀ (a : α) (b : β), f a b ≠ ⊤
h_eq_sum : kernel.withDensity κ f = kernel.sum fun i => kernel.withDensity (seq κ i) f
⊢ IsSFiniteKernel (kernel.sum fun i => kernel.withDensity (seq κ i) f)

Next tactic:
exact isSFiniteKernel_sum fun n =>
    isSFiniteKernel_withDensity_of_isFiniteKernel (seq κ n) hf_ne_top
@[to_additive]
theorem image_op_smul : (op '' s) • t = t * s := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : Mul α
s t u : Set α
a : α
⊢ op '' s • t = t * s

Next tactic:
rw [← image2_smul, ← image2_mul, image2_image_left, image2_swap]
@[to_additive]
theorem image_op_smul : (op '' s) • t = t * s := by
  rw [← image2_smul, ← image2_mul, image2_image_left, image2_swap]
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : Mul α
s t u : Set α
a : α
⊢ image2 (fun a b => SMul.smul (op b) a) t s = image2 (fun x x_1 => x * x_1) t s

Next tactic:
rfl
@[to_additive vaddAssocClass]
instance isScalarTower [SMul α β] [SMul α γ] [SMul β γ] [IsScalarTower α β γ] :
    IsScalarTower α β (Set γ) where
  smul_assoc a b T := by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a✝ : α
b✝ : β
inst✝³ : SMul α β
inst✝² : SMul α γ
inst✝¹ : SMul β γ
inst✝ : IsScalarTower α β γ
a : α
b : β
T : Set γ
⊢ (a • b) • T = a • b • T

Next tactic:
simp only [← image_smul, image_image, smul_assoc]
/-- A multiplicative action of a monoid `α` on a type `β` gives a multiplicative action of `Set α`
on `Set β`. -/
@[to_additive
      "An additive action of an additive monoid `α` on a type `β` gives an additive action of
      `Set α` on `Set β`"]
protected def mulAction [Monoid α] [MulAction α β] : MulAction (Set α) (Set β) where
  mul_smul _ _ _ := image2_assoc mul_smul
  one_smul s := image2_singleton_left.trans <| by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
s✝ s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
inst✝¹ : Monoid α
inst✝ : MulAction α β
s : Set β
⊢ (fun x => 1 • x) '' s = s

Next tactic:
simp_rw [one_smul, image_id']
/-- A multiplicative action of a monoid on a type `β` gives a multiplicative action on `Set β`. -/
@[to_additive
      "An additive action of an additive monoid on a type `β` gives an additive action on `Set β`."]
protected def mulActionSet [Monoid α] [MulAction α β] : MulAction α (Set β) where
  mul_smul _ _ _ := by simp only [← image_smul, image_image, ← mul_smul]
  one_smul _ := by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
inst✝¹ : Monoid α
inst✝ : MulAction α β
x✝ : Set β
⊢ 1 • x✝ = x✝

Next tactic:
simp only [← image_smul, one_smul, image_id']
/-- A multiplicative action of a monoid on a type `β` gives a multiplicative action on `Set β`. -/
@[to_additive
      "An additive action of an additive monoid on a type `β` gives an additive action on `Set β`."]
protected def mulActionSet [Monoid α] [MulAction α β] : MulAction α (Set β) where
  mul_smul _ _ _ := by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
inst✝¹ : Monoid α
inst✝ : MulAction α β
x✝² x✝¹ : α
x✝ : Set β
⊢ (x✝² * x✝¹) • x✝ = x✝² • x✝¹ • x✝

Next tactic:
simp only [← image_smul, image_image, ← mul_smul]
/-- If scalar multiplication by elements of `α` sends `(0 : β)` to zero,
then the same is true for `(0 : Set β)`. -/
protected def smulZeroClassSet [Zero β] [SMulZeroClass α β] :
    SMulZeroClass α (Set β) where
  smul_zero _ := image_singleton.trans <| by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
inst✝¹ : Zero β
inst✝ : SMulZeroClass α β
x✝ : α
⊢ {x✝ • 0} = 0

Next tactic:
rw [smul_zero, singleton_zero]
/-- A multiplicative action of a monoid on a monoid `β` gives a multiplicative action on `Set β`. -/
protected def mulDistribMulActionSet [Monoid α] [Monoid β] [MulDistribMulAction α β] :
    MulDistribMulAction α (Set β) where
  smul_mul _ _ _ := image_image2_distrib <| smul_mul' _
  smul_one _ := image_singleton.trans <| by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
inst✝² : Monoid α
inst✝¹ : Monoid β
inst✝ : MulDistribMulAction α β
x✝ : α
⊢ {x✝ • 1} = 1

Next tactic:
rw [smul_one, singleton_one]
instance [Zero α] [Zero β] [SMul α β] [NoZeroSMulDivisors α β] :
    NoZeroSMulDivisors (Set α) (Set β) :=
  ⟨fun {s t} h ↦ by
    

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
s✝ s₁ s₂ : Set α
t✝ t₁ t₂ : Set β
a : α
b : β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : NoZeroSMulDivisors α β
s : Set α
t : Set β
h : s • t = 0
⊢ s = 0 ∨ t = 0

Next tactic:
by_contra! H
instance [Zero α] [Zero β] [SMul α β] [NoZeroSMulDivisors α β] :
    NoZeroSMulDivisors (Set α) (Set β) :=
  ⟨fun {s t} h ↦ by
    by_contra! H
    

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
s✝ s₁ s₂ : Set α
t✝ t₁ t₂ : Set β
a : α
b : β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : NoZeroSMulDivisors α β
s : Set α
t : Set β
h : s • t = 0
H : s ≠ 0 ∧ t ≠ 0
⊢ False

Next tactic:
have hst : (s • t).Nonempty := h.symm.subst zero_nonempty
instance [Zero α] [Zero β] [SMul α β] [NoZeroSMulDivisors α β] :
    NoZeroSMulDivisors (Set α) (Set β) :=
  ⟨fun {s t} h ↦ by
    by_contra! H
    have hst : (s • t).Nonempty := h.symm.subst zero_nonempty
    

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
s✝ s₁ s₂ : Set α
t✝ t₁ t₂ : Set β
a : α
b : β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : NoZeroSMulDivisors α β
s : Set α
t : Set β
h : s • t = 0
H : s ≠ 0 ∧ t ≠ 0
hst : Set.Nonempty (s • t)
⊢ False

Next tactic:
rw [Ne.def, ← hst.of_smul_left.subset_zero_iff, Ne.def,
      ← hst.of_smul_right.subset_zero_iff] at H
instance [Zero α] [Zero β] [SMul α β] [NoZeroSMulDivisors α β] :
    NoZeroSMulDivisors (Set α) (Set β) :=
  ⟨fun {s t} h ↦ by
    by_contra! H
    have hst : (s • t).Nonempty := h.symm.subst zero_nonempty
    rw [Ne.def, ← hst.of_smul_left.subset_zero_iff, Ne.def,
      ← hst.of_smul_right.subset_zero_iff] at H
    

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
s✝ s₁ s₂ : Set α
t✝ t₁ t₂ : Set β
a : α
b : β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : NoZeroSMulDivisors α β
s : Set α
t : Set β
h : s • t = 0
H : ¬s ⊆ 0 ∧ ¬t ⊆ 0
hst : Set.Nonempty (s • t)
⊢ False

Next tactic:
simp only [not_subset, mem_zero] at H
instance [Zero α] [Zero β] [SMul α β] [NoZeroSMulDivisors α β] :
    NoZeroSMulDivisors (Set α) (Set β) :=
  ⟨fun {s t} h ↦ by
    by_contra! H
    have hst : (s • t).Nonempty := h.symm.subst zero_nonempty
    rw [Ne.def, ← hst.of_smul_left.subset_zero_iff, Ne.def,
      ← hst.of_smul_right.subset_zero_iff] at H
    simp only [not_subset, mem_zero] at H
    

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
s✝ s₁ s₂ : Set α
t✝ t₁ t₂ : Set β
a : α
b : β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : NoZeroSMulDivisors α β
s : Set α
t : Set β
h : s • t = 0
hst : Set.Nonempty (s • t)
H : (∃ a ∈ s, ¬a = 0) ∧ ∃ a ∈ t, ¬a = 0
⊢ False

Next tactic:
obtain ⟨⟨a, hs, ha⟩, b, ht, hb⟩ := H
instance [Zero α] [Zero β] [SMul α β] [NoZeroSMulDivisors α β] :
    NoZeroSMulDivisors (Set α) (Set β) :=
  ⟨fun {s t} h ↦ by
    by_contra! H
    have hst : (s • t).Nonempty := h.symm.subst zero_nonempty
    rw [Ne.def, ← hst.of_smul_left.subset_zero_iff, Ne.def,
      ← hst.of_smul_right.subset_zero_iff] at H
    simp only [not_subset, mem_zero] at H
    obtain ⟨⟨a, hs, ha⟩, b, ht, hb⟩ := H
    

Proof state:
case intro.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
s✝ s₁ s₂ : Set α
t✝ t₁ t₂ : Set β
a✝ : α
b✝ : β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : NoZeroSMulDivisors α β
s : Set α
t : Set β
h : s • t = 0
hst : Set.Nonempty (s • t)
a : α
hs : a ∈ s
ha : ¬a = 0
b : β
ht : b ∈ t
hb : ¬b = 0
⊢ False

Next tactic:
exact (eq_zero_or_eq_zero_of_smul_eq_zero <| h.subset <| smul_mem_smul hs ht).elim ha hb
instance noZeroSMulDivisors_set [Zero α] [Zero β] [SMul α β] [NoZeroSMulDivisors α β] :
    NoZeroSMulDivisors α (Set β) :=
  ⟨fun {a s} h ↦ by
    

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
s✝ s₁ s₂ : Set α
t t₁ t₂ : Set β
a✝ : α
b : β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : NoZeroSMulDivisors α β
a : α
s : Set β
h : a • s = 0
⊢ a = 0 ∨ s = 0

Next tactic:
by_contra! H
instance noZeroSMulDivisors_set [Zero α] [Zero β] [SMul α β] [NoZeroSMulDivisors α β] :
    NoZeroSMulDivisors α (Set β) :=
  ⟨fun {a s} h ↦ by
    by_contra! H
    

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
s✝ s₁ s₂ : Set α
t t₁ t₂ : Set β
a✝ : α
b : β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : NoZeroSMulDivisors α β
a : α
s : Set β
h : a • s = 0
H : a ≠ 0 ∧ s ≠ 0
⊢ False

Next tactic:
have hst : (a • s).Nonempty := h.symm.subst zero_nonempty
instance noZeroSMulDivisors_set [Zero α] [Zero β] [SMul α β] [NoZeroSMulDivisors α β] :
    NoZeroSMulDivisors α (Set β) :=
  ⟨fun {a s} h ↦ by
    by_contra! H
    have hst : (a • s).Nonempty := h.symm.subst zero_nonempty
    

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
s✝ s₁ s₂ : Set α
t t₁ t₂ : Set β
a✝ : α
b : β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : NoZeroSMulDivisors α β
a : α
s : Set β
h : a • s = 0
H : a ≠ 0 ∧ s ≠ 0
hst : Set.Nonempty (a • s)
⊢ False

Next tactic:
rw [Ne.def, Ne.def, ← hst.of_image.subset_zero_iff, not_subset] at H
instance noZeroSMulDivisors_set [Zero α] [Zero β] [SMul α β] [NoZeroSMulDivisors α β] :
    NoZeroSMulDivisors α (Set β) :=
  ⟨fun {a s} h ↦ by
    by_contra! H
    have hst : (a • s).Nonempty := h.symm.subst zero_nonempty
    rw [Ne.def, Ne.def, ← hst.of_image.subset_zero_iff, not_subset] at H
    

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
s✝ s₁ s₂ : Set α
t t₁ t₂ : Set β
a✝ : α
b : β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : NoZeroSMulDivisors α β
a : α
s : Set β
h : a • s = 0
H : ¬a = 0 ∧ ∃ a ∈ s, a ∉ 0
hst : Set.Nonempty (a • s)
⊢ False

Next tactic:
obtain ⟨ha, b, ht, hb⟩ := H
instance noZeroSMulDivisors_set [Zero α] [Zero β] [SMul α β] [NoZeroSMulDivisors α β] :
    NoZeroSMulDivisors α (Set β) :=
  ⟨fun {a s} h ↦ by
    by_contra! H
    have hst : (a • s).Nonempty := h.symm.subst zero_nonempty
    rw [Ne.def, Ne.def, ← hst.of_image.subset_zero_iff, not_subset] at H
    obtain ⟨ha, b, ht, hb⟩ := H
    

Proof state:
case intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
s✝ s₁ s₂ : Set α
t t₁ t₂ : Set β
a✝ : α
b✝ : β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : NoZeroSMulDivisors α β
a : α
s : Set β
h : a • s = 0
hst : Set.Nonempty (a • s)
ha : ¬a = 0
b : β
ht : b ∈ s
hb : b ∉ 0
⊢ False

Next tactic:
exact (eq_zero_or_eq_zero_of_smul_eq_zero <| h.subset <| smul_mem_smul_set ht).elim ha hb
@[to_additive]
theorem op_smul_set_smul_eq_smul_smul_set (a : α) (s : Set β) (t : Set γ)
    (h : ∀ (a : α) (b : β) (c : γ), (op a • b) • c = b • a • c) : (op a • s) • t = s • a • t := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : SMul αᵐᵒᵖ β
inst✝¹ : SMul β γ
inst✝ : SMul α γ
a : α
s : Set β
t : Set γ
h : ∀ (a : α) (b : β) (c : γ), (op a • b) • c = b • a • c
⊢ (op a • s) • t = s • a • t

Next tactic:
ext
@[to_additive]
theorem op_smul_set_smul_eq_smul_smul_set (a : α) (s : Set β) (t : Set γ)
    (h : ∀ (a : α) (b : β) (c : γ), (op a • b) • c = b • a • c) : (op a • s) • t = s • a • t := by
  ext
  

Proof state:
case h
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : SMul αᵐᵒᵖ β
inst✝¹ : SMul β γ
inst✝ : SMul α γ
a : α
s : Set β
t : Set γ
h : ∀ (a : α) (b : β) (c : γ), (op a • b) • c = b • a • c
x✝ : γ
⊢ x✝ ∈ (op a • s) • t ↔ x✝ ∈ s • a • t

Next tactic:
simp [mem_smul, mem_smul_set, h]
theorem smul_zero_subset (s : Set α) : s • (0 : Set β) ⊆ 0 := by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : Zero α
inst✝¹ : Zero β
inst✝ : SMulWithZero α β
s✝ : Set α
t : Set β
s : Set α
⊢ s • 0 ⊆ 0

Next tactic:
simp [subset_def, mem_smul]
theorem zero_smul_subset (t : Set β) : (0 : Set α) • t ⊆ 0 := by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : Zero α
inst✝¹ : Zero β
inst✝ : SMulWithZero α β
s : Set α
t✝ t : Set β
⊢ 0 • t ⊆ 0

Next tactic:
simp [subset_def, mem_smul]
theorem Nonempty.smul_zero (hs : s.Nonempty) : s • (0 : Set β) = 0 :=
  s.smul_zero_subset.antisymm <| by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : Zero α
inst✝¹ : Zero β
inst✝ : SMulWithZero α β
s : Set α
t : Set β
hs : Set.Nonempty s
⊢ 0 ⊆ s • 0

Next tactic:
simpa [mem_smul] using hs
theorem Nonempty.zero_smul (ht : t.Nonempty) : (0 : Set α) • t = 0 :=
  t.zero_smul_subset.antisymm <| by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : Zero α
inst✝¹ : Zero β
inst✝ : SMulWithZero α β
s : Set α
t : Set β
ht : Set.Nonempty t
⊢ 0 ⊆ 0 • t

Next tactic:
simpa [mem_smul] using ht
/-- A nonempty set is scaled by zero to the singleton set containing 0. -/
theorem zero_smul_set {s : Set β} (h : s.Nonempty) : (0 : α) • s = (0 : Set β) := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : Zero α
inst✝¹ : Zero β
inst✝ : SMulWithZero α β
s✝ : Set α
t s : Set β
h : Set.Nonempty s
⊢ 0 • s = 0

Next tactic:
simp only [← image_smul, image_eta, zero_smul, h.image_const, singleton_zero]
theorem zero_mem_smul_iff :
    (0 : β) ∈ s • t ↔ (0 : α) ∈ s ∧ t.Nonempty ∨ (0 : β) ∈ t ∧ s.Nonempty := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMulWithZero α β
s : Set α
t : Set β
inst✝ : NoZeroSMulDivisors α β
a : α
⊢ 0 ∈ s • t ↔ 0 ∈ s ∧ Set.Nonempty t ∨ 0 ∈ t ∧ Set.Nonempty s

Next tactic:
constructor
theorem zero_mem_smul_iff :
    (0 : β) ∈ s • t ↔ (0 : α) ∈ s ∧ t.Nonempty ∨ (0 : β) ∈ t ∧ s.Nonempty := by
  constructor
  · 

Proof state:
case mp
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMulWithZero α β
s : Set α
t : Set β
inst✝ : NoZeroSMulDivisors α β
a : α
⊢ 0 ∈ s • t → 0 ∈ s ∧ Set.Nonempty t ∨ 0 ∈ t ∧ Set.Nonempty s

Next tactic:
rintro ⟨a, b, ha, hb, h⟩
theorem zero_mem_smul_iff :
    (0 : β) ∈ s • t ↔ (0 : α) ∈ s ∧ t.Nonempty ∨ (0 : β) ∈ t ∧ s.Nonempty := by
  constructor
  · rintro ⟨a, b, ha, hb, h⟩
    

Proof state:
case mp.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMulWithZero α β
s : Set α
t : Set β
inst✝ : NoZeroSMulDivisors α β
a✝ a : α
b : β
ha : a ∈ s
hb : b ∈ t
h : (fun x x_1 => x • x_1) a b = 0
⊢ 0 ∈ s ∧ Set.Nonempty t ∨ 0 ∈ t ∧ Set.Nonempty s

Next tactic:
obtain rfl | rfl := eq_zero_or_eq_zero_of_smul_eq_zero h
theorem zero_mem_smul_iff :
    (0 : β) ∈ s • t ↔ (0 : α) ∈ s ∧ t.Nonempty ∨ (0 : β) ∈ t ∧ s.Nonempty := by
  constructor
  · rintro ⟨a, b, ha, hb, h⟩
    obtain rfl | rfl := eq_zero_or_eq_zero_of_smul_eq_zero h
    · 

Proof state:
case mp.intro.intro.intro.intro.inl
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMulWithZero α β
s : Set α
t : Set β
inst✝ : NoZeroSMulDivisors α β
a : α
b : β
hb : b ∈ t
ha : 0 ∈ s
h : (fun x x_1 => x • x_1) 0 b = 0
⊢ 0 ∈ s ∧ Set.Nonempty t ∨ 0 ∈ t ∧ Set.Nonempty s

Next tactic:
exact Or.inl ⟨ha, b, hb⟩
theorem zero_mem_smul_iff :
    (0 : β) ∈ s • t ↔ (0 : α) ∈ s ∧ t.Nonempty ∨ (0 : β) ∈ t ∧ s.Nonempty := by
  constructor
  · rintro ⟨a, b, ha, hb, h⟩
    obtain rfl | rfl := eq_zero_or_eq_zero_of_smul_eq_zero h
    · exact Or.inl ⟨ha, b, hb⟩
    · 

Proof state:
case mp.intro.intro.intro.intro.inr
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMulWithZero α β
s : Set α
t : Set β
inst✝ : NoZeroSMulDivisors α β
a✝ a : α
ha : a ∈ s
hb : 0 ∈ t
h : (fun x x_1 => x • x_1) a 0 = 0
⊢ 0 ∈ s ∧ Set.Nonempty t ∨ 0 ∈ t ∧ Set.Nonempty s

Next tactic:
exact Or.inr ⟨hb, a, ha⟩
theorem zero_mem_smul_iff :
    (0 : β) ∈ s • t ↔ (0 : α) ∈ s ∧ t.Nonempty ∨ (0 : β) ∈ t ∧ s.Nonempty := by
  constructor
  · rintro ⟨a, b, ha, hb, h⟩
    obtain rfl | rfl := eq_zero_or_eq_zero_of_smul_eq_zero h
    · exact Or.inl ⟨ha, b, hb⟩
    · exact Or.inr ⟨hb, a, ha⟩
  · 

Proof state:
case mpr
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMulWithZero α β
s : Set α
t : Set β
inst✝ : NoZeroSMulDivisors α β
a : α
⊢ 0 ∈ s ∧ Set.Nonempty t ∨ 0 ∈ t ∧ Set.Nonempty s → 0 ∈ s • t

Next tactic:
rintro (⟨hs, b, hb⟩ | ⟨ht, a, ha⟩)
theorem zero_mem_smul_iff :
    (0 : β) ∈ s • t ↔ (0 : α) ∈ s ∧ t.Nonempty ∨ (0 : β) ∈ t ∧ s.Nonempty := by
  constructor
  · rintro ⟨a, b, ha, hb, h⟩
    obtain rfl | rfl := eq_zero_or_eq_zero_of_smul_eq_zero h
    · exact Or.inl ⟨ha, b, hb⟩
    · exact Or.inr ⟨hb, a, ha⟩
  · rintro (⟨hs, b, hb⟩ | ⟨ht, a, ha⟩)
    · 

Proof state:
case mpr.inl.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMulWithZero α β
s : Set α
t : Set β
inst✝ : NoZeroSMulDivisors α β
a : α
hs : 0 ∈ s
b : β
hb : b ∈ t
⊢ 0 ∈ s • t

Next tactic:
exact ⟨0, b, hs, hb, zero_smul _ _⟩
theorem zero_mem_smul_iff :
    (0 : β) ∈ s • t ↔ (0 : α) ∈ s ∧ t.Nonempty ∨ (0 : β) ∈ t ∧ s.Nonempty := by
  constructor
  · rintro ⟨a, b, ha, hb, h⟩
    obtain rfl | rfl := eq_zero_or_eq_zero_of_smul_eq_zero h
    · exact Or.inl ⟨ha, b, hb⟩
    · exact Or.inr ⟨hb, a, ha⟩
  · rintro (⟨hs, b, hb⟩ | ⟨ht, a, ha⟩)
    · exact ⟨0, b, hs, hb, zero_smul _ _⟩
    · 

Proof state:
case mpr.inr.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMulWithZero α β
s : Set α
t : Set β
inst✝ : NoZeroSMulDivisors α β
a✝ : α
ht : 0 ∈ t
a : α
ha : a ∈ s
⊢ 0 ∈ s • t

Next tactic:
exact ⟨a, 0, ha, ht, smul_zero _⟩
theorem zero_mem_smul_set_iff (ha : a ≠ 0) : (0 : β) ∈ a • t ↔ (0 : β) ∈ t := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMulWithZero α β
s : Set α
t : Set β
inst✝ : NoZeroSMulDivisors α β
a : α
ha : a ≠ 0
⊢ 0 ∈ a • t ↔ 0 ∈ t

Next tactic:
refine' ⟨_, zero_mem_smul_set⟩
theorem zero_mem_smul_set_iff (ha : a ≠ 0) : (0 : β) ∈ a • t ↔ (0 : β) ∈ t := by
  refine' ⟨_, zero_mem_smul_set⟩
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMulWithZero α β
s : Set α
t : Set β
inst✝ : NoZeroSMulDivisors α β
a : α
ha : a ≠ 0
⊢ 0 ∈ a • t → 0 ∈ t

Next tactic:
rintro ⟨b, hb, h⟩
theorem zero_mem_smul_set_iff (ha : a ≠ 0) : (0 : β) ∈ a • t ↔ (0 : β) ∈ t := by
  refine' ⟨_, zero_mem_smul_set⟩
  rintro ⟨b, hb, h⟩
  

Proof state:
case intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMulWithZero α β
s : Set α
t : Set β
inst✝ : NoZeroSMulDivisors α β
a : α
ha : a ≠ 0
b : β
hb : b ∈ t
h : (fun x => a • x) b = 0
⊢ 0 ∈ t

Next tactic:
rwa [(eq_zero_or_eq_zero_of_smul_eq_zero h).resolve_left ha] at hb
@[to_additive]
theorem mem_inv_smul_set_iff : x ∈ a⁻¹ • A ↔ a • x ∈ A := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : Group α
inst✝ : MulAction α β
s t A B : Set β
a : α
x : β
⊢ x ∈ a⁻¹ • A ↔ a • x ∈ A

Next tactic:
simp only [← image_smul, mem_image, inv_smul_eq_iff, exists_eq_right]
@[to_additive]
theorem smul_inter_ne_empty_iff {s t : Set α} {x : α} :
    x • s ∩ t ≠ ∅ ↔ ∃ a b, (a ∈ t ∧ b ∈ s) ∧ a * b⁻¹ = x := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : Group α
inst✝ : MulAction α β
s✝ t✝ A B : Set β
a : α
x✝ : β
s t : Set α
x : α
⊢ x • s ∩ t ≠ ∅ ↔ ∃ a b, (a ∈ t ∧ b ∈ s) ∧ a * b⁻¹ = x

Next tactic:
rw [← nonempty_iff_ne_empty]
@[to_additive]
theorem smul_inter_ne_empty_iff {s t : Set α} {x : α} :
    x • s ∩ t ≠ ∅ ↔ ∃ a b, (a ∈ t ∧ b ∈ s) ∧ a * b⁻¹ = x := by
  rw [← nonempty_iff_ne_empty]
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : Group α
inst✝ : MulAction α β
s✝ t✝ A B : Set β
a : α
x✝ : β
s t : Set α
x : α
⊢ Set.Nonempty (x • s ∩ t) ↔ ∃ a b, (a ∈ t ∧ b ∈ s) ∧ a * b⁻¹ = x

Next tactic:
constructor
@[to_additive]
theorem smul_inter_ne_empty_iff {s t : Set α} {x : α} :
    x • s ∩ t ≠ ∅ ↔ ∃ a b, (a ∈ t ∧ b ∈ s) ∧ a * b⁻¹ = x := by
  rw [← nonempty_iff_ne_empty]
  constructor
  · 

Proof state:
case mp
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : Group α
inst✝ : MulAction α β
s✝ t✝ A B : Set β
a : α
x✝ : β
s t : Set α
x : α
⊢ Set.Nonempty (x • s ∩ t) → ∃ a b, (a ∈ t ∧ b ∈ s) ∧ a * b⁻¹ = x

Next tactic:
rintro ⟨a, h, ha⟩
@[to_additive]
theorem smul_inter_ne_empty_iff {s t : Set α} {x : α} :
    x • s ∩ t ≠ ∅ ↔ ∃ a b, (a ∈ t ∧ b ∈ s) ∧ a * b⁻¹ = x := by
  rw [← nonempty_iff_ne_empty]
  constructor
  · rintro ⟨a, h, ha⟩
    

Proof state:
case mp.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : Group α
inst✝ : MulAction α β
s✝ t✝ A B : Set β
a✝ : α
x✝ : β
s t : Set α
x a : α
h : a ∈ x • s
ha : a ∈ t
⊢ ∃ a b, (a ∈ t ∧ b ∈ s) ∧ a * b⁻¹ = x

Next tactic:
obtain ⟨b, hb, rfl⟩ := mem_smul_set.mp h
@[to_additive]
theorem smul_inter_ne_empty_iff {s t : Set α} {x : α} :
    x • s ∩ t ≠ ∅ ↔ ∃ a b, (a ∈ t ∧ b ∈ s) ∧ a * b⁻¹ = x := by
  rw [← nonempty_iff_ne_empty]
  constructor
  · rintro ⟨a, h, ha⟩
    obtain ⟨b, hb, rfl⟩ := mem_smul_set.mp h
    

Proof state:
case mp.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : Group α
inst✝ : MulAction α β
s✝ t✝ A B : Set β
a : α
x✝ : β
s t : Set α
x b : α
hb : b ∈ s
h : x • b ∈ x • s
ha : x • b ∈ t
⊢ ∃ a b, (a ∈ t ∧ b ∈ s) ∧ a * b⁻¹ = x

Next tactic:
exact ⟨x • b, b, ⟨ha, hb⟩, by simp⟩
@[to_additive]
theorem smul_inter_ne_empty_iff {s t : Set α} {x : α} :
    x • s ∩ t ≠ ∅ ↔ ∃ a b, (a ∈ t ∧ b ∈ s) ∧ a * b⁻¹ = x := by
  rw [← nonempty_iff_ne_empty]
  constructor
  · rintro ⟨a, h, ha⟩
    obtain ⟨b, hb, rfl⟩ := mem_smul_set.mp h
    exact ⟨x • b, b, ⟨ha, hb⟩, by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : Group α
inst✝ : MulAction α β
s✝ t✝ A B : Set β
a : α
x✝ : β
s t : Set α
x b : α
hb : b ∈ s
h : x • b ∈ x • s
ha : x • b ∈ t
⊢ x • b * b⁻¹ = x

Next tactic:
simp
@[to_additive]
theorem smul_inter_ne_empty_iff {s t : Set α} {x : α} :
    x • s ∩ t ≠ ∅ ↔ ∃ a b, (a ∈ t ∧ b ∈ s) ∧ a * b⁻¹ = x := by
  rw [← nonempty_iff_ne_empty]
  constructor
  · rintro ⟨a, h, ha⟩
    obtain ⟨b, hb, rfl⟩ := mem_smul_set.mp h
    exact ⟨x • b, b, ⟨ha, hb⟩, by simp⟩
  · 

Proof state:
case mpr
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : Group α
inst✝ : MulAction α β
s✝ t✝ A B : Set β
a : α
x✝ : β
s t : Set α
x : α
⊢ (∃ a b, (a ∈ t ∧ b ∈ s) ∧ a * b⁻¹ = x) → Set.Nonempty (x • s ∩ t)

Next tactic:
rintro ⟨a, b, ⟨ha, hb⟩, rfl⟩