|
| 1 | +/- |
| 2 | +Copyright (c) 2018 Mario Carneiro, Kevin Buzzard. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Mario Carneiro, Kevin Buzzard |
| 5 | +
|
| 6 | +! This file was ported from Lean 3 source module ring_theory.ideal.idempotent_fg |
| 7 | +! leanprover-community/mathlib commit 25cf7631da8ddc2d5f957c388bf5e4b25a77d8dc |
| 8 | +! Please do not edit these lines, except to modify the commit id |
| 9 | +! if you have ported upstream changes. |
| 10 | +-/ |
| 11 | +import Mathlib.Algebra.Ring.Idempotents |
| 12 | +import Mathlib.RingTheory.Finiteness |
| 13 | + |
| 14 | +/-! |
| 15 | +## Lemmas on idempotent finitely generated ideals |
| 16 | +-/ |
| 17 | + |
| 18 | + |
| 19 | +namespace Ideal |
| 20 | + |
| 21 | +/-- A finitely generated idempotent ideal is generated by an idempotent element -/ |
| 22 | +theorem isIdempotentElem_iff_of_fg {R : Type _} [CommRing R] (I : Ideal R) (h : I.Fg) : |
| 23 | + IsIdempotentElem I ↔ ∃ e : R, IsIdempotentElem e ∧ I = R ∙ e := by |
| 24 | + constructor |
| 25 | + · intro e |
| 26 | + obtain ⟨r, hr, hr'⟩ := |
| 27 | + Submodule.exists_mem_and_smul_eq_self_of_fg_of_le_smul I I h |
| 28 | + (by |
| 29 | + rw [smul_eq_mul] |
| 30 | + exact e.ge) |
| 31 | + simp_rw [smul_eq_mul] at hr' |
| 32 | + refine' ⟨r, hr' r hr, antisymm _ ((Submodule.span_singleton_le_iff_mem _ _).mpr hr)⟩ |
| 33 | + intro x hx |
| 34 | + rw [← hr' x hx] |
| 35 | + exact Ideal.mem_span_singleton'.mpr ⟨_, mul_comm _ _⟩ |
| 36 | + · rintro ⟨e, he, rfl⟩ |
| 37 | + simp [IsIdempotentElem, Ideal.span_singleton_mul_span_singleton, he.eq] |
| 38 | +#align ideal.is_idempotent_elem_iff_of_fg Ideal.isIdempotentElem_iff_of_fg |
| 39 | + |
| 40 | +theorem isIdempotentElem_iff_eq_bot_or_top {R : Type _} [CommRing R] [IsDomain R] (I : Ideal R) |
| 41 | + (h : I.Fg) : IsIdempotentElem I ↔ I = ⊥ ∨ I = ⊤ := by |
| 42 | + constructor |
| 43 | + · intro H |
| 44 | + obtain ⟨e, he, rfl⟩ := (I.isIdempotentElem_iff_of_fg h).mp H |
| 45 | + simp only [Ideal.submodule_span_eq, Ideal.span_singleton_eq_bot] |
| 46 | + apply Or.imp id _ (IsIdempotentElem.iff_eq_zero_or_one.mp he) |
| 47 | + rintro rfl |
| 48 | + simp |
| 49 | + · rintro (rfl | rfl) <;> simp [IsIdempotentElem] |
| 50 | +#align ideal.is_idempotent_elem_iff_eq_bot_or_top Ideal.isIdempotentElem_iff_eq_bot_or_top |
| 51 | + |
| 52 | +end Ideal |
0 commit comments