[GOAL]
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : Semiring C
inst✝ : Algebra R C
p q : Subalgebra R A
h : (fun s => s.carrier) p = (fun s => s.carrier) q
⊢ p = q
[PROOFSTEP]
cases p
[GOAL]
case mk
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : Semiring C
inst✝ : Algebra R C
q : Subalgebra R A
toSubsemiring✝ : Subsemiring A
algebraMap_mem'✝ : ∀ (r : R), ↑(algebraMap R A) r ∈ toSubsemiring✝.carrier
h :
  (fun s => s.carrier) { toSubsemiring := toSubsemiring✝, algebraMap_mem' := algebraMap_mem'✝ } = (fun s => s.carrier) q
⊢ { toSubsemiring := toSubsemiring✝, algebraMap_mem' := algebraMap_mem'✝ } = q
[PROOFSTEP]
cases q
[GOAL]
case mk.mk
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : Semiring C
inst✝ : Algebra R C
toSubsemiring✝¹ : Subsemiring A
algebraMap_mem'✝¹ : ∀ (r : R), ↑(algebraMap R A) r ∈ toSubsemiring✝¹.carrier
toSubsemiring✝ : Subsemiring A
algebraMap_mem'✝ : ∀ (r : R), ↑(algebraMap R A) r ∈ toSubsemiring✝.carrier
h :
  (fun s => s.carrier) { toSubsemiring := toSubsemiring✝¹, algebraMap_mem' := algebraMap_mem'✝¹ } =
    (fun s => s.carrier) { toSubsemiring := toSubsemiring✝, algebraMap_mem' := algebraMap_mem'✝ }
⊢ { toSubsemiring := toSubsemiring✝¹, algebraMap_mem' := algebraMap_mem'✝¹ } =
    { toSubsemiring := toSubsemiring✝, algebraMap_mem' := algebraMap_mem'✝ }
[PROOFSTEP]
congr
[GOAL]
case mk.mk.e_toSubsemiring
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : Semiring C
inst✝ : Algebra R C
toSubsemiring✝¹ : Subsemiring A
algebraMap_mem'✝¹ : ∀ (r : R), ↑(algebraMap R A) r ∈ toSubsemiring✝¹.carrier
toSubsemiring✝ : Subsemiring A
algebraMap_mem'✝ : ∀ (r : R), ↑(algebraMap R A) r ∈ toSubsemiring✝.carrier
h :
  (fun s => s.carrier) { toSubsemiring := toSubsemiring✝¹, algebraMap_mem' := algebraMap_mem'✝¹ } =
    (fun s => s.carrier) { toSubsemiring := toSubsemiring✝, algebraMap_mem' := algebraMap_mem'✝ }
⊢ toSubsemiring✝¹ = toSubsemiring✝
[PROOFSTEP]
exact SetLike.coe_injective' h
[GOAL]
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : Semiring C
inst✝ : Algebra R C
S T : Subalgebra R A
h : S.toSubsemiring = T.toSubsemiring
x : A
⊢ x ∈ S ↔ x ∈ T
[PROOFSTEP]
rw [← mem_toSubsemiring, ← mem_toSubsemiring, h]
[GOAL]
R' : Type u'
R✝ : Type u
A✝ : Type v
B : Type w
C : Type w'
inst✝⁹ : CommSemiring R✝
inst✝⁸ : Semiring A✝
inst✝⁷ : Algebra R✝ A✝
inst✝⁶ : Semiring B
inst✝⁵ : Algebra R✝ B
inst✝⁴ : Semiring C
inst✝³ : Algebra R✝ C
S✝ : Subalgebra R✝ A✝
R : Type u
A : Type v
inst✝² : CommRing R
inst✝¹ : Ring A
inst✝ : Algebra R A
S T : Subalgebra R A
h : toSubring S = toSubring T
x : A
⊢ x ∈ S ↔ x ∈ T
[PROOFSTEP]
rw [← mem_toSubring, ← mem_toSubring, h]
[GOAL]
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝¹⁰ : CommSemiring R
inst✝⁹ : Semiring A
inst✝⁸ : Algebra R A
inst✝⁷ : Semiring B
inst✝⁶ : Algebra R B
inst✝⁵ : Semiring C
inst✝⁴ : Algebra R C
S : Subalgebra R A
inst✝³ : CommSemiring R'
inst✝² : SMul R' R
inst✝¹ : Algebra R' A
inst✝ : IsScalarTower R' R A
x : R'
⊢ ↑(algebraMap R' A) x ∈ S
[PROOFSTEP]
rw [Algebra.algebraMap_eq_smul_one, ← smul_one_smul R x (1 : A), ← Algebra.algebraMap_eq_smul_one]
[GOAL]
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝¹⁰ : CommSemiring R
inst✝⁹ : Semiring A
inst✝⁸ : Algebra R A
inst✝⁷ : Semiring B
inst✝⁶ : Algebra R B
inst✝⁵ : Semiring C
inst✝⁴ : Algebra R C
S : Subalgebra R A
inst✝³ : CommSemiring R'
inst✝² : SMul R' R
inst✝¹ : Algebra R' A
inst✝ : IsScalarTower R' R A
x : R'
⊢ ↑(algebraMap R A) (x • 1) ∈ S
[PROOFSTEP]
exact algebraMap_mem S _
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
p✝ p : Submodule R A
h_one : 1 ∈ p
h_mul : ∀ (x y : A), x ∈ p → y ∈ p → x * y ∈ p
r : R
⊢ ↑(algebraMap R A) r ∈
    {
            toSubmonoid :=
              {
                toSubsemigroup :=
                  { carrier := p.carrier, mul_mem' := (_ : ∀ {a b : A}, a ∈ p.carrier → b ∈ p.carrier → a * b ∈ p) },
                one_mem' := h_one },
            add_mem' := (_ : ∀ {a b : A}, a ∈ p.carrier → b ∈ p.carrier → a + b ∈ p.carrier),
            zero_mem' := (_ : 0 ∈ p.carrier) }.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
rw [Algebra.algebraMap_eq_smul_one]
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
p✝ p : Submodule R A
h_one : 1 ∈ p
h_mul : ∀ (x y : A), x ∈ p → y ∈ p → x * y ∈ p
r : R
⊢ r • 1 ∈
    {
            toSubmonoid :=
              {
                toSubsemigroup :=
                  { carrier := p.carrier, mul_mem' := (_ : ∀ {a b : A}, a ∈ p.carrier → b ∈ p.carrier → a * b ∈ p) },
                one_mem' := h_one },
            add_mem' := (_ : ∀ {a b : A}, a ∈ p.carrier → b ∈ p.carrier → a + b ∈ p.carrier),
            zero_mem' := (_ : 0 ∈ p.carrier) }.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
exact p.smul_mem _ h_one
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
p s : Submodule R A
h1 : 1 ∈ s
hmul : ∀ (x y : A), x ∈ s → y ∈ s → x * y ∈ s
⊢ ∀ (r : R),
    ↑(algebraMap R A) r ∈
      { toSubmonoid := { toSubsemigroup := { carrier := ↑s, mul_mem' := hmul }, one_mem' := h1 },
              add_mem' := (_ : ∀ {a b : A}, a ∈ s → b ∈ s → a + b ∈ s),
              zero_mem' := (_ : 0 ∈ s) }.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
intro r
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
p s : Submodule R A
h1 : 1 ∈ s
hmul : ∀ (x y : A), x ∈ s → y ∈ s → x * y ∈ s
r : R
⊢ ↑(algebraMap R A) r ∈
    { toSubmonoid := { toSubsemigroup := { carrier := ↑s, mul_mem' := hmul }, one_mem' := h1 },
            add_mem' := (_ : ∀ {a b : A}, a ∈ s → b ∈ s → a + b ∈ s),
            zero_mem' := (_ : 0 ∈ s) }.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
rw [Algebra.algebraMap_eq_smul_one]
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
p s : Submodule R A
h1 : 1 ∈ s
hmul : ∀ (x y : A), x ∈ s → y ∈ s → x * y ∈ s
r : R
⊢ r • 1 ∈
    { toSubmonoid := { toSubsemigroup := { carrier := ↑s, mul_mem' := hmul }, one_mem' := h1 },
            add_mem' := (_ : ∀ {a b : A}, a ∈ s → b ∈ s → a + b ∈ s),
            zero_mem' := (_ : 0 ∈ s) }.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
apply s.smul_mem _ h1
[GOAL]
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : Semiring C
inst✝ : Algebra R C
φ✝ φ : A →ₐ[R] B
⊢ ↑(AlgHom.range φ) = Set.range ↑φ
[PROOFSTEP]
ext
[GOAL]
case h
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : Semiring C
inst✝ : Algebra R C
φ✝ φ : A →ₐ[R] B
x✝ : B
⊢ x✝ ∈ ↑(AlgHom.range φ) ↔ x✝ ∈ Set.range ↑φ
[PROOFSTEP]
rw [SetLike.mem_coe, mem_range]
[GOAL]
case h
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : Semiring C
inst✝ : Algebra R C
φ✝ φ : A →ₐ[R] B
x✝ : B
⊢ (∃ x, ↑φ x = x✝) ↔ x✝ ∈ Set.range ↑φ
[PROOFSTEP]
rfl
[GOAL]
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : Semiring C
inst✝ : Algebra R C
φ ϕ ψ : A →ₐ[R] B
x y : A
hx : ↑ϕ x = ↑ψ x
hy : ↑ϕ y = ↑ψ y
⊢ x * y ∈ {a | ↑ϕ a = ↑ψ a}
[PROOFSTEP]
rw [Set.mem_setOf_eq, ϕ.map_mul, ψ.map_mul, hx, hy]
[GOAL]
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : Semiring C
inst✝ : Algebra R C
φ ϕ ψ : A →ₐ[R] B
⊢ 1 ∈
    { carrier := {a | ↑ϕ a = ↑ψ a},
        mul_mem' := (_ : ∀ {x y : A}, ↑ϕ x = ↑ψ x → ↑ϕ y = ↑ψ y → x * y ∈ {a | ↑ϕ a = ↑ψ a}) }.carrier
[PROOFSTEP]
simp only [Set.mem_setOf_eq, map_one]
[GOAL]
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : Semiring C
inst✝ : Algebra R C
φ ϕ ψ : A →ₐ[R] B
x y : A
hx : ↑ϕ x = ↑ψ x
hy : ↑ϕ y = ↑ψ y
⊢ x + y ∈
    {
          toSubsemigroup :=
            { carrier := {a | ↑ϕ a = ↑ψ a},
              mul_mem' := (_ : ∀ {x y : A}, ↑ϕ x = ↑ψ x → ↑ϕ y = ↑ψ y → x * y ∈ {a | ↑ϕ a = ↑ψ a}) },
          one_mem' := (_ : ↑ϕ 1 = ↑ψ 1) }.toSubsemigroup.carrier
[PROOFSTEP]
rw [Set.mem_setOf_eq, ϕ.map_add, ψ.map_add, hx, hy]
[GOAL]
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : Semiring C
inst✝ : Algebra R C
φ ϕ ψ : A →ₐ[R] B
⊢ 0 ∈
    {
          toSubsemigroup :=
            { carrier := {a | ↑ϕ a = ↑ψ a},
              mul_mem' := (_ : ∀ {x y : A}, ↑ϕ x = ↑ψ x → ↑ϕ y = ↑ψ y → x * y ∈ {a | ↑ϕ a = ↑ψ a}) },
          one_mem' := (_ : ↑ϕ 1 = ↑ψ 1) }.toSubsemigroup.carrier
[PROOFSTEP]
simp only [Set.mem_setOf_eq, map_zero]
[GOAL]
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : Semiring C
inst✝ : Algebra R C
φ ϕ ψ : A →ₐ[R] B
x : R
⊢ ↑(algebraMap R A) x ∈
    {
            toSubmonoid :=
              {
                toSubsemigroup :=
                  { carrier := {a | ↑ϕ a = ↑ψ a},
                    mul_mem' := (_ : ∀ {x y : A}, ↑ϕ x = ↑ψ x → ↑ϕ y = ↑ψ y → x * y ∈ {a | ↑ϕ a = ↑ψ a}) },
                one_mem' := (_ : ↑ϕ 1 = ↑ψ 1) },
            add_mem' :=
              (_ :
                ∀ {x y : A},
                  ↑ϕ x = ↑ψ x →
                    ↑ϕ y = ↑ψ y →
                      x + y ∈
                        {
                              toSubsemigroup :=
                                { carrier := {a | ↑ϕ a = ↑ψ a},
                                  mul_mem' :=
                                    (_ : ∀ {x y : A}, ↑ϕ x = ↑ψ x → ↑ϕ y = ↑ψ y → x * y ∈ {a | ↑ϕ a = ↑ψ a}) },
                              one_mem' := (_ : ↑ϕ 1 = ↑ψ 1) }.toSubsemigroup.carrier),
            zero_mem' := (_ : ↑ϕ 0 = ↑ψ 0) }.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
rw [Set.mem_setOf_eq, AlgHom.commutes, AlgHom.commutes]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
g : B → A
f : A →ₐ[R] B
h : Function.LeftInverse g ↑f
src✝ : A →ₐ[R] { x // x ∈ AlgHom.range f } := AlgHom.rangeRestrict f
x : { x // x ∈ AlgHom.range f }
x' : A
hx' : ↑f x' = ↑x
⊢ ↑f (g ↑x) = ↑x
[PROOFSTEP]
rw [← hx', h x']
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
e : A ≃ₐ[R] B
S : Subalgebra R A
src✝ : { x // x ∈ S.toSubsemiring } ≃+*
  { x // x ∈ Subsemiring.map (RingEquiv.toRingHom (toRingEquiv e)) S.toSubsemiring } :=
  RingEquiv.subsemiringMap (toRingEquiv e) S.toSubsemiring
r : R
⊢ Equiv.toFun src✝.toEquiv (↑(algebraMap R { x // x ∈ S }) r) = ↑(algebraMap R { x // x ∈ Subalgebra.map (↑e) S }) r
[PROOFSTEP]
ext
[GOAL]
case a
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
e : A ≃ₐ[R] B
S : Subalgebra R A
src✝ : { x // x ∈ S.toSubsemiring } ≃+*
  { x // x ∈ Subsemiring.map (RingEquiv.toRingHom (toRingEquiv e)) S.toSubsemiring } :=
  RingEquiv.subsemiringMap (toRingEquiv e) S.toSubsemiring
r : R
⊢ ↑(Equiv.toFun src✝.toEquiv (↑(algebraMap R { x // x ∈ S }) r)) =
    ↑(↑(algebraMap R { x // x ∈ Subalgebra.map (↑e) S }) r)
[PROOFSTEP]
dsimp only
[GOAL]
case a
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
e : A ≃ₐ[R] B
S : Subalgebra R A
src✝ : { x // x ∈ S.toSubsemiring } ≃+*
  { x // x ∈ Subsemiring.map (RingEquiv.toRingHom (toRingEquiv e)) S.toSubsemiring } :=
  RingEquiv.subsemiringMap (toRingEquiv e) S.toSubsemiring
r : R
⊢ ↑(Equiv.toFun (RingEquiv.subsemiringMap (toRingEquiv e) S.toSubsemiring).toEquiv (↑(algebraMap R { x // x ∈ S }) r)) =
    ↑(↑(algebraMap R { x // x ∈ Subalgebra.map (↑e) S }) r)
[PROOFSTEP]
erw [RingEquiv.subsemiringMap_apply_coe]
[GOAL]
case a
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
e : A ≃ₐ[R] B
S : Subalgebra R A
src✝ : { x // x ∈ S.toSubsemiring } ≃+*
  { x // x ∈ Subsemiring.map (RingEquiv.toRingHom (toRingEquiv e)) S.toSubsemiring } :=
  RingEquiv.subsemiringMap (toRingEquiv e) S.toSubsemiring
r : R
⊢ ↑(toRingEquiv e) ↑(↑(algebraMap R { x // x ∈ S }) r) = ↑(↑(algebraMap R { x // x ∈ Subalgebra.map (↑e) S }) r)
[PROOFSTEP]
exact e.commutes _
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
S : Set (Subalgebra R A)
x : A
⊢ x ∈ sInf S ↔ ∀ (p : Subalgebra R A), p ∈ S → x ∈ p
[PROOFSTEP]
simp only [← SetLike.mem_coe, coe_sInf, Set.mem_iInter₂]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
S : Set (Subalgebra R A)
⊢ ↑(↑Subalgebra.toSubmodule (sInf S)) = ↑(sInf (↑Subalgebra.toSubmodule '' S))
[PROOFSTEP]
simp
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
S : Set (Subalgebra R A)
⊢ ↑(sInf S).toSubsemiring = ↑(sInf (Subalgebra.toSubsemiring '' S))
[PROOFSTEP]
simp
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
ι : Sort u_1
S : ι → Subalgebra R A
⊢ ↑(⨅ (i : ι), S i) = ⋂ (i : ι), ↑(S i)
[PROOFSTEP]
simp [iInf]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
ι : Sort u_1
S : ι → Subalgebra R A
x : A
⊢ x ∈ ⨅ (i : ι), S i ↔ ∀ (i : ι), x ∈ S i
[PROOFSTEP]
simp only [iInf, mem_sInf, Set.forall_range_iff]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
ι : Sort u_1
S : ι → Subalgebra R A
⊢ ↑(↑toSubmodule (⨅ (i : ι), S i)) = ↑(⨅ (i : ι), ↑toSubmodule (S i))
[PROOFSTEP]
simp
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
x : A
this : AlgHom.range (ofId R A) = ⊥
⊢ x ∈ ⊥ ↔ x ∈ Set.range ↑(algebraMap R A)
[PROOFSTEP]
rw [← this, ← SetLike.mem_coe, AlgHom.coe_range]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
x : A
this : AlgHom.range (ofId R A) = ⊥
⊢ x ∈ Set.range ↑(ofId R A) ↔ x ∈ Set.range ↑(algebraMap R A)
[PROOFSTEP]
rfl
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
⊢ ↑Subalgebra.toSubmodule ⊥ = Submodule.span R {1}
[PROOFSTEP]
ext x
[GOAL]
case h
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
x : A
⊢ x ∈ ↑Subalgebra.toSubmodule ⊥ ↔ x ∈ Submodule.span R {1}
[PROOFSTEP]
simp [mem_bot, Submodule.mem_span_singleton, Algebra.smul_def]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
⊢ ↑⊥ = Set.range ↑(algebraMap R A)
[PROOFSTEP]
simp [Set.ext_iff, Algebra.mem_bot]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
S : Subalgebra R A
h : S = ⊤
x : A
⊢ x ∈ S
[PROOFSTEP]
rw [h]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
S : Subalgebra R A
h : S = ⊤
x : A
⊢ x ∈ ⊤
[PROOFSTEP]
exact mem_top
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
S : Subalgebra R A
h : ∀ (x : A), x ∈ S
⊢ S = ⊤
[PROOFSTEP]
ext x
[GOAL]
case h
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
S : Subalgebra R A
h : ∀ (x : A), x ∈ S
x : A
⊢ x ∈ S ↔ x ∈ ⊤
[PROOFSTEP]
exact ⟨fun _ => mem_top, fun _ => h x⟩
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
f : A →ₐ[R] B
⊢ ↑(Subalgebra.map f ⊥) = ↑⊥
[PROOFSTEP]
simp only [← Set.range_comp, (· ∘ ·), Algebra.coe_bot, Subalgebra.coe_map, f.commutes]
[GOAL]
R : Type u
A : Type v
B✝ : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B✝
inst✝¹ : Algebra R B✝
S : Subalgebra R A
inst✝ : Subsingleton A
B C : Subalgebra R A
x : A
⊢ x ∈ B ↔ x ∈ C
[PROOFSTEP]
simp only [Subsingleton.elim x 0, zero_mem B, zero_mem C]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
inst✝ : Subsingleton (Subalgebra R B)
f g : A ≃ₐ[R] B
⊢ f = g
[PROOFSTEP]
rw [← f.symm_symm, Subsingleton.elim f.symm g.symm, g.symm_symm]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
S : Subalgebra R A
src✝ : Inhabited (Subalgebra R R) := inferInstanceAs (Inhabited (Subalgebra R R))
⊢ ∀ (a : Subalgebra R R), a = default
[PROOFSTEP]
intro S
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
S✝ : Subalgebra R A
src✝ : Inhabited (Subalgebra R R) := inferInstanceAs (Inhabited (Subalgebra R R))
S : Subalgebra R R
⊢ S = default
[PROOFSTEP]
refine' le_antisymm ?_ bot_le
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
S✝ : Subalgebra R A
src✝ : Inhabited (Subalgebra R R) := inferInstanceAs (Inhabited (Subalgebra R R))
S : Subalgebra R R
⊢ S ≤ default
[PROOFSTEP]
intro _ _
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
S✝ : Subalgebra R A
src✝ : Inhabited (Subalgebra R R) := inferInstanceAs (Inhabited (Subalgebra R R))
S : Subalgebra R R
x✝ : R
a✝ : x✝ ∈ S
⊢ x✝ ∈ default
[PROOFSTEP]
simp only [Set.mem_range, mem_bot, id.map_eq_self, exists_apply_eq_apply, default]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
S✝ S : Subalgebra R A
⊢ equivOfEq S S (_ : S = S) = AlgEquiv.refl
[PROOFSTEP]
ext
[GOAL]
case h.a
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
S✝ S : Subalgebra R A
a✝ : { x // x ∈ S }
⊢ ↑(↑(equivOfEq S S (_ : S = S)) a✝) = ↑(↑AlgEquiv.refl a✝)
[PROOFSTEP]
rfl
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
S : Subalgebra R A
S₁ : Subalgebra R B
⊢ prod ⊤ ⊤ = ⊤
[PROOFSTEP]
ext
[GOAL]
case h
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
S : Subalgebra R A
S₁ : Subalgebra R B
x✝ : A × B
⊢ x✝ ∈ prod ⊤ ⊤ ↔ x✝ ∈ ⊤
[PROOFSTEP]
simp
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S✝ : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
S : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) S
i : ι := Nonempty.some (_ : Nonempty ι)
⊢ 1 ∈
    { carrier := ⋃ (i : ι), ↑(S i),
        mul_mem' :=
          (_ : ∀ {a b : A}, a ∈ ⋃ (i : ι), ↑(S i) → b ∈ ⋃ (i : ι), ↑(S i) → a * b ∈ ⋃ (i : ι), ↑(S i)) }.carrier
[PROOFSTEP]
simp only [Set.mem_iUnion, SetLike.mem_coe]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S✝ : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
S : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) S
i : ι := Nonempty.some (_ : Nonempty ι)
⊢ ∃ i, 1 ∈ S i
[PROOFSTEP]
exact ⟨i, one_mem _⟩
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S✝ : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
S : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) S
i : ι := Nonempty.some (_ : Nonempty ι)
⊢ 0 ∈
    {
          toSubsemigroup :=
            { carrier := ⋃ (i : ι), ↑(S i),
              mul_mem' :=
                (_ : ∀ {a b : A}, a ∈ ⋃ (i : ι), ↑(S i) → b ∈ ⋃ (i : ι), ↑(S i) → a * b ∈ ⋃ (i : ι), ↑(S i)) },
          one_mem' :=
            (_ :
              1 ∈
                { carrier := ⋃ (i : ι), ↑(S i),
                    mul_mem' :=
                      (_ :
                        ∀ {a b : A},
                          a ∈ ⋃ (i : ι), ↑(S i) →
                            b ∈ ⋃ (i : ι), ↑(S i) → a * b ∈ ⋃ (i : ι), ↑(S i)) }.carrier) }.toSubsemigroup.carrier
[PROOFSTEP]
simp only [Set.mem_iUnion, SetLike.mem_coe]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S✝ : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
S : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) S
i : ι := Nonempty.some (_ : Nonempty ι)
⊢ ∃ i, 0 ∈ S i
[PROOFSTEP]
exact ⟨i, zero_mem _⟩
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
i j : ι
x : A
hxi : x ∈ (fun i => ↑(K i)) i
hxj : x ∈ (fun i => ↑(K i)) j
⊢ (fun i x => ↑(f i) x) i { val := x, property := hxi } = (fun i x => ↑(f i) x) j { val := x, property := hxj }
[PROOFSTEP]
let ⟨k, hik, hjk⟩ := dir i j
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
i j : ι
x : A
hxi : x ∈ (fun i => ↑(K i)) i
hxj : x ∈ (fun i => ↑(K i)) j
k : ι
hik : (fun x x_1 => x ≤ x_1) (K i) (K k)
hjk : (fun x x_1 => x ≤ x_1) (K j) (K k)
⊢ (fun i x => ↑(f i) x) i { val := x, property := hxi } = (fun i x => ↑(f i) x) j { val := x, property := hxj }
[PROOFSTEP]
dsimp
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
i j : ι
x : A
hxi : x ∈ (fun i => ↑(K i)) i
hxj : x ∈ (fun i => ↑(K i)) j
k : ι
hik : (fun x x_1 => x ≤ x_1) (K i) (K k)
hjk : (fun x x_1 => x ≤ x_1) (K j) (K k)
⊢ ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj }
[PROOFSTEP]
rw [hf i k hik, hf j k hjk]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
i j : ι
x : A
hxi : x ∈ (fun i => ↑(K i)) i
hxj : x ∈ (fun i => ↑(K i)) j
k : ι
hik : (fun x x_1 => x ≤ x_1) (K i) (K k)
hjk : (fun x x_1 => x ≤ x_1) (K j) (K k)
⊢ ↑(AlgHom.comp (f k) (inclusion hik)) { val := x, property := hxi } =
    ↑(AlgHom.comp (f k) (inclusion hjk)) { val := x, property := hxj }
[PROOFSTEP]
rfl
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
⊢ ↑T ⊆ ⋃ (i : ι), ↑(K i)
[PROOFSTEP]
rw [hT, coe_iSup_of_directed dir]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
⊢ Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
      (_ :
        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
          (fun i x => ↑(f i) x) i { val := x, property := hxi } = (fun i x => ↑(f i) x) j { val := x, property := hxj })
      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
    1
[PROOFSTEP]
apply Set.iUnionLift_const _ (fun _ => 1)
[GOAL]
case hci
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
⊢ ∀ (i : ι), ↑1 = ↑1
[PROOFSTEP]
simp
[GOAL]
case h
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
⊢ ∀ (i : ι), ↑(f i) 1 = 1
[PROOFSTEP]
simp
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
⊢ ∀ (x y : { x // x ∈ T }),
    OneHom.toFun
        {
          toFun :=
            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
              (_ :
                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                    (fun i x => ↑(f i) x) j { val := x, property := hxj })
              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
          map_one' :=
            (_ :
              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                  (_ :
                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                        (fun i x => ↑(f i) x) j { val := x, property := hxj })
                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                1) }
        (x * y) =
      OneHom.toFun
          {
            toFun :=
              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                (_ :
                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                      (fun i x => ↑(f i) x) j { val := x, property := hxj })
                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
            map_one' :=
              (_ :
                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                    (_ :
                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                          (fun i x => ↑(f i) x) j { val := x, property := hxj })
                    ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                  1) }
          x *
        OneHom.toFun
          {
            toFun :=
              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                (_ :
                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                      (fun i x => ↑(f i) x) j { val := x, property := hxj })
                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
            map_one' :=
              (_ :
                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                    (_ :
                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                          (fun i x => ↑(f i) x) j { val := x, property := hxj })
                    ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                  1) }
          y
[PROOFSTEP]
subst hT
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ∀ (x y : { x // x ∈ iSup K }),
    OneHom.toFun
        {
          toFun :=
            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
              (_ :
                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                    (fun i x => ↑(f i) x) j { val := x, property := hxj })
              ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),
          map_one' :=
            (_ :
              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                  (_ :
                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                        (fun i x => ↑(f i) x) j { val := x, property := hxj })
                  ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                1) }
        (x * y) =
      OneHom.toFun
          {
            toFun :=
              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                (_ :
                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                      (fun i x => ↑(f i) x) j { val := x, property := hxj })
                ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),
            map_one' :=
              (_ :
                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                    (_ :
                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                          (fun i x => ↑(f i) x) j { val := x, property := hxj })
                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                  1) }
          x *
        OneHom.toFun
          {
            toFun :=
              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                (_ :
                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                      (fun i x => ↑(f i) x) j { val := x, property := hxj })
                ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),
            map_one' :=
              (_ :
                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                    (_ :
                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                          (fun i x => ↑(f i) x) j { val := x, property := hxj })
                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                  1) }
          y
[PROOFSTEP]
dsimp
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ∀ (x y : { x // x ∈ iSup K }),
    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
        (_ :
          ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),
            ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })
        ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (x * y) =
      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
          (_ :
            ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),
              ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })
          ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x *
        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
          (_ :
            ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),
              ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })
          ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) y
[PROOFSTEP]
apply Set.iUnionLift_binary (coe_iSup_of_directed dir) dir _ (fun _ => (· * ·))
[GOAL]
case hopi
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ∀ (i : ι) (x y : ↑↑(K i)),
    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x * y) =
      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x * Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y
case h
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x * y) = ↑(f i) x * ↑(f i) y
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)
[PROOFSTEP]
on_goal 3 => rw [coe_iSup_of_directed dir]
[GOAL]
case hopi
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ∀ (i : ι) (x y : ↑↑(K i)),
    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x * y) =
      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x * Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y
case h
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x * y) = ↑(f i) x * ↑(f i) y
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)
[PROOFSTEP]
on_goal 3 => rw [coe_iSup_of_directed dir]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)
[PROOFSTEP]
rw [coe_iSup_of_directed dir]
[GOAL]
case hopi
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ∀ (i : ι) (x y : ↑↑(K i)),
    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x * y) =
      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x * Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y
case h
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x * y) = ↑(f i) x * ↑(f i) y
[PROOFSTEP]
all_goals simp
[GOAL]
case hopi
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ∀ (i : ι) (x y : ↑↑(K i)),
    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x * y) =
      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x * Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y
[PROOFSTEP]
simp
[GOAL]
case h
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x * y) = ↑(f i) x * ↑(f i) y
[PROOFSTEP]
simp
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
⊢ OneHom.toFun
      (↑{
          toOneHom :=
            {
              toFun :=
                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                  (_ :
                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                        (fun i x => ↑(f i) x) j { val := x, property := hxj })
                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
              map_one' :=
                (_ :
                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                      (_ :
                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                            (fun i x => ↑(f i) x) j { val := x, property := hxj })
                      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                    1) },
          map_mul' :=
            (_ :
              ∀ (x y : { x // x ∈ T }),
                OneHom.toFun
                    {
                      toFun :=
                        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                          (_ :
                            ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                              (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                (fun i x => ↑(f i) x) j { val := x, property := hxj })
                          ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                      map_one' :=
                        (_ :
                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                              (_ :
                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })
                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                            1) }
                    (x * y) =
                  OneHom.toFun
                      {
                        toFun :=
                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                            (_ :
                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })
                            ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                        map_one' :=
                          (_ :
                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                (_ :
                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                              1) }
                      x *
                    OneHom.toFun
                      {
                        toFun :=
                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                            (_ :
                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })
                            ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                        map_one' :=
                          (_ :
                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                (_ :
                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                              1) }
                      y) })
      0 =
    0
[PROOFSTEP]
dsimp
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
⊢ Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
      (_ :
        ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),
          ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })
      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 0 =
    0
[PROOFSTEP]
apply Set.iUnionLift_const _ (fun _ => 0)
[GOAL]
case hci
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
⊢ ∀ (i : ι), ↑0 = ↑0
[PROOFSTEP]
simp
[GOAL]
case h
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
⊢ ∀ (i : ι), ↑(f i) 0 = 0
[PROOFSTEP]
simp
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
⊢ ∀ (x y : { x // x ∈ T }),
    OneHom.toFun
        (↑{
            toOneHom :=
              {
                toFun :=
                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                    (_ :
                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                          (fun i x => ↑(f i) x) j { val := x, property := hxj })
                    ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                map_one' :=
                  (_ :
                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                        (_ :
                          ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                            (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                              (fun i x => ↑(f i) x) j { val := x, property := hxj })
                        ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                      1) },
            map_mul' :=
              (_ :
                ∀ (x y : { x // x ∈ T }),
                  OneHom.toFun
                      {
                        toFun :=
                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                            (_ :
                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })
                            ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                        map_one' :=
                          (_ :
                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                (_ :
                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                              1) }
                      (x * y) =
                    OneHom.toFun
                        {
                          toFun :=
                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                              (_ :
                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })
                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                          map_one' :=
                            (_ :
                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                  (_ :
                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                1) }
                        x *
                      OneHom.toFun
                        {
                          toFun :=
                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                              (_ :
                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })
                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                          map_one' :=
                            (_ :
                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                  (_ :
                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                1) }
                        y) })
        (x + y) =
      OneHom.toFun
          (↑{
              toOneHom :=
                {
                  toFun :=
                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                      (_ :
                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                            (fun i x => ↑(f i) x) j { val := x, property := hxj })
                      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                  map_one' :=
                    (_ :
                      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                          (_ :
                            ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                              (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                (fun i x => ↑(f i) x) j { val := x, property := hxj })
                          ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                        1) },
              map_mul' :=
                (_ :
                  ∀ (x y : { x // x ∈ T }),
                    OneHom.toFun
                        {
                          toFun :=
                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                              (_ :
                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })
                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                          map_one' :=
                            (_ :
                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                  (_ :
                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                1) }
                        (x * y) =
                      OneHom.toFun
                          {
                            toFun :=
                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                (_ :
                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                            map_one' :=
                              (_ :
                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                    (_ :
                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                        (hxj : x ∈ (fun i => ↑(K i)) j),
                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                    ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                  1) }
                          x *
                        OneHom.toFun
                          {
                            toFun :=
                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                (_ :
                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                            map_one' :=
                              (_ :
                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                    (_ :
                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                        (hxj : x ∈ (fun i => ↑(K i)) j),
                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                    ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                  1) }
                          y) })
          x +
        OneHom.toFun
          (↑{
              toOneHom :=
                {
                  toFun :=
                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                      (_ :
                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                            (fun i x => ↑(f i) x) j { val := x, property := hxj })
                      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                  map_one' :=
                    (_ :
                      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                          (_ :
                            ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                              (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                (fun i x => ↑(f i) x) j { val := x, property := hxj })
                          ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                        1) },
              map_mul' :=
                (_ :
                  ∀ (x y : { x // x ∈ T }),
                    OneHom.toFun
                        {
                          toFun :=
                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                              (_ :
                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })
                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                          map_one' :=
                            (_ :
                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                  (_ :
                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                1) }
                        (x * y) =
                      OneHom.toFun
                          {
                            toFun :=
                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                (_ :
                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                            map_one' :=
                              (_ :
                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                    (_ :
                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                        (hxj : x ∈ (fun i => ↑(K i)) j),
                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                    ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                  1) }
                          x *
                        OneHom.toFun
                          {
                            toFun :=
                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                (_ :
                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                            map_one' :=
                              (_ :
                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                    (_ :
                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                        (hxj : x ∈ (fun i => ↑(K i)) j),
                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                    ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                  1) }
                          y) })
          y
[PROOFSTEP]
subst hT
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ∀ (x y : { x // x ∈ iSup K }),
    OneHom.toFun
        (↑{
            toOneHom :=
              {
                toFun :=
                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                    (_ :
                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                          (fun i x => ↑(f i) x) j { val := x, property := hxj })
                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),
                map_one' :=
                  (_ :
                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                        (_ :
                          ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                            (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                              (fun i x => ↑(f i) x) j { val := x, property := hxj })
                        ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                      1) },
            map_mul' :=
              (_ :
                ∀ (x y : { x // x ∈ iSup K }),
                  OneHom.toFun
                      {
                        toFun :=
                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                            (_ :
                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })
                            ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),
                        map_one' :=
                          (_ :
                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                (_ :
                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                              1) }
                      (x * y) =
                    OneHom.toFun
                        {
                          toFun :=
                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                              (_ :
                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })
                              ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),
                          map_one' :=
                            (_ :
                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                  (_ :
                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                  ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                1) }
                        x *
                      OneHom.toFun
                        {
                          toFun :=
                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                              (_ :
                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })
                              ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),
                          map_one' :=
                            (_ :
                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                  (_ :
                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                  ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                1) }
                        y) })
        (x + y) =
      OneHom.toFun
          (↑{
              toOneHom :=
                {
                  toFun :=
                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                      (_ :
                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                            (fun i x => ↑(f i) x) j { val := x, property := hxj })
                      ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),
                  map_one' :=
                    (_ :
                      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                          (_ :
                            ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                              (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                (fun i x => ↑(f i) x) j { val := x, property := hxj })
                          ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                        1) },
              map_mul' :=
                (_ :
                  ∀ (x y : { x // x ∈ iSup K }),
                    OneHom.toFun
                        {
                          toFun :=
                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                              (_ :
                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })
                              ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),
                          map_one' :=
                            (_ :
                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                  (_ :
                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                  ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                1) }
                        (x * y) =
                      OneHom.toFun
                          {
                            toFun :=
                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                (_ :
                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),
                            map_one' :=
                              (_ :
                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                    (_ :
                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                        (hxj : x ∈ (fun i => ↑(K i)) j),
                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                  1) }
                          x *
                        OneHom.toFun
                          {
                            toFun :=
                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                (_ :
                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),
                            map_one' :=
                              (_ :
                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                    (_ :
                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                        (hxj : x ∈ (fun i => ↑(K i)) j),
                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                  1) }
                          y) })
          x +
        OneHom.toFun
          (↑{
              toOneHom :=
                {
                  toFun :=
                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                      (_ :
                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                            (fun i x => ↑(f i) x) j { val := x, property := hxj })
                      ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),
                  map_one' :=
                    (_ :
                      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                          (_ :
                            ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                              (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                (fun i x => ↑(f i) x) j { val := x, property := hxj })
                          ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                        1) },
              map_mul' :=
                (_ :
                  ∀ (x y : { x // x ∈ iSup K }),
                    OneHom.toFun
                        {
                          toFun :=
                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                              (_ :
                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })
                              ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),
                          map_one' :=
                            (_ :
                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                  (_ :
                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                  ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                1) }
                        (x * y) =
                      OneHom.toFun
                          {
                            toFun :=
                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                (_ :
                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),
                            map_one' :=
                              (_ :
                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                    (_ :
                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                        (hxj : x ∈ (fun i => ↑(K i)) j),
                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                  1) }
                          x *
                        OneHom.toFun
                          {
                            toFun :=
                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                (_ :
                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),
                            map_one' :=
                              (_ :
                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                    (_ :
                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                        (hxj : x ∈ (fun i => ↑(K i)) j),
                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                  1) }
                          y) })
          y
[PROOFSTEP]
dsimp
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ∀ (x y : { x // x ∈ iSup K }),
    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
        (_ :
          ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),
            ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })
        ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (x + y) =
      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
          (_ :
            ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),
              ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })
          ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x +
        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
          (_ :
            ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),
              ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })
          ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) y
[PROOFSTEP]
apply Set.iUnionLift_binary (coe_iSup_of_directed dir) dir _ (fun _ => (· + ·))
[GOAL]
case hopi
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ∀ (i : ι) (x y : ↑↑(K i)),
    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x + y) =
      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x + Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y
case h
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x + y) = ↑(f i) x + ↑(f i) y
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)
[PROOFSTEP]
on_goal 3 => rw [coe_iSup_of_directed dir]
[GOAL]
case hopi
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ∀ (i : ι) (x y : ↑↑(K i)),
    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x + y) =
      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x + Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y
case h
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x + y) = ↑(f i) x + ↑(f i) y
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)
[PROOFSTEP]
on_goal 3 => rw [coe_iSup_of_directed dir]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)
[PROOFSTEP]
rw [coe_iSup_of_directed dir]
[GOAL]
case hopi
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ∀ (i : ι) (x y : ↑↑(K i)),
    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x + y) =
      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x + Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y
case h
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x + y) = ↑(f i) x + ↑(f i) y
[PROOFSTEP]
all_goals simp
[GOAL]
case hopi
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ∀ (i : ι) (x y : ↑↑(K i)),
    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x + y) =
      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x + Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y
[PROOFSTEP]
simp
[GOAL]
case h
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x + y) = ↑(f i) x + ↑(f i) y
[PROOFSTEP]
simp
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
r : R
⊢ OneHom.toFun
      (↑↑{
            toMonoidHom :=
              {
                toOneHom :=
                  {
                    toFun :=
                      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                        (_ :
                          ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                            (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                              (fun i x => ↑(f i) x) j { val := x, property := hxj })
                        ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                    map_one' :=
                      (_ :
                        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                            (_ :
                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })
                            ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                          1) },
                map_mul' :=
                  (_ :
                    ∀ (x y : { x // x ∈ T }),
                      OneHom.toFun
                          {
                            toFun :=
                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                (_ :
                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                            map_one' :=
                              (_ :
                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                    (_ :
                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                        (hxj : x ∈ (fun i => ↑(K i)) j),
                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                    ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                  1) }
                          (x * y) =
                        OneHom.toFun
                            {
                              toFun :=
                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                  (_ :
                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                              map_one' :=
                                (_ :
                                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                      (_ :
                                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                          (hxj : x ∈ (fun i => ↑(K i)) j),
                                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                            (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                    1) }
                            x *
                          OneHom.toFun
                            {
                              toFun :=
                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                  (_ :
                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                              map_one' :=
                                (_ :
                                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                      (_ :
                                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                          (hxj : x ∈ (fun i => ↑(K i)) j),
                                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                            (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                    1) }
                            y) },
            map_zero' :=
              (_ :
                OneHom.toFun
                    (↑{
                        toOneHom :=
                          {
                            toFun :=
                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                (_ :
                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                            map_one' :=
                              (_ :
                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                    (_ :
                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                        (hxj : x ∈ (fun i => ↑(K i)) j),
                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                    ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                  1) },
                        map_mul' :=
                          (_ :
                            ∀ (x y : { x // x ∈ T }),
                              OneHom.toFun
                                  {
                                    toFun :=
                                      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                        (_ :
                                          ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                            (hxj : x ∈ (fun i => ↑(K i)) j),
                                            (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                              (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                        ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                                    map_one' :=
                                      (_ :
                                        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                            (_ :
                                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                                (hxj : x ∈ (fun i => ↑(K i)) j),
                                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                            ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                          1) }
                                  (x * y) =
                                OneHom.toFun
                                    {
                                      toFun :=
                                        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                          (_ :
                                            ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                              (hxj : x ∈ (fun i => ↑(K i)) j),
                                              (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                          ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                                      map_one' :=
                                        (_ :
                                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                              (_ :
                                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                                  (hxj : x ∈ (fun i => ↑(K i)) j),
                                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                            1) }
                                    x *
                                  OneHom.toFun
                                    {
                                      toFun :=
                                        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                          (_ :
                                            ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                              (hxj : x ∈ (fun i => ↑(K i)) j),
                                              (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                          ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                                      map_one' :=
                                        (_ :
                                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                              (_ :
                                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                                  (hxj : x ∈ (fun i => ↑(K i)) j),
                                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                            1) }
                                    y) })
                    0 =
                  0),
            map_add' :=
              (_ :
                ∀ (x y : { x // x ∈ T }),
                  OneHom.toFun
                      (↑{
                          toOneHom :=
                            {
                              toFun :=
                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                  (_ :
                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                              map_one' :=
                                (_ :
                                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                      (_ :
                                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                          (hxj : x ∈ (fun i => ↑(K i)) j),
                                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                            (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                    1) },
                          map_mul' :=
                            (_ :
                              ∀ (x y : { x // x ∈ T }),
                                OneHom.toFun
                                    {
                                      toFun :=
                                        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                          (_ :
                                            ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                              (hxj : x ∈ (fun i => ↑(K i)) j),
                                              (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                          ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                                      map_one' :=
                                        (_ :
                                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                              (_ :
                                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                                  (hxj : x ∈ (fun i => ↑(K i)) j),
                                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                            1) }
                                    (x * y) =
                                  OneHom.toFun
                                      {
                                        toFun :=
                                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                            (_ :
                                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                                (hxj : x ∈ (fun i => ↑(K i)) j),
                                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                            ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                                        map_one' :=
                                          (_ :
                                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                                (_ :
                                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                                    (hxj : x ∈ (fun i => ↑(K i)) j),
                                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                              1) }
                                      x *
                                    OneHom.toFun
                                      {
                                        toFun :=
                                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                            (_ :
                                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                                (hxj : x ∈ (fun i => ↑(K i)) j),
                                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                            ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                                        map_one' :=
                                          (_ :
                                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                                (_ :
                                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                                    (hxj : x ∈ (fun i => ↑(K i)) j),
                                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                              1) }
                                      y) })
                      (x + y) =
                    OneHom.toFun
                        (↑{
                            toOneHom :=
                              {
                                toFun :=
                                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                    (_ :
                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                        (hxj : x ∈ (fun i => ↑(K i)) j),
                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                    ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                                map_one' :=
                                  (_ :
                                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                        (_ :
                                          ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                            (hxj : x ∈ (fun i => ↑(K i)) j),
                                            (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                              (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                        ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                      1) },
                            map_mul' :=
                              (_ :
                                ∀ (x y : { x // x ∈ T }),
                                  OneHom.toFun
                                      {
                                        toFun :=
                                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                            (_ :
                                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                                (hxj : x ∈ (fun i => ↑(K i)) j),
                                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                            ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                                        map_one' :=
                                          (_ :
                                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                                (_ :
                                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                                    (hxj : x ∈ (fun i => ↑(K i)) j),
                                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                              1) }
                                      (x * y) =
                                    OneHom.toFun
                                        {
                                          toFun :=
                                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                              (_ :
                                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                                  (hxj : x ∈ (fun i => ↑(K i)) j),
                                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                                          map_one' :=
                                            (_ :
                                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                                  (_ :
                                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                                      (hxj : x ∈ (fun i => ↑(K i)) j),
                                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                                1) }
                                        x *
                                      OneHom.toFun
                                        {
                                          toFun :=
                                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                              (_ :
                                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                                  (hxj : x ∈ (fun i => ↑(K i)) j),
                                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                                          map_one' :=
                                            (_ :
                                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                                  (_ :
                                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                                      (hxj : x ∈ (fun i => ↑(K i)) j),
                                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                                1) }
                                        y) })
                        x +
                      OneHom.toFun
                        (↑{
                            toOneHom :=
                              {
                                toFun :=
                                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                    (_ :
                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                        (hxj : x ∈ (fun i => ↑(K i)) j),
                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                    ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                                map_one' :=
                                  (_ :
                                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                        (_ :
                                          ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                            (hxj : x ∈ (fun i => ↑(K i)) j),
                                            (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                              (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                        ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                      1) },
                            map_mul' :=
                              (_ :
                                ∀ (x y : { x // x ∈ T }),
                                  OneHom.toFun
                                      {
                                        toFun :=
                                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                            (_ :
                                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                                (hxj : x ∈ (fun i => ↑(K i)) j),
                                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                            ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                                        map_one' :=
                                          (_ :
                                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                                (_ :
                                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                                    (hxj : x ∈ (fun i => ↑(K i)) j),
                                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                              1) }
                                      (x * y) =
                                    OneHom.toFun
                                        {
                                          toFun :=
                                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                              (_ :
                                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                                  (hxj : x ∈ (fun i => ↑(K i)) j),
                                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                                          map_one' :=
                                            (_ :
                                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                                  (_ :
                                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                                      (hxj : x ∈ (fun i => ↑(K i)) j),
                                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                                1) }
                                        x *
                                      OneHom.toFun
                                        {
                                          toFun :=
                                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                              (_ :
                                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                                  (hxj : x ∈ (fun i => ↑(K i)) j),
                                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),
                                          map_one' :=
                                            (_ :
                                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
                                                  (_ :
                                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)
                                                      (hxj : x ∈ (fun i => ↑(K i)) j),
                                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =
                                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })
                                                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =
                                                1) }
                                        y) })
                        y) })
      (↑(algebraMap R { x // x ∈ T }) r) =
    ↑(algebraMap R B) r
[PROOFSTEP]
dsimp
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
r : R
⊢ Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
      (_ :
        ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),
          ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })
      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) (↑(algebraMap R { x // x ∈ T }) r) =
    ↑(algebraMap R B) r
[PROOFSTEP]
apply Set.iUnionLift_const _ (fun _ => algebraMap R _ r)
[GOAL]
case hci
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
r : R
⊢ ∀ (i : ι), ↑(↑(algebraMap R ↑↑(K i)) r) = ↑(↑(algebraMap R { x // x ∈ T }) r)
[PROOFSTEP]
simp
[GOAL]
case h
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
r : R
⊢ ∀ (i : ι), ↑(f i) (↑(algebraMap R ↑↑(K i)) r) = ↑(algebraMap R B) r
[PROOFSTEP]
simp
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
i : ι
x : { x // x ∈ K i }
h : K i ≤ T
⊢ ↑(iSupLift K dir f hf T hT) (↑(inclusion h) x) = ↑(f i) x
[PROOFSTEP]
dsimp [iSupLift, inclusion]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
i : ι
x : { x // x ∈ K i }
h : K i ≤ T
⊢ Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
      (_ :
        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
          (fun i x => ↑(f i) x) i { val := x, property := hxi } = (fun i x => ↑(f i) x) j { val := x, property := hxj })
      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) (Set.inclusion h x) =
    ↑(f i) x
[PROOFSTEP]
rw [Set.iUnionLift_inclusion]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
i : ι
h : K i ≤ T
⊢ AlgHom.comp (iSupLift K dir f hf T hT) (inclusion h) = f i
[PROOFSTEP]
ext
[GOAL]
case H
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
i : ι
h : K i ≤ T
x✝ : { x // x ∈ K i }
⊢ ↑(AlgHom.comp (iSupLift K dir f hf T hT) (inclusion h)) x✝ = ↑(f i) x✝
[PROOFSTEP]
simp
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
i : ι
x : { x // x ∈ K i }
hx : ↑x ∈ T
⊢ ↑(iSupLift K dir f hf T hT) { val := ↑x, property := hx } = ↑(f i) x
[PROOFSTEP]
dsimp [iSupLift, inclusion]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
i : ι
x : { x // x ∈ K i }
hx : ↑x ∈ T
⊢ Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
      (_ :
        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
          (fun i x => ↑(f i) x) i { val := x, property := hxi } = (fun i x => ↑(f i) x) j { val := x, property := hxj })
      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) { val := ↑x, property := hx } =
    ↑(f i) x
[PROOFSTEP]
rw [Set.iUnionLift_mk]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
i : ι
x : { x // x ∈ T }
hx : ↑x ∈ K i
⊢ ↑(iSupLift K dir f hf T hT) x = ↑(f i) { val := ↑x, property := hx }
[PROOFSTEP]
dsimp [iSupLift, inclusion]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
i : ι
x : { x // x ∈ T }
hx : ↑x ∈ K i
⊢ Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
      (_ :
        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
          (fun i x => ↑(f i) x) i { val := x, property := hxi } = (fun i x => ↑(f i) x) j { val := x, property := hxj })
      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) x =
    ↑(f i) { val := ↑x, property := hx }
[PROOFSTEP]
rw [Set.iUnionLift_of_mem]
[GOAL]
R✝ : Type u
A✝ : Type v
B : Type w
inst✝⁷ : CommSemiring R✝
inst✝⁶ : Semiring A✝
inst✝⁵ : Algebra R✝ A✝
inst✝⁴ : Semiring B
inst✝³ : Algebra R✝ B
S✝ : Subalgebra R✝ A✝
α : Type u_1
β : Type u_2
R : Type u_3
A : Type u_4
inst✝² : CommSemiring R
inst✝¹ : CommSemiring A
inst✝ : Algebra R A
S : Subalgebra R A
⊢ RingHom.rangeS (algebraMap { x // x ∈ S } A) = S.toSubsemiring
[PROOFSTEP]
rw [algebraMap_eq, Algebra.id.map_eq_id, RingHom.id_comp, ← toSubsemiring_subtype, Subsemiring.rangeS_subtype]
[GOAL]
R✝ : Type u
A✝ : Type v
B : Type w
inst✝⁷ : CommSemiring R✝
inst✝⁶ : Semiring A✝
inst✝⁵ : Algebra R✝ A✝
inst✝⁴ : Semiring B
inst✝³ : Algebra R✝ B
S✝ : Subalgebra R✝ A✝
α : Type u_1
β : Type u_2
R : Type u_3
A : Type u_4
inst✝² : CommRing R
inst✝¹ : CommRing A
inst✝ : Algebra R A
S : Subalgebra R A
⊢ RingHom.range (algebraMap { x // x ∈ S } A) = toSubring S
[PROOFSTEP]
rw [algebraMap_eq, Algebra.id.map_eq_id, RingHom.id_comp, ← toSubring_subtype, Subring.range_subtype]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
S : Subalgebra R A
r : R
⊢ ↑(algebraMap R A) r ∈ Set.center A
[PROOFSTEP]
simp [Algebra.commutes, Set.mem_center_iff]
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
H : ∀ (i : ι), ∃ n, s i ^ n • x ∈ S'
⊢ x ∈ S'
[PROOFSTEP]
let _i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id _
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
H : ∀ (i : ι), ∃ n, s i ^ n • x ∈ S'
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
⊢ x ∈ S'
[PROOFSTEP]
suffices x ∈ Subalgebra.toSubmodule (Algebra.ofId S' S).range
  by
  obtain ⟨x, rfl⟩ := this
  exact x.2
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
H : ∀ (i : ι), ∃ n, s i ^ n • x ∈ S'
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
this : x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))
⊢ x ∈ S'
[PROOFSTEP]
obtain ⟨x, rfl⟩ := this
[GOAL]
case intro
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
x : { x // x ∈ S' }
H : ∀ (i : ι), ∃ n, s i ^ n • ↑↑(ofId { x // x ∈ S' } S) x ∈ S'
⊢ ↑↑(ofId { x // x ∈ S' } S) x ∈ S'
[PROOFSTEP]
exact x.2
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
H : ∀ (i : ι), ∃ n, s i ^ n • x ∈ S'
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
⊢ x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))
[PROOFSTEP]
choose n hn using H
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
n : ι → ℕ
hn : ∀ (i : ι), s i ^ n i • x ∈ S'
⊢ x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))
[PROOFSTEP]
let s' : ι → S' := fun x => ⟨s x, hs x⟩
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
n : ι → ℕ
hn : ∀ (i : ι), s i ^ n i • x ∈ S'
s' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }
⊢ x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))
[PROOFSTEP]
let l' : ι → S' := fun x => ⟨l x, hl x⟩
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
n : ι → ℕ
hn : ∀ (i : ι), s i ^ n i • x ∈ S'
s' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }
l' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }
⊢ x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))
[PROOFSTEP]
have e' : ∑ i in ι', l' i * s' i = 1 := by
  ext
  show S'.subtype (∑ i in ι', l' i * s' i) = 1
  simpa only [map_sum, map_mul] using e
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
n : ι → ℕ
hn : ∀ (i : ι), s i ^ n i • x ∈ S'
s' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }
l' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }
⊢ ∑ i in ι', l' i * s' i = 1
[PROOFSTEP]
ext
[GOAL]
case a
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
n : ι → ℕ
hn : ∀ (i : ι), s i ^ n i • x ∈ S'
s' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }
l' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }
⊢ ↑(∑ i in ι', l' i * s' i) = ↑1
[PROOFSTEP]
show S'.subtype (∑ i in ι', l' i * s' i) = 1
[GOAL]
case a
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
n : ι → ℕ
hn : ∀ (i : ι), s i ^ n i • x ∈ S'
s' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }
l' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }
⊢ ↑(Subsemiring.subtype S'.toSubsemiring) (∑ i in ι', l' i * s' i) = 1
[PROOFSTEP]
simpa only [map_sum, map_mul] using e
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
n : ι → ℕ
hn : ∀ (i : ι), s i ^ n i • x ∈ S'
s' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }
l' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }
e' : ∑ i in ι', l' i * s' i = 1
⊢ x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))
[PROOFSTEP]
have : Ideal.span (s' '' ι') = ⊤ := by
  rw [Ideal.eq_top_iff_one, ← e']
  apply sum_mem
  intros i hi
  exact Ideal.mul_mem_left _ _ <| Ideal.subset_span <| Set.mem_image_of_mem s' hi
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
n : ι → ℕ
hn : ∀ (i : ι), s i ^ n i • x ∈ S'
s' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }
l' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }
e' : ∑ i in ι', l' i * s' i = 1
⊢ Ideal.span (s' '' ↑ι') = ⊤
[PROOFSTEP]
rw [Ideal.eq_top_iff_one, ← e']
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
n : ι → ℕ
hn : ∀ (i : ι), s i ^ n i • x ∈ S'
s' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }
l' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }
e' : ∑ i in ι', l' i * s' i = 1
⊢ ∑ i in ι', l' i * s' i ∈ Ideal.span (s' '' ↑ι')
[PROOFSTEP]
apply sum_mem
[GOAL]
case h
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
n : ι → ℕ
hn : ∀ (i : ι), s i ^ n i • x ∈ S'
s' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }
l' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }
e' : ∑ i in ι', l' i * s' i = 1
⊢ ∀ (c : ι), c ∈ ι' → l' c * s' c ∈ Ideal.span (s' '' ↑ι')
[PROOFSTEP]
intros i hi
[GOAL]
case h
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
n : ι → ℕ
hn : ∀ (i : ι), s i ^ n i • x ∈ S'
s' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }
l' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }
e' : ∑ i in ι', l' i * s' i = 1
i : ι
hi : i ∈ ι'
⊢ l' i * s' i ∈ Ideal.span (s' '' ↑ι')
[PROOFSTEP]
exact Ideal.mul_mem_left _ _ <| Ideal.subset_span <| Set.mem_image_of_mem s' hi
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
n : ι → ℕ
hn : ∀ (i : ι), s i ^ n i • x ∈ S'
s' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }
l' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }
e' : ∑ i in ι', l' i * s' i = 1
this : Ideal.span (s' '' ↑ι') = ⊤
⊢ x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))
[PROOFSTEP]
let N := ι'.sup n
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
n : ι → ℕ
hn : ∀ (i : ι), s i ^ n i • x ∈ S'
s' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }
l' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }
e' : ∑ i in ι', l' i * s' i = 1
this : Ideal.span (s' '' ↑ι') = ⊤
N : ℕ := Finset.sup ι' n
⊢ x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))
[PROOFSTEP]
have hN := Ideal.span_pow_eq_top _ this N
[GOAL]
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
n : ι → ℕ
hn : ∀ (i : ι), s i ^ n i • x ∈ S'
s' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }
l' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }
e' : ∑ i in ι', l' i * s' i = 1
this : Ideal.span (s' '' ↑ι') = ⊤
N : ℕ := Finset.sup ι' n
hN : Ideal.span ((fun x => x ^ N) '' (s' '' ↑ι')) = ⊤
⊢ x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))
[PROOFSTEP]
apply (Algebra.ofId S' S).range.toSubmodule.mem_of_span_top_of_smul_mem _ hN
[GOAL]
case H
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
n : ι → ℕ
hn : ∀ (i : ι), s i ^ n i • x ∈ S'
s' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }
l' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }
e' : ∑ i in ι', l' i * s' i = 1
this : Ideal.span (s' '' ↑ι') = ⊤
N : ℕ := Finset.sup ι' n
hN : Ideal.span ((fun x => x ^ N) '' (s' '' ↑ι')) = ⊤
⊢ ∀ (r : ↑((fun x => x ^ N) '' (s' '' ↑ι'))), ↑r • x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))
[PROOFSTEP]
rintro ⟨_, _, ⟨i, hi, rfl⟩, rfl⟩
[GOAL]
case H.mk.intro.intro.intro.intro
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
n : ι → ℕ
hn : ∀ (i : ι), s i ^ n i • x ∈ S'
s' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }
l' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }
e' : ∑ i in ι', l' i * s' i = 1
this : Ideal.span (s' '' ↑ι') = ⊤
N : ℕ := Finset.sup ι' n
hN : Ideal.span ((fun x => x ^ N) '' (s' '' ↑ι')) = ⊤
i : ι
hi : i ∈ ↑ι'
⊢ ↑{ val := (fun x => x ^ N) (s' i),
          property := (_ : ∃ a, a ∈ s' '' ↑ι' ∧ (fun x => x ^ N) a = (fun x => x ^ N) (s' i)) } •
      x ∈
    ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))
[PROOFSTEP]
change s' i ^ N • x ∈ _
[GOAL]
case H.mk.intro.intro.intro.intro
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
n : ι → ℕ
hn : ∀ (i : ι), s i ^ n i • x ∈ S'
s' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }
l' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }
e' : ∑ i in ι', l' i * s' i = 1
this : Ideal.span (s' '' ↑ι') = ⊤
N : ℕ := Finset.sup ι' n
hN : Ideal.span ((fun x => x ^ N) '' (s' '' ↑ι')) = ⊤
i : ι
hi : i ∈ ↑ι'
⊢ s' i ^ N • x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))
[PROOFSTEP]
rw [← tsub_add_cancel_of_le (show n i ≤ N from Finset.le_sup hi), pow_add, mul_smul]
[GOAL]
case H.mk.intro.intro.intro.intro
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
n : ι → ℕ
hn : ∀ (i : ι), s i ^ n i • x ∈ S'
s' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }
l' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }
e' : ∑ i in ι', l' i * s' i = 1
this : Ideal.span (s' '' ↑ι') = ⊤
N : ℕ := Finset.sup ι' n
hN : Ideal.span ((fun x => x ^ N) '' (s' '' ↑ι')) = ⊤
i : ι
hi : i ∈ ↑ι'
⊢ s' i ^ (N - n i) • s' i ^ n i • x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))
[PROOFSTEP]
refine' Submodule.smul_mem _ (⟨_, pow_mem (hs i) _⟩ : S') _
[GOAL]
case H.mk.intro.intro.intro.intro
R : Type u
A : Type v
B : Type w
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
S✝ : Subalgebra R A
S : Type u_1
inst✝¹ : CommRing S
inst✝ : Algebra R S
S' : Subalgebra R S
ι : Type u_2
ι' : Finset ι
s l : ι → S
e : ∑ i in ι', l i * s i = 1
hs : ∀ (i : ι), s i ∈ S'
hl : ∀ (i : ι), l i ∈ S'
x : S
_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }
n : ι → ℕ
hn : ∀ (i : ι), s i ^ n i • x ∈ S'
s' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }
l' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }
e' : ∑ i in ι', l' i * s' i = 1
this : Ideal.span (s' '' ↑ι') = ⊤
N : ℕ := Finset.sup ι' n
hN : Ideal.span ((fun x => x ^ N) '' (s' '' ↑ι')) = ⊤
i : ι
hi : i ∈ ↑ι'
⊢ s' i ^ n i • x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))
[PROOFSTEP]
exact ⟨⟨_, hn i⟩, rfl⟩
[GOAL]
R : Type u_1
inst✝ : Ring R
S : Subring R
i : ℤ
⊢ ↑(algebraMap ℤ R) 0 ∈ S.carrier
[PROOFSTEP]
simpa using S.zero_mem
[GOAL]
R : Type u_1
inst✝ : Ring R
S : Subring R
i✝ : ℤ
i : ℕ
ih : ↑(algebraMap ℤ R) ↑i ∈ S.carrier
⊢ ↑(algebraMap ℤ R) (↑i + 1) ∈ S.carrier
[PROOFSTEP]
simpa using S.add_mem ih S.one_mem
[GOAL]
R : Type u_1
inst✝ : Ring R
S : Subring R
i✝ : ℤ
i : ℕ
ih : ↑(algebraMap ℤ R) (-↑i) ∈ S.carrier
⊢ ↑(-↑i - 1) ∈ S
[PROOFSTEP]
rw [Int.cast_sub, Int.cast_one]
[GOAL]
R : Type u_1
inst✝ : Ring R
S : Subring R
i✝ : ℤ
i : ℕ
ih : ↑(algebraMap ℤ R) (-↑i) ∈ S.carrier
⊢ ↑(-↑i) - 1 ∈ S
[PROOFSTEP]
exact S.sub_mem ih S.one_mem
