internlm/Lean-Github huggingface dataset:
Theorem: Submonoid.closure_mem_of_prod_mem
Proof state before:
case intro.refine_2.inl.intro
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ x ∈ closure {r | IsUnit r ∨ Prime r}
Tactic:
refine hind x (y*k) ?_ hs ?_
Proof state after:
case intro.refine_2.inl.intro.refine_1
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ x * (y * k) ∈ closure {r | IsUnit r ∨ Prime r}

case intro.refine_2.inl.intro.refine_2
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ Multiset.prod s = x * (y * k)
Theorem: Submonoid.closure_mem_of_prod_mem
Proof state before:
case intro.refine_2.inl.intro.refine_1
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ x * (y * k) ∈ closure {r | IsUnit r ∨ Prime r}

case intro.refine_2.inl.intro.refine_2
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ Multiset.prod s = x * (y * k)
Tactic:
simp only [← mul_assoc, ← hprod, ← Multiset.prod_cons, mul_comm]
Proof state after:
case intro.refine_2.inl.intro.refine_1
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ Multiset.prod (k ::ₘ a✝¹ ::ₘ s) ∈ closure {r | IsUnit r ∨ Prime r}

case intro.refine_2.inl.intro.refine_2
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ Multiset.prod s = x * (y * k)
Theorem: Submonoid.closure_mem_of_prod_mem
Proof state before:
case intro.refine_2.inl.intro.refine_1
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ Multiset.prod (k ::ₘ a✝¹ ::ₘ s) ∈ closure {r | IsUnit r ∨ Prime r}

case intro.refine_2.inl.intro.refine_2
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ Multiset.prod s = x * (y * k)
Tactic:
refine multiset_prod_mem _ _ (Multiset.forall_mem_cons.2 ⟨subset_closure (Set.mem_def.2 ?_),
  Multiset.forall_mem_cons.2 ⟨subset_closure (Set.mem_def.2 ?_), (fun t ht =>
  subset_closure (hs t ht))⟩⟩)
Proof state after:
case intro.refine_2.inl.intro.refine_1.refine_1
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ {r | IsUnit r ∨ Prime r} k

case intro.refine_2.inl.intro.refine_1.refine_2
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ {r | IsUnit r ∨ Prime r} a✝¹

case intro.refine_2.inl.intro.refine_2
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ Multiset.prod s = x * (y * k)
Theorem: Submonoid.closure_mem_of_prod_mem
Proof state before:
case intro.refine_2.inl.intro.refine_1.refine_1
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ {r | IsUnit r ∨ Prime r} k

case intro.refine_2.inl.intro.refine_1.refine_2
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ {r | IsUnit r ∨ Prime r} a✝¹

case intro.refine_2.inl.intro.refine_2
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ Multiset.prod s = x * (y * k)
Tactic:
left
Proof state after:
case intro.refine_2.inl.intro.refine_1.refine_1.h
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ IsUnit k

case intro.refine_2.inl.intro.refine_1.refine_2
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ {r | IsUnit r ∨ Prime r} a✝¹

case intro.refine_2.inl.intro.refine_2
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ Multiset.prod s = x * (y * k)
Theorem: Submonoid.closure_mem_of_prod_mem
Proof state before:
case intro.refine_2.inl.intro.refine_1.refine_1.h
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ IsUnit k

case intro.refine_2.inl.intro.refine_1.refine_2
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ {r | IsUnit r ∨ Prime r} a✝¹

case intro.refine_2.inl.intro.refine_2
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ Multiset.prod s = x * (y * k)
Tactic:
exact isUnit_of_mul_eq_one_right _ _ hk
Proof state after:
case intro.refine_2.inl.intro.refine_1.refine_2
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ {r | IsUnit r ∨ Prime r} a✝¹

case intro.refine_2.inl.intro.refine_2
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ Multiset.prod s = x * (y * k)
Theorem: Submonoid.closure_mem_of_prod_mem
Proof state before:
case intro.refine_2.inl.intro.refine_1.refine_2
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ {r | IsUnit r ∨ Prime r} a✝¹

case intro.refine_2.inl.intro.refine_2
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ Multiset.prod s = x * (y * k)
Tactic:
left
Proof state after:
case intro.refine_2.inl.intro.refine_1.refine_2.h
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ IsUnit a✝¹

case intro.refine_2.inl.intro.refine_2
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ Multiset.prod s = x * (y * k)
Theorem: Submonoid.closure_mem_of_prod_mem
Proof state before:
case intro.refine_2.inl.intro.refine_1.refine_2.h
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ IsUnit a✝¹

case intro.refine_2.inl.intro.refine_2
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ Multiset.prod s = x * (y * k)
Tactic:
exact ha₁
Proof state after:
case intro.refine_2.inl.intro.refine_2
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ Multiset.prod s = x * (y * k)
Theorem: Submonoid.closure_mem_of_prod_mem
Proof state before:
case intro.refine_2.inl.intro.refine_2
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ Multiset.prod s = x * (y * k)
Tactic:
rw [← mul_one s.prod, ← hk, ← mul_assoc, ← mul_assoc, mul_eq_mul_right_iff, mul_comm]
Proof state after:
case intro.refine_2.inl.intro.refine_2
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ a✝¹ * Multiset.prod s = x * y ∨ k = 0
Theorem: Submonoid.closure_mem_of_prod_mem
Proof state before:
case intro.refine_2.inl.intro.refine_2
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ a✝¹ * Multiset.prod s = x * y ∨ k = 0
Tactic:
left
Proof state after:
case intro.refine_2.inl.intro.refine_2.h
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ a✝¹ * Multiset.prod s = x * y
Theorem: Submonoid.closure_mem_of_prod_mem
Proof state before:
case intro.refine_2.inl.intro.refine_2.h
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₁ : IsUnit a✝¹
k : R
hk : a✝¹ * k = 1
⊢ a✝¹ * Multiset.prod s = x * y
Tactic:
exact hprod
Proof state after:
no goals
Theorem: Submonoid.closure_mem_of_prod_mem
Proof state before:
case intro.refine_2.inr
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₂ : Prime a✝¹
⊢ x ∈ closure {r | IsUnit r ∨ Prime r}
Tactic:
rcases ha₂.dvd_mul.1 (Dvd.intro _ hprod) with ⟨c, hc⟩ | ⟨c, hc⟩
Proof state after:
case intro.refine_2.inr.inl.intro
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₂ : Prime a✝¹
c : R
hc : x = a✝¹ * c
⊢ x ∈ closure {r | IsUnit r ∨ Prime r}

case intro.refine_2.inr.inr.intro
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₂ : Prime a✝¹
c : R
hc : y = a✝¹ * c
⊢ x ∈ closure {r | IsUnit r ∨ Prime r}
Theorem: Submonoid.closure_mem_of_prod_mem
Proof state before:
case intro.refine_2.inr.inl.intro
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₂ : Prime a✝¹
c : R
hc : x = a✝¹ * c
⊢ x ∈ closure {r | IsUnit r ∨ Prime r}

case intro.refine_2.inr.inr.intro
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₂ : Prime a✝¹
c : R
hc : y = a✝¹ * c
⊢ x ∈ closure {r | IsUnit r ∨ Prime r}
Tactic:
rw [hc]
Proof state after:
case intro.refine_2.inr.inl.intro
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₂ : Prime a✝¹
c : R
hc : x = a✝¹ * c
⊢ a✝¹ * c ∈ closure {r | IsUnit r ∨ Prime r}

case intro.refine_2.inr.inr.intro
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
m : Multiset R
a✝¹ : R
s : Multiset R
hind :
  ∀ (a b : R),
    a * b ∈ closure {r | IsUnit r ∨ Prime r} →
      (∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}) → Multiset.prod s = a * b → a ∈ closure {r | IsUnit r ∨ Prime r}
x y : R
a✝ : x * y ∈ closure {r | IsUnit r ∨ Prime r}
hs : ∀ y ∈ s, y ∈ {r | IsUnit r ∨ Prime r}
hprod : a✝¹ * Multiset.prod s = x * y
ha₂ : Prime a✝¹
c : R
hc : y = a✝¹ * c
⊢ x ∈ closure {r | IsUnit r ∨ Prime r}