Users' Mathboxes Mathbox for Thierry Arnoux < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  smatrcl Structured version   Visualization version   Unicode version

Theorem smatrcl 28696
Description: Closure of the rectangular submatrix. (Contributed by Thierry Arnoux, 19-Aug-2020.)
Hypotheses
Ref Expression
smat.s  |-  S  =  ( K (subMat1 `  A
) L )
smat.m  |-  ( ph  ->  M  e.  NN )
smat.n  |-  ( ph  ->  N  e.  NN )
smat.k  |-  ( ph  ->  K  e.  ( 1 ... M ) )
smat.l  |-  ( ph  ->  L  e.  ( 1 ... N ) )
smat.a  |-  ( ph  ->  A  e.  ( B  ^m  ( ( 1 ... M )  X.  ( 1 ... N
) ) ) )
Assertion
Ref Expression
smatrcl  |-  ( ph  ->  S  e.  ( B  ^m  ( ( 1 ... ( M  - 
1 ) )  X.  ( 1 ... ( N  -  1 ) ) ) ) )

Proof of Theorem smatrcl
Dummy variables  i 
j  x are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 smat.a . . . . . . . 8  |-  ( ph  ->  A  e.  ( B  ^m  ( ( 1 ... M )  X.  ( 1 ... N
) ) ) )
2 elmapi 7511 . . . . . . . 8  |-  ( A  e.  ( B  ^m  ( ( 1 ... M )  X.  (
1 ... N ) ) )  ->  A :
( ( 1 ... M )  X.  (
1 ... N ) ) --> B )
3 ffun 5742 . . . . . . . 8  |-  ( A : ( ( 1 ... M )  X.  ( 1 ... N
) ) --> B  ->  Fun  A )
41, 2, 33syl 18 . . . . . . 7  |-  ( ph  ->  Fun  A )
5 eqid 2471 . . . . . . . . 9  |-  ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K , 
i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >.
)  =  ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K , 
i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >.
)
65mpt2fun 6417 . . . . . . . 8  |-  Fun  (
i  e.  NN , 
j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  <  L , 
j ,  ( j  +  1 ) )
>. )
76a1i 11 . . . . . . 7  |-  ( ph  ->  Fun  ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  < 
L ,  j ,  ( j  +  1 ) ) >. )
)
8 funco 5627 . . . . . . 7  |-  ( ( Fun  A  /\  Fun  ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  < 
K ,  i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >. ) )  ->  Fun  ( A  o.  (
i  e.  NN , 
j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  <  L , 
j ,  ( j  +  1 ) )
>. ) ) )
94, 7, 8syl2anc 673 . . . . . 6  |-  ( ph  ->  Fun  ( A  o.  ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  < 
K ,  i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >. ) ) )
10 smat.s . . . . . . . 8  |-  S  =  ( K (subMat1 `  A
) L )
11 fz1ssnn 11856 . . . . . . . . . 10  |-  ( 1 ... M )  C_  NN
12 smat.k . . . . . . . . . 10  |-  ( ph  ->  K  e.  ( 1 ... M ) )
1311, 12sseldi 3416 . . . . . . . . 9  |-  ( ph  ->  K  e.  NN )
14 fz1ssnn 11856 . . . . . . . . . 10  |-  ( 1 ... N )  C_  NN
15 smat.l . . . . . . . . . 10  |-  ( ph  ->  L  e.  ( 1 ... N ) )
1614, 15sseldi 3416 . . . . . . . . 9  |-  ( ph  ->  L  e.  NN )
17 smatfval 28695 . . . . . . . . 9  |-  ( ( K  e.  NN  /\  L  e.  NN  /\  A  e.  ( B  ^m  (
( 1 ... M
)  X.  ( 1 ... N ) ) ) )  ->  ( K (subMat1 `  A ) L )  =  ( A  o.  ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K , 
i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >.
) ) )
1813, 16, 1, 17syl3anc 1292 . . . . . . . 8  |-  ( ph  ->  ( K (subMat1 `  A
) L )  =  ( A  o.  (
i  e.  NN , 
j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  <  L , 
j ,  ( j  +  1 ) )
>. ) ) )
1910, 18syl5eq 2517 . . . . . . 7  |-  ( ph  ->  S  =  ( A  o.  ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  < 
L ,  j ,  ( j  +  1 ) ) >. )
) )
2019funeqd 5610 . . . . . 6  |-  ( ph  ->  ( Fun  S  <->  Fun  ( A  o.  ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  < 
L ,  j ,  ( j  +  1 ) ) >. )
) ) )
219, 20mpbird 240 . . . . 5  |-  ( ph  ->  Fun  S )
22 fdmrn 5756 . . . . 5  |-  ( Fun 
S  <->  S : dom  S --> ran  S )
2321, 22sylib 201 . . . 4  |-  ( ph  ->  S : dom  S --> ran  S )
2419dmeqd 5042 . . . . . 6  |-  ( ph  ->  dom  S  =  dom  ( A  o.  (
i  e.  NN , 
j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  <  L , 
j ,  ( j  +  1 ) )
>. ) ) )
25 dmco 5350 . . . . . . 7  |-  dom  ( A  o.  ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  < 
L ,  j ,  ( j  +  1 ) ) >. )
)  =  ( `' ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  < 
K ,  i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >. ) " dom  A )
26 fdm 5745 . . . . . . . . . . . 12  |-  ( A : ( ( 1 ... M )  X.  ( 1 ... N
) ) --> B  ->  dom  A  =  ( ( 1 ... M )  X.  ( 1 ... N ) ) )
271, 2, 263syl 18 . . . . . . . . . . 11  |-  ( ph  ->  dom  A  =  ( ( 1 ... M
)  X.  ( 1 ... N ) ) )
2827imaeq2d 5174 . . . . . . . . . 10  |-  ( ph  ->  ( `' ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K , 
i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >.
) " dom  A
)  =  ( `' ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  < 
K ,  i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >. ) " (
( 1 ... M
)  X.  ( 1 ... N ) ) ) )
2928eleq2d 2534 . . . . . . . . 9  |-  ( ph  ->  ( x  e.  ( `' ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  < 
L ,  j ,  ( j  +  1 ) ) >. ) " dom  A )  <->  x  e.  ( `' ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  < 
L ,  j ,  ( j  +  1 ) ) >. ) " ( ( 1 ... M )  X.  ( 1 ... N
) ) ) ) )
30 opex 4664 . . . . . . . . . . . 12  |-  <. if ( i  <  K , 
i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >.  e.  _V
315, 30fnmpt2i 6881 . . . . . . . . . . 11  |-  ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K , 
i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >.
)  Fn  ( NN 
X.  NN )
32 elpreima 6017 . . . . . . . . . . 11  |-  ( ( i  e.  NN , 
j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  <  L , 
j ,  ( j  +  1 ) )
>. )  Fn  ( NN  X.  NN )  -> 
( x  e.  ( `' ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  < 
L ,  j ,  ( j  +  1 ) ) >. ) " ( ( 1 ... M )  X.  ( 1 ... N
) ) )  <->  ( x  e.  ( NN  X.  NN )  /\  ( ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K , 
i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >.
) `  x )  e.  ( ( 1 ... M )  X.  (
1 ... N ) ) ) ) )
3331, 32ax-mp 5 . . . . . . . . . 10  |-  ( x  e.  ( `' ( i  e.  NN , 
j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  <  L , 
j ,  ( j  +  1 ) )
>. ) " ( ( 1 ... M )  X.  ( 1 ... N ) ) )  <-> 
( x  e.  ( NN  X.  NN )  /\  ( ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K , 
i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >.
) `  x )  e.  ( ( 1 ... M )  X.  (
1 ... N ) ) ) )
3433a1i 11 . . . . . . . . 9  |-  ( ph  ->  ( x  e.  ( `' ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  < 
L ,  j ,  ( j  +  1 ) ) >. ) " ( ( 1 ... M )  X.  ( 1 ... N
) ) )  <->  ( x  e.  ( NN  X.  NN )  /\  ( ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K , 
i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >.
) `  x )  e.  ( ( 1 ... M )  X.  (
1 ... N ) ) ) ) )
35 simplr 770 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  x  =  <. ( 1st `  x ) ,  ( 2nd `  x
) >. )
3635fveq2d 5883 . . . . . . . . . . . . . . . . . 18  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K , 
i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >.
) `  x )  =  ( ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K , 
i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >.
) `  <. ( 1st `  x ) ,  ( 2nd `  x )
>. ) )
37 df-ov 6311 . . . . . . . . . . . . . . . . . 18  |-  ( ( 1st `  x ) ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  < 
K ,  i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >. ) ( 2nd `  x ) )  =  ( ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  < 
L ,  j ,  ( j  +  1 ) ) >. ) `  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )
3836, 37syl6eqr 2523 . . . . . . . . . . . . . . . . 17  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K , 
i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >.
) `  x )  =  ( ( 1st `  x ) ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K , 
i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >.
) ( 2nd `  x
) ) )
39 breq1 4398 . . . . . . . . . . . . . . . . . . . . 21  |-  ( i  =  ( 1st `  x
)  ->  ( i  <  K  <->  ( 1st `  x
)  <  K )
)
40 id 22 . . . . . . . . . . . . . . . . . . . . 21  |-  ( i  =  ( 1st `  x
)  ->  i  =  ( 1st `  x ) )
41 oveq1 6315 . . . . . . . . . . . . . . . . . . . . 21  |-  ( i  =  ( 1st `  x
)  ->  ( i  +  1 )  =  ( ( 1st `  x
)  +  1 ) )
4239, 40, 41ifbieq12d 3899 . . . . . . . . . . . . . . . . . . . 20  |-  ( i  =  ( 1st `  x
)  ->  if (
i  <  K , 
i ,  ( i  +  1 ) )  =  if ( ( 1st `  x )  <  K ,  ( 1st `  x ) ,  ( ( 1st `  x )  +  1 ) ) )
4342opeq1d 4164 . . . . . . . . . . . . . . . . . . 19  |-  ( i  =  ( 1st `  x
)  ->  <. if ( i  <  K , 
i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >.  =  <. if ( ( 1st `  x )  <  K ,  ( 1st `  x ) ,  ( ( 1st `  x )  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >. )
44 breq1 4398 . . . . . . . . . . . . . . . . . . . . 21  |-  ( j  =  ( 2nd `  x
)  ->  ( j  <  L  <->  ( 2nd `  x
)  <  L )
)
45 id 22 . . . . . . . . . . . . . . . . . . . . 21  |-  ( j  =  ( 2nd `  x
)  ->  j  =  ( 2nd `  x ) )
46 oveq1 6315 . . . . . . . . . . . . . . . . . . . . 21  |-  ( j  =  ( 2nd `  x
)  ->  ( j  +  1 )  =  ( ( 2nd `  x
)  +  1 ) )
4744, 45, 46ifbieq12d 3899 . . . . . . . . . . . . . . . . . . . 20  |-  ( j  =  ( 2nd `  x
)  ->  if (
j  <  L , 
j ,  ( j  +  1 ) )  =  if ( ( 2nd `  x )  <  L ,  ( 2nd `  x ) ,  ( ( 2nd `  x )  +  1 ) ) )
4847opeq2d 4165 . . . . . . . . . . . . . . . . . . 19  |-  ( j  =  ( 2nd `  x
)  ->  <. if ( ( 1st `  x
)  <  K , 
( 1st `  x
) ,  ( ( 1st `  x )  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >.  =  <. if ( ( 1st `  x )  <  K ,  ( 1st `  x ) ,  ( ( 1st `  x )  +  1 ) ) ,  if ( ( 2nd `  x
)  <  L , 
( 2nd `  x
) ,  ( ( 2nd `  x )  +  1 ) )
>. )
49 opex 4664 . . . . . . . . . . . . . . . . . . 19  |-  <. if ( ( 1st `  x
)  <  K , 
( 1st `  x
) ,  ( ( 1st `  x )  +  1 ) ) ,  if ( ( 2nd `  x )  <  L ,  ( 2nd `  x ) ,  ( ( 2nd `  x )  +  1 ) ) >.  e.  _V
5043, 48, 5, 49ovmpt2 6451 . . . . . . . . . . . . . . . . . 18  |-  ( ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN )  -> 
( ( 1st `  x
) ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  < 
L ,  j ,  ( j  +  1 ) ) >. )
( 2nd `  x
) )  =  <. if ( ( 1st `  x
)  <  K , 
( 1st `  x
) ,  ( ( 1st `  x )  +  1 ) ) ,  if ( ( 2nd `  x )  <  L ,  ( 2nd `  x ) ,  ( ( 2nd `  x )  +  1 ) ) >. )
5150adantl 473 . . . . . . . . . . . . . . . . 17  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( 1st `  x ) ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K , 
i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >.
) ( 2nd `  x
) )  =  <. if ( ( 1st `  x
)  <  K , 
( 1st `  x
) ,  ( ( 1st `  x )  +  1 ) ) ,  if ( ( 2nd `  x )  <  L ,  ( 2nd `  x ) ,  ( ( 2nd `  x )  +  1 ) ) >. )
5238, 51eqtrd 2505 . . . . . . . . . . . . . . . 16  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K , 
i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >.
) `  x )  =  <. if ( ( 1st `  x )  <  K ,  ( 1st `  x ) ,  ( ( 1st `  x )  +  1 ) ) ,  if ( ( 2nd `  x
)  <  L , 
( 2nd `  x
) ,  ( ( 2nd `  x )  +  1 ) )
>. )
5352eleq1d 2533 . . . . . . . . . . . . . . 15  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( ( i  e.  NN , 
j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  <  L , 
j ,  ( j  +  1 ) )
>. ) `  x )  e.  ( ( 1 ... M )  X.  ( 1 ... N
) )  <->  <. if ( ( 1st `  x
)  <  K , 
( 1st `  x
) ,  ( ( 1st `  x )  +  1 ) ) ,  if ( ( 2nd `  x )  <  L ,  ( 2nd `  x ) ,  ( ( 2nd `  x )  +  1 ) ) >.  e.  ( ( 1 ... M
)  X.  ( 1 ... N ) ) ) )
54 opelxp 4869 . . . . . . . . . . . . . . 15  |-  ( <. if ( ( 1st `  x
)  <  K , 
( 1st `  x
) ,  ( ( 1st `  x )  +  1 ) ) ,  if ( ( 2nd `  x )  <  L ,  ( 2nd `  x ) ,  ( ( 2nd `  x )  +  1 ) ) >.  e.  ( ( 1 ... M
)  X.  ( 1 ... N ) )  <-> 
( if ( ( 1st `  x )  <  K ,  ( 1st `  x ) ,  ( ( 1st `  x )  +  1 ) )  e.  ( 1 ... M )  /\  if ( ( 2nd `  x )  <  L ,  ( 2nd `  x ) ,  ( ( 2nd `  x )  +  1 ) )  e.  ( 1 ... N ) ) )
5553, 54syl6bb 269 . . . . . . . . . . . . . 14  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( ( i  e.  NN , 
j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  <  L , 
j ,  ( j  +  1 ) )
>. ) `  x )  e.  ( ( 1 ... M )  X.  ( 1 ... N
) )  <->  ( if ( ( 1st `  x
)  <  K , 
( 1st `  x
) ,  ( ( 1st `  x )  +  1 ) )  e.  ( 1 ... M )  /\  if ( ( 2nd `  x
)  <  L , 
( 2nd `  x
) ,  ( ( 2nd `  x )  +  1 ) )  e.  ( 1 ... N ) ) ) )
56 ifel 3913 . . . . . . . . . . . . . . . 16  |-  ( if ( ( 1st `  x
)  <  K , 
( 1st `  x
) ,  ( ( 1st `  x )  +  1 ) )  e.  ( 1 ... M )  <->  ( (
( 1st `  x
)  <  K  /\  ( 1st `  x )  e.  ( 1 ... M ) )  \/  ( -.  ( 1st `  x )  <  K  /\  ( ( 1st `  x
)  +  1 )  e.  ( 1 ... M ) ) ) )
57 simplrl 778 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 1st `  x
)  <  K )  ->  ( 1st `  x
)  e.  NN )
5857nnred 10646 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 1st `  x
)  <  K )  ->  ( 1st `  x
)  e.  RR )
5913nnred 10646 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( ph  ->  K  e.  RR )
6059ad3antrrr 744 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 1st `  x
)  <  K )  ->  K  e.  RR )
61 smat.m . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( ph  ->  M  e.  NN )
6261nnred 10646 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( ph  ->  M  e.  RR )
6362ad3antrrr 744 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 1st `  x
)  <  K )  ->  M  e.  RR )
64 simpr 468 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 1st `  x
)  <  K )  ->  ( 1st `  x
)  <  K )
6558, 60, 64ltled 9800 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 1st `  x
)  <  K )  ->  ( 1st `  x
)  <_  K )
66 elfzle2 11829 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( K  e.  ( 1 ... M )  ->  K  <_  M )
6712, 66syl 17 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( ph  ->  K  <_  M )
6867ad3antrrr 744 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 1st `  x
)  <  K )  ->  K  <_  M )
6958, 60, 63, 65, 68letrd 9809 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 1st `  x
)  <  K )  ->  ( 1st `  x
)  <_  M )
7057, 69jca 541 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 1st `  x
)  <  K )  ->  ( ( 1st `  x
)  e.  NN  /\  ( 1st `  x )  <_  M ) )
7161nnzd 11062 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ph  ->  M  e.  ZZ )
72 fznn 11889 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( M  e.  ZZ  ->  (
( 1st `  x
)  e.  ( 1 ... M )  <->  ( ( 1st `  x )  e.  NN  /\  ( 1st `  x )  <_  M
) ) )
7371, 72syl 17 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ph  ->  ( ( 1st `  x
)  e.  ( 1 ... M )  <->  ( ( 1st `  x )  e.  NN  /\  ( 1st `  x )  <_  M
) ) )
7473ad3antrrr 744 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 1st `  x
)  <  K )  ->  ( ( 1st `  x
)  e.  ( 1 ... M )  <->  ( ( 1st `  x )  e.  NN  /\  ( 1st `  x )  <_  M
) ) )
7570, 74mpbird 240 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 1st `  x
)  <  K )  ->  ( 1st `  x
)  e.  ( 1 ... M ) )
7658, 60, 63, 64, 68ltletrd 9812 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 1st `  x
)  <  K )  ->  ( 1st `  x
)  <  M )
7761ad3antrrr 744 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 1st `  x
)  <  K )  ->  M  e.  NN )
78 nnltlem1 11026 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( ( 1st `  x
)  e.  NN  /\  M  e.  NN )  ->  ( ( 1st `  x
)  <  M  <->  ( 1st `  x )  <_  ( M  -  1 ) ) )
7957, 77, 78syl2anc 673 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 1st `  x
)  <  K )  ->  ( ( 1st `  x
)  <  M  <->  ( 1st `  x )  <_  ( M  -  1 ) ) )
8076, 79mpbid 215 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 1st `  x
)  <  K )  ->  ( 1st `  x
)  <_  ( M  -  1 ) )
8175, 802thd 248 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 1st `  x
)  <  K )  ->  ( ( 1st `  x
)  e.  ( 1 ... M )  <->  ( 1st `  x )  <_  ( M  -  1 ) ) )
8281pm5.32da 653 . . . . . . . . . . . . . . . . . 18  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( ( 1st `  x )  <  K  /\  ( 1st `  x )  e.  ( 1 ... M
) )  <->  ( ( 1st `  x )  < 
K  /\  ( 1st `  x )  <_  ( M  -  1 ) ) ) )
83 fznn 11889 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( M  e.  ZZ  ->  (
( ( 1st `  x
)  +  1 )  e.  ( 1 ... M )  <->  ( (
( 1st `  x
)  +  1 )  e.  NN  /\  (
( 1st `  x
)  +  1 )  <_  M ) ) )
8471, 83syl 17 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ph  ->  ( ( ( 1st `  x )  +  1 )  e.  ( 1 ... M )  <->  ( (
( 1st `  x
)  +  1 )  e.  NN  /\  (
( 1st `  x
)  +  1 )  <_  M ) ) )
8584ad2antrr 740 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( ( 1st `  x )  +  1 )  e.  ( 1 ... M
)  <->  ( ( ( 1st `  x )  +  1 )  e.  NN  /\  ( ( 1st `  x )  +  1 )  <_  M ) ) )
86 simprl 772 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( 1st `  x
)  e.  NN )
8786peano2nnd 10648 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( 1st `  x )  +  1 )  e.  NN )
8887biantrurd 516 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( ( 1st `  x )  +  1 )  <_  M 
<->  ( ( ( 1st `  x )  +  1 )  e.  NN  /\  ( ( 1st `  x
)  +  1 )  <_  M ) ) )
8986nnzd 11062 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( 1st `  x
)  e.  ZZ )
9071ad2antrr 740 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  M  e.  ZZ )
91 zltp1le 11010 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( ( 1st `  x
)  e.  ZZ  /\  M  e.  ZZ )  ->  ( ( 1st `  x
)  <  M  <->  ( ( 1st `  x )  +  1 )  <_  M
) )
92 zltlem1 11013 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( ( 1st `  x
)  e.  ZZ  /\  M  e.  ZZ )  ->  ( ( 1st `  x
)  <  M  <->  ( 1st `  x )  <_  ( M  -  1 ) ) )
9391, 92bitr3d 263 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( 1st `  x
)  e.  ZZ  /\  M  e.  ZZ )  ->  ( ( ( 1st `  x )  +  1 )  <_  M  <->  ( 1st `  x )  <_  ( M  -  1 ) ) )
9489, 90, 93syl2anc 673 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( ( 1st `  x )  +  1 )  <_  M 
<->  ( 1st `  x
)  <_  ( M  -  1 ) ) )
9585, 88, 943bitr2d 289 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( ( 1st `  x )  +  1 )  e.  ( 1 ... M
)  <->  ( 1st `  x
)  <_  ( M  -  1 ) ) )
9695anbi2d 718 . . . . . . . . . . . . . . . . . 18  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( -.  ( 1st `  x
)  <  K  /\  ( ( 1st `  x
)  +  1 )  e.  ( 1 ... M ) )  <->  ( -.  ( 1st `  x )  <  K  /\  ( 1st `  x )  <_ 
( M  -  1 ) ) ) )
9782, 96orbi12d 724 . . . . . . . . . . . . . . . . 17  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( ( ( 1st `  x
)  <  K  /\  ( 1st `  x )  e.  ( 1 ... M ) )  \/  ( -.  ( 1st `  x )  <  K  /\  ( ( 1st `  x
)  +  1 )  e.  ( 1 ... M ) ) )  <-> 
( ( ( 1st `  x )  <  K  /\  ( 1st `  x
)  <_  ( M  -  1 ) )  \/  ( -.  ( 1st `  x )  < 
K  /\  ( 1st `  x )  <_  ( M  -  1 ) ) ) ) )
98 pm4.42 972 . . . . . . . . . . . . . . . . . 18  |-  ( ( 1st `  x )  <_  ( M  - 
1 )  <->  ( (
( 1st `  x
)  <_  ( M  -  1 )  /\  ( 1st `  x )  <  K )  \/  ( ( 1st `  x
)  <_  ( M  -  1 )  /\  -.  ( 1st `  x
)  <  K )
) )
99 ancom 457 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( 1st `  x
)  <_  ( M  -  1 )  /\  ( 1st `  x )  <  K )  <->  ( ( 1st `  x )  < 
K  /\  ( 1st `  x )  <_  ( M  -  1 ) ) )
100 ancom 457 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( 1st `  x
)  <_  ( M  -  1 )  /\  -.  ( 1st `  x
)  <  K )  <->  ( -.  ( 1st `  x
)  <  K  /\  ( 1st `  x )  <_  ( M  - 
1 ) ) )
10199, 100orbi12i 530 . . . . . . . . . . . . . . . . . 18  |-  ( ( ( ( 1st `  x
)  <_  ( M  -  1 )  /\  ( 1st `  x )  <  K )  \/  ( ( 1st `  x
)  <_  ( M  -  1 )  /\  -.  ( 1st `  x
)  <  K )
)  <->  ( ( ( 1st `  x )  <  K  /\  ( 1st `  x )  <_ 
( M  -  1 ) )  \/  ( -.  ( 1st `  x
)  <  K  /\  ( 1st `  x )  <_  ( M  - 
1 ) ) ) )
10298, 101bitri 257 . . . . . . . . . . . . . . . . 17  |-  ( ( 1st `  x )  <_  ( M  - 
1 )  <->  ( (
( 1st `  x
)  <  K  /\  ( 1st `  x )  <_  ( M  - 
1 ) )  \/  ( -.  ( 1st `  x )  <  K  /\  ( 1st `  x
)  <_  ( M  -  1 ) ) ) )
10397, 102syl6bbr 271 . . . . . . . . . . . . . . . 16  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( ( ( 1st `  x
)  <  K  /\  ( 1st `  x )  e.  ( 1 ... M ) )  \/  ( -.  ( 1st `  x )  <  K  /\  ( ( 1st `  x
)  +  1 )  e.  ( 1 ... M ) ) )  <-> 
( 1st `  x
)  <_  ( M  -  1 ) ) )
10456, 103syl5bb 265 . . . . . . . . . . . . . . 15  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( if ( ( 1st `  x
)  <  K , 
( 1st `  x
) ,  ( ( 1st `  x )  +  1 ) )  e.  ( 1 ... M )  <->  ( 1st `  x )  <_  ( M  -  1 ) ) )
105 ifel 3913 . . . . . . . . . . . . . . . 16  |-  ( if ( ( 2nd `  x
)  <  L , 
( 2nd `  x
) ,  ( ( 2nd `  x )  +  1 ) )  e.  ( 1 ... N )  <->  ( (
( 2nd `  x
)  <  L  /\  ( 2nd `  x )  e.  ( 1 ... N ) )  \/  ( -.  ( 2nd `  x )  <  L  /\  ( ( 2nd `  x
)  +  1 )  e.  ( 1 ... N ) ) ) )
106 simplrr 779 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 2nd `  x
)  <  L )  ->  ( 2nd `  x
)  e.  NN )
107106nnred 10646 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 2nd `  x
)  <  L )  ->  ( 2nd `  x
)  e.  RR )
10816nnred 10646 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( ph  ->  L  e.  RR )
109108ad3antrrr 744 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 2nd `  x
)  <  L )  ->  L  e.  RR )
110 smat.n . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( ph  ->  N  e.  NN )
111110nnred 10646 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( ph  ->  N  e.  RR )
112111ad3antrrr 744 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 2nd `  x
)  <  L )  ->  N  e.  RR )
113 simpr 468 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 2nd `  x
)  <  L )  ->  ( 2nd `  x
)  <  L )
114107, 109, 113ltled 9800 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 2nd `  x
)  <  L )  ->  ( 2nd `  x
)  <_  L )
115 elfzle2 11829 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( L  e.  ( 1 ... N )  ->  L  <_  N )
11615, 115syl 17 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( ph  ->  L  <_  N )
117116ad3antrrr 744 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 2nd `  x
)  <  L )  ->  L  <_  N )
118107, 109, 112, 114, 117letrd 9809 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 2nd `  x
)  <  L )  ->  ( 2nd `  x
)  <_  N )
119106, 118jca 541 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 2nd `  x
)  <  L )  ->  ( ( 2nd `  x
)  e.  NN  /\  ( 2nd `  x )  <_  N ) )
120110nnzd 11062 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ph  ->  N  e.  ZZ )
121 fznn 11889 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( N  e.  ZZ  ->  (
( 2nd `  x
)  e.  ( 1 ... N )  <->  ( ( 2nd `  x )  e.  NN  /\  ( 2nd `  x )  <_  N
) ) )
122120, 121syl 17 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ph  ->  ( ( 2nd `  x
)  e.  ( 1 ... N )  <->  ( ( 2nd `  x )  e.  NN  /\  ( 2nd `  x )  <_  N
) ) )
123122ad3antrrr 744 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 2nd `  x
)  <  L )  ->  ( ( 2nd `  x
)  e.  ( 1 ... N )  <->  ( ( 2nd `  x )  e.  NN  /\  ( 2nd `  x )  <_  N
) ) )
124119, 123mpbird 240 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 2nd `  x
)  <  L )  ->  ( 2nd `  x
)  e.  ( 1 ... N ) )
125107, 109, 112, 113, 117ltletrd 9812 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 2nd `  x
)  <  L )  ->  ( 2nd `  x
)  <  N )
126110ad3antrrr 744 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 2nd `  x
)  <  L )  ->  N  e.  NN )
127 nnltlem1 11026 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( ( 2nd `  x
)  e.  NN  /\  N  e.  NN )  ->  ( ( 2nd `  x
)  <  N  <->  ( 2nd `  x )  <_  ( N  -  1 ) ) )
128106, 126, 127syl2anc 673 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 2nd `  x
)  <  L )  ->  ( ( 2nd `  x
)  <  N  <->  ( 2nd `  x )  <_  ( N  -  1 ) ) )
129125, 128mpbid 215 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 2nd `  x
)  <  L )  ->  ( 2nd `  x
)  <_  ( N  -  1 ) )
130124, 1292thd 248 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ( ph  /\  x  =  <. ( 1st `  x ) ,  ( 2nd `  x )
>. )  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( 2nd `  x
)  <  L )  ->  ( ( 2nd `  x
)  e.  ( 1 ... N )  <->  ( 2nd `  x )  <_  ( N  -  1 ) ) )
131130pm5.32da 653 . . . . . . . . . . . . . . . . . 18  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( ( 2nd `  x )  <  L  /\  ( 2nd `  x )  e.  ( 1 ... N
) )  <->  ( ( 2nd `  x )  < 
L  /\  ( 2nd `  x )  <_  ( N  -  1 ) ) ) )
132 fznn 11889 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( N  e.  ZZ  ->  (
( ( 2nd `  x
)  +  1 )  e.  ( 1 ... N )  <->  ( (
( 2nd `  x
)  +  1 )  e.  NN  /\  (
( 2nd `  x
)  +  1 )  <_  N ) ) )
133120, 132syl 17 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ph  ->  ( ( ( 2nd `  x )  +  1 )  e.  ( 1 ... N )  <->  ( (
( 2nd `  x
)  +  1 )  e.  NN  /\  (
( 2nd `  x
)  +  1 )  <_  N ) ) )
134133ad2antrr 740 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( ( 2nd `  x )  +  1 )  e.  ( 1 ... N
)  <->  ( ( ( 2nd `  x )  +  1 )  e.  NN  /\  ( ( 2nd `  x )  +  1 )  <_  N ) ) )
135 simprr 774 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( 2nd `  x
)  e.  NN )
136135peano2nnd 10648 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( 2nd `  x )  +  1 )  e.  NN )
137136biantrurd 516 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( ( 2nd `  x )  +  1 )  <_  N 
<->  ( ( ( 2nd `  x )  +  1 )  e.  NN  /\  ( ( 2nd `  x
)  +  1 )  <_  N ) ) )
138135nnzd 11062 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( 2nd `  x
)  e.  ZZ )
139120ad2antrr 740 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  N  e.  ZZ )
140 zltp1le 11010 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( ( 2nd `  x
)  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( 2nd `  x
)  <  N  <->  ( ( 2nd `  x )  +  1 )  <_  N
) )
141 zltlem1 11013 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( ( 2nd `  x
)  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( 2nd `  x
)  <  N  <->  ( 2nd `  x )  <_  ( N  -  1 ) ) )
142140, 141bitr3d 263 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( 2nd `  x
)  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( ( 2nd `  x )  +  1 )  <_  N  <->  ( 2nd `  x )  <_  ( N  -  1 ) ) )
143138, 139, 142syl2anc 673 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( ( 2nd `  x )  +  1 )  <_  N 
<->  ( 2nd `  x
)  <_  ( N  -  1 ) ) )
144134, 137, 1433bitr2d 289 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( ( 2nd `  x )  +  1 )  e.  ( 1 ... N
)  <->  ( 2nd `  x
)  <_  ( N  -  1 ) ) )
145144anbi2d 718 . . . . . . . . . . . . . . . . . 18  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( -.  ( 2nd `  x
)  <  L  /\  ( ( 2nd `  x
)  +  1 )  e.  ( 1 ... N ) )  <->  ( -.  ( 2nd `  x )  <  L  /\  ( 2nd `  x )  <_ 
( N  -  1 ) ) ) )
146131, 145orbi12d 724 . . . . . . . . . . . . . . . . 17  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( ( ( 2nd `  x
)  <  L  /\  ( 2nd `  x )  e.  ( 1 ... N ) )  \/  ( -.  ( 2nd `  x )  <  L  /\  ( ( 2nd `  x
)  +  1 )  e.  ( 1 ... N ) ) )  <-> 
( ( ( 2nd `  x )  <  L  /\  ( 2nd `  x
)  <_  ( N  -  1 ) )  \/  ( -.  ( 2nd `  x )  < 
L  /\  ( 2nd `  x )  <_  ( N  -  1 ) ) ) ) )
147 pm4.42 972 . . . . . . . . . . . . . . . . . 18  |-  ( ( 2nd `  x )  <_  ( N  - 
1 )  <->  ( (
( 2nd `  x
)  <_  ( N  -  1 )  /\  ( 2nd `  x )  <  L )  \/  ( ( 2nd `  x
)  <_  ( N  -  1 )  /\  -.  ( 2nd `  x
)  <  L )
) )
148 ancom 457 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( 2nd `  x
)  <_  ( N  -  1 )  /\  ( 2nd `  x )  <  L )  <->  ( ( 2nd `  x )  < 
L  /\  ( 2nd `  x )  <_  ( N  -  1 ) ) )
149 ancom 457 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( 2nd `  x
)  <_  ( N  -  1 )  /\  -.  ( 2nd `  x
)  <  L )  <->  ( -.  ( 2nd `  x
)  <  L  /\  ( 2nd `  x )  <_  ( N  - 
1 ) ) )
150148, 149orbi12i 530 . . . . . . . . . . . . . . . . . 18  |-  ( ( ( ( 2nd `  x
)  <_  ( N  -  1 )  /\  ( 2nd `  x )  <  L )  \/  ( ( 2nd `  x
)  <_  ( N  -  1 )  /\  -.  ( 2nd `  x
)  <  L )
)  <->  ( ( ( 2nd `  x )  <  L  /\  ( 2nd `  x )  <_ 
( N  -  1 ) )  \/  ( -.  ( 2nd `  x
)  <  L  /\  ( 2nd `  x )  <_  ( N  - 
1 ) ) ) )
151147, 150bitri 257 . . . . . . . . . . . . . . . . 17  |-  ( ( 2nd `  x )  <_  ( N  - 
1 )  <->  ( (
( 2nd `  x
)  <  L  /\  ( 2nd `  x )  <_  ( N  - 
1 ) )  \/  ( -.  ( 2nd `  x )  <  L  /\  ( 2nd `  x
)  <_  ( N  -  1 ) ) ) )
152146, 151syl6bbr 271 . . . . . . . . . . . . . . . 16  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( ( ( 2nd `  x
)  <  L  /\  ( 2nd `  x )  e.  ( 1 ... N ) )  \/  ( -.  ( 2nd `  x )  <  L  /\  ( ( 2nd `  x
)  +  1 )  e.  ( 1 ... N ) ) )  <-> 
( 2nd `  x
)  <_  ( N  -  1 ) ) )
153105, 152syl5bb 265 . . . . . . . . . . . . . . 15  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( if ( ( 2nd `  x
)  <  L , 
( 2nd `  x
) ,  ( ( 2nd `  x )  +  1 ) )  e.  ( 1 ... N )  <->  ( 2nd `  x )  <_  ( N  -  1 ) ) )
154104, 153anbi12d 725 . . . . . . . . . . . . . 14  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( if ( ( 1st `  x
)  <  K , 
( 1st `  x
) ,  ( ( 1st `  x )  +  1 ) )  e.  ( 1 ... M )  /\  if ( ( 2nd `  x
)  <  L , 
( 2nd `  x
) ,  ( ( 2nd `  x )  +  1 ) )  e.  ( 1 ... N ) )  <->  ( ( 1st `  x )  <_ 
( M  -  1 )  /\  ( 2nd `  x )  <_  ( N  -  1 ) ) ) )
15555, 154bitrd 261 . . . . . . . . . . . . 13  |-  ( ( ( ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  /\  ( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  ->  ( ( ( i  e.  NN , 
j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  <  L , 
j ,  ( j  +  1 ) )
>. ) `  x )  e.  ( ( 1 ... M )  X.  ( 1 ... N
) )  <->  ( ( 1st `  x )  <_ 
( M  -  1 )  /\  ( 2nd `  x )  <_  ( N  -  1 ) ) ) )
156155pm5.32da 653 . . . . . . . . . . . 12  |-  ( (
ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  ->  ( ( ( ( 1st `  x )  e.  NN  /\  ( 2nd `  x )  e.  NN )  /\  (
( i  e.  NN ,  j  e.  NN  |->  <. if ( i  < 
K ,  i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >. ) `  x
)  e.  ( ( 1 ... M )  X.  ( 1 ... N ) ) )  <-> 
( ( ( 1st `  x )  e.  NN  /\  ( 2nd `  x
)  e.  NN )  /\  ( ( 1st `  x )  <_  ( M  -  1 )  /\  ( 2nd `  x
)  <_  ( N  -  1 ) ) ) ) )
157 1zzd 10992 . . . . . . . . . . . . . . . . 17  |-  ( ph  ->  1  e.  ZZ )
15871, 157zsubcld 11068 . . . . . . . . . . . . . . . 16  |-  ( ph  ->  ( M  -  1 )  e.  ZZ )
159 fznn 11889 . . . . . . . . . . . . . . . 16  |-  ( ( M  -  1 )  e.  ZZ  ->  (
( 1st `  x
)  e.  ( 1 ... ( M  - 
1 ) )  <->  ( ( 1st `  x )  e.  NN  /\  ( 1st `  x )  <_  ( M  -  1 ) ) ) )
160158, 159syl 17 . . . . . . . . . . . . . . 15  |-  ( ph  ->  ( ( 1st `  x
)  e.  ( 1 ... ( M  - 
1 ) )  <->  ( ( 1st `  x )  e.  NN  /\  ( 1st `  x )  <_  ( M  -  1 ) ) ) )
161120, 157zsubcld 11068 . . . . . . . . . . . . . . . 16  |-  ( ph  ->  ( N  -  1 )  e.  ZZ )
162 fznn 11889 . . . . . . . . . . . . . . . 16  |-  ( ( N  -  1 )  e.  ZZ  ->  (
( 2nd `  x
)  e.  ( 1 ... ( N  - 
1 ) )  <->  ( ( 2nd `  x )  e.  NN  /\  ( 2nd `  x )  <_  ( N  -  1 ) ) ) )
163161, 162syl 17 . . . . . . . . . . . . . . 15  |-  ( ph  ->  ( ( 2nd `  x
)  e.  ( 1 ... ( N  - 
1 ) )  <->  ( ( 2nd `  x )  e.  NN  /\  ( 2nd `  x )  <_  ( N  -  1 ) ) ) )
164160, 163anbi12d 725 . . . . . . . . . . . . . 14  |-  ( ph  ->  ( ( ( 1st `  x )  e.  ( 1 ... ( M  -  1 ) )  /\  ( 2nd `  x
)  e.  ( 1 ... ( N  - 
1 ) ) )  <-> 
( ( ( 1st `  x )  e.  NN  /\  ( 1st `  x
)  <_  ( M  -  1 ) )  /\  ( ( 2nd `  x )  e.  NN  /\  ( 2nd `  x
)  <_  ( N  -  1 ) ) ) ) )
165 an4 840 . . . . . . . . . . . . . 14  |-  ( ( ( ( 1st `  x
)  e.  NN  /\  ( 1st `  x )  <_  ( M  - 
1 ) )  /\  ( ( 2nd `  x
)  e.  NN  /\  ( 2nd `  x )  <_  ( N  - 
1 ) ) )  <-> 
( ( ( 1st `  x )  e.  NN  /\  ( 2nd `  x
)  e.  NN )  /\  ( ( 1st `  x )  <_  ( M  -  1 )  /\  ( 2nd `  x
)  <_  ( N  -  1 ) ) ) )
166164, 165syl6bb 269 . . . . . . . . . . . . 13  |-  ( ph  ->  ( ( ( 1st `  x )  e.  ( 1 ... ( M  -  1 ) )  /\  ( 2nd `  x
)  e.  ( 1 ... ( N  - 
1 ) ) )  <-> 
( ( ( 1st `  x )  e.  NN  /\  ( 2nd `  x
)  e.  NN )  /\  ( ( 1st `  x )  <_  ( M  -  1 )  /\  ( 2nd `  x
)  <_  ( N  -  1 ) ) ) ) )
167166adantr 472 . . . . . . . . . . . 12  |-  ( (
ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  ->  ( ( ( 1st `  x )  e.  ( 1 ... ( M  -  1 ) )  /\  ( 2nd `  x
)  e.  ( 1 ... ( N  - 
1 ) ) )  <-> 
( ( ( 1st `  x )  e.  NN  /\  ( 2nd `  x
)  e.  NN )  /\  ( ( 1st `  x )  <_  ( M  -  1 )  /\  ( 2nd `  x
)  <_  ( N  -  1 ) ) ) ) )
168156, 167bitr4d 264 . . . . . . . . . . 11  |-  ( (
ph  /\  x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >. )  ->  ( ( ( ( 1st `  x )  e.  NN  /\  ( 2nd `  x )  e.  NN )  /\  (
( i  e.  NN ,  j  e.  NN  |->  <. if ( i  < 
K ,  i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >. ) `  x
)  e.  ( ( 1 ... M )  X.  ( 1 ... N ) ) )  <-> 
( ( 1st `  x
)  e.  ( 1 ... ( M  - 
1 ) )  /\  ( 2nd `  x )  e.  ( 1 ... ( N  -  1 ) ) ) ) )
169168pm5.32da 653 . . . . . . . . . 10  |-  ( ph  ->  ( ( x  = 
<. ( 1st `  x
) ,  ( 2nd `  x ) >.  /\  (
( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN )  /\  ( ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  < 
L ,  j ,  ( j  +  1 ) ) >. ) `  x )  e.  ( ( 1 ... M
)  X.  ( 1 ... N ) ) ) )  <->  ( x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >.  /\  (
( 1st `  x
)  e.  ( 1 ... ( M  - 
1 ) )  /\  ( 2nd `  x )  e.  ( 1 ... ( N  -  1 ) ) ) ) ) )
170 elxp6 6844 . . . . . . . . . . . 12  |-  ( x  e.  ( NN  X.  NN )  <->  ( x  = 
<. ( 1st `  x
) ,  ( 2nd `  x ) >.  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) ) )
171170anbi1i 709 . . . . . . . . . . 11  |-  ( ( x  e.  ( NN 
X.  NN )  /\  ( ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  < 
L ,  j ,  ( j  +  1 ) ) >. ) `  x )  e.  ( ( 1 ... M
)  X.  ( 1 ... N ) ) )  <->  ( ( x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >.  /\  (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  ( ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K , 
i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >.
) `  x )  e.  ( ( 1 ... M )  X.  (
1 ... N ) ) ) )
172 anass 661 . . . . . . . . . . 11  |-  ( ( ( x  =  <. ( 1st `  x ) ,  ( 2nd `  x
) >.  /\  ( ( 1st `  x )  e.  NN  /\  ( 2nd `  x )  e.  NN ) )  /\  (
( i  e.  NN ,  j  e.  NN  |->  <. if ( i  < 
K ,  i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >. ) `  x
)  e.  ( ( 1 ... M )  X.  ( 1 ... N ) ) )  <-> 
( x  =  <. ( 1st `  x ) ,  ( 2nd `  x
) >.  /\  ( (
( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN )  /\  ( ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  < 
L ,  j ,  ( j  +  1 ) ) >. ) `  x )  e.  ( ( 1 ... M
)  X.  ( 1 ... N ) ) ) ) )
173171, 172bitri 257 . . . . . . . . . 10  |-  ( ( x  e.  ( NN 
X.  NN )  /\  ( ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  < 
L ,  j ,  ( j  +  1 ) ) >. ) `  x )  e.  ( ( 1 ... M
)  X.  ( 1 ... N ) ) )  <->  ( x  = 
<. ( 1st `  x
) ,  ( 2nd `  x ) >.  /\  (
( ( 1st `  x
)  e.  NN  /\  ( 2nd `  x )  e.  NN )  /\  ( ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  < 
L ,  j ,  ( j  +  1 ) ) >. ) `  x )  e.  ( ( 1 ... M
)  X.  ( 1 ... N ) ) ) ) )
174 elxp6 6844 . . . . . . . . . 10  |-  ( x  e.  ( ( 1 ... ( M  - 
1 ) )  X.  ( 1 ... ( N  -  1 ) ) )  <->  ( x  =  <. ( 1st `  x
) ,  ( 2nd `  x ) >.  /\  (
( 1st `  x
)  e.  ( 1 ... ( M  - 
1 ) )  /\  ( 2nd `  x )  e.  ( 1 ... ( N  -  1 ) ) ) ) )
175169, 173, 1743bitr4g 296 . . . . . . . . 9  |-  ( ph  ->  ( ( x  e.  ( NN  X.  NN )  /\  ( ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K , 
i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >.
) `  x )  e.  ( ( 1 ... M )  X.  (
1 ... N ) ) )  <->  x  e.  (
( 1 ... ( M  -  1 ) )  X.  ( 1 ... ( N  - 
1 ) ) ) ) )
17629, 34, 1753bitrd 287 . . . . . . . 8  |-  ( ph  ->  ( x  e.  ( `' ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  < 
L ,  j ,  ( j  +  1 ) ) >. ) " dom  A )  <->  x  e.  ( ( 1 ... ( M  -  1 ) )  X.  (
1 ... ( N  - 
1 ) ) ) ) )
177176eqrdv 2469 . . . . . . 7  |-  ( ph  ->  ( `' ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K , 
i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >.
) " dom  A
)  =  ( ( 1 ... ( M  -  1 ) )  X.  ( 1 ... ( N  -  1 ) ) ) )
17825, 177syl5eq 2517 . . . . . 6  |-  ( ph  ->  dom  ( A  o.  ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  < 
K ,  i ,  ( i  +  1 ) ) ,  if ( j  <  L ,  j ,  ( j  +  1 ) ) >. ) )  =  ( ( 1 ... ( M  -  1 ) )  X.  (
1 ... ( N  - 
1 ) ) ) )
17924, 178eqtrd 2505 . . . . 5  |-  ( ph  ->  dom  S  =  ( ( 1 ... ( M  -  1 ) )  X.  ( 1 ... ( N  - 
1 ) ) ) )
180179feq2d 5725 . . . 4  |-  ( ph  ->  ( S : dom  S --> ran  S  <->  S :
( ( 1 ... ( M  -  1 ) )  X.  (
1 ... ( N  - 
1 ) ) ) --> ran  S ) )
18123, 180mpbid 215 . . 3  |-  ( ph  ->  S : ( ( 1 ... ( M  -  1 ) )  X.  ( 1 ... ( N  -  1 ) ) ) --> ran 
S )
18219rneqd 5068 . . . . 5  |-  ( ph  ->  ran  S  =  ran  ( A  o.  (
i  e.  NN , 
j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  <  L , 
j ,  ( j  +  1 ) )
>. ) ) )
183 rncoss 5101 . . . . 5  |-  ran  ( A  o.  ( i  e.  NN ,  j  e.  NN  |->  <. if ( i  <  K ,  i ,  ( i  +  1 ) ) ,  if ( j  < 
L ,  j ,  ( j  +  1 ) ) >. )
)  C_  ran  A
184182, 183syl6eqss 3468 . . . 4  |-  ( ph  ->  ran  S  C_  ran  A )
185 frn 5747 . . . . 5  |-  ( A : ( ( 1 ... M )  X.  ( 1 ... N
) ) --> B  ->  ran  A  C_  B )
1861, 2, 1853syl 18 . . . 4  |-  ( ph  ->  ran  A  C_  B
)
187184, 186sstrd 3428 . . 3  |-  ( ph  ->  ran  S  C_  B
)
188 fss 5749 . . 3  |-  ( ( S : ( ( 1 ... ( M  -  1 ) )  X.  ( 1 ... ( N  -  1 ) ) ) --> ran 
S  /\  ran  S  C_  B )  ->  S : ( ( 1 ... ( M  - 
1 ) )  X.  ( 1 ... ( N  -  1 ) ) ) --> B )
189181, 187, 188syl2anc 673 . 2  |-  ( ph  ->  S : ( ( 1 ... ( M  -  1 ) )  X.  ( 1 ... ( N  -  1 ) ) ) --> B )
190 reldmmap 7499 . . . . . 6  |-  Rel  dom  ^m
191190ovrcl 6341 . . . . 5  |-  ( A  e.  ( B  ^m  ( ( 1 ... M )  X.  (
1 ... N ) ) )  ->  ( B  e.  _V  /\  ( ( 1 ... M )  X.  ( 1 ... N ) )  e. 
_V ) )
1921, 191syl 17 . . . 4  |-  ( ph  ->  ( B  e.  _V  /\  ( ( 1 ... M )  X.  (
1 ... N ) )  e.  _V ) )
193192simpld 466 . . 3  |-  ( ph  ->  B  e.  _V )
194 ovex 6336 . . . 4  |-  ( 1 ... ( M  - 
1 ) )  e. 
_V
195 ovex 6336 . . . 4  |-  ( 1 ... ( N  - 
1 ) )  e. 
_V
196194, 195xpex 6614 . . 3  |-  ( ( 1 ... ( M  -  1 ) )  X.  ( 1 ... ( N  -  1 ) ) )  e. 
_V
197 elmapg 7503 . . 3  |-  ( ( B  e.  _V  /\  ( ( 1 ... ( M  -  1 ) )  X.  (
1 ... ( N  - 
1 ) ) )  e.  _V )  -> 
( S  e.  ( B  ^m  ( ( 1 ... ( M  -  1 ) )  X.  ( 1 ... ( N  -  1 ) ) ) )  <-> 
S : ( ( 1 ... ( M  -  1 ) )  X.  ( 1 ... ( N  -  1 ) ) ) --> B ) )
198193, 196, 197sylancl 675 . 2  |-  ( ph  ->  ( S  e.  ( B  ^m  ( ( 1 ... ( M  -  1 ) )  X.  ( 1 ... ( N  -  1 ) ) ) )  <-> 
S : ( ( 1 ... ( M  -  1 ) )  X.  ( 1 ... ( N  -  1 ) ) ) --> B ) )
199189, 198mpbird 240 1  |-  ( ph  ->  S  e.  ( B  ^m  ( ( 1 ... ( M  - 
1 ) )  X.  ( 1 ... ( N  -  1 ) ) ) ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 189    \/ wo 375    /\ wa 376    = wceq 1452    e. wcel 1904   _Vcvv 3031    C_ wss 3390   ifcif 3872   <.cop 3965   class class class wbr 4395    X. cxp 4837   `'ccnv 4838   dom cdm 4839   ran crn 4840   "cima 4842    o. ccom 4843   Fun wfun 5583    Fn wfn 5584   -->wf 5585   ` cfv 5589  (class class class)co 6308    |-> cmpt2 6310   1stc1st 6810   2ndc2nd 6811    ^m cmap 7490   RRcr 9556   1c1 9558    + caddc 9560    < clt 9693    <_ cle 9694    - cmin 9880   NNcn 10631   ZZcz 10961   ...cfz 11810  subMat1csmat 28693
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1677  ax-4 1690  ax-5 1766  ax-6 1813  ax-7 1859  ax-8 1906  ax-9 1913  ax-10 1932  ax-11 1937  ax-12 1950  ax-13 2104  ax-ext 2451  ax-rep 4508  ax-sep 4518  ax-nul 4527  ax-pow 4579  ax-pr 4639  ax-un 6602  ax-cnex 9613  ax-resscn 9614  ax-1cn 9615  ax-icn 9616  ax-addcl 9617  ax-addrcl 9618  ax-mulcl 9619  ax-mulrcl 9620  ax-mulcom 9621  ax-addass 9622  ax-mulass 9623  ax-distr 9624  ax-i2m1 9625  ax-1ne0 9626  ax-1rid 9627  ax-rnegex 9628  ax-rrecex 9629  ax-cnre 9630  ax-pre-lttri 9631  ax-pre-lttrn 9632  ax-pre-ltadd 9633  ax-pre-mulgt0 9634
This theorem depends on definitions:  df-bi 190  df-or 377  df-an 378  df-3or 1008  df-3an 1009  df-tru 1455  df-ex 1672  df-nf 1676  df-sb 1806  df-eu 2323  df-mo 2324  df-clab 2458  df-cleq 2464  df-clel 2467  df-nfc 2601  df-ne 2643  df-nel 2644  df-ral 2761  df-rex 2762  df-reu 2763  df-rab 2765  df-v 3033  df-sbc 3256  df-csb 3350  df-dif 3393  df-un 3395  df-in 3397  df-ss 3404  df-pss 3406  df-nul 3723  df-if 3873  df-pw 3944  df-sn 3960  df-pr 3962  df-tp 3964  df-op 3966  df-uni 4191  df-iun 4271  df-br 4396  df-opab 4455  df-mpt 4456  df-tr 4491  df-eprel 4750  df-id 4754  df-po 4760  df-so 4761  df-fr 4798  df-we 4800  df-xp 4845  df-rel 4846  df-cnv 4847  df-co 4848  df-dm 4849  df-rn 4850  df-res 4851  df-ima 4852  df-pred 5387  df-ord 5433  df-on 5434  df-lim 5435  df-suc 5436  df-iota 5553  df-fun 5591  df-fn 5592  df-f 5593  df-f1 5594  df-fo 5595  df-f1o 5596  df-fv 5597  df-riota 6270  df-ov 6311  df-oprab 6312  df-mpt2 6313  df-om 6712  df-1st 6812  df-2nd 6813  df-wrecs 7046  df-recs 7108  df-rdg 7146  df-er 7381  df-map 7492  df-en 7588  df-dom 7589  df-sdom 7590  df-pnf 9695  df-mnf 9696  df-xr 9697  df-ltxr 9698  df-le 9699  df-sub 9882  df-neg 9883  df-nn 10632  df-n0 10894  df-z 10962  df-uz 11183  df-fz 11811  df-smat 28694
This theorem is referenced by:  smatcl  28702  1smat1  28704
  Copyright terms: Public domain W3C validator