# Documentation

Mathlib.Algebra.Ring.Idempotents

# Idempotents #

This file defines idempotents for an arbitary multiplication and proves some basic results, including:

• IsIdempotentElem.mul_of_commute: In a semigroup, the product of two commuting idempotents is an idempotent;
• IsIdempotentElem.one_sub_iff: In a (non-associative) ring, p is an idempotent if and only if 1-p is an idempotent.
• IsIdempotentElem.pow_succ_eq: In a monoid p ^ (n+1) = p for p an idempotent and n a natural number.

## Tags #

projection, idempotent

def IsIdempotentElem {M : Type u_1} [inst : Mul M] (p : M) :

An element p is said to be idempotent if p * p = p

Equations
theorem IsIdempotentElem.of_isIdempotent {M : Type u_1} [inst : Mul M] [inst : IsIdempotent M fun x x_1 => x * x_1] (a : M) :
theorem IsIdempotentElem.eq {M : Type u_1} [inst : Mul M] {p : M} (h : ) :
p * p = p
theorem IsIdempotentElem.mul_of_commute {S : Type u_1} [inst : ] {p : S} {q : S} (h : Commute p q) (h₁ : ) (h₂ : ) :
theorem IsIdempotentElem.zero {M₀ : Type u_1} [inst : ] :
theorem IsIdempotentElem.one {M₁ : Type u_1} [inst : ] :
theorem IsIdempotentElem.one_sub {R : Type u_1} [inst : ] {p : R} (h : ) :
@[simp]
theorem IsIdempotentElem.one_sub_iff {R : Type u_1} [inst : ] {p : R} :
theorem IsIdempotentElem.pow {N : Type u_1} [inst : ] {p : N} (n : ) (h : ) :
theorem IsIdempotentElem.pow_succ_eq {N : Type u_1} [inst : ] {p : N} (n : ) (h : ) :
p ^ (n + 1) = p
@[simp]
theorem IsIdempotentElem.iff_eq_one {G : Type u_1} [inst : ] {p : G} :
p = 1
@[simp]
theorem IsIdempotentElem.iff_eq_zero_or_one {G₀ : Type u_1} [inst : ] {p : G₀} :
p = 0 p = 1

### Instances on Subtype IsIdempotentElem#

instance IsIdempotentElem.instZeroSubtypeIsIdempotentElemToMul {M₀ : Type u_1} [inst : ] :
Zero { p // }
Equations
• IsIdempotentElem.instZeroSubtypeIsIdempotentElemToMul = { zero := { val := 0, property := (_ : ) } }
@[simp]
theorem IsIdempotentElem.coe_zero {M₀ : Type u_1} [inst : ] :
0 = 0
instance IsIdempotentElem.instOneSubtypeIsIdempotentElemToMul {M₁ : Type u_1} [inst : ] :
One { p // }
Equations
• IsIdempotentElem.instOneSubtypeIsIdempotentElemToMul = { one := { val := 1, property := (_ : ) } }
@[simp]
theorem IsIdempotentElem.coe_one {M₁ : Type u_1} [inst : ] :
1 = 1
Equations
• IsIdempotentElem.instHasComplSubtypeIsIdempotentElemToMulToNonUnitalNonAssocRing = { compl := fun p => { val := 1 - p, property := (_ : IsIdempotentElem (1 - p)) } }
@[simp]
theorem IsIdempotentElem.coe_compl {R : Type u_1} [inst : ] (p : { p // }) :
↑(p) = 1 - p
@[simp]
theorem IsIdempotentElem.compl_compl {R : Type u_1} [inst : ] (p : { p // }) :
@[simp]
theorem IsIdempotentElem.zero_compl {R : Type u_1} [inst : ] :
0 = 1
@[simp]
theorem IsIdempotentElem.one_compl {R : Type u_1} [inst : ] :
1 = 0