/-
Copyright 2026 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/
module
public import FormalConjecturesForMathlib.RingTheory.Ideal.Defs
public import Mathlib.RingTheory.Ideal.DefsRight ideals
This file gives the basic API for right ideals.
@[expose] public sectionuniverse unamespace RightIdealsection Semiringvariable {R : Type u} [Semiring R]@[ext]
theorem ext {I J : RightIdeal R} (h : ∀ x, x ∈ I ↔ x ∈ J) : I = J :=
Submodule.ext hA right ideal is closed under multiplication on the right.
theorem mul_mem_right (I : RightIdeal R) {a : R} (b : R) (ha : a ∈ I) : a * b ∈ I :=
I.smul_mem (MulOpposite.op b) haend Semiringsection CommSemiringvariable {R : Type u} [CommSemiring R]A right ideal in a commutative semiring, regarded as an ideal.
R:Type uinst✝:CommSemiring RI:RightIdeal Rr:Rx:Rhx:x ∈ ↑I⊢ x * r ∈ ↑I
exact I.mul_mem_right r hx All goals completed! 🐙@[simp]
theorem mem_toIdeal {I : RightIdeal R} {x : R} : x ∈ I.toIdeal ↔ x ∈ I :=
Iff.rflAn ideal in a commutative semiring, regarded as a right ideal.
def _root_.Ideal.toRightIdeal (I : Ideal R) : RightIdeal R where
carrier := (I : Set R)
zero_mem' := I.zero_mem
add_mem' := I.add_mem
smul_mem' := by R:Type uinst✝:CommSemiring RI:Ideal R⊢ ∀ (c : Rᵐᵒᵖ) {x : R}, x ∈ ↑I → c • x ∈ ↑I
intro r x hx R:Type uinst✝:CommSemiring RI:Ideal Rr:Rᵐᵒᵖx:Rhx:x ∈ ↑I⊢ r • x ∈ ↑I
rw [MulOpposite.smul_eq_mul_unop, R:Type uinst✝:CommSemiring RI:Ideal Rr:Rᵐᵒᵖx:Rhx:x ∈ ↑I⊢ x * MulOpposite.unop r ∈ ↑I R:Type uinst✝:CommSemiring RI:Ideal Rr:Rᵐᵒᵖx:Rhx:x ∈ ↑I⊢ MulOpposite.unop r * x ∈ ↑I mul_comm R:Type uinst✝:CommSemiring RI:Ideal Rr:Rᵐᵒᵖx:Rhx:x ∈ ↑I⊢ MulOpposite.unop r * x ∈ ↑I R:Type uinst✝:CommSemiring RI:Ideal Rr:Rᵐᵒᵖx:Rhx:x ∈ ↑I⊢ MulOpposite.unop r * x ∈ ↑I] R:Type uinst✝:CommSemiring RI:Ideal Rr:Rᵐᵒᵖx:Rhx:x ∈ ↑I⊢ MulOpposite.unop r * x ∈ ↑I
exact I.mul_mem_left r.unop hx All goals completed! 🐙@[simp]
theorem _root_.Ideal.mem_toRightIdeal {I : Ideal R} {x : R} :
x ∈ I.toRightIdeal ↔ x ∈ I :=
Iff.rfl@[simp]
theorem toIdeal_toRightIdeal (I : RightIdeal R) : I.toIdeal.toRightIdeal = I :=
rfl@[simp]
theorem _root_.Ideal.toRightIdeal_toIdeal (I : Ideal R) : I.toRightIdeal.toIdeal = I :=
rflOver a commutative semiring, right ideals and ideals are order isomorphic.
def orderIsoIdeal (R : Type u) [CommSemiring R] : RightIdeal R ≃o Ideal R where
toFun := toIdeal
invFun := Ideal.toRightIdeal
left_inv := toIdeal_toRightIdeal
right_inv := Ideal.toRightIdeal_toIdeal
map_rel_iff' := Iff.rflend CommSemiringend RightIdeal