Theorem: Submonoid.closure_eq_one_union
File: Mathlib/Algebra/Group/Submonoid/Basic.lean

tactic: apply le_antisymm
state_before: M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
⊢ ↑(closure s) = {1} ∪ ↑(Subsemigroup.closure s)
state_after: case a
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
⊢ ↑(closure s) ≤ {1} ∪ ↑(Subsemigroup.closure s)

case a
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
⊢ {1} ∪ ↑(Subsemigroup.closure s) ≤ ↑(closure s)

tactic: intro x hx
state_before: case a
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
⊢ ↑(closure s) ≤ {1} ∪ ↑(Subsemigroup.closure s)
state_after: case a
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x : M
hx : x ∈ ↑(closure s)
⊢ x ∈ {1} ∪ ↑(Subsemigroup.closure s)

tactic: induction hx using closure_induction' with
| mem x hx => exact Or.inr <| Subsemigroup.subset_closure hx
| one => exact Or.inl <| by simp
| mul x hx y hy hx hy =>
  simp only [singleton_union, mem_insert_iff, SetLike.mem_coe] at hx hy
  obtain ⟨(rfl | hx), (rfl | hy)⟩ := And.intro hx hy
  all_goals simp_all
  exact Or.inr <| mul_mem hx hy
state_before: case a
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x : M
hx : x ∈ ↑(closure s)
⊢ x ∈ {1} ∪ ↑(Subsemigroup.closure s)
state_after: no goals

tactic: exact Or.inr <| Subsemigroup.subset_closure hx
state_before: case a.mem
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x✝ x : M
hx : x ∈ s
⊢ x ∈ {1} ∪ ↑(Subsemigroup.closure s)
state_after: no goals

tactic: exact Or.inl <| by simp
state_before: case a.one
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x : M
⊢ 1 ∈ {1} ∪ ↑(Subsemigroup.closure s)
state_after: no goals

tactic: simp
state_before: M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x : M
⊢ 1 ∈ {1}
state_after: no goals

tactic: simp only [singleton_union, mem_insert_iff, SetLike.mem_coe] at hx hy
state_before: case a.mul
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x✝ x : M
hx✝ : x ∈ closure s
y : M
hy✝ : y ∈ closure s
hx : x ∈ {1} ∪ ↑(Subsemigroup.closure s)
hy : y ∈ {1} ∪ ↑(Subsemigroup.closure s)
⊢ x * y ∈ {1} ∪ ↑(Subsemigroup.closure s)
state_after: case a.mul
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x✝ x : M
hx✝ : x ∈ closure s
y : M
hy✝ : y ∈ closure s
hx : x = 1 ∨ x ∈ Subsemigroup.closure s
hy : y = 1 ∨ y ∈ Subsemigroup.closure s
⊢ x * y ∈ {1} ∪ ↑(Subsemigroup.closure s)

tactic: obtain ⟨(rfl | hx), (rfl | hy)⟩ := And.intro hx hy
state_before: case a.mul
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x✝ x : M
hx✝ : x ∈ closure s
y : M
hy✝ : y ∈ closure s
hx : x = 1 ∨ x ∈ Subsemigroup.closure s
hy : y = 1 ∨ y ∈ Subsemigroup.closure s
⊢ x * y ∈ {1} ∪ ↑(Subsemigroup.closure s)
state_after: case a.mul.intro.inl.inl
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x : M
hx✝ : 1 ∈ closure s
hx : 1 = 1 ∨ 1 ∈ Subsemigroup.closure s
hy✝ : 1 ∈ closure s
hy : 1 = 1 ∨ 1 ∈ Subsemigroup.closure s
⊢ 1 * 1 ∈ {1} ∪ ↑(Subsemigroup.closure s)

case a.mul.intro.inl.inr
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x y : M
hy✝¹ : y ∈ closure s
hy✝ : y = 1 ∨ y ∈ Subsemigroup.closure s
hx✝ : 1 ∈ closure s
hx : 1 = 1 ∨ 1 ∈ Subsemigroup.closure s
hy : y ∈ Subsemigroup.closure s
⊢ 1 * y ∈ {1} ∪ ↑(Subsemigroup.closure s)

case a.mul.intro.inr.inl
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x✝ x : M
hx✝¹ : x ∈ closure s
hx✝ : x = 1 ∨ x ∈ Subsemigroup.closure s
hx : x ∈ Subsemigroup.closure s
hy✝ : 1 ∈ closure s
hy : 1 = 1 ∨ 1 ∈ Subsemigroup.closure s
⊢ x * 1 ∈ {1} ∪ ↑(Subsemigroup.closure s)

case a.mul.intro.inr.inr
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x✝ x : M
hx✝¹ : x ∈ closure s
y : M
hy✝¹ : y ∈ closure s
hx✝ : x = 1 ∨ x ∈ Subsemigroup.closure s
hy✝ : y = 1 ∨ y ∈ Subsemigroup.closure s
hx : x ∈ Subsemigroup.closure s
hy : y ∈ Subsemigroup.closure s
⊢ x * y ∈ {1} ∪ ↑(Subsemigroup.closure s)

tactic: all_goals simp_all
state_before: case a.mul.intro.inl.inl
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x : M
hx✝ : 1 ∈ closure s
hx : 1 = 1 ∨ 1 ∈ Subsemigroup.closure s
hy✝ : 1 ∈ closure s
hy : 1 = 1 ∨ 1 ∈ Subsemigroup.closure s
⊢ 1 * 1 ∈ {1} ∪ ↑(Subsemigroup.closure s)

case a.mul.intro.inl.inr
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x y : M
hy✝¹ : y ∈ closure s
hy✝ : y = 1 ∨ y ∈ Subsemigroup.closure s
hx✝ : 1 ∈ closure s
hx : 1 = 1 ∨ 1 ∈ Subsemigroup.closure s
hy : y ∈ Subsemigroup.closure s
⊢ 1 * y ∈ {1} ∪ ↑(Subsemigroup.closure s)

case a.mul.intro.inr.inl
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x✝ x : M
hx✝¹ : x ∈ closure s
hx✝ : x = 1 ∨ x ∈ Subsemigroup.closure s
hx : x ∈ Subsemigroup.closure s
hy✝ : 1 ∈ closure s
hy : 1 = 1 ∨ 1 ∈ Subsemigroup.closure s
⊢ x * 1 ∈ {1} ∪ ↑(Subsemigroup.closure s)

case a.mul.intro.inr.inr
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x✝ x : M
hx✝¹ : x ∈ closure s
y : M
hy✝¹ : y ∈ closure s
hx✝ : x = 1 ∨ x ∈ Subsemigroup.closure s
hy✝ : y = 1 ∨ y ∈ Subsemigroup.closure s
hx : x ∈ Subsemigroup.closure s
hy : y ∈ Subsemigroup.closure s
⊢ x * y ∈ {1} ∪ ↑(Subsemigroup.closure s)
state_after: case a.mul.intro.inr.inr
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x✝ x : M
hx✝ : x ∈ closure s
y : M
hy✝ : y ∈ closure s
hx : x ∈ Subsemigroup.closure s
hy : y ∈ Subsemigroup.closure s
⊢ x * y = 1 ∨ x * y ∈ Subsemigroup.closure s

tactic: exact Or.inr <| mul_mem hx hy
state_before: case a.mul.intro.inr.inr
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x✝ x : M
hx✝ : x ∈ closure s
y : M
hy✝ : y ∈ closure s
hx : x ∈ Subsemigroup.closure s
hy : y ∈ Subsemigroup.closure s
⊢ x * y = 1 ∨ x * y ∈ Subsemigroup.closure s
state_after: no goals

tactic: simp_all
state_before: case a.mul.intro.inr.inr
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x✝ x : M
hx✝¹ : x ∈ closure s
y : M
hy✝¹ : y ∈ closure s
hx✝ : x = 1 ∨ x ∈ Subsemigroup.closure s
hy✝ : y = 1 ∨ y ∈ Subsemigroup.closure s
hx : x ∈ Subsemigroup.closure s
hy : y ∈ Subsemigroup.closure s
⊢ x * y ∈ {1} ∪ ↑(Subsemigroup.closure s)
state_after: case a.mul.intro.inr.inr
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x✝ x : M
hx✝ : x ∈ closure s
y : M
hy✝ : y ∈ closure s
hx : x ∈ Subsemigroup.closure s
hy : y ∈ Subsemigroup.closure s
⊢ x * y = 1 ∨ x * y ∈ Subsemigroup.closure s

tactic: rintro x (hx | hx)
state_before: case a
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
⊢ {1} ∪ ↑(Subsemigroup.closure s) ≤ ↑(closure s)
state_after: case a.inl
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x : M
hx : x ∈ {1}
⊢ x ∈ ↑(closure s)

case a.inr
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x : M
hx : x ∈ ↑(Subsemigroup.closure s)
⊢ x ∈ ↑(closure s)

tactic: exact (show x = 1 by simpa using hx) ▸ one_mem (closure s)
state_before: case a.inl
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x : M
hx : x ∈ {1}
⊢ x ∈ ↑(closure s)
state_after: no goals

tactic: simpa using hx
state_before: M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x : M
hx : x ∈ {1}
⊢ x = 1
state_after: no goals

tactic: exact Subsemigroup.closure_le.mpr subset_closure hx
state_before: case a.inr
M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s✝ : Set M
inst✝ : AddZeroClass A
t : Set A
S : Submonoid M
s : Set M
x : M
hx : x ∈ ↑(Subsemigroup.closure s)
⊢ x ∈ ↑(closure s)
state_after: no goals