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 commutes_with M2 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 commutes_with M2 holds
(M1 @ ) * (M2 @ ) is Idempotent

let M1, M2 be Matrix of n,K; :: thesis: ( M1 is Idempotent & M2 is Idempotent & M1 commutes_with M2 implies (M1 @ ) * (M2 @ ) is Idempotent )
assume A1: ( M1 is Idempotent & M2 is Idempotent & M1 commutes_with M2 ) ; :: thesis: (M1 @ ) * (M2 @ ) is Idempotent
set M3 = (M1 @ ) * (M2 @ );
per cases ( n > 0 or n = 0 ) by NAT_1:3;
suppose A2: n > 0 ; :: thesis: (M1 @ ) * (M2 @ ) is Idempotent
A3: ( M1 * M1 = M1 & M2 * M2 = M2 & M1 * M2 = M2 * M1 ) by A1, Def1, MATRIX_6:def 1;
A4: ( len M1 = n & width M1 = n & len M2 = n & width M2 = n & len ((M1 @ ) * (M2 @ )) = n & width ((M1 @ ) * (M2 @ )) = n ) by MATRIX_1:25;
A5: ( len (M1 @ ) = n & width (M1 @ ) = n & len (M2 @ ) = n & width (M2 @ ) = n ) by MATRIX_1:25;
then ((M1 @ ) * (M2 @ )) * ((M1 @ ) * (M2 @ )) = (((M1 @ ) * (M2 @ )) * (M1 @ )) * (M2 @ ) by A4, MATRIX_3:35
.= ((M1 @ ) * ((M2 @ ) * (M1 @ ))) * (M2 @ ) by A5, MATRIX_3:35
.= ((M1 @ ) * ((M1 * M2) @ )) * (M2 @ ) by A2, A4, MATRIX_3:24
.= ((M1 @ ) * ((M2 * M1) @ )) * (M2 @ ) by A1, MATRIX_6:def 1
.= ((M1 @ ) * ((M1 @ ) * (M2 @ ))) * (M2 @ ) by A2, A4, MATRIX_3:24
.= (((M1 @ ) * (M1 @ )) * (M2 @ )) * (M2 @ ) by A5, MATRIX_3:35
.= (((M1 * M1) @ ) * (M2 @ )) * (M2 @ ) by A2, A4, MATRIX_3:24
.= (M1 @ ) * ((M2 @ ) * (M2 @ )) by A3, A5, MATRIX_3:35
.= (M1 @ ) * ((M2 * M2) @ ) by A2, A4, MATRIX_3:24
.= (M1 @ ) * (M2 @ ) by A1, Def1 ;
hence (M1 @ ) * (M2 @ ) is Idempotent by Def1; :: thesis: verum
end;
suppose n = 0 ; :: thesis: (M1 @ ) * (M2 @ ) is Idempotent
then ((M1 @ ) * (M2 @ )) * ((M1 @ ) * (M2 @ )) = (M1 @ ) * (M2 @ ) by MATRIX_1:36;
hence (M1 @ ) * (M2 @ ) is Idempotent by Def1; :: thesis: verum
end;
end;