The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V09. Commutative algebra I: ideals, polynomials, factorization

Mathlib.RingTheory.TwoSidedIdeal.Basic

59 declarations and 4 deprecated aliases. Mathlib docs · Source

Two Sided Ideals

In this file, for any Ring R, we reinterpret I : RingCon R as a two-sided-ideal of a ring.

Main definitions and results

  • TwoSidedIdeal: For any NonUnitalNonAssocRing R, TwoSidedIdeal R is a wrapper around RingCon R.
  • TwoSidedIdeal.setLike: Every I : TwoSidedIdeal R can be interpreted as a set of R where x ∈ I if and only if I.ringCon x 0.
  • TwoSidedIdeal.addCommGroup: Every I : TwoSidedIdeal R is an abelian group.

theorem TwoSidedIdeal.ofRingCon.inj E1 #

∀ {R : Type u_1} {inst : NonUnitalNonAssocRing R} {ringCon ringCon_1 : RingCon R},
  { ringCon := ringCon } = { ringCon := ringCon_1 } → ringCon = ringCon_1

theorem RingCon.mk.congr_simp E1 #

∀ {R : Type u_1} [inst : Add R] [inst_1 : Mul R] (toCon toCon_1 : Con R) (e_toCon : toCon = toCon_1)
  (add' : ∀ {w x y z : R}, toCon.toSetoid w x → toCon.toSetoid y z → toCon.toSetoid (w + y) (x + z)),
  { toCon := toCon, add' := add' } = { toCon := toCon_1, add' := ⋯ }

def TwoSidedIdeal.ctorIdx E1 #

{R : Type u_1} → {inst : NonUnitalNonAssocRing R} → TwoSidedIdeal R → ℕ

theorem TwoSidedIdeal.ofRingCon.injEq E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] (ringCon ringCon_1 : RingCon R),
  ({ ringCon := ringCon } = { ringCon := ringCon_1 }) = (ringCon = ringCon_1)

structure TwoSidedIdeal E1 #

(R : Type u_1) → [NonUnitalNonAssocRing R] → Type u_1

A two-sided ideal of a ring R is a subset of R that contains 0 and is closed under addition, negation, and absorbs multiplication on both sides.

ctor TwoSidedIdeal.ofRingCon E0 #

{R : Type u_1} → [inst : NonUnitalNonAssocRing R] → RingCon R → TwoSidedIdeal R

In a ring, every two-sided ideal is induced by a ring congruence relation.

abbrev TwoSidedIdeal.ringCon E1 #

{R : Type u_1} → [inst : NonUnitalNonAssocRing R] → TwoSidedIdeal R → RingCon R

The congruence relation induced by this ideal.

instance TwoSidedIdeal.instNontrivial E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] [Nontrivial R], Nontrivial (TwoSidedIdeal R)

instance TwoSidedIdeal.setLike E0 #

{R : Type u_1} → [inst : NonUnitalNonAssocRing R] → SetLike (TwoSidedIdeal R) R

instance TwoSidedIdeal.instPartialOrder E0 #

{R : Type u_1} → [inst : NonUnitalNonAssocRing R] → PartialOrder (TwoSidedIdeal R)

theorem TwoSidedIdeal.mem_iff E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] (I : TwoSidedIdeal R) (x : R), x ∈ I ↔ I.ringCon x 0

theorem TwoSidedIdeal.mem_ofRingCon E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] {x : R} {c : RingCon R}, x ∈ { ringCon := c } ↔ c x 0

theorem TwoSidedIdeal.coe_ofRingCon E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] {c : RingCon R}, ↑{ ringCon := c } = {x | c x 0}

theorem TwoSidedIdeal.rel_iff E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] (I : TwoSidedIdeal R) (x y : R), I.ringCon x y ↔ x - y ∈ I

def TwoSidedIdeal.coeOrderEmbedding E1 #

{R : Type u_1} → [inst : NonUnitalNonAssocRing R] → TwoSidedIdeal R ↪o Set R

the coercion from two-sided-ideals to sets is an order embedding

theorem TwoSidedIdeal.coeOrderEmbedding_apply E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] (a : TwoSidedIdeal R), TwoSidedIdeal.coeOrderEmbedding a = ↑a

theorem TwoSidedIdeal.le_iff E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] {I J : TwoSidedIdeal R}, I ≤ J ↔ ↑I ⊆ ↑J

def TwoSidedIdeal.orderIsoRingCon E1 #

{R : Type u_1} → [inst : NonUnitalNonAssocRing R] → TwoSidedIdeal R ≃o RingCon R

Two-sided-ideals corresponds to congruence relations on a ring.

theorem TwoSidedIdeal.orderIsoRingCon_symm_apply E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] (ringCon : RingCon R),
  (RelIso.symm TwoSidedIdeal.orderIsoRingCon) ringCon = { ringCon := ringCon }

theorem TwoSidedIdeal.orderIsoRingCon_apply E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] (self : TwoSidedIdeal R),
  TwoSidedIdeal.orderIsoRingCon self = self.ringCon

theorem TwoSidedIdeal.ringCon_injective E1 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R], Function.Injective TwoSidedIdeal.ringCon

theorem TwoSidedIdeal.ringCon_le_iff E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] {I J : TwoSidedIdeal R}, I ≤ J ↔ I.ringCon ≤ J.ringCon

theorem TwoSidedIdeal.ext E1 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] {I J : TwoSidedIdeal R}, (∀ (x : R), x ∈ I ↔ x ∈ J) → I = J

theorem TwoSidedIdeal.ext_iff E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] {I J : TwoSidedIdeal R}, I = J ↔ ∀ (x : R), x ∈ I ↔ x ∈ J

theorem TwoSidedIdeal.lt_iff E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] (I J : TwoSidedIdeal R), I < J ↔ ↑I ⊂ ↑J

theorem TwoSidedIdeal.zero_mem E1 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] (I : TwoSidedIdeal R), 0 ∈ I

theorem TwoSidedIdeal.add_mem E1 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] (I : TwoSidedIdeal R) {x y : R}, x ∈ I → y ∈ I → x + y ∈ I

theorem TwoSidedIdeal.neg_mem E1 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] (I : TwoSidedIdeal R) {x : R}, x ∈ I → -x ∈ I

instance TwoSidedIdeal.instAddSubgroupClass E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R], AddSubgroupClass (TwoSidedIdeal R) R

theorem TwoSidedIdeal.sub_mem E1 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] (I : TwoSidedIdeal R) {x y : R}, x ∈ I → y ∈ I → x - y ∈ I

theorem TwoSidedIdeal.mul_mem_left E1 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] (I : TwoSidedIdeal R) (x y : R), y ∈ I → x * y ∈ I

theorem TwoSidedIdeal.mul_mem_right E1 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] (I : TwoSidedIdeal R) (x y : R), x ∈ I → x * y ∈ I

theorem TwoSidedIdeal.nsmul_mem E1 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] (I : TwoSidedIdeal R) {x : R} (n : ℕ), x ∈ I → n • x ∈ I

theorem TwoSidedIdeal.zsmul_mem E1 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] (I : TwoSidedIdeal R) {x : R} (n : ℤ), x ∈ I → n • x ∈ I

def TwoSidedIdeal.mk' E1 #

{R : Type u_1} →
  [inst : NonUnitalNonAssocRing R] →
    (carrier : Set R) →
      0 ∈ carrier →
        (∀ {x y : R}, x ∈ carrier → y ∈ carrier → x + y ∈ carrier) →
          (∀ {x : R}, x ∈ carrier → -x ∈ carrier) →
            (∀ {x y : R}, y ∈ carrier → x * y ∈ carrier) →
              (∀ {x y : R}, x ∈ carrier → x * y ∈ carrier) → TwoSidedIdeal R

The "set-theoretic-way" of constructing a two-sided ideal by providing:

  • the underlying set S;
  • a proof that 0 ∈ S;
  • a proof that x + y ∈ S if x ∈ S and y ∈ S;
  • a proof that -x ∈ S if x ∈ S;
  • a proof that x * y ∈ S if y ∈ S;
  • a proof that x * y ∈ S if x ∈ S.

theorem TwoSidedIdeal.mem_mk' E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] (carrier : Set R) (zero_mem : 0 ∈ carrier)
  (add_mem : ∀ {x y : R}, x ∈ carrier → y ∈ carrier → x + y ∈ carrier) (neg_mem : ∀ {x : R}, x ∈ carrier → -x ∈ carrier)
  (mul_mem_left : ∀ {x y : R}, y ∈ carrier → x * y ∈ carrier)
  (mul_mem_right : ∀ {x y : R}, x ∈ carrier → x * y ∈ carrier) (x : R),
  x ∈ TwoSidedIdeal.mk' carrier zero_mem add_mem neg_mem mul_mem_left mul_mem_right ↔ x ∈ carrier

theorem TwoSidedIdeal.coe_mk' E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] (carrier : Set R) (zero_mem : 0 ∈ carrier)
  (add_mem : ∀ {x y : R}, x ∈ carrier → y ∈ carrier → x + y ∈ carrier) (neg_mem : ∀ {x : R}, x ∈ carrier → -x ∈ carrier)
  (mul_mem_left : ∀ {x y : R}, y ∈ carrier → x * y ∈ carrier)
  (mul_mem_right : ∀ {x y : R}, x ∈ carrier → x * y ∈ carrier),
  ↑(TwoSidedIdeal.mk' carrier zero_mem add_mem neg_mem mul_mem_left mul_mem_right) = carrier

instance TwoSidedIdeal.instSMulMemClass E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R], SMulMemClass (TwoSidedIdeal R) R R

theorem TwoSidedIdeal.smulMemClass_mulOpposite E1 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R], SMulMemClass (TwoSidedIdeal R) Rᵐᵒᵖ R

instance TwoSidedIdeal.instAddSubtypeMem E0 #

{R : Type u_1} → [inst : NonUnitalNonAssocRing R] → (I : TwoSidedIdeal R) → Add ↥I

instance TwoSidedIdeal.instZeroSubtypeMem E0 #

{R : Type u_1} → [inst : NonUnitalNonAssocRing R] → (I : TwoSidedIdeal R) → Zero ↥I

instance TwoSidedIdeal.instSMulNatSubtypeMem E0 #

{R : Type u_1} → [inst : NonUnitalNonAssocRing R] → (I : TwoSidedIdeal R) → SMul ℕ ↥I

instance TwoSidedIdeal.instNegSubtypeMem E0 #

{R : Type u_1} → [inst : NonUnitalNonAssocRing R] → (I : TwoSidedIdeal R) → Neg ↥I

instance TwoSidedIdeal.instSubSubtypeMem E0 #

{R : Type u_1} → [inst : NonUnitalNonAssocRing R] → (I : TwoSidedIdeal R) → Sub ↥I

instance TwoSidedIdeal.instSMulIntSubtypeMem E0 #

{R : Type u_1} → [inst : NonUnitalNonAssocRing R] → (I : TwoSidedIdeal R) → SMul ℤ ↥I

instance TwoSidedIdeal.addCommGroup E0 #

{R : Type u_1} → [inst : NonUnitalNonAssocRing R] → (I : TwoSidedIdeal R) → AddCommGroup ↥I

def TwoSidedIdeal.coeAddMonoidHom E1 #

{R : Type u_1} → [inst : NonUnitalNonAssocRing R] → (I : TwoSidedIdeal R) → ↥I →+ R

The coercion into the ring as a AddMonoidHom

theorem TwoSidedIdeal.coeAddMonoidHom_apply E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] (I : TwoSidedIdeal R) (self : ↥I), I.coeAddMonoidHom self = ↑self

def TwoSidedIdeal.op E1 #

{R : Type u_1} → [inst : NonUnitalNonAssocRing R] → TwoSidedIdeal R → TwoSidedIdeal Rᵐᵒᵖ

If I is a two-sided ideal of R, then {op x | x ∈ I} is a two-sided ideal in Rᵐᵒᵖ.

theorem TwoSidedIdeal.op_ringCon E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] (I : TwoSidedIdeal R), I.op.ringCon = I.ringCon.op

theorem TwoSidedIdeal.mem_op_iff E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] {I : TwoSidedIdeal R} {x : Rᵐᵒᵖ}, x ∈ I.op ↔ MulOpposite.unop x ∈ I

theorem TwoSidedIdeal.coe_op E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] {I : TwoSidedIdeal R}, ↑I.op = MulOpposite.unop ⁻¹' ↑I

def TwoSidedIdeal.unop E1 #

{R : Type u_1} → [inst : NonUnitalNonAssocRing R] → TwoSidedIdeal Rᵐᵒᵖ → TwoSidedIdeal R

If I is a two-sided ideal of Rᵐᵒᵖ, then {x.unop | x ∈ I} is a two-sided ideal in R.

theorem TwoSidedIdeal.unop_ringCon E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] (I : TwoSidedIdeal Rᵐᵒᵖ), I.unop.ringCon = I.ringCon.unop

theorem TwoSidedIdeal.mem_unop_iff E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] {I : TwoSidedIdeal Rᵐᵒᵖ} {x : R}, x ∈ I.unop ↔ MulOpposite.op x ∈ I

theorem TwoSidedIdeal.coe_unop E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] {I : TwoSidedIdeal Rᵐᵒᵖ}, ↑I.unop = MulOpposite.op ⁻¹' ↑I

def TwoSidedIdeal.opOrderIso E1 #

{R : Type u_1} → [inst : NonUnitalNonAssocRing R] → TwoSidedIdeal R ≃o TwoSidedIdeal Rᵐᵒᵖ

Two-sided-ideals of A and that of Aᵒᵖ corresponds bijectively to each other.

theorem TwoSidedIdeal.opOrderIso_symm_apply E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] (I : TwoSidedIdeal Rᵐᵒᵖ),
  (RelIso.symm TwoSidedIdeal.opOrderIso) I = I.unop

theorem TwoSidedIdeal.opOrderIso_apply E0 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocRing R] (I : TwoSidedIdeal R), TwoSidedIdeal.opOrderIso I = I.op

Deprecated aliases

NameNew nameSince
TwoSidedIdeal.coe_mkTwoSidedIdeal.coe_ofRingCon2026-06-18
TwoSidedIdeal.instSMulMemClassMulOppositeTwoSidedIdeal.smulMemClass_mulOpposite2026-11-05
TwoSidedIdeal.mem_mkTwoSidedIdeal.mem_ofRingCon2026-06-18
TwoSidedIdeal.mkTwoSidedIdeal.ofRingCon2026-06-18