Theorem: MonoidAlgebra.exists_finset_adjoin_eq_top
File: Mathlib/RingTheory/FiniteType.lean

tactic: obtain ⟨S, hS⟩ := h
state_before: R : Type u_1
M : Type u_2
inst✝¹ : CommRing R
inst✝ : Monoid M
h : FiniteType R (MonoidAlgebra R M)
⊢ ∃ G, adjoin R (⇑(of R M) '' ↑G) = ⊤
state_after: case mk.intro
R : Type u_1
M : Type u_2
inst✝¹ : CommRing R
inst✝ : Monoid M
S : Finset (MonoidAlgebra R M)
hS : adjoin R ↑S = ⊤
⊢ ∃ G, adjoin R (⇑(of R M) '' ↑G) = ⊤

tactic: letI : DecidableEq M := Classical.decEq M
state_before: case mk.intro
R : Type u_1
M : Type u_2
inst✝¹ : CommRing R
inst✝ : Monoid M
S : Finset (MonoidAlgebra R M)
hS : adjoin R ↑S = ⊤
⊢ ∃ G, adjoin R (⇑(of R M) '' ↑G) = ⊤
state_after: case mk.intro
R : Type u_1
M : Type u_2
inst✝¹ : CommRing R
inst✝ : Monoid M
S : Finset (MonoidAlgebra R M)
hS : adjoin R ↑S = ⊤
this : DecidableEq M := Classical.decEq M
⊢ ∃ G, adjoin R (⇑(of R M) '' ↑G) = ⊤

tactic: use Finset.biUnion S fun f => f.support
state_before: case mk.intro
R : Type u_1
M : Type u_2
inst✝¹ : CommRing R
inst✝ : Monoid M
S : Finset (MonoidAlgebra R M)
hS : adjoin R ↑S = ⊤
this : DecidableEq M := Classical.decEq M
⊢ ∃ G, adjoin R (⇑(of R M) '' ↑G) = ⊤
state_after: case h
R : Type u_1
M : Type u_2
inst✝¹ : CommRing R
inst✝ : Monoid M
S : Finset (MonoidAlgebra R M)
hS : adjoin R ↑S = ⊤
this : DecidableEq M := Classical.decEq M
⊢ adjoin R (⇑(of R M) '' ↑(S.biUnion fun f => f.support)) = ⊤

tactic: have : (Finset.biUnion S fun f => f.support : Set M) = ⋃ f ∈ S, (f.support : Set M) := by
  simp only [Finset.set_biUnion_coe, Finset.coe_biUnion]
state_before: case h
R : Type u_1
M : Type u_2
inst✝¹ : CommRing R
inst✝ : Monoid M
S : Finset (MonoidAlgebra R M)
hS : adjoin R ↑S = ⊤
this : DecidableEq M := Classical.decEq M
⊢ adjoin R (⇑(of R M) '' ↑(S.biUnion fun f => f.support)) = ⊤
state_after: case h
R : Type u_1
M : Type u_2
inst✝¹ : CommRing R
inst✝ : Monoid M
S : Finset (MonoidAlgebra R M)
hS : adjoin R ↑S = ⊤
this✝ : DecidableEq M := Classical.decEq M
this : ↑(S.biUnion fun f => f.support) = ⋃ f ∈ S, ↑f.support
⊢ adjoin R (⇑(of R M) '' ↑(S.biUnion fun f => f.support)) = ⊤

tactic: rw [this]
state_before: case h
R : Type u_1
M : Type u_2
inst✝¹ : CommRing R
inst✝ : Monoid M
S : Finset (MonoidAlgebra R M)
hS : adjoin R ↑S = ⊤
this✝ : DecidableEq M := Classical.decEq M
this : ↑(S.biUnion fun f => f.support) = ⋃ f ∈ S, ↑f.support
⊢ adjoin R (⇑(of R M) '' ↑(S.biUnion fun f => f.support)) = ⊤
state_after: case h
R : Type u_1
M : Type u_2
inst✝¹ : CommRing R
inst✝ : Monoid M
S : Finset (MonoidAlgebra R M)
hS : adjoin R ↑S = ⊤
this✝ : DecidableEq M := Classical.decEq M
this : ↑(S.biUnion fun f => f.support) = ⋃ f ∈ S, ↑f.support
⊢ adjoin R (⇑(of R M) '' ⋃ f ∈ S, ↑f.support) = ⊤

tactic: exact support_gen_of_gen' hS
state_before: case h
R : Type u_1
M : Type u_2
inst✝¹ : CommRing R
inst✝ : Monoid M
S : Finset (MonoidAlgebra R M)
hS : adjoin R ↑S = ⊤
this✝ : DecidableEq M := Classical.decEq M
this : ↑(S.biUnion fun f => f.support) = ⋃ f ∈ S, ↑f.support
⊢ adjoin R (⇑(of R M) '' ⋃ f ∈ S, ↑f.support) = ⊤
state_after: no goals

tactic: simp only [Finset.set_biUnion_coe, Finset.coe_biUnion]
state_before: R : Type u_1
M : Type u_2
inst✝¹ : CommRing R
inst✝ : Monoid M
S : Finset (MonoidAlgebra R M)
hS : adjoin R ↑S = ⊤
this : DecidableEq M := Classical.decEq M
⊢ ↑(S.biUnion fun f => f.support) = ⋃ f ∈ S, ↑f.support
state_after: no goals