Documentation

Mathlib.Algebra.Ring.Subsemiring.Basic

Bundled subsemirings #

We define some standard constructions on bundled subsemirings: CompleteLattice structure, subsemiring map, comap and range (rangeS) of a RingHom etc.

instance SubsemiringClass.instCharZero {R : Type u} {S : Type v} [NonAssocSemiring R] [SetLike S R] [hSR : SubsemiringClass S R] (s : S) [CharZero R] :
CharZero β†₯s
theorem Subsemiring.list_prod_mem {R : Type u_1} [Semiring R] (s : Subsemiring R) {l : List R} :
(βˆ€ x ∈ l, x ∈ s) β†’ l.prod ∈ s

Product of a list of elements in a Subsemiring is in the Subsemiring.

theorem Subsemiring.list_sum_mem {R : Type u} [NonAssocSemiring R] (s : Subsemiring R) {l : List R} :
(βˆ€ x ∈ l, x ∈ s) β†’ l.sum ∈ s

Sum of a list of elements in a Subsemiring is in the Subsemiring.

theorem Subsemiring.multiset_prod_mem {R : Type u_1} [CommSemiring R] (s : Subsemiring R) (m : Multiset R) :
(βˆ€ a ∈ m, a ∈ s) β†’ m.prod ∈ s

Product of a multiset of elements in a Subsemiring of a CommSemiring is in the Subsemiring.

theorem Subsemiring.multiset_sum_mem {R : Type u} [NonAssocSemiring R] (s : Subsemiring R) (m : Multiset R) :
(βˆ€ a ∈ m, a ∈ s) β†’ m.sum ∈ s

Sum of a multiset of elements in a Subsemiring of a NonAssocSemiring is in the Subsemiring.

theorem Subsemiring.prod_mem {R : Type u_1} [CommSemiring R] (s : Subsemiring R) {ΞΉ : Type u_2} {t : Finset ΞΉ} {f : ΞΉ β†’ R} (h : βˆ€ c ∈ t, f c ∈ s) :
∏ i ∈ t, f i ∈ s

Product of elements of a subsemiring of a CommSemiring indexed by a Finset is in the Subsemiring.

theorem Subsemiring.sum_mem {R : Type u} [NonAssocSemiring R] (s : Subsemiring R) {ΞΉ : Type u_1} {t : Finset ΞΉ} {f : ΞΉ β†’ R} (h : βˆ€ c ∈ t, f c ∈ s) :
βˆ‘ i ∈ t, f i ∈ s

Sum of elements in a Subsemiring of a NonAssocSemiring indexed by a Finset is in the Subsemiring.

The ring equiv between the top element of Subsemiring R and R.

Instances For
    @[simp]
    theorem Subsemiring.topEquiv_apply {R : Type u} [NonAssocSemiring R] (r : β†₯⊀) :
    topEquiv r = ↑r

    The preimage of a subsemiring along a ring homomorphism is a subsemiring.

    Instances For
      @[simp]
      theorem Subsemiring.coe_comap {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (f : R β†’+* S) (s : Subsemiring S) :
      ↑(comap f s) = ⇑f ⁻¹' ↑s
      @[simp]
      theorem Subsemiring.comap_toSubmonoid {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (f : R β†’+* S) (s : Subsemiring S) :
      (comap f s).toSubmonoid = { carrier := ⇑f ⁻¹' ↑s, mul_mem' := β‹―, one_mem' := β‹― }
      @[simp]
      theorem Subsemiring.mem_comap {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {s : Subsemiring S} {f : R β†’+* S} {x : R} :
      x ∈ comap f s ↔ f x ∈ s
      theorem Subsemiring.comap_comap {R : Type u} {S : Type v} {T : Type w} [NonAssocSemiring R] [NonAssocSemiring S] [NonAssocSemiring T] (s : Subsemiring T) (g : S β†’+* T) (f : R β†’+* S) :
      comap f (comap g s) = comap (g.comp f) s

      The image of a subsemiring along a ring homomorphism is a subsemiring.

      Instances For
        @[simp]
        theorem Subsemiring.map_toSubmonoid {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (f : R β†’+* S) (s : Subsemiring R) :
        (map f s).toSubmonoid = { carrier := ⇑f '' ↑s, mul_mem' := β‹―, one_mem' := β‹― }
        @[simp]
        theorem Subsemiring.coe_map {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (f : R β†’+* S) (s : Subsemiring R) :
        ↑(map f s) = ⇑f '' ↑s
        @[simp]
        theorem Subsemiring.mem_map {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {f : R β†’+* S} {s : Subsemiring R} {y : S} :
        y ∈ map f s ↔ βˆƒ x ∈ s, f x = y
        theorem Subsemiring.map_map {R : Type u} {S : Type v} {T : Type w} [NonAssocSemiring R] [NonAssocSemiring S] [NonAssocSemiring T] (s : Subsemiring R) (g : S β†’+* T) (f : R β†’+* S) :
        map g (map f s) = map (g.comp f) s
        noncomputable def Subsemiring.equivMapOfInjective {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (s : Subsemiring R) (f : R β†’+* S) (hf : Function.Injective ⇑f) :
        β†₯s ≃+* β†₯(map f s)

        A subsemiring is isomorphic to its image under an injective function

        Instances For
          @[simp]
          theorem Subsemiring.coe_equivMapOfInjective_apply {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (s : Subsemiring R) (f : R β†’+* S) (hf : Function.Injective ⇑f) (x : β†₯s) :
          ↑((s.equivMapOfInjective f hf) x) = f ↑x

          The range of a ring homomorphism is a subsemiring. See Note [range copy pattern].

          Instances For
            @[simp]
            theorem RingHom.coe_rangeS {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (f : R β†’+* S) :
            ↑f.rangeS = Set.range ⇑f
            @[simp]
            theorem RingHom.rangeS_toSubmonoid {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (f : R β†’+* S) :
            f.rangeS.toSubmonoid = { carrier := Set.range ⇑f, mul_mem' := β‹―, one_mem' := β‹― }
            @[simp]
            theorem RingHom.mem_rangeS {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {f : R β†’+* S} {y : S} :
            y ∈ f.rangeS ↔ βˆƒ (x : R), f x = y
            theorem RingHom.mem_rangeS_self {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (f : R β†’+* S) (x : R) :
            f x ∈ f.rangeS
            theorem RingHom.rangeS_eq_top {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {f : R β†’+* S} :
            f.rangeS = ⊀ ↔ Function.Surjective ⇑f
            @[implicit_reducible]
            instance RingHom.fintypeRangeS {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] [Fintype R] [DecidableEq S] (f : R β†’+* S) :
            Fintype β†₯f.rangeS

            The range of a morphism of semirings is a fintype, if the domain is a fintype. Note: this instance can form a diamond with Subtype.fintype in the presence of Fintype S.

            @[implicit_reducible]
            @[implicit_reducible]
            instance Subsemiring.instInhabited {R : Type u} [NonAssocSemiring R] :
            Inhabited (Subsemiring R)
            theorem Subsemiring.mem_bot {R : Type u} [NonAssocSemiring R] {x : R} :
            x ∈ βŠ₯ ↔ βˆƒ (n : β„•), ↑n = x
            @[simp]
            theorem Subsemiring.coe_sInf {R : Type u} [NonAssocSemiring R] (S : Set (Subsemiring R)) :
            ↑(sInf S) = β‹‚ s ∈ S, ↑s
            @[simp]
            theorem Subsemiring.mem_sInf {R : Type u} [NonAssocSemiring R] {S : Set (Subsemiring R)} {x : R} :
            x ∈ sInf S ↔ βˆ€ p ∈ S, x ∈ p
            @[simp]
            theorem Subsemiring.coe_iInf {R : Type u} [NonAssocSemiring R] {ΞΉ : Sort u_1} {S : ΞΉ β†’ Subsemiring R} :
            ↑(β¨… (i : ΞΉ), S i) = β‹‚ (i : ΞΉ), ↑(S i)
            @[simp]
            theorem Subsemiring.mem_iInf {R : Type u} [NonAssocSemiring R] {ΞΉ : Sort u_1} {S : ΞΉ β†’ Subsemiring R} {x : R} :
            x ∈ β¨… (i : ΞΉ), S i ↔ βˆ€ (i : ΞΉ), x ∈ S i
            @[simp]
            theorem Subsemiring.sInf_toSubmonoid {R : Type u} [NonAssocSemiring R] (s : Set (Subsemiring R)) :
            (sInf s).toSubmonoid = β¨… t ∈ s, t.toSubmonoid
            @[implicit_reducible]

            Subsemirings of a semiring form a complete lattice.

            theorem Subsemiring.eq_top_iff' {R : Type u} [NonAssocSemiring R] (A : Subsemiring R) :
            A = ⊀ ↔ βˆ€ (x : R), x ∈ A

            The center of a non-associative semiring R is the set of elements that commute and associate with everything in R

            Instances For
              @[simp]
              theorem Subsemiring.center_toSubmonoid (R : Type u) [NonAssocSemiring R] :
              (center R).toSubmonoid = { carrier := (NonUnitalSubsemiring.center R).carrier, mul_mem' := β‹―, one_mem' := β‹― }
              @[reducible, inline]

              The center is commutative and associative.

              This is not an instance as it forms a non-defeq diamond with NonUnitalSubringClass.toNonUnitalRing in the npow field.

              Instances For
                def Subsemiring.centerCongr {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (e : R ≃+* S) :
                β†₯(center R) ≃+* β†₯(center S)

                The center of isomorphic (not necessarily associative) semirings are isomorphic.

                Instances For
                  @[simp]
                  theorem Subsemiring.centerCongr_apply_coe {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (e : R ≃+* S) (r : β†₯(Subsemigroup.center R)) :
                  ↑((centerCongr e) r) = e ↑r
                  @[simp]
                  theorem Subsemiring.centerCongr_symm_apply_coe {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (e : R ≃+* S) (s : β†₯(Subsemigroup.center S)) :
                  ↑((centerCongr e).symm s) = (↑e).symm ↑s

                  The center of a (not necessarily associative) semiring is isomorphic to the center of its opposite.

                  Instances For
                    @[implicit_reducible]

                    The center is commutative.

                    theorem Subsemiring.mem_center_iff {R : Type u_1} [Semiring R] {z : R} :
                    z ∈ center R ↔ βˆ€ (g : R), g * z = z * g
                    @[implicit_reducible]
                    instance Subsemiring.decidableMemCenter {R : Type u_1} [Semiring R] [DecidableEq R] [Fintype R] :
                    DecidablePred fun (x : R) => x ∈ center R
                    def Subsemiring.centralizer {R : Type u_1} [Semiring R] (s : Set R) :

                    The centralizer of a set as subsemiring.

                    Instances For
                      @[simp]
                      theorem Subsemiring.coe_centralizer {R : Type u_1} [Semiring R] (s : Set R) :
                      ↑(centralizer s) = s.centralizer
                      theorem Subsemiring.mem_centralizer_iff {R : Type u_1} [Semiring R] {s : Set R} {z : R} :
                      z ∈ centralizer s ↔ βˆ€ g ∈ s, g * z = z * g
                      theorem Subsemiring.centralizer_le {R : Type u_1} [Semiring R] (s t : Set R) (h : s βŠ† t) :
                      @[simp]
                      theorem Subsemiring.centralizer_eq_top_iff_subset {R : Type u_1} [Semiring R] {s : Set R} :
                      centralizer s = ⊀ ↔ s βŠ† ↑(center R)

                      The Subsemiring generated by a set.

                      Instances For
                        theorem Subsemiring.mem_closure {R : Type u} [NonAssocSemiring R] {x : R} {s : Set R} :
                        x ∈ closure s ↔ βˆ€ (S : Subsemiring R), s βŠ† ↑S β†’ x ∈ S
                        @[simp]
                        theorem Subsemiring.subset_closure {R : Type u} [NonAssocSemiring R] {s : Set R} :
                        s βŠ† ↑(closure s)

                        The subsemiring generated by a set includes the set.

                        theorem Subsemiring.mem_closure_of_mem {R : Type u} [NonAssocSemiring R] {s : Set R} {x : R} (hx : x ∈ s) :
                        x ∈ closure s
                        theorem Subsemiring.notMem_of_notMem_closure {R : Type u} [NonAssocSemiring R] {s : Set R} {P : R} (hP : P βˆ‰ closure s) :
                        P βˆ‰ s
                        @[simp]
                        theorem Subsemiring.closure_le {R : Type u} [NonAssocSemiring R] {s : Set R} {t : Subsemiring R} :
                        closure s ≀ t ↔ s βŠ† ↑t

                        A subsemiring S includes closure s if and only if it includes s.

                        theorem Subsemiring.closure_mono {R : Type u} [NonAssocSemiring R] ⦃s t : Set R⦄ (h : s βŠ† t) :

                        Subsemiring closure of a set is monotone in its argument: if s βŠ† t, then closure s ≀ closure t.

                        theorem Subsemiring.closure_eq_of_le {R : Type u} [NonAssocSemiring R] {s : Set R} {t : Subsemiring R} (h₁ : s βŠ† ↑t) (hβ‚‚ : t ≀ closure s) :
                        closure s = t
                        theorem Subsemiring.mem_map_equiv {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {f : R ≃+* S} {K : Subsemiring R} {x : S} :
                        x ∈ map (↑f) K ↔ f.symm x ∈ K
                        theorem Subsemiring.map_equiv_eq_comap_symm {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (f : R ≃+* S) (K : Subsemiring R) :
                        map (↑f) K = comap (↑f.symm) K
                        theorem Subsemiring.comap_equiv_eq_map_symm {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (f : R ≃+* S) (K : Subsemiring S) :
                        comap (↑f) K = map (↑f.symm) K

                        The additive closure of a submonoid is a subsemiring.

                        Instances For

                          The Subsemiring generated by a multiplicative submonoid coincides with the Subsemiring.closure of the submonoid itself .

                          theorem Subsemiring.coe_closure_eq {R : Type u} [NonAssocSemiring R] (s : Set R) :
                          ↑(closure s) = ↑(AddSubmonoid.closure ↑(Submonoid.closure s))

                          The elements of the subsemiring closure of M are exactly the elements of the additive closure of a multiplicative submonoid M.

                          theorem Subsemiring.mem_closure_iff {R : Type u} [NonAssocSemiring R] {s : Set R} {x : R} :
                          x ∈ closure s ↔ x ∈ AddSubmonoid.closure ↑(Submonoid.closure s)
                          theorem Subsemiring.closure_induction {R : Type u} [NonAssocSemiring R] {s : Set R} {p : (x : R) β†’ x ∈ closure s β†’ Prop} (mem : βˆ€ (x : R) (hx : x ∈ s), p x β‹―) (zero : p 0 β‹―) (one : p 1 β‹―) (add : βˆ€ (x y : R) (hx : x ∈ closure s) (hy : y ∈ closure s), p x hx β†’ p y hy β†’ p (x + y) β‹―) (mul : βˆ€ (x y : R) (hx : x ∈ closure s) (hy : y ∈ closure s), p x hx β†’ p y hy β†’ p (x * y) β‹―) {x : R} (hx : x ∈ closure s) :
                          p x hx

                          An induction principle for closure membership. If p holds for 0, 1, and all elements of s, and is preserved under addition and multiplication, then p holds for all elements of the closure of s.

                          theorem Subsemiring.closure_inductionβ‚‚ {R : Type u} [NonAssocSemiring R] {s : Set R} {p : (x y : R) β†’ x ∈ closure s β†’ y ∈ closure s β†’ Prop} (mem_mem : βˆ€ (x y : R) (hx : x ∈ s) (hy : y ∈ s), p x y β‹― β‹―) (zero_left : βˆ€ (x : R) (hx : x ∈ closure s), p 0 x β‹― hx) (zero_right : βˆ€ (x : R) (hx : x ∈ closure s), p x 0 hx β‹―) (one_left : βˆ€ (x : R) (hx : x ∈ closure s), p 1 x β‹― hx) (one_right : βˆ€ (x : R) (hx : x ∈ closure s), p x 1 hx β‹―) (add_left : βˆ€ (x y z : R) (hx : x ∈ closure s) (hy : y ∈ closure s) (hz : z ∈ closure s), p x z hx hz β†’ p y z hy hz β†’ p (x + y) z β‹― hz) (add_right : βˆ€ (x y z : R) (hx : x ∈ closure s) (hy : y ∈ closure s) (hz : z ∈ closure s), p x y hx hy β†’ p x z hx hz β†’ p x (y + z) hx β‹―) (mul_left : βˆ€ (x y z : R) (hx : x ∈ closure s) (hy : y ∈ closure s) (hz : z ∈ closure s), p x z hx hz β†’ p y z hy hz β†’ p (x * y) z β‹― hz) (mul_right : βˆ€ (x y z : R) (hx : x ∈ closure s) (hy : y ∈ closure s) (hz : z ∈ closure s), p x y hx hy β†’ p x z hx hz β†’ p x (y * z) hx β‹―) {x y : R} (hx : x ∈ closure s) (hy : y ∈ closure s) :
                          p x y hx hy

                          An induction principle for closure membership for predicates with two arguments.

                          theorem Subsemiring.mem_closure_iff_exists_list {R : Type u_1} [Semiring R] {s : Set R} {x : R} :
                          x ∈ closure s ↔ βˆƒ (L : List (List R)), (βˆ€ t ∈ L, βˆ€ y ∈ t, y ∈ s) ∧ (List.map List.prod L).sum = x

                          closure forms a Galois insertion with the coercion to set.

                          Instances For
                            @[simp]
                            theorem Subsemiring.closure_eq {R : Type u} [NonAssocSemiring R] (s : Subsemiring R) :
                            closure ↑s = s

                            Closure of a subsemiring S equals S.

                            theorem Subsemiring.closure_union {R : Type u} [NonAssocSemiring R] (s t : Set R) :
                            closure (s βˆͺ t) = closure s βŠ” closure t
                            theorem Subsemiring.closure_iUnion {R : Type u} [NonAssocSemiring R] {ΞΉ : Sort u_1} (s : ΞΉ β†’ Set R) :
                            closure (⋃ (i : ΞΉ), s i) = ⨆ (i : ΞΉ), closure (s i)
                            @[simp]
                            theorem Subsemiring.closure_insert_natCast {R : Type u} [NonAssocSemiring R] (n : β„•) (s : Set R) :
                            closure (insert (↑n) s) = closure s
                            @[simp]
                            theorem Subsemiring.closure_insert_zero {R : Type u} [NonAssocSemiring R] (s : Set R) :
                            closure (insert 0 s) = closure s
                            @[simp]
                            theorem Subsemiring.closure_insert_one {R : Type u} [NonAssocSemiring R] (s : Set R) :
                            closure (insert 1 s) = closure s
                            theorem Subsemiring.map_sup {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (s t : Subsemiring R) (f : R β†’+* S) :
                            map f (s βŠ” t) = map f s βŠ” map f t
                            theorem Subsemiring.map_iSup {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {ΞΉ : Sort u_1} (f : R β†’+* S) (s : ΞΉ β†’ Subsemiring R) :
                            map f (iSup s) = ⨆ (i : ΞΉ), map f (s i)
                            theorem Subsemiring.map_inf {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (s t : Subsemiring R) (f : R β†’+* S) (hf : Function.Injective ⇑f) :
                            map f (s βŠ“ t) = map f s βŠ“ map f t
                            theorem Subsemiring.map_iInf {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {ΞΉ : Sort u_1} [Nonempty ΞΉ] (f : R β†’+* S) (hf : Function.Injective ⇑f) (s : ΞΉ β†’ Subsemiring R) :
                            map f (iInf s) = β¨… (i : ΞΉ), map f (s i)
                            theorem Subsemiring.comap_inf {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (s t : Subsemiring S) (f : R β†’+* S) :
                            comap f (s βŠ“ t) = comap f s βŠ“ comap f t
                            theorem Subsemiring.comap_iInf {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {ΞΉ : Sort u_1} (f : R β†’+* S) (s : ΞΉ β†’ Subsemiring S) :
                            comap f (iInf s) = β¨… (i : ΞΉ), comap f (s i)
                            def Subsemiring.prod {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (s : Subsemiring R) (t : Subsemiring S) :
                            Subsemiring (R Γ— S)

                            Given Subsemirings s, t of semirings R, S respectively, s.prod t is s Γ— t as a subsemiring of R Γ— S.

                            Instances For
                              theorem Subsemiring.coe_prod {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (s : Subsemiring R) (t : Subsemiring S) :
                              ↑(s.prod t) = ↑s Γ—Λ’ ↑t
                              theorem Subsemiring.mem_prod {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {s : Subsemiring R} {t : Subsemiring S} {p : R Γ— S} :
                              p ∈ s.prod t ↔ p.1 ∈ s ∧ p.2 ∈ t
                              theorem Subsemiring.prod_mono {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] ⦃s₁ sβ‚‚ : Subsemiring R⦄ (hs : s₁ ≀ sβ‚‚) ⦃t₁ tβ‚‚ : Subsemiring S⦄ (ht : t₁ ≀ tβ‚‚) :
                              s₁.prod t₁ ≀ sβ‚‚.prod tβ‚‚
                              def Subsemiring.prodEquiv {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (s : Subsemiring R) (t : Subsemiring S) :
                              β†₯(s.prod t) ≃+* β†₯s Γ— β†₯t

                              Product of subsemirings is isomorphic to their product as monoids.

                              Instances For
                                theorem Subsemiring.mem_iSup_of_directed {R : Type u} [NonAssocSemiring R] {ΞΉ : Sort u_1} [hΞΉ : Nonempty ΞΉ] {S : ΞΉ β†’ Subsemiring R} (hS : Directed (fun (x1 x2 : Subsemiring R) => x1 ≀ x2) S) {x : R} :
                                x ∈ ⨆ (i : ΞΉ), S i ↔ βˆƒ (i : ΞΉ), x ∈ S i
                                theorem Subsemiring.coe_iSup_of_directed {R : Type u} [NonAssocSemiring R] {ΞΉ : Sort u_1} [hΞΉ : Nonempty ΞΉ] {S : ΞΉ β†’ Subsemiring R} (hS : Directed (fun (x1 x2 : Subsemiring R) => x1 ≀ x2) S) :
                                ↑(⨆ (i : ΞΉ), S i) = ⋃ (i : ΞΉ), ↑(S i)
                                theorem Subsemiring.mem_sSup_of_directedOn {R : Type u} [NonAssocSemiring R] {S : Set (Subsemiring R)} (Sne : S.Nonempty) (hS : DirectedOn (fun (x1 x2 : Subsemiring R) => x1 ≀ x2) S) {x : R} :
                                x ∈ sSup S ↔ βˆƒ s ∈ S, x ∈ s
                                theorem Subsemiring.coe_sSup_of_directedOn {R : Type u} [NonAssocSemiring R] {S : Set (Subsemiring R)} (Sne : S.Nonempty) (hS : DirectedOn (fun (x1 x2 : Subsemiring R) => x1 ≀ x2) S) :
                                ↑(sSup S) = ⋃ s ∈ S, ↑s
                                def RingHom.codRestrict {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {ΟƒS : Type u_2} [SetLike ΟƒS S] [SubsemiringClass ΟƒS S] (f : R β†’+* S) (s : ΟƒS) (h : βˆ€ (x : R), f x ∈ s) :
                                R β†’+* β†₯s

                                Restriction of a ring homomorphism to a subsemiring of the codomain.

                                Instances For
                                  @[simp]
                                  theorem RingHom.codRestrict_apply {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {ΟƒS : Type u_2} [SetLike ΟƒS S] [SubsemiringClass ΟƒS S] (f : R β†’+* S) (s : ΟƒS) (h : βˆ€ (x : R), f x ∈ s) (x : R) :
                                  ↑((f.codRestrict s h) x) = f x
                                  theorem RingHom.injective_codRestrict {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {ΟƒS : Type u_2} [SetLike ΟƒS S] [SubsemiringClass ΟƒS S] {f : R β†’+* S} {s : ΟƒS} {h : βˆ€ (x : R), f x ∈ s} :
                                  Function.Injective ⇑(f.codRestrict s h) ↔ Function.Injective ⇑f
                                  theorem RingHom.rangeS_codRestrict {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {ΟƒS : Type u_2} [SetLike ΟƒS S] [SubsemiringClass ΟƒS S] {f : R β†’+* S} {s : ΟƒS} {h : βˆ€ (x : R), f x ∈ s} :
                                  theorem RingHom.surjective_codRestrict {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {ΟƒS : Type u_2} [SetLike ΟƒS S] [SubsemiringClass ΟƒS S] {f : R β†’+* S} {s : ΟƒS} {h : βˆ€ (x : R), f x ∈ s} :
                                  Function.Surjective ⇑(f.codRestrict s h) ↔ f.rangeS = Subsemiring.ofClass s
                                  def RingHom.restrict {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {ΟƒR : Type u_1} {ΟƒS : Type u_2} [SetLike ΟƒR R] [SetLike ΟƒS S] [SubsemiringClass ΟƒR R] [SubsemiringClass ΟƒS S] (f : R β†’+* S) (s' : ΟƒR) (s : ΟƒS) (h : βˆ€ x ∈ s', f x ∈ s) :
                                  β†₯s' β†’+* β†₯s

                                  The ring homomorphism from the preimage of s to s.

                                  Instances For
                                    @[simp]
                                    theorem RingHom.coe_restrict_apply {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {ΟƒR : Type u_1} {ΟƒS : Type u_2} [SetLike ΟƒR R] [SetLike ΟƒS S] [SubsemiringClass ΟƒR R] [SubsemiringClass ΟƒS S] (f : R β†’+* S) (s' : ΟƒR) (s : ΟƒS) (h : βˆ€ x ∈ s', f x ∈ s) (x : β†₯s') :
                                    ↑((f.restrict s' s h) x) = f ↑x
                                    @[simp]
                                    theorem RingHom.comp_restrict {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {ΟƒR : Type u_1} {ΟƒS : Type u_2} [SetLike ΟƒR R] [SetLike ΟƒS S] [SubsemiringClass ΟƒR R] [SubsemiringClass ΟƒS S] (f : R β†’+* S) (s' : ΟƒR) (s : ΟƒS) (h : βˆ€ x ∈ s', f x ∈ s) :
                                    def RingHom.rangeSRestrict {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (f : R β†’+* S) :
                                    R β†’+* β†₯f.rangeS

                                    Restriction of a ring homomorphism to its range interpreted as a subsemiring.

                                    This is the bundled version of Set.rangeFactorization.

                                    Instances For
                                      @[simp]
                                      theorem RingHom.coe_rangeSRestrict {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (f : R β†’+* S) (x : R) :
                                      ↑(f.rangeSRestrict x) = f x
                                      theorem RingHom.rangeSRestrict_surjective {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (f : R β†’+* S) :
                                      Function.Surjective ⇑f.rangeSRestrict
                                      theorem RingHom.rangeS_top_iff_surjective {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {f : R β†’+* S} :
                                      f.rangeS = ⊀ ↔ Function.Surjective ⇑f
                                      @[simp]
                                      theorem RingHom.rangeS_top_of_surjective {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (f : R β†’+* S) (hf : Function.Surjective ⇑f) :

                                      The range of a surjective ring homomorphism is the whole of the codomain.

                                      theorem RingHom.eqOn_sclosure {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {f g : R β†’+* S} {s : Set R} (h : Set.EqOn (⇑f) (⇑g) s) :
                                      Set.EqOn ⇑f ⇑g ↑(Subsemiring.closure s)

                                      If two ring homomorphisms are equal on a set, then they are equal on its subsemiring closure.

                                      theorem RingHom.eq_of_eqOn_stop {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {f g : R β†’+* S} (h : Set.EqOn ⇑f ⇑g β†‘βŠ€) :
                                      f = g
                                      theorem RingHom.eq_of_eqOn_sdense {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {s : Set R} (hs : Subsemiring.closure s = ⊀) {f g : R β†’+* S} (h : Set.EqOn (⇑f) (⇑g) s) :
                                      f = g

                                      The image under a ring homomorphism of the subsemiring generated by a set equals the subsemiring generated by the image of the set.

                                      def Subsemiring.inclusion {R : Type u} [NonAssocSemiring R] {S T : Subsemiring R} (h : S ≀ T) :
                                      β†₯S β†’+* β†₯T

                                      The ring homomorphism associated to an inclusion of subsemirings.

                                      Instances For
                                        theorem Subsemiring.inclusion_injective {R : Type u} [NonAssocSemiring R] {S T : Subsemiring R} (h : S ≀ T) :
                                        Function.Injective ⇑(inclusion h)
                                        def RingEquiv.subsemiringCongr {R : Type u} [NonAssocSemiring R] {s t : Subsemiring R} (h : s = t) :
                                        β†₯s ≃+* β†₯t

                                        Makes the identity isomorphism from a proof two subsemirings of a multiplicative monoid are equal.

                                        Instances For
                                          def RingEquiv.ofLeftInverseS {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {g : S β†’ R} {f : R β†’+* S} (h : Function.LeftInverse g ⇑f) :
                                          R ≃+* β†₯f.rangeS

                                          Restrict a ring homomorphism with a left inverse to a ring isomorphism to its RingHom.rangeS.

                                          Instances For
                                            @[simp]
                                            theorem RingEquiv.ofLeftInverseS_apply {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {g : S β†’ R} {f : R β†’+* S} (h : Function.LeftInverse g ⇑f) (x : R) :
                                            ↑((ofLeftInverseS h) x) = f x
                                            @[simp]
                                            theorem RingEquiv.ofLeftInverseS_symm_apply {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {g : S β†’ R} {f : R β†’+* S} (h : Function.LeftInverse g ⇑f) (x : β†₯f.rangeS) :
                                            (ofLeftInverseS h).symm x = g ↑x
                                            def RingEquiv.subsemiringMap {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (e : R ≃+* S) (s : Subsemiring R) :
                                            β†₯s ≃+* β†₯(Subsemiring.map (↑e) s)

                                            Given an equivalence e : R ≃+* S of semirings and a subsemiring s of R, subsemiringMap e s is the induced equivalence between s and s.map e

                                            Instances For
                                              @[simp]
                                              theorem RingEquiv.subsemiringMap_apply_coe {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (e : R ≃+* S) (s : Subsemiring R) (x : β†₯s) :
                                              ↑((e.subsemiringMap s) x) = e ↑x
                                              @[simp]
                                              theorem RingEquiv.subsemiringMap_symm_apply_coe {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (e : R ≃+* S) (s : Subsemiring R) (x : β†₯(Subsemiring.map e.toRingHom s)) :
                                              ↑((e.subsemiringMap s).symm x) = e.symm ↑x

                                              Actions by Subsemirings #

                                              These are just copies of the definitions about Submonoid starting from Submonoid.mulAction. The only new result is Subsemiring.module.

                                              When R is commutative, Algebra.ofSubsemiring provides a stronger result than those found in this file, which uses the same scalar action.

                                              @[implicit_reducible]
                                              instance Subsemiring.smul {R' : Type u_1} {Ξ± : Type u_2} [NonAssocSemiring R'] [SMul R' Ξ±] (S : Subsemiring R') :
                                              SMul (β†₯S) Ξ±

                                              The action by a subsemiring is the action by the underlying semiring.

                                              theorem Subsemiring.smul_def {R' : Type u_1} {Ξ± : Type u_2} [NonAssocSemiring R'] [SMul R' Ξ±] {S : Subsemiring R'} (g : β†₯S) (m : Ξ±) :
                                              g β€’ m = ↑g β€’ m
                                              instance Subsemiring.smulCommClass_left {R' : Type u_1} {Ξ± : Type u_2} {Ξ² : Type u_3} [NonAssocSemiring R'] [SMul R' Ξ²] [SMul Ξ± Ξ²] [SMulCommClass R' Ξ± Ξ²] (S : Subsemiring R') :
                                              SMulCommClass (β†₯S) Ξ± Ξ²
                                              instance Subsemiring.smulCommClass_right {R' : Type u_1} {Ξ± : Type u_2} {Ξ² : Type u_3} [NonAssocSemiring R'] [SMul Ξ± Ξ²] [SMul R' Ξ²] [SMulCommClass Ξ± R' Ξ²] (S : Subsemiring R') :
                                              SMulCommClass Ξ± (β†₯S) Ξ²
                                              instance Subsemiring.isScalarTower {R' : Type u_1} {Ξ± : Type u_2} {Ξ² : Type u_3} [NonAssocSemiring R'] [SMul Ξ± Ξ²] [SMul R' Ξ±] [SMul R' Ξ²] [IsScalarTower R' Ξ± Ξ²] (S : Subsemiring R') :
                                              IsScalarTower (β†₯S) Ξ± Ξ²

                                              Note that this provides IsScalarTower S R R which is needed by smul_mul_assoc.

                                              @[instance 100]
                                              instance Subsemiring.instFaithfulSMulSubtypeMem {M' : Type u_5} {Ξ± : Type u_6} [SMul M' Ξ±] {S' : Type u_7} [SetLike S' M'] (s : S') [FaithfulSMul M' Ξ±] :
                                              FaithfulSMul (β†₯s) Ξ±
                                              instance Subsemiring.faithfulSMul {R' : Type u_1} {Ξ± : Type u_2} [NonAssocSemiring R'] [SMul R' Ξ±] [FaithfulSMul R' Ξ±] (S : Subsemiring R') :
                                              FaithfulSMul (β†₯S) Ξ±
                                              @[implicit_reducible, instance 100]
                                              instance Subsemiring.instSMulWithZeroSubtypeMem {R' : Type u_1} {Ξ± : Type u_2} [NonAssocSemiring R'] {S' : Type u_5} [SetLike S' R'] [SubsemiringClass S' R'] (s : S') [Zero Ξ±] [SMulWithZero R' Ξ±] :
                                              SMulWithZero (β†₯s) Ξ±
                                              @[implicit_reducible]
                                              instance Subsemiring.instSMulWithZeroSubtypeMem_1 {R' : Type u_1} {Ξ± : Type u_2} [NonAssocSemiring R'] [Zero Ξ±] [SMulWithZero R' Ξ±] (S : Subsemiring R') :
                                              SMulWithZero (β†₯S) Ξ±

                                              The action by a subsemiring is the action by the underlying semiring.

                                              @[implicit_reducible]
                                              instance Subsemiring.mulAction {R' : Type u_1} {Ξ± : Type u_2} [Semiring R'] [MulAction R' Ξ±] (S : Subsemiring R') :
                                              MulAction (β†₯S) Ξ±

                                              The action by a subsemiring is the action by the underlying semiring.

                                              @[implicit_reducible]
                                              instance Subsemiring.distribMulAction {R' : Type u_1} {Ξ± : Type u_2} [Semiring R'] [AddMonoid Ξ±] [DistribMulAction R' Ξ±] (S : Subsemiring R') :
                                              DistribMulAction (β†₯S) Ξ±

                                              The action by a subsemiring is the action by the underlying semiring.

                                              @[implicit_reducible]
                                              instance Subsemiring.mulDistribMulAction {R' : Type u_1} {Ξ± : Type u_2} [Semiring R'] [Monoid Ξ±] [MulDistribMulAction R' Ξ±] (S : Subsemiring R') :
                                              MulDistribMulAction (β†₯S) Ξ±

                                              The action by a subsemiring is the action by the underlying semiring.

                                              @[implicit_reducible, instance 100]
                                              instance Subsemiring.instMulActionWithZeroSubtypeMem {R' : Type u_1} {Ξ± : Type u_2} [Semiring R'] {S' : Type u_5} [SetLike S' R'] [SubsemiringClass S' R'] (s : S') [Zero Ξ±] [MulActionWithZero R' Ξ±] :
                                              MulActionWithZero (β†₯s) Ξ±
                                              @[implicit_reducible]
                                              instance Subsemiring.mulActionWithZero {R' : Type u_1} {Ξ± : Type u_2} [Semiring R'] [Zero Ξ±] [MulActionWithZero R' Ξ±] (S : Subsemiring R') :
                                              MulActionWithZero (β†₯S) Ξ±

                                              The action by a subsemiring is the action by the underlying semiring.

                                              @[implicit_reducible, instance 100]
                                              instance Subsemiring.instModuleSubtypeMem {R' : Type u_1} {Ξ± : Type u_2} [Semiring R'] [AddCommMonoid Ξ±] [Module R' Ξ±] {S' : Type u_5} [SetLike S' R'] [SubsemiringClass S' R'] (s : S') :
                                              Module (β†₯s) Ξ±
                                              @[implicit_reducible]
                                              instance Subsemiring.module {R' : Type u_1} {Ξ± : Type u_2} [Semiring R'] [AddCommMonoid Ξ±] [Module R' Ξ±] (S : Subsemiring R') :
                                              Module (β†₯S) Ξ±

                                              The action by a subsemiring is the action by the underlying semiring.

                                              @[implicit_reducible]
                                              instance Subsemiring.instMulSemiringActionSubtypeMem {R' : Type u_1} {Ξ± : Type u_2} [Semiring R'] [Semiring Ξ±] [MulSemiringAction R' Ξ±] (S : Subsemiring R') :
                                              MulSemiringAction (β†₯S) Ξ±

                                              The action by a subsemiring is the action by the underlying semiring.

                                              instance Subsemiring.center.smulCommClass_left {R' : Type u_1} [Semiring R'] :
                                              SMulCommClass (β†₯(center R')) R' R'

                                              The center of a semiring acts commutatively on that semiring.

                                              instance Subsemiring.center.smulCommClass_right {R' : Type u_1} [Semiring R'] :
                                              SMulCommClass R' (β†₯(center R')) R'

                                              The center of a semiring acts commutatively on that semiring.

                                              theorem Subsemiring.isMulCommutative_closure {R' : Type u_1} [Semiring R'] {s : Set R'} (hcomm : βˆ€ x ∈ s, βˆ€ y ∈ s, x * y = y * x) :

                                              If all the elements of a set s commute, then closure s is a commutative semiring.

                                              @[reducible, inline, deprecated Subsemiring.isMulCommutative_closure (since := "2026-03-11")]
                                              abbrev Subsemiring.closureCommSemiringOfComm {R' : Type u_1} [Semiring R'] {s : Set R'} (hcomm : βˆ€ x ∈ s, βˆ€ y ∈ s, x * y = y * x) :

                                              If all the elements of a set s commute, then closure s is a commutative semiring.

                                              Instances For
                                                instance Subsemiring.instIsMulCommutative_closure {R' : Type u_1} [Semiring R'] {S : Type u_5} [SetLike S R'] [MulMemClass S R'] (s : S) [IsMulCommutative β†₯s] :
                                                IsMulCommutative β†₯(closure ↑s)
                                                theorem Subsemiring.map_comap_eq {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] (f : R β†’+* S) (t : Subsemiring S) :
                                                map f (comap f t) = t βŠ“ f.rangeS
                                                theorem Subsemiring.map_comap_eq_self_of_surjective {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {f : R β†’+* S} (hf : Function.Surjective ⇑f) (t : Subsemiring S) :
                                                map f (comap f t) = t
                                                theorem Subsemiring.comap_map_eq_self_of_injective {R : Type u} {S : Type v} [NonAssocSemiring R] [NonAssocSemiring S] {f : R β†’+* S} (hf : Function.Injective ⇑f) (s : Subsemiring R) :
                                                comap f (map f s) = s