File: Mathlib/RingTheory/Adjoin/Basic.lean

full_name: Algebra.subset_adjoin
code: @[aesop safe 20 apply (rule_sets := [SetLike])]
theorem subset_adjoin : s ⊆ adjoin R s 
goal: s ⊆ ↑(Algebra.adjoin R s)

full_name: Algebra.adjoin_le
code: theorem adjoin_le {S : Subalgebra R A} (H : s ⊆ S) : adjoin R s ≤ S 
goal: Algebra.adjoin R s ≤ S

full_name: Algebra.adjoin_eq_sInf
code: theorem adjoin_eq_sInf : adjoin R s = sInf { p : Subalgebra R A | s ⊆ p } 
goal: Algebra.adjoin R s = sInf {p | s ⊆ ↑p}

full_name: Algebra.adjoin_le_iff
code: theorem adjoin_le_iff {S : Subalgebra R A} : adjoin R s ≤ S ↔ s ⊆ S 
goal: Algebra.adjoin R s ≤ S ↔ s ⊆ ↑S

full_name: Algebra.adjoin_mono
code: theorem adjoin_mono (H : s ⊆ t) : adjoin R s ≤ adjoin R t 
goal: Algebra.adjoin R s ≤ Algebra.adjoin R t

full_name: Algebra.adjoin_eq_of_le
code: theorem adjoin_eq_of_le (S : Subalgebra R A) (h₁ : s ⊆ S) (h₂ : S ≤ adjoin R s) : adjoin R s = S 
goal: Algebra.adjoin R s = S

full_name: Algebra.adjoin_eq
code: theorem adjoin_eq (S : Subalgebra R A) : adjoin R ↑S = S 
goal: Algebra.adjoin R ↑S = S

full_name: Algebra.adjoin_iUnion
code: theorem adjoin_iUnion {α : Type*} (s : α → Set A) :
    adjoin R (Set.iUnion s) = ⨆ i : α, adjoin R (s i) 
goal: Algebra.adjoin R (Set.iUnion s) = ⨆ i, Algebra.adjoin R (s i)

full_name: Algebra.adjoin_attach_biUnion
code: theorem adjoin_attach_biUnion [DecidableEq A] {α : Type*} {s : Finset α} (f : s → Finset A) :
    adjoin R (s.attach.biUnion f : Set A) = ⨆ x, adjoin R (f x) 
goal: Algebra.adjoin R ↑(s.attach.biUnion f) = ⨆ x, Algebra.adjoin R ↑(f x)

full_name: Algebra.adjoin_induction
code: @[elab_as_elim]
theorem adjoin_induction {p : A → Prop} {x : A} (h : x ∈ adjoin R s) (mem : ∀ x ∈ s, p x)
    (algebraMap : ∀ r, p (algebraMap R A r)) (add : ∀ x y, p x → p y → p (x + y))
    (mul : ∀ x y, p x → p y → p (x * y)) : p x 
goal: p x

full_name: Algebra.adjoin_induction₂
code: /-- Induction principle for the algebra generated by a set `s`: show that `p x y` holds for any
`x y ∈ adjoin R s` given that it holds for `x y ∈ s` and that it satisfies a number of
natural properties. -/
@[elab_as_elim]
theorem adjoin_induction₂ {p : A → A → Prop} {a b : A} (ha : a ∈ adjoin R s) (hb : b ∈ adjoin R s)
    (Hs : ∀ x ∈ s, ∀ y ∈ s, p x y) (Halg : ∀ r₁ r₂, p (algebraMap R A r₁) (algebraMap R A r₂))
    (Halg_left : ∀ (r), ∀ x ∈ s, p (algebraMap R A r) x)
    (Halg_right : ∀ (r), ∀ x ∈ s, p x (algebraMap R A r))
    (Hadd_left : ∀ x₁ x₂ y, p x₁ y → p x₂ y → p (x₁ + x₂) y)
    (Hadd_right : ∀ x y₁ y₂, p x y₁ → p x y₂ → p x (y₁ + y₂))
    (Hmul_left : ∀ x₁ x₂ y, p x₁ y → p x₂ y → p (x₁ * x₂) y)
    (Hmul_right : ∀ x y₁ y₂, p x y₁ → p x y₂ → p x (y₁ * y₂)) : p a b 
goal: p a b

full_name: Algebra.adjoin_induction'
code: /-- The difference with `Algebra.adjoin_induction` is that this acts on the subtype. -/
@[elab_as_elim]
theorem adjoin_induction' {p : adjoin R s → Prop} (mem : ∀ (x) (h : x ∈ s), p ⟨x, subset_adjoin h⟩)
    (algebraMap : ∀ r, p (algebraMap R _ r)) (add : ∀ x y, p x → p y → p (x + y))
    (mul : ∀ x y, p x → p y → p (x * y)) (x : adjoin R s) : p x 
goal: p x

full_name: Algebra.adjoin_induction''
code: @[elab_as_elim]
theorem adjoin_induction'' {x : A} (hx : x ∈ adjoin R s)
    {p : (x : A) → x ∈ adjoin R s → Prop} (mem : ∀ x (h : x ∈ s), p x (subset_adjoin h))
    (algebraMap : ∀ (r : R), p (algebraMap R A r) (algebraMap_mem _ r))
    (add : ∀ x hx y hy, p x hx → p y hy → p (x + y) (add_mem hx hy))
    (mul : ∀ x hx y hy, p x hx → p y hy → p (x * y) (mul_mem hx hy)) :
    p x hx 
goal: p x hx

full_name: Algebra.adjoin_adjoin_coe_preimage
code: @[simp]
theorem adjoin_adjoin_coe_preimage {s : Set A} : adjoin R (((↑) : adjoin R s → A) ⁻¹' s) = ⊤ 
goal: Algebra.adjoin R (Subtype.val ⁻¹' s) = ⊤

full_name: Algebra.adjoin_union
code: theorem adjoin_union (s t : Set A) : adjoin R (s ∪ t) = adjoin R s ⊔ adjoin R t 
goal: Algebra.adjoin R (s ∪ t) = Algebra.adjoin R s ⊔ Algebra.adjoin R t

full_name: Algebra.adjoin_empty
code: @[simp]
theorem adjoin_empty : adjoin R (∅ : Set A) = ⊥ 
goal: Algebra.adjoin R ∅ = ⊥

full_name: Algebra.adjoin_univ
code: @[simp]
theorem adjoin_univ : adjoin R (Set.univ : Set A) = ⊤ 
goal: Algebra.adjoin R Set.univ = ⊤

full_name: Algebra.adjoin_eq_span
code: theorem adjoin_eq_span : Subalgebra.toSubmodule (adjoin R s) = span R (Submonoid.closure s) 
goal: Subalgebra.toSubmodule (Algebra.adjoin R s) = Submodule.span R ↑(Submonoid.closure s)

full_name: Algebra.span_le_adjoin
code: theorem span_le_adjoin (s : Set A) : span R s ≤ Subalgebra.toSubmodule (adjoin R s) 
goal: Submodule.span R s ≤ Subalgebra.toSubmodule (Algebra.adjoin R s)

full_name: Algebra.adjoin_toSubmodule_le
code: theorem adjoin_toSubmodule_le {s : Set A} {t : Submodule R A} :
    Subalgebra.toSubmodule (adjoin R s) ≤ t ↔ ↑(Submonoid.closure s) ⊆ (t : Set A) 
goal: Subalgebra.toSubmodule (Algebra.adjoin R s) ≤ t ↔ ↑(Submonoid.closure s) ⊆ ↑t

full_name: Algebra.adjoin_eq_span_of_subset
code: theorem adjoin_eq_span_of_subset {s : Set A} (hs : ↑(Submonoid.closure s) ⊆ (span R s : Set A)) :
    Subalgebra.toSubmodule (adjoin R s) = span R s 
goal: Subalgebra.toSubmodule (Algebra.adjoin R s) = Submodule.span R s

full_name: Algebra.adjoin_span
code: @[simp]
theorem adjoin_span {s : Set A} : adjoin R (Submodule.span R s : Set A) = adjoin R s 
goal: Algebra.adjoin R ↑(Submodule.span R s) = Algebra.adjoin R s

full_name: Algebra.adjoin_image
code: theorem adjoin_image (f : A →ₐ[R] B) (s : Set A) : adjoin R (f '' s) = (adjoin R s).map f 
goal: Algebra.adjoin R (⇑f '' s) = Subalgebra.map f (Algebra.adjoin R s)

full_name: Algebra.adjoin_insert_adjoin
code: @[simp]
theorem adjoin_insert_adjoin (x : A) : adjoin R (insert x ↑(adjoin R s)) = adjoin R (insert x s) 
goal: Algebra.adjoin R (insert x ↑(Algebra.adjoin R s)) = Algebra.adjoin R (insert x s)

full_name: Algebra.adjoin_prod_le
code: theorem adjoin_prod_le (s : Set A) (t : Set B) :
    adjoin R (s ×ˢ t) ≤ (adjoin R s).prod (adjoin R t) 
goal: Algebra.adjoin R (s ×ˢ t) ≤ (Algebra.adjoin R s).prod (Algebra.adjoin R t)

full_name: Algebra.mem_adjoin_of_map_mul
code: theorem mem_adjoin_of_map_mul {s} {x : A} {f : A →ₗ[R] B} (hf : ∀ a₁ a₂, f (a₁ * a₂) = f a₁ * f a₂)
    (h : x ∈ adjoin R s) : f x ∈ adjoin R (f '' (s ∪ {1})) 
goal: f x ∈ Algebra.adjoin R (⇑f '' (s ∪ {1}))

full_name: Algebra.adjoin_inl_union_inr_eq_prod
code: theorem adjoin_inl_union_inr_eq_prod (s) (t) :
    adjoin R (LinearMap.inl R A B '' (s ∪ {1}) ∪ LinearMap.inr R A B '' (t ∪ {1})) =
      (adjoin R s).prod (adjoin R t) 
goal: Algebra.adjoin R (⇑(LinearMap.inl R A B) '' (s ∪ {1}) ∪ ⇑(LinearMap.inr R A B) '' (t ∪ {1})) =
  (Algebra.adjoin R s).prod (Algebra.adjoin R t)

full_name: Algebra.adjoinCommSemiringOfComm
code: /-- If all elements of `s : Set A` commute pairwise, then `adjoin R s` is a commutative
semiring.  -/
def adjoinCommSemiringOfComm {s : Set A} (hcomm : ∀ a ∈ s, ∀ b ∈ s, a * b = b * a) :
    CommSemiring (adjoin R s) 
goal: CommSemiring ↥(Algebra.adjoin R s)

full_name: Algebra.commute_of_mem_adjoin_of_forall_mem_commute
code: lemma commute_of_mem_adjoin_of_forall_mem_commute {a b : A} {s : Set A}
    (hb : b ∈ adjoin R s) (h : ∀ b ∈ s, Commute a b) :
    Commute a b 
goal: Commute a b

full_name: Algebra.commute_of_mem_adjoin_singleton_of_commute
code: lemma commute_of_mem_adjoin_singleton_of_commute {a b c : A}
    (hc : c ∈ adjoin R {b}) (h : Commute a b) :
    Commute a c 
goal: Commute a c

full_name: Algebra.commute_of_mem_adjoin_self
code: lemma commute_of_mem_adjoin_self {a b : A} (hb : b ∈ adjoin R {a}) :
    Commute a b 
goal: Commute a b

full_name: Algebra.adjoin_singleton_one
code: theorem adjoin_singleton_one : adjoin R ({1} : Set A) = ⊥ 
goal: Algebra.adjoin R {1} = ⊥

full_name: Algebra.self_mem_adjoin_singleton
code: theorem self_mem_adjoin_singleton (x : A) : x ∈ adjoin R ({x} : Set A) 
goal: x ∈ Algebra.adjoin R {x}

full_name: Algebra.adjoin_algebraMap
code: theorem adjoin_algebraMap (s : Set S) :
    adjoin R (algebraMap S A '' s) = (adjoin R s).map (IsScalarTower.toAlgHom R S A) 
goal: Algebra.adjoin R (⇑(algebraMap S A) '' s) = Subalgebra.map (IsScalarTower.toAlgHom R S A) (Algebra.adjoin R s)

full_name: Algebra.adjoin_algebraMap_image_union_eq_adjoin_adjoin
code: theorem adjoin_algebraMap_image_union_eq_adjoin_adjoin (s : Set S) (t : Set A) :
    adjoin R (algebraMap S A '' s ∪ t) = (adjoin (adjoin R s) t).restrictScalars R 
goal: Algebra.adjoin R (⇑(algebraMap S A) '' s ∪ t) = Subalgebra.restrictScalars R (Algebra.adjoin (↥(Algebra.adjoin R s)) t)

full_name: Algebra.adjoin_adjoin_of_tower
code: theorem adjoin_adjoin_of_tower (s : Set A) : adjoin S (adjoin R s : Set A) = adjoin S s 
goal: Algebra.adjoin S ↑(Algebra.adjoin R s) = Algebra.adjoin S s

full_name: Algebra.adjoin_top
code: @[simp]
theorem adjoin_top :
    adjoin (⊤ : Subalgebra R S) t = (adjoin S t).restrictScalars (⊤ : Subalgebra R S) 
goal: Algebra.adjoin (↥⊤) t = Subalgebra.restrictScalars (↥⊤) (Algebra.adjoin S t)

full_name: Algebra.adjoin_union_eq_adjoin_adjoin
code: theorem adjoin_union_eq_adjoin_adjoin :
    adjoin R (s ∪ t) = (adjoin (adjoin R s) t).restrictScalars R 
goal: Algebra.adjoin R (s ∪ t) = Subalgebra.restrictScalars R (Algebra.adjoin (↥(Algebra.adjoin R s)) t)

full_name: Algebra.adjoin_union_coe_submodule
code: theorem adjoin_union_coe_submodule :
    Subalgebra.toSubmodule (adjoin R (s ∪ t)) =
      Subalgebra.toSubmodule (adjoin R s) * Subalgebra.toSubmodule (adjoin R t) 
goal: Subalgebra.toSubmodule (Algebra.adjoin R (s ∪ t)) =
  Subalgebra.toSubmodule (Algebra.adjoin R s) * Subalgebra.toSubmodule (Algebra.adjoin R t)

full_name: Algebra.pow_smul_mem_of_smul_subset_of_mem_adjoin
code: theorem pow_smul_mem_of_smul_subset_of_mem_adjoin [CommSemiring B] [Algebra R B] [Algebra A B]
    [IsScalarTower R A B] (r : A) (s : Set B) (B' : Subalgebra R B) (hs : r • s ⊆ B') {x : B}
    (hx : x ∈ adjoin R s) (hr : algebraMap A B r ∈ B') : ∃ n₀ : ℕ, ∀ n ≥ n₀, r ^ n • x ∈ B' 
goal: ∃ n₀, ∀ n ≥ n₀, r ^ n • x ∈ B'

full_name: Algebra.pow_smul_mem_adjoin_smul
code: theorem pow_smul_mem_adjoin_smul (r : R) (s : Set A) {x : A} (hx : x ∈ adjoin R s) :
    ∃ n₀ : ℕ, ∀ n ≥ n₀, r ^ n • x ∈ adjoin R (r • s) 
goal: ∃ n₀, ∀ n ≥ n₀, r ^ n • x ∈ Algebra.adjoin R (r • s)

full_name: Algebra.mem_adjoin_iff
code: theorem mem_adjoin_iff {s : Set A} {x : A} :
    x ∈ adjoin R s ↔ x ∈ Subring.closure (Set.range (algebraMap R A) ∪ s) 
goal: x ∈ Algebra.adjoin R s ↔ x ∈ Subring.closure (Set.range ⇑(algebraMap R A) ∪ s)

full_name: Algebra.adjoin_eq_ring_closure
code: theorem adjoin_eq_ring_closure (s : Set A) :
    (adjoin R s).toSubring = Subring.closure (Set.range (algebraMap R A) ∪ s) 
goal: (Algebra.adjoin R s).toSubring = Subring.closure (Set.range ⇑(algebraMap R A) ∪ s)

full_name: Algebra.adjoinCommRingOfComm
code: /-- If all elements of `s : Set A` commute pairwise, then `adjoin R s` is a commutative
ring.  -/
def adjoinCommRingOfComm {s : Set A} (hcomm : ∀ a ∈ s, ∀ b ∈ s, a * b = b * a) :
    CommRing (adjoin R s) 
goal: CommRing ↥(Algebra.adjoin R s)

full_name: AlgHom.map_adjoin
code: theorem map_adjoin (φ : A →ₐ[R] B) (s : Set A) : (adjoin R s).map φ = adjoin R (φ '' s) 
goal: Subalgebra.map φ (Algebra.adjoin R s) = Algebra.adjoin R (⇑φ '' s)

full_name: AlgHom.map_adjoin_singleton
code: @[simp]
theorem map_adjoin_singleton (e : A →ₐ[R] B) (x : A) :
    (adjoin R {x}).map e = adjoin R {e x} 
goal: Subalgebra.map e (Algebra.adjoin R {x}) = Algebra.adjoin R {e x}

full_name: AlgHom.adjoin_le_equalizer
code: theorem adjoin_le_equalizer (φ₁ φ₂ : A →ₐ[R] B) {s : Set A} (h : s.EqOn φ₁ φ₂) :
    adjoin R s ≤ equalizer φ₁ φ₂ 
goal: Algebra.adjoin R s ≤ AlgHom.equalizer φ₁ φ₂

full_name: AlgHom.ext_of_adjoin_eq_top
code: theorem ext_of_adjoin_eq_top {s : Set A} (h : adjoin R s = ⊤) ⦃φ₁ φ₂ : A →ₐ[R] B⦄
    (hs : s.EqOn φ₁ φ₂) : φ₁ = φ₂ 
goal: φ₁ = φ₂

full_name: AlgHom.eqOn_adjoin_iff
code: /-- Two algebra morphisms are equal on `Algebra.span s`iff they are equal on s -/
theorem eqOn_adjoin_iff {φ ψ : A →ₐ[R] B} {s : Set A}  :
    Set.EqOn φ ψ (adjoin R s) ↔ Set.EqOn φ ψ s 
goal: Set.EqOn ⇑φ ⇑ψ ↑(Algebra.adjoin R s) ↔ Set.EqOn (⇑φ) (⇑ψ) s

full_name: Algebra.adjoin_nat
code: theorem Algebra.adjoin_nat {R : Type*} [Semiring R] (s : Set R) :
    adjoin ℕ s = subalgebraOfSubsemiring (Subsemiring.closure s) 
goal: Algebra.adjoin ℕ s = subalgebraOfSubsemiring (Subsemiring.closure s)

full_name: Algebra.adjoin_int
code: theorem Algebra.adjoin_int {R : Type*} [Ring R] (s : Set R) :
    adjoin ℤ s = subalgebraOfSubring (Subring.closure s) 
goal: Algebra.adjoin ℤ s = subalgebraOfSubring (Subring.closure s)

full_name: Subsemiring.closureEquivAdjoinNat
code: /-- The `ℕ`-algebra equivalence between `Subsemiring.closure s` and `Algebra.adjoin ℕ s` given
by the identity map. -/
def Subsemiring.closureEquivAdjoinNat {R : Type*} [Semiring R] (s : Set R) :
    Subsemiring.closure s ≃ₐ[ℕ] Algebra.adjoin ℕ s 
goal: ↥(Subsemiring.closure s) ≃ₐ[ℕ] ↥(Algebra.adjoin ℕ s)

full_name: Subring.closureEquivAdjoinInt
code: /-- The `ℤ`-algebra equivalence between `Subring.closure s` and `Algebra.adjoin ℤ s` given by
the identity map. -/
def Subring.closureEquivAdjoinInt {R : Type*} [Ring R] (s : Set R) :
    Subring.closure s ≃ₐ[ℤ] Algebra.adjoin ℤ s 
goal: ↥(Subring.closure s) ≃ₐ[ℤ] ↥(Algebra.adjoin ℤ s)

full_name: Submonoid.adjoin_eq_span_of_eq_span
code: /-- If `K / E / F` is a ring extension tower, `L` is a submonoid of `K / F` which is generated by
`S` as an `F`-module, then `E[L]` is generated by `S` as an `E`-module. -/
theorem Submonoid.adjoin_eq_span_of_eq_span [Semiring F] [Module F K] [IsScalarTower F E K]
    (L : Submonoid K) {S : Set K} (h : (L : Set K) = span F S) :
    toSubmodule (adjoin E (L : Set K)) = span E S 
goal: Subalgebra.toSubmodule (Algebra.adjoin E ↑L) = Submodule.span E S

full_name: Subalgebra.adjoin_eq_span_of_eq_span
code: /-- If `K / E / F` is a ring extension tower, `L` is a subalgebra of `K / F` which is generated by
`S` as an `F`-module, then `E[L]` is generated by `S` as an `E`-module. -/
theorem Subalgebra.adjoin_eq_span_of_eq_span {S : Set K} (h : toSubmodule L = span F S) :
    toSubmodule (adjoin E (L : Set K)) = span E S 
goal: Subalgebra.toSubmodule (Algebra.adjoin E ↑L) = Submodule.span E S

full_name: Subalgebra.adjoin_eq_span_basis
code: /-- If `K / E / F` is a ring extension tower, `L` is a subalgebra of `K / F`,
then `E[L]` is generated by any basis of `L / F` as an `E`-module. -/
theorem Subalgebra.adjoin_eq_span_basis {ι : Type*} (bL : Basis ι F L) :
    toSubmodule (adjoin E (L : Set K)) = span E (Set.range fun i : ι ↦ (bL i).1) 
goal: Subalgebra.toSubmodule (Algebra.adjoin E ↑L) = Submodule.span E (Set.range fun i => ↑(bL i))

full_name: Algebra.restrictScalars_adjoin
code: theorem Algebra.restrictScalars_adjoin (F : Type*) [CommSemiring F] {E : Type*} [CommSemiring E]
    [Algebra F E] (K : Subalgebra F E) (S : Set E) :
    (Algebra.adjoin K S).restrictScalars F = Algebra.adjoin F (K ∪ S) 
goal: Subalgebra.restrictScalars F (Algebra.adjoin (↥K) S) = Algebra.adjoin F (↑K ∪ S)

full_name: Algebra.restrictScalars_adjoin_of_algEquiv
code: /-- If `E / L / F` and `E / L' / F` are two ring extension towers, `L ≃ₐ[F] L'` is an isomorphism
compatible with `E / L` and `E / L'`, then for any subset `S` of `E`, `L[S]` and `L'[S]` are
equal as subalgebras of `E / F`. -/
theorem Algebra.restrictScalars_adjoin_of_algEquiv
    {F E L L' : Type*} [CommSemiring F] [CommSemiring L] [CommSemiring L'] [Semiring E]
    [Algebra F L] [Algebra L E] [Algebra F L'] [Algebra L' E] [Algebra F E]
    [IsScalarTower F L E] [IsScalarTower F L' E] (i : L ≃ₐ[F] L')
    (hi : algebraMap L E = (algebraMap L' E) ∘ i) (S : Set E) :
    (Algebra.adjoin L S).restrictScalars F = (Algebra.adjoin L' S).restrictScalars F 
goal: Subalgebra.restrictScalars F (Algebra.adjoin L S) = Subalgebra.restrictScalars F (Algebra.adjoin L' S)

full_name: Subalgebra.comap_map_eq
code: theorem comap_map_eq (f : A →ₐ[R] B) (S : Subalgebra R A) :
    (S.map f).comap f = S ⊔ Algebra.adjoin R (f ⁻¹' {0}) 
goal: Subalgebra.comap f (Subalgebra.map f S) = S ⊔ Algebra.adjoin R (⇑f ⁻¹' {0})

full_name: Subalgebra.comap_map_eq_self
code: theorem comap_map_eq_self {f : A →ₐ[R] B} {S : Subalgebra R A}
    (h : f ⁻¹' {0} ⊆ S) : (S.map f).comap f = S 
goal: Subalgebra.comap f (Subalgebra.map f S) = S