Skip to content

Commit 9cb197e

Browse files
chrisflavriccardobrasca
authored andcommitted
feat(RingTheory/Idempotents): binary version of bijective_pi_of_isIdempotentElem (#24518)
Also renames `bijective_pi_of_isIdempotentElem` to `RingHom.pi_bijective_of_isIdempotentElem`.
1 parent 7267513 commit 9cb197e

1 file changed

Lines changed: 33 additions & 1 deletion

File tree

Mathlib/RingTheory/Idempotents.lean

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,13 +435,45 @@ lemma CompleteOrthogonalIdempotents.bijective_pi' (he : CompleteOrthogonalIdempo
435435
Ideal.Quotient.mk (Ideal.span {e' i})) := ⟨_, funext (by simp), he.bijective_pi⟩
436436
exact h
437437

438-
lemma bijective_pi_of_isIdempotentElem (e : I → R)
438+
lemma RingHom.pi_bijective_of_isIdempotentElem (e : I → R)
439439
(he : ∀ i, IsIdempotentElem (e i))
440440
(he₁ : ∀ i j, i ≠ j → (1 - e i) * (1 - e j) = 0) (he₂ : ∏ i, e i = 0) :
441441
Function.Bijective (Pi.ringHom fun i ↦ Ideal.Quotient.mk (Ideal.span {e i})) :=
442442
(CompleteOrthogonalIdempotents.of_prod_one_sub
443443
fun i ↦ (he i).one_sub, he₁⟩ (by simpa using he₂)).bijective_pi'
444444

445+
@[deprecated (since := "2025-01-05")]
446+
alias bijective_pi_of_isIdempotentElem := RingHom.pi_bijective_of_isIdempotentElem
447+
448+
lemma RingHom.prod_bijective_of_isIdempotentElem {e f : R} (he : IsIdempotentElem e)
449+
(hf : IsIdempotentElem f) (hef₁ : e + f = 1) (hef₂ : e * f = 0) :
450+
Function.Bijective ((Ideal.Quotient.mk <| Ideal.span {e}).prod
451+
(Ideal.Quotient.mk <| Ideal.span {f})) := by
452+
let o (i : Fin 2) : R := match i with
453+
| 0 => e
454+
| 1 => f
455+
show Function.Bijective
456+
(piFinTwoEquiv _ ∘ Pi.ringHom (fun i : Fin 2 ↦ Ideal.Quotient.mk (Ideal.span {o i})))
457+
rw [(Equiv.bijective _).of_comp_iff']
458+
apply pi_bijective_of_isIdempotentElem
459+
· intro i
460+
fin_cases i <;> simpa [o]
461+
· intro i j hij
462+
fin_cases i <;> fin_cases j <;> simp at hij ⊢ <;>
463+
simp [o, mul_comm, sub_mul, mul_sub, hef₂, ← hef₁]
464+
· simpa
465+
466+
variable (R) in
467+
/-- If `e` and `f` are idempotent elements such that `e + f = 1` and `e * f = 0`,
468+
`S` is isomorphic as an `R`-algebra to `S ⧸ (e) × S ⧸ (f)`. -/
469+
@[simps! -isSimp apply, simps! apply_fst apply_snd]
470+
noncomputable def AlgEquiv.prodQuotientOfIsIdempotentElem
471+
{S : Type*} [CommRing S] [Algebra R S] {e f : S} (he : IsIdempotentElem e)
472+
(hf : IsIdempotentElem f) (hef₁ : e + f = 1) (hef₂ : e * f = 0) :
473+
S ≃ₐ[R] (S ⧸ Ideal.span {e}) × S ⧸ Ideal.span {f} :=
474+
AlgEquiv.ofBijective ((Ideal.Quotient.mkₐ _ _).prod (Ideal.Quotient.mkₐ _ _)) <|
475+
RingHom.prod_bijective_of_isIdempotentElem he hf hef₁ hef₂
476+
445477
end CommRing
446478

447479
section corner

0 commit comments

Comments
 (0)