/- 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.Basic public import Mathlib.RingTheory.Ideal.Maximal

Maximal right ideals

This file defines maximal right ideals and gives their basic order-theoretic API.

@[expose] public sectionuniverse unamespace RightIdealsection Semiringvariable {R : Type u} [Semiring R] (I : RightIdeal R)

A right ideal is maximal if it is maximal among the proper right ideals.

class IsMaximal : Prop where

A maximal right ideal is a coatom in the lattice of right ideals.

out : IsCoatom Itheorem isMaximal_def : I.IsMaximal IsCoatom I := fun h => h.1, fun h => htheorem IsMaximal.ne_top (h : I.IsMaximal) : I := (isMaximal_def I).1 h |>.1theorem IsMaximal.lt_top (h : I.IsMaximal) : I < := h.ne_top.lt_toptheorem IsMaximal.eq_of_le {J : RightIdeal R} (hI : I.IsMaximal) (hJ : J ) (hIJ : I J) : I = J := eq_iff_le_not_lt.2 hIJ, fun h => hJ (((isMaximal_def I).1 hI).2 J h)theorem IsMaximal.eq_iff_le {J : RightIdeal R} (hI : I.IsMaximal) (hJ : J ) : I = J I J := fun h => h.le, fun h => IsMaximal.eq_of_le I hI hJ hend Semiringsection CommSemiringvariable {R : Type u} [CommSemiring R]R:Type uinst✝:CommSemiring RI:RightIdeal RIsCoatom I.toIdeal IsCoatom I All goals completed! 🐙R:Type uinst✝:CommSemiring RI:Ideal RIsCoatom I.toRightIdeal IsCoatom I All goals completed! 🐙end CommSemiringend RightIdeal