let n be Nat; :: thesis: for M1, M2 being Matrix of n,REAL st M1 is_less_or_equal_with M2 holds

M1 - M2 is Nonpositive

let M1, M2 be Matrix of n,REAL; :: thesis: ( M1 is_less_or_equal_with M2 implies M1 - M2 is Nonpositive )

assume A1: M1 is_less_or_equal_with M2 ; :: thesis: M1 - M2 is Nonpositive

A2: ( Indices M1 = [:(Seg n),(Seg n):] & Indices (M1 - M2) = [:(Seg n),(Seg n):] ) by MATRIX_0:24;

A3: ( len M1 = len M2 & width M1 = width M2 ) by Lm3;

for i, j being Nat st [i,j] in Indices (M1 - M2) holds

(M1 - M2) * (i,j) <= 0

M1 - M2 is Nonpositive

let M1, M2 be Matrix of n,REAL; :: thesis: ( M1 is_less_or_equal_with M2 implies M1 - M2 is Nonpositive )

assume A1: M1 is_less_or_equal_with M2 ; :: thesis: M1 - M2 is Nonpositive

A2: ( Indices M1 = [:(Seg n),(Seg n):] & Indices (M1 - M2) = [:(Seg n),(Seg n):] ) by MATRIX_0:24;

A3: ( len M1 = len M2 & width M1 = width M2 ) by Lm3;

for i, j being Nat st [i,j] in Indices (M1 - M2) holds

(M1 - M2) * (i,j) <= 0

proof

hence
M1 - M2 is Nonpositive
; :: thesis: verum
let i, j be Nat; :: thesis: ( [i,j] in Indices (M1 - M2) implies (M1 - M2) * (i,j) <= 0 )

assume A4: [i,j] in Indices (M1 - M2) ; :: thesis: (M1 - M2) * (i,j) <= 0

then M1 * (i,j) <= M2 * (i,j) by A1, A2;

then (M1 * (i,j)) - (M2 * (i,j)) <= 0 by XREAL_1:47;

hence (M1 - M2) * (i,j) <= 0 by A2, A3, A4, Th3; :: thesis: verum

end;assume A4: [i,j] in Indices (M1 - M2) ; :: thesis: (M1 - M2) * (i,j) <= 0

then M1 * (i,j) <= M2 * (i,j) by A1, A2;

then (M1 * (i,j)) - (M2 * (i,j)) <= 0 by XREAL_1:47;

hence (M1 - M2) * (i,j) <= 0 by A2, A3, A4, Th3; :: thesis: verum