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

tactic: induction h
state_before: M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type ?u.66965
inst✝ : AddMonoid A
t : Set A
s : Set M
a : M
h : a ∈ Closure s
⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a

tactic: case basic a ha => exists [a]; simp [ha]
state_before: case basic
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type ?u.66965
inst✝ : AddMonoid A
t : Set A
s : Set M
a a✝¹ : M
a✝ : a✝¹ ∈ s
⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a✝¹

case one
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type ?u.66965
inst✝ : AddMonoid A
t : Set A
s : Set M
a : M
⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = 1

case mul
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type ?u.66965
inst✝ : AddMonoid A
t : Set A
s : Set M
a a✝² b✝ : M
a✝¹ : InClosure s a✝²
a✝ : InClosure s b✝
a_ih✝¹ : ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a✝²
a_ih✝ : ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = b✝
⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a✝² * b✝

tactic: case one => exists []; simp
state_before: case one
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type ?u.66965
inst✝ : AddMonoid A
t : Set A
s : Set M
a : M
⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = 1

case mul
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type ?u.66965
inst✝ : AddMonoid A
t : Set A
s : Set M
a a✝² b✝ : M
a✝¹ : InClosure s a✝²
a✝ : InClosure s b✝
a_ih✝¹ : ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a✝²
a_ih✝ : ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = b✝
⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a✝² * b✝

tactic: case mul a b _ _ ha hb =>
  rcases ha with ⟨la, ha, eqa⟩
  rcases hb with ⟨lb, hb, eqb⟩
  exists la ++ lb
  simp [eqa.symm, eqb.symm, or_imp]
  exact fun a => ⟨ha a, hb a⟩
state_before: case mul
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type ?u.66965
inst✝ : AddMonoid A
t : Set A
s : Set M
a a✝² b✝ : M
a✝¹ : InClosure s a✝²
a✝ : InClosure s b✝
a_ih✝¹ : ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a✝²
a_ih✝ : ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = b✝
⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a✝² * b✝

tactic: exists [a]
state_before: M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type ?u.66965
inst✝ : AddMonoid A
t : Set A
s : Set M
a✝ a : M
ha : a ∈ s
⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a

tactic: simp [ha]
state_before: M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type ?u.66965
inst✝ : AddMonoid A
t : Set A
s : Set M
a✝ a : M
ha : a ∈ s
⊢ (∀ (x : M), x ∈ [a] → x ∈ s) ∧ List.prod [a] = a

tactic: exists []
state_before: M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type ?u.66965
inst✝ : AddMonoid A
t : Set A
s : Set M
a : M
⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = 1

tactic: simp
state_before: M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type ?u.66965
inst✝ : AddMonoid A
t : Set A
s : Set M
a : M
⊢ (∀ (x : M), x ∈ [] → x ∈ s) ∧ List.prod [] = 1

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

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

tactic: exists la ++ lb
state_before: case intro.intro.intro.intro
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type ?u.66965
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 : M), x ∈ la → x ∈ s
eqa : List.prod la = a
lb : List M
hb : ∀ (x : M), x ∈ lb → x ∈ s
eqb : List.prod lb = b
⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a * b

tactic: simp [eqa.symm, eqb.symm, or_imp]
state_before: case intro.intro.intro.intro
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type ?u.66965
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 : M), x ∈ la → x ∈ s
eqa : List.prod la = a
lb : List M
hb : ∀ (x : M), x ∈ lb → x ∈ s
eqb : List.prod lb = b
⊢ (∀ (x : M), x ∈ la ++ lb → x ∈ s) ∧ List.prod (la ++ lb) = a * b

tactic: exact fun a => ⟨ha a, hb a⟩
state_before: case intro.intro.intro.intro
M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type ?u.66965
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 : M), x ∈ la → x ∈ s
eqa : List.prod la = a
lb : List M
hb : ∀ (x : M), x ∈ lb → x ∈ s
eqb : List.prod lb = b
⊢ ∀ (x : M), (x ∈ la → x ∈ s) ∧ (x ∈ lb → x ∈ s)