let D, E be non empty set ; :: thesis: for M being Matrix of D st ( for i, j being Nat st [i,j] in Indices M holds
M * (i,j) in E ) holds
M is Matrix of E

let M be Matrix of D; :: thesis: ( ( for i, j being Nat st [i,j] in Indices M holds
M * (i,j) in E ) implies M is Matrix of E )

assume AS: for i, j being Nat st [i,j] in Indices M holds
M * (i,j) in E ; :: thesis: M is Matrix of E
consider n being Nat such that
A0: for x being object st x in rng M holds
ex p being FinSequence of D st
( x = p & len p = n ) by MATRIX_0:9;
per cases ( len M = 0 or len M <> 0 ) ;
suppose len M = 0 ; :: thesis: M is Matrix of E
end;
suppose I0: len M <> 0 ; :: thesis: M is Matrix of E
for x being object st x in rng M holds
ex p being FinSequence of E st
( x = p & len p = n )
proof
let x be object ; :: thesis: ( x in rng M implies ex p being FinSequence of E st
( x = p & len p = n ) )

assume S1: x in rng M ; :: thesis: ex p being FinSequence of E st
( x = p & len p = n )

then consider p being FinSequence of D such that
S3: ( x = p & len p = n ) by A0;
X1: width M = n by S1, S3, MATRIX_0:def 3, I0;
for z being object st z in rng p holds
z in E
proof
let z be object ; :: thesis: ( z in rng p implies z in E )
assume z in rng p ; :: thesis: z in E
then consider j1 being object such that
S4: ( j1 in dom p & z = p . j1 ) by FUNCT_1:def 3;
S5: j1 in Seg n by S3, S4, FINSEQ_1:def 3;
reconsider j1 = j1 as Nat by S4;
consider i1 being object such that
S6: ( i1 in dom M & x = M . i1 ) by S1, FUNCT_1:def 3;
reconsider i1 = i1 as Nat by S6;
S8: [i1,j1] in Indices M by S6, S5, X1, ZFMISC_1:87;
then consider q being FinSequence of D such that
S9: ( q = M . i1 & M * (i1,j1) = q . j1 ) by MATRIX_0:def 5;
thus z in E by AS, S3, S4, S6, S8, S9; :: thesis: verum
end;
then rng p c= E ;
then reconsider p = p as FinSequence of E by FINSEQ_1:def 4;
take p ; :: thesis: ( x = p & len p = n )
thus ( x = p & len p = n ) by S3; :: thesis: verum
end;
hence M is Matrix of E by MATRIX_0:9; :: thesis: verum
end;
end;