let n be Nat; :: thesis: for K being Field

for M1, M2 being Matrix of n,K st M1 is Idempotent & M2 is Idempotent & M1 * M2 = - (M2 * M1) holds

M1 + M2 is Idempotent

let K be Field; :: thesis: for M1, M2 being Matrix of n,K st M1 is Idempotent & M2 is Idempotent & M1 * M2 = - (M2 * M1) holds

M1 + M2 is Idempotent

let M1, M2 be Matrix of n,K; :: thesis: ( M1 is Idempotent & M2 is Idempotent & M1 * M2 = - (M2 * M1) implies M1 + M2 is Idempotent )

assume that

A1: ( M1 is Idempotent & M2 is Idempotent ) and

A2: M1 * M2 = - (M2 * M1) ; :: thesis: M1 + M2 is Idempotent

A3: ( M1 * M1 = M1 & M2 * M2 = M2 ) by A1;

for M1, M2 being Matrix of n,K st M1 is Idempotent & M2 is Idempotent & M1 * M2 = - (M2 * M1) holds

M1 + M2 is Idempotent

let K be Field; :: thesis: for M1, M2 being Matrix of n,K st M1 is Idempotent & M2 is Idempotent & M1 * M2 = - (M2 * M1) holds

M1 + M2 is Idempotent

let M1, M2 be Matrix of n,K; :: thesis: ( M1 is Idempotent & M2 is Idempotent & M1 * M2 = - (M2 * M1) implies M1 + M2 is Idempotent )

assume that

A1: ( M1 is Idempotent & M2 is Idempotent ) and

A2: M1 * M2 = - (M2 * M1) ; :: thesis: M1 + M2 is Idempotent

A3: ( M1 * M1 = M1 & M2 * M2 = M2 ) by A1;

per cases
( n > 0 or n = 0 )
by NAT_1:3;

end;

suppose A4:
n > 0
; :: thesis: M1 + M2 is Idempotent

A5:
( len (M1 * M2) = n & width (M1 * M2) = n )
by MATRIX_0:24;

A6: ( len M2 = n & width M2 = n ) by MATRIX_0:24;

A7: ( len ((M1 * M1) + (M2 * M1)) = n & width ((M1 * M1) + (M2 * M1)) = n ) by MATRIX_0:24;

A8: ( len (M2 * M1) = n & width (M2 * M1) = n ) by MATRIX_0:24;

A9: ( len (M1 * M1) = n & width (M1 * M1) = n ) by MATRIX_0:24;

A10: ( len M1 = n & width M1 = n ) by MATRIX_0:24;

( len (M1 + M2) = n & width (M1 + M2) = n ) by MATRIX_0:24;

then (M1 + M2) * (M1 + M2) = ((M1 + M2) * M1) + ((M1 + M2) * M2) by A4, A10, A6, MATRIX_4:62

.= ((M1 * M1) + (M2 * M1)) + ((M1 + M2) * M2) by A4, A10, A6, MATRIX_4:63

.= ((M1 * M1) + (M2 * M1)) + ((M1 * M2) + (M2 * M2)) by A4, A10, A6, MATRIX_4:63

.= (((M1 * M1) + (M2 * M1)) + (M1 * M2)) + (M2 * M2) by A5, A7, MATRIX_3:3

.= ((M1 * M1) + ((M2 * M1) + (- (M2 * M1)))) + (M2 * M2) by A2, A9, A8, MATRIX_3:3

.= ((M1 * M1) + (0. (K,n,n))) + (M2 * M2) by A8, MATRIX_4:2

.= M1 + M2 by A3, MATRIX_3:4 ;

hence M1 + M2 is Idempotent ; :: thesis: verum

end;A6: ( len M2 = n & width M2 = n ) by MATRIX_0:24;

A7: ( len ((M1 * M1) + (M2 * M1)) = n & width ((M1 * M1) + (M2 * M1)) = n ) by MATRIX_0:24;

A8: ( len (M2 * M1) = n & width (M2 * M1) = n ) by MATRIX_0:24;

A9: ( len (M1 * M1) = n & width (M1 * M1) = n ) by MATRIX_0:24;

A10: ( len M1 = n & width M1 = n ) by MATRIX_0:24;

( len (M1 + M2) = n & width (M1 + M2) = n ) by MATRIX_0:24;

then (M1 + M2) * (M1 + M2) = ((M1 + M2) * M1) + ((M1 + M2) * M2) by A4, A10, A6, MATRIX_4:62

.= ((M1 * M1) + (M2 * M1)) + ((M1 + M2) * M2) by A4, A10, A6, MATRIX_4:63

.= ((M1 * M1) + (M2 * M1)) + ((M1 * M2) + (M2 * M2)) by A4, A10, A6, MATRIX_4:63

.= (((M1 * M1) + (M2 * M1)) + (M1 * M2)) + (M2 * M2) by A5, A7, MATRIX_3:3

.= ((M1 * M1) + ((M2 * M1) + (- (M2 * M1)))) + (M2 * M2) by A2, A9, A8, MATRIX_3:3

.= ((M1 * M1) + (0. (K,n,n))) + (M2 * M2) by A8, MATRIX_4:2

.= M1 + M2 by A3, MATRIX_3:4 ;

hence M1 + M2 is Idempotent ; :: thesis: verum