Theorem: Algebra.adjoin_restrictScalars
File: Mathlib/RingTheory/Adjoin/Tower.lean

tactic: suffices
  Set.range (algebraMap D E) =
    Set.range (algebraMap ((⊤ : Subalgebra C D).map (IsScalarTower.toAlgHom C D E)) E) by
  ext x
  change x ∈ Subsemiring.closure (_ ∪ S) ↔ x ∈ Subsemiring.closure (_ ∪ S)
  rw [this]
state_before: R : Type u
S✝ : Type v
A : Type w
B : Type u₁
C : Type u_1
D : Type u_2
E : Type u_3
inst✝⁶ : CommSemiring C
inst✝⁵ : CommSemiring D
inst✝⁴ : CommSemiring E
inst✝³ : Algebra C D
inst✝² : Algebra C E
inst✝¹ : Algebra D E
inst✝ : IsScalarTower C D E
S : Set E
⊢ Subalgebra.restrictScalars C (adjoin D S) =
    Subalgebra.restrictScalars C (adjoin { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } S)

tactic: ext x
state_before: R : Type u
S✝ : Type v
A : Type w
B : Type u₁
C : Type u_1
D : Type u_2
E : Type u_3
inst✝⁶ : CommSemiring C
inst✝⁵ : CommSemiring D
inst✝⁴ : CommSemiring E
inst✝³ : Algebra C D
inst✝² : Algebra C E
inst✝¹ : Algebra D E
inst✝ : IsScalarTower C D E
S : Set E
⊢ Set.range ↑(algebraMap D E) = Set.range ↑(algebraMap { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } E)

tactic: constructor
state_before: case h
R : Type u
S✝ : Type v
A : Type w
B : Type u₁
C : Type u_1
D : Type u_2
E : Type u_3
inst✝⁶ : CommSemiring C
inst✝⁵ : CommSemiring D
inst✝⁴ : CommSemiring E
inst✝³ : Algebra C D
inst✝² : Algebra C E
inst✝¹ : Algebra D E
inst✝ : IsScalarTower C D E
S : Set E
x : E
⊢ x ∈ Set.range ↑(algebraMap D E) ↔
    x ∈ Set.range ↑(algebraMap { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } E)

tactic: ext x
state_before: R : Type u
S✝ : Type v
A : Type w
B : Type u₁
C : Type u_1
D : Type u_2
E : Type u_3
inst✝⁶ : CommSemiring C
inst✝⁵ : CommSemiring D
inst✝⁴ : CommSemiring E
inst✝³ : Algebra C D
inst✝² : Algebra C E
inst✝¹ : Algebra D E
inst✝ : IsScalarTower C D E
S : Set E
this :
  Set.range ↑(algebraMap D E) = Set.range ↑(algebraMap { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } E)
⊢ Subalgebra.restrictScalars C (adjoin D S) =
    Subalgebra.restrictScalars C (adjoin { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } S)

tactic: change x ∈ Subsemiring.closure (_ ∪ S) ↔ x ∈ Subsemiring.closure (_ ∪ S)
state_before: case h
R : Type u
S✝ : Type v
A : Type w
B : Type u₁
C : Type u_1
D : Type u_2
E : Type u_3
inst✝⁶ : CommSemiring C
inst✝⁵ : CommSemiring D
inst✝⁴ : CommSemiring E
inst✝³ : Algebra C D
inst✝² : Algebra C E
inst✝¹ : Algebra D E
inst✝ : IsScalarTower C D E
S : Set E
this :
  Set.range ↑(algebraMap D E) = Set.range ↑(algebraMap { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } E)
x : E
⊢ x ∈ Subalgebra.restrictScalars C (adjoin D S) ↔
    x ∈ Subalgebra.restrictScalars C (adjoin { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } S)

tactic: rw [this]
state_before: case h
R : Type u
S✝ : Type v
A : Type w
B : Type u₁
C : Type u_1
D : Type u_2
E : Type u_3
inst✝⁶ : CommSemiring C
inst✝⁵ : CommSemiring D
inst✝⁴ : CommSemiring E
inst✝³ : Algebra C D
inst✝² : Algebra C E
inst✝¹ : Algebra D E
inst✝ : IsScalarTower C D E
S : Set E
this :
  Set.range ↑(algebraMap D E) = Set.range ↑(algebraMap { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } E)
x : E
⊢ x ∈ Subsemiring.closure (Set.range ↑(algebraMap D E) ∪ S) ↔
    x ∈ Subsemiring.closure (Set.range ↑(algebraMap { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } E) ∪ S)

tactic: rintro ⟨y, hy⟩
state_before: case h.mp
R : Type u
S✝ : Type v
A : Type w
B : Type u₁
C : Type u_1
D : Type u_2
E : Type u_3
inst✝⁶ : CommSemiring C
inst✝⁵ : CommSemiring D
inst✝⁴ : CommSemiring E
inst✝³ : Algebra C D
inst✝² : Algebra C E
inst✝¹ : Algebra D E
inst✝ : IsScalarTower C D E
S : Set E
x : E
⊢ x ∈ Set.range ↑(algebraMap D E) →
    x ∈ Set.range ↑(algebraMap { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } E)

tactic: exact ⟨⟨algebraMap D E y, ⟨y, ⟨Algebra.mem_top, rfl⟩⟩⟩, hy⟩
state_before: case h.mp.intro
R : Type u
S✝ : Type v
A : Type w
B : Type u₁
C : Type u_1
D : Type u_2
E : Type u_3
inst✝⁶ : CommSemiring C
inst✝⁵ : CommSemiring D
inst✝⁴ : CommSemiring E
inst✝³ : Algebra C D
inst✝² : Algebra C E
inst✝¹ : Algebra D E
inst✝ : IsScalarTower C D E
S : Set E
x : E
y : D
hy : ↑(algebraMap D E) y = x
⊢ x ∈ Set.range ↑(algebraMap { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } E)

tactic: rintro ⟨⟨y, ⟨z, ⟨h0, h1⟩⟩⟩, h2⟩
state_before: case h.mpr
R : Type u
S✝ : Type v
A : Type w
B : Type u₁
C : Type u_1
D : Type u_2
E : Type u_3
inst✝⁶ : CommSemiring C
inst✝⁵ : CommSemiring D
inst✝⁴ : CommSemiring E
inst✝³ : Algebra C D
inst✝² : Algebra C E
inst✝¹ : Algebra D E
inst✝ : IsScalarTower C D E
S : Set E
x : E
⊢ x ∈ Set.range ↑(algebraMap { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } E) →
    x ∈ Set.range ↑(algebraMap D E)

tactic: exact ⟨z, Eq.trans h1 h2⟩
state_before: case h.mpr.intro.mk.intro.intro
R : Type u
S✝ : Type v
A : Type w
B : Type u₁
C : Type u_1
D : Type u_2
E : Type u_3
inst✝⁶ : CommSemiring C
inst✝⁵ : CommSemiring D
inst✝⁴ : CommSemiring E
inst✝³ : Algebra C D
inst✝² : Algebra C E
inst✝¹ : Algebra D E
inst✝ : IsScalarTower C D E
S : Set E
x y : E
z : D
h0 : z ∈ ↑⊤.toSubsemiring
h1 : ↑↑(IsScalarTower.toAlgHom C D E) z = y
h2 :
  ↑(algebraMap { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } E)
      { val := y, property := (_ : ∃ a, a ∈ ↑⊤.toSubsemiring ∧ ↑↑(IsScalarTower.toAlgHom C D E) a = y) } =
    x
⊢ x ∈ Set.range ↑(algebraMap D E)