Theorem: Algebra.pow_smul_mem_of_smul_subset_of_mem_adjoin
File: Mathlib/RingTheory/Adjoin/Basic.lean

tactic: replace hx : x ∈ Subalgebra.toSubmodule (adjoin R s) := hx
state_before: R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring A
inst✝⁴ : Algebra R A
s✝ t : Set A
inst✝³ : CommSemiring B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
r : A
s : Set B
B' : Subalgebra R B
hs : r • s ⊆ ↑B'
x : B
hx : x ∈ adjoin R s
hr : ↑(algebraMap A B) r ∈ B'
⊢ ∃ n₀, ∀ (n : ℕ), n ≥ n₀ → r ^ n • x ∈ B'

tactic: rw [adjoin_eq_span, Finsupp.mem_span_iff_total] at hx
state_before: R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring A
inst✝⁴ : Algebra R A
s✝ t : Set A
inst✝³ : CommSemiring B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
r : A
s : Set B
B' : Subalgebra R B
hs : r • s ⊆ ↑B'
x : B
hr : ↑(algebraMap A B) r ∈ B'
hx : x ∈ ↑Subalgebra.toSubmodule (adjoin R s)
⊢ ∃ n₀, ∀ (n : ℕ), n ≥ n₀ → r ^ n • x ∈ B'

tactic: rcases hx with ⟨l, rfl : (l.sum fun (i : Submonoid.closure s) (c : R) => c • (i : B)) = x⟩
state_before: R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring A
inst✝⁴ : Algebra R A
s✝ t : Set A
inst✝³ : CommSemiring B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
r : A
s : Set B
B' : Subalgebra R B
hs : r • s ⊆ ↑B'
x : B
hr : ↑(algebraMap A B) r ∈ B'
hx : ∃ l, ↑(Finsupp.total (↑↑(Submonoid.closure s)) B R Subtype.val) l = x
⊢ ∃ n₀, ∀ (n : ℕ), n ≥ n₀ → r ^ n • x ∈ B'

tactic: choose n₁ n₂ using fun x : Submonoid.closure s => Submonoid.pow_smul_mem_closure_smul r s x.prop
state_before: case intro
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring A
inst✝⁴ : Algebra R A
s✝ t : Set A
inst✝³ : CommSemiring B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
r : A
s : Set B
B' : Subalgebra R B
hs : r • s ⊆ ↑B'
hr : ↑(algebraMap A B) r ∈ B'
l : ↑↑(Submonoid.closure s) →₀ R
⊢ ∃ n₀, ∀ (n : ℕ), n ≥ n₀ → (r ^ n • Finsupp.sum l fun i c => c • ↑i) ∈ B'

tactic: use l.support.sup n₁
state_before: case intro
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring A
inst✝⁴ : Algebra R A
s✝ t : Set A
inst✝³ : CommSemiring B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
r : A
s : Set B
B' : Subalgebra R B
hs : r • s ⊆ ↑B'
hr : ↑(algebraMap A B) r ∈ B'
l : ↑↑(Submonoid.closure s) →₀ R
n₁ : { x // x ∈ Submonoid.closure s } → ℕ
n₂ : ∀ (x : { x // x ∈ Submonoid.closure s }), r ^ n₁ x • ↑x ∈ Submonoid.closure (r • s)
⊢ ∃ n₀, ∀ (n : ℕ), n ≥ n₀ → (r ^ n • Finsupp.sum l fun i c => c • ↑i) ∈ B'

tactic: intro n hn
state_before: case intro
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring A
inst✝⁴ : Algebra R A
s✝ t : Set A
inst✝³ : CommSemiring B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
r : A
s : Set B
B' : Subalgebra R B
hs : r • s ⊆ ↑B'
hr : ↑(algebraMap A B) r ∈ B'
l : ↑↑(Submonoid.closure s) →₀ R
n₁ : { x // x ∈ Submonoid.closure s } → ℕ
n₂ : ∀ (x : { x // x ∈ Submonoid.closure s }), r ^ n₁ x • ↑x ∈ Submonoid.closure (r • s)
⊢ ∀ (n : ℕ), n ≥ Finset.sup l.support n₁ → (r ^ n • Finsupp.sum l fun i c => c • ↑i) ∈ B'

tactic: rw [Finsupp.smul_sum]
state_before: case intro
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring A
inst✝⁴ : Algebra R A
s✝ t : Set A
inst✝³ : CommSemiring B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
r : A
s : Set B
B' : Subalgebra R B
hs : r • s ⊆ ↑B'
hr : ↑(algebraMap A B) r ∈ B'
l : ↑↑(Submonoid.closure s) →₀ R
n₁ : { x // x ∈ Submonoid.closure s } → ℕ
n₂ : ∀ (x : { x // x ∈ Submonoid.closure s }), r ^ n₁ x • ↑x ∈ Submonoid.closure (r • s)
n : ℕ
hn : n ≥ Finset.sup l.support n₁
⊢ (r ^ n • Finsupp.sum l fun i c => c • ↑i) ∈ B'

tactic: refine' B'.toSubmodule.sum_mem _
state_before: case intro
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring A
inst✝⁴ : Algebra R A
s✝ t : Set A
inst✝³ : CommSemiring B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
r : A
s : Set B
B' : Subalgebra R B
hs : r • s ⊆ ↑B'
hr : ↑(algebraMap A B) r ∈ B'
l : ↑↑(Submonoid.closure s) →₀ R
n₁ : { x // x ∈ Submonoid.closure s } → ℕ
n₂ : ∀ (x : { x // x ∈ Submonoid.closure s }), r ^ n₁ x • ↑x ∈ Submonoid.closure (r • s)
n : ℕ
hn : n ≥ Finset.sup l.support n₁
⊢ (Finsupp.sum l fun a b => r ^ n • b • ↑a) ∈ B'

tactic: intro a ha
state_before: case intro
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring A
inst✝⁴ : Algebra R A
s✝ t : Set A
inst✝³ : CommSemiring B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
r : A
s : Set B
B' : Subalgebra R B
hs : r • s ⊆ ↑B'
hr : ↑(algebraMap A B) r ∈ B'
l : ↑↑(Submonoid.closure s) →₀ R
n₁ : { x // x ∈ Submonoid.closure s } → ℕ
n₂ : ∀ (x : { x // x ∈ Submonoid.closure s }), r ^ n₁ x • ↑x ∈ Submonoid.closure (r • s)
n : ℕ
hn : n ≥ Finset.sup l.support n₁
⊢ ∀ (c : ↑↑(Submonoid.closure s)), c ∈ l.support → (fun a b => r ^ n • b • ↑a) c (↑l c) ∈ ↑Subalgebra.toSubmodule B'

tactic: have : n ≥ n₁ a := le_trans (Finset.le_sup ha) hn
state_before: case intro
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring A
inst✝⁴ : Algebra R A
s✝ t : Set A
inst✝³ : CommSemiring B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
r : A
s : Set B
B' : Subalgebra R B
hs : r • s ⊆ ↑B'
hr : ↑(algebraMap A B) r ∈ B'
l : ↑↑(Submonoid.closure s) →₀ R
n₁ : { x // x ∈ Submonoid.closure s } → ℕ
n₂ : ∀ (x : { x // x ∈ Submonoid.closure s }), r ^ n₁ x • ↑x ∈ Submonoid.closure (r • s)
n : ℕ
hn : n ≥ Finset.sup l.support n₁
a : ↑↑(Submonoid.closure s)
ha : a ∈ l.support
⊢ (fun a b => r ^ n • b • ↑a) a (↑l a) ∈ ↑Subalgebra.toSubmodule B'

tactic: dsimp only
state_before: case intro
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring A
inst✝⁴ : Algebra R A
s✝ t : Set A
inst✝³ : CommSemiring B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
r : A
s : Set B
B' : Subalgebra R B
hs : r • s ⊆ ↑B'
hr : ↑(algebraMap A B) r ∈ B'
l : ↑↑(Submonoid.closure s) →₀ R
n₁ : { x // x ∈ Submonoid.closure s } → ℕ
n₂ : ∀ (x : { x // x ∈ Submonoid.closure s }), r ^ n₁ x • ↑x ∈ Submonoid.closure (r • s)
n : ℕ
hn : n ≥ Finset.sup l.support n₁
a : ↑↑(Submonoid.closure s)
ha : a ∈ l.support
this : n ≥ n₁ a
⊢ (fun a b => r ^ n • b • ↑a) a (↑l a) ∈ ↑Subalgebra.toSubmodule B'

tactic: rw [← tsub_add_cancel_of_le this, pow_add, ← smul_smul, ←
  IsScalarTower.algebraMap_smul A (l a) (a : B), smul_smul (r ^ n₁ a), mul_comm, ← smul_smul,
  smul_def, map_pow, IsScalarTower.algebraMap_smul]
state_before: case intro
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring A
inst✝⁴ : Algebra R A
s✝ t : Set A
inst✝³ : CommSemiring B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
r : A
s : Set B
B' : Subalgebra R B
hs : r • s ⊆ ↑B'
hr : ↑(algebraMap A B) r ∈ B'
l : ↑↑(Submonoid.closure s) →₀ R
n₁ : { x // x ∈ Submonoid.closure s } → ℕ
n₂ : ∀ (x : { x // x ∈ Submonoid.closure s }), r ^ n₁ x • ↑x ∈ Submonoid.closure (r • s)
n : ℕ
hn : n ≥ Finset.sup l.support n₁
a : ↑↑(Submonoid.closure s)
ha : a ∈ l.support
this : n ≥ n₁ a
⊢ r ^ n • ↑l a • ↑a ∈ ↑Subalgebra.toSubmodule B'

tactic: apply Subalgebra.mul_mem _ (Subalgebra.pow_mem _ hr _) _
state_before: case intro
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring A
inst✝⁴ : Algebra R A
s✝ t : Set A
inst✝³ : CommSemiring B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
r : A
s : Set B
B' : Subalgebra R B
hs : r • s ⊆ ↑B'
hr : ↑(algebraMap A B) r ∈ B'
l : ↑↑(Submonoid.closure s) →₀ R
n₁ : { x // x ∈ Submonoid.closure s } → ℕ
n₂ : ∀ (x : { x // x ∈ Submonoid.closure s }), r ^ n₁ x • ↑x ∈ Submonoid.closure (r • s)
n : ℕ
hn : n ≥ Finset.sup l.support n₁
a : ↑↑(Submonoid.closure s)
ha : a ∈ l.support
this : n ≥ n₁ a
⊢ ↑(algebraMap A B) r ^ (n - n₁ a) * ↑l a • r ^ n₁ a • ↑a ∈ ↑Subalgebra.toSubmodule B'

tactic: refine' Subalgebra.smul_mem _ _ _
state_before: R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring A
inst✝⁴ : Algebra R A
s✝ t : Set A
inst✝³ : CommSemiring B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
r : A
s : Set B
B' : Subalgebra R B
hs : r • s ⊆ ↑B'
hr : ↑(algebraMap A B) r ∈ B'
l : ↑↑(Submonoid.closure s) →₀ R
n₁ : { x // x ∈ Submonoid.closure s } → ℕ
n₂ : ∀ (x : { x // x ∈ Submonoid.closure s }), r ^ n₁ x • ↑x ∈ Submonoid.closure (r • s)
n : ℕ
hn : n ≥ Finset.sup l.support n₁
a : ↑↑(Submonoid.closure s)
ha : a ∈ l.support
this : n ≥ n₁ a
⊢ ↑l a • r ^ n₁ a • ↑a ∈ B'

tactic: change _ ∈ B'.toSubmonoid
state_before: R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring A
inst✝⁴ : Algebra R A
s✝ t : Set A
inst✝³ : CommSemiring B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
r : A
s : Set B
B' : Subalgebra R B
hs : r • s ⊆ ↑B'
hr : ↑(algebraMap A B) r ∈ B'
l : ↑↑(Submonoid.closure s) →₀ R
n₁ : { x // x ∈ Submonoid.closure s } → ℕ
n₂ : ∀ (x : { x // x ∈ Submonoid.closure s }), r ^ n₁ x • ↑x ∈ Submonoid.closure (r • s)
n : ℕ
hn : n ≥ Finset.sup l.support n₁
a : ↑↑(Submonoid.closure s)
ha : a ∈ l.support
this : n ≥ n₁ a
⊢ r ^ n₁ a • ↑a ∈ B'

tactic: rw [← Submonoid.closure_eq B'.toSubmonoid]
state_before: R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring A
inst✝⁴ : Algebra R A
s✝ t : Set A
inst✝³ : CommSemiring B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
r : A
s : Set B
B' : Subalgebra R B
hs : r • s ⊆ ↑B'
hr : ↑(algebraMap A B) r ∈ B'
l : ↑↑(Submonoid.closure s) →₀ R
n₁ : { x // x ∈ Submonoid.closure s } → ℕ
n₂ : ∀ (x : { x // x ∈ Submonoid.closure s }), r ^ n₁ x • ↑x ∈ Submonoid.closure (r • s)
n : ℕ
hn : n ≥ Finset.sup l.support n₁
a : ↑↑(Submonoid.closure s)
ha : a ∈ l.support
this : n ≥ n₁ a
⊢ r ^ n₁ a • ↑a ∈ B'.toSubmonoid

tactic: apply Submonoid.closure_mono hs (n₂ a)
state_before: R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring A
inst✝⁴ : Algebra R A
s✝ t : Set A
inst✝³ : CommSemiring B
inst✝² : Algebra R B
inst✝¹ : Algebra A B
inst✝ : IsScalarTower R A B
r : A
s : Set B
B' : Subalgebra R B
hs : r • s ⊆ ↑B'
hr : ↑(algebraMap A B) r ∈ B'
l : ↑↑(Submonoid.closure s) →₀ R
n₁ : { x // x ∈ Submonoid.closure s } → ℕ
n₂ : ∀ (x : { x // x ∈ Submonoid.closure s }), r ^ n₁ x • ↑x ∈ Submonoid.closure (r • s)
n : ℕ
hn : n ≥ Finset.sup l.support n₁
a : ↑↑(Submonoid.closure s)
ha : a ∈ l.support
this : n ≥ n₁ a
⊢ r ^ n₁ a • ↑a ∈ Submonoid.closure ↑B'.toSubmonoid