Theorem: Monoid.exists_list_of_mem_closure
File: Mathlib/Deprecated/Submonoid.lean

tactic: induction h with
| @basic a ha => exists [a]; simp [ha]
| one => exists []; simp
| mul _ _ ha hb =>
  rcases ha with ⟨la, ha, eqa⟩
  rcases hb with ⟨lb, hb, eqb⟩
  exists la ++ lb
  simp only [List.mem_append, or_imp, List.prod_append, eqa.symm, eqb.symm, and_true]
  exact fun a => ⟨ha a, hb a⟩
state_before: M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type u_2
inst✝ : AddMonoid A
t : Set A
s : Set M
a : M
h : a ∈ Closure s
⊢ ∃ l, (∀ x ∈ l, x ∈ s) ∧ l.prod = a
state_after: no goals

tactic: exists [a]
state_before: case basic
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type u_2
inst✝ : AddMonoid A
t : Set A
s : Set M
a✝ a : M
ha : a ∈ s
⊢ ∃ l, (∀ x ∈ l, x ∈ s) ∧ l.prod = a
state_after: case basic
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type u_2
inst✝ : AddMonoid A
t : Set A
s : Set M
a✝ a : M
ha : a ∈ s
⊢ (∀ x ∈ [a], x ∈ s) ∧ [a].prod = a

tactic: simp [ha]
state_before: case basic
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type u_2
inst✝ : AddMonoid A
t : Set A
s : Set M
a✝ a : M
ha : a ∈ s
⊢ (∀ x ∈ [a], x ∈ s) ∧ [a].prod = a
state_after: no goals

tactic: exists []
state_before: case one
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type u_2
inst✝ : AddMonoid A
t : Set A
s : Set M
a : M
⊢ ∃ l, (∀ x ∈ l, x ∈ s) ∧ l.prod = 1
state_after: case one
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type u_2
inst✝ : AddMonoid A
t : Set A
s : Set M
a : M
⊢ (∀ x ∈ [], x ∈ s) ∧ [].prod = 1

tactic: simp
state_before: case one
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type u_2
inst✝ : AddMonoid A
t : Set A
s : Set M
a : M
⊢ (∀ x ∈ [], x ∈ s) ∧ [].prod = 1
state_after: no goals

tactic: rcases ha with ⟨la, ha, eqa⟩
state_before: case mul
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type u_2
inst✝ : AddMonoid A
t : Set A
s : Set M
a a✝² b✝ : M
a✝¹ : InClosure s a✝²
a✝ : InClosure s b✝
ha : ∃ l, (∀ x ∈ l, x ∈ s) ∧ l.prod = a✝²
hb : ∃ l, (∀ x ∈ l, x ∈ s) ∧ l.prod = b✝
⊢ ∃ l, (∀ x ∈ l, x ∈ s) ∧ l.prod = a✝² * b✝
state_after: case mul.intro.intro
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type u_2
inst✝ : AddMonoid A
t : Set A
s : Set M
a a✝² b✝ : M
a✝¹ : InClosure s a✝²
a✝ : InClosure s b✝
hb : ∃ l, (∀ x ∈ l, x ∈ s) ∧ l.prod = b✝
la : List M
ha : ∀ x ∈ la, x ∈ s
eqa : la.prod = a✝²
⊢ ∃ l, (∀ x ∈ l, x ∈ s) ∧ l.prod = a✝² * b✝

tactic: rcases hb with ⟨lb, hb, eqb⟩
state_before: case mul.intro.intro
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type u_2
inst✝ : AddMonoid A
t : Set A
s : Set M
a a✝² b✝ : M
a✝¹ : InClosure s a✝²
a✝ : InClosure s b✝
hb : ∃ l, (∀ x ∈ l, x ∈ s) ∧ l.prod = b✝
la : List M
ha : ∀ x ∈ la, x ∈ s
eqa : la.prod = a✝²
⊢ ∃ l, (∀ x ∈ l, x ∈ s) ∧ l.prod = a✝² * b✝
state_after: case mul.intro.intro.intro.intro
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type u_2
inst✝ : AddMonoid A
t : Set A
s : Set M
a a✝² b✝ : M
a✝¹ : InClosure s a✝²
a✝ : InClosure s b✝
la : List M
ha : ∀ x ∈ la, x ∈ s
eqa : la.prod = a✝²
lb : List M
hb : ∀ x ∈ lb, x ∈ s
eqb : lb.prod = b✝
⊢ ∃ l, (∀ x ∈ l, x ∈ s) ∧ l.prod = a✝² * b✝

tactic: exists la ++ lb
state_before: case mul.intro.intro.intro.intro
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type u_2
inst✝ : AddMonoid A
t : Set A
s : Set M
a a✝² b✝ : M
a✝¹ : InClosure s a✝²
a✝ : InClosure s b✝
la : List M
ha : ∀ x ∈ la, x ∈ s
eqa : la.prod = a✝²
lb : List M
hb : ∀ x ∈ lb, x ∈ s
eqb : lb.prod = b✝
⊢ ∃ l, (∀ x ∈ l, x ∈ s) ∧ l.prod = a✝² * b✝
state_after: case mul.intro.intro.intro.intro
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type u_2
inst✝ : AddMonoid A
t : Set A
s : Set M
a a✝² b✝ : M
a✝¹ : InClosure s a✝²
a✝ : InClosure s b✝
la : List M
ha : ∀ x ∈ la, x ∈ s
eqa : la.prod = a✝²
lb : List M
hb : ∀ x ∈ lb, x ∈ s
eqb : lb.prod = b✝
⊢ (∀ x ∈ la ++ lb, x ∈ s) ∧ (la ++ lb).prod = a✝² * b✝

tactic: simp only [List.mem_append, or_imp, List.prod_append, eqa.symm, eqb.symm, and_true]
state_before: case mul.intro.intro.intro.intro
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type u_2
inst✝ : AddMonoid A
t : Set A
s : Set M
a a✝² b✝ : M
a✝¹ : InClosure s a✝²
a✝ : InClosure s b✝
la : List M
ha : ∀ x ∈ la, x ∈ s
eqa : la.prod = a✝²
lb : List M
hb : ∀ x ∈ lb, x ∈ s
eqb : lb.prod = b✝
⊢ (∀ x ∈ la ++ lb, x ∈ s) ∧ (la ++ lb).prod = a✝² * b✝
state_after: case mul.intro.intro.intro.intro
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type u_2
inst✝ : AddMonoid A
t : Set A
s : Set M
a a✝² b✝ : M
a✝¹ : InClosure s a✝²
a✝ : InClosure s b✝
la : List M
ha : ∀ x ∈ la, x ∈ s
eqa : la.prod = a✝²
lb : List M
hb : ∀ x ∈ lb, x ∈ s
eqb : lb.prod = b✝
⊢ ∀ (x : M), (x ∈ la → x ∈ s) ∧ (x ∈ lb → x ∈ s)

tactic: exact fun a => ⟨ha a, hb a⟩
state_before: case mul.intro.intro.intro.intro
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type u_2
inst✝ : AddMonoid A
t : Set A
s : Set M
a a✝² b✝ : M
a✝¹ : InClosure s a✝²
a✝ : InClosure s b✝
la : List M
ha : ∀ x ∈ la, x ∈ s
eqa : la.prod = a✝²
lb : List M
hb : ∀ x ∈ lb, x ∈ s
eqb : lb.prod = b✝
⊢ ∀ (x : M), (x ∈ la → x ∈ s) ∧ (x ∈ lb → x ∈ s)
state_after: no goals