Metamath Proof Explorer


Theorem qnumval

Description: Value of the canonical numerator function. (Contributed by Stefan O'Rear, 13-Sep-2014)

Ref Expression
Assertion qnumval
|- ( A e. QQ -> ( numer ` A ) = ( 1st ` ( iota_ x e. ( ZZ X. NN ) ( ( ( 1st ` x ) gcd ( 2nd ` x ) ) = 1 /\ A = ( ( 1st ` x ) / ( 2nd ` x ) ) ) ) ) )

Proof

Step Hyp Ref Expression
1 eqeq1
 |-  ( a = A -> ( a = ( ( 1st ` x ) / ( 2nd ` x ) ) <-> A = ( ( 1st ` x ) / ( 2nd ` x ) ) ) )
2 1 anbi2d
 |-  ( a = A -> ( ( ( ( 1st ` x ) gcd ( 2nd ` x ) ) = 1 /\ a = ( ( 1st ` x ) / ( 2nd ` x ) ) ) <-> ( ( ( 1st ` x ) gcd ( 2nd ` x ) ) = 1 /\ A = ( ( 1st ` x ) / ( 2nd ` x ) ) ) ) )
3 2 riotabidv
 |-  ( a = A -> ( iota_ x e. ( ZZ X. NN ) ( ( ( 1st ` x ) gcd ( 2nd ` x ) ) = 1 /\ a = ( ( 1st ` x ) / ( 2nd ` x ) ) ) ) = ( iota_ x e. ( ZZ X. NN ) ( ( ( 1st ` x ) gcd ( 2nd ` x ) ) = 1 /\ A = ( ( 1st ` x ) / ( 2nd ` x ) ) ) ) )
4 3 fveq2d
 |-  ( a = A -> ( 1st ` ( iota_ x e. ( ZZ X. NN ) ( ( ( 1st ` x ) gcd ( 2nd ` x ) ) = 1 /\ a = ( ( 1st ` x ) / ( 2nd ` x ) ) ) ) ) = ( 1st ` ( iota_ x e. ( ZZ X. NN ) ( ( ( 1st ` x ) gcd ( 2nd ` x ) ) = 1 /\ A = ( ( 1st ` x ) / ( 2nd ` x ) ) ) ) ) )
5 df-numer
 |-  numer = ( a e. QQ |-> ( 1st ` ( iota_ x e. ( ZZ X. NN ) ( ( ( 1st ` x ) gcd ( 2nd ` x ) ) = 1 /\ a = ( ( 1st ` x ) / ( 2nd ` x ) ) ) ) ) )
6 fvex
 |-  ( 1st ` ( iota_ x e. ( ZZ X. NN ) ( ( ( 1st ` x ) gcd ( 2nd ` x ) ) = 1 /\ A = ( ( 1st ` x ) / ( 2nd ` x ) ) ) ) ) e. _V
7 4 5 6 fvmpt
 |-  ( A e. QQ -> ( numer ` A ) = ( 1st ` ( iota_ x e. ( ZZ X. NN ) ( ( ( 1st ` x ) gcd ( 2nd ` x ) ) = 1 /\ A = ( ( 1st ` x ) / ( 2nd ` x ) ) ) ) ) )