Metamath Proof Explorer


Theorem qnumdencl

Description: Lemma for qnumcl and qdencl . (Contributed by Stefan O'Rear, 13-Sep-2014)

Ref Expression
Assertion qnumdencl
|- ( A e. QQ -> ( ( numer ` A ) e. ZZ /\ ( denom ` A ) e. NN ) )

Proof

Step Hyp Ref Expression
1 qredeu
 |-  ( A e. QQ -> E! a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) )
2 riotacl
 |-  ( E! a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) -> ( iota_ a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) ) e. ( ZZ X. NN ) )
3 1 2 syl
 |-  ( A e. QQ -> ( iota_ a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) ) e. ( ZZ X. NN ) )
4 elxp6
 |-  ( ( iota_ a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) ) e. ( ZZ X. NN ) <-> ( ( iota_ a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) ) = <. ( 1st ` ( iota_ a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) ) ) , ( 2nd ` ( iota_ a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) ) ) >. /\ ( ( 1st ` ( iota_ a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) ) ) e. ZZ /\ ( 2nd ` ( iota_ a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) ) ) e. NN ) ) )
5 qnumval
 |-  ( A e. QQ -> ( numer ` A ) = ( 1st ` ( iota_ a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) ) ) )
6 5 eleq1d
 |-  ( A e. QQ -> ( ( numer ` A ) e. ZZ <-> ( 1st ` ( iota_ a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) ) ) e. ZZ ) )
7 qdenval
 |-  ( A e. QQ -> ( denom ` A ) = ( 2nd ` ( iota_ a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) ) ) )
8 7 eleq1d
 |-  ( A e. QQ -> ( ( denom ` A ) e. NN <-> ( 2nd ` ( iota_ a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) ) ) e. NN ) )
9 6 8 anbi12d
 |-  ( A e. QQ -> ( ( ( numer ` A ) e. ZZ /\ ( denom ` A ) e. NN ) <-> ( ( 1st ` ( iota_ a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) ) ) e. ZZ /\ ( 2nd ` ( iota_ a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) ) ) e. NN ) ) )
10 9 biimprd
 |-  ( A e. QQ -> ( ( ( 1st ` ( iota_ a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) ) ) e. ZZ /\ ( 2nd ` ( iota_ a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) ) ) e. NN ) -> ( ( numer ` A ) e. ZZ /\ ( denom ` A ) e. NN ) ) )
11 10 adantld
 |-  ( A e. QQ -> ( ( ( iota_ a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) ) = <. ( 1st ` ( iota_ a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) ) ) , ( 2nd ` ( iota_ a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) ) ) >. /\ ( ( 1st ` ( iota_ a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) ) ) e. ZZ /\ ( 2nd ` ( iota_ a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) ) ) e. NN ) ) -> ( ( numer ` A ) e. ZZ /\ ( denom ` A ) e. NN ) ) )
12 4 11 syl5bi
 |-  ( A e. QQ -> ( ( iota_ a e. ( ZZ X. NN ) ( ( ( 1st ` a ) gcd ( 2nd ` a ) ) = 1 /\ A = ( ( 1st ` a ) / ( 2nd ` a ) ) ) ) e. ( ZZ X. NN ) -> ( ( numer ` A ) e. ZZ /\ ( denom ` A ) e. NN ) ) )
13 3 12 mpd
 |-  ( A e. QQ -> ( ( numer ` A ) e. ZZ /\ ( denom ` A ) e. NN ) )