Metamath Proof Explorer


Theorem qdenval

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

Ref Expression
Assertion qdenval
|- ( A e. QQ -> ( denom ` A ) = ( 2nd ` ( 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 -> ( 2nd ` ( iota_ x e. ( ZZ X. NN ) ( ( ( 1st ` x ) gcd ( 2nd ` x ) ) = 1 /\ a = ( ( 1st ` x ) / ( 2nd ` x ) ) ) ) ) = ( 2nd ` ( iota_ x e. ( ZZ X. NN ) ( ( ( 1st ` x ) gcd ( 2nd ` x ) ) = 1 /\ A = ( ( 1st ` x ) / ( 2nd ` x ) ) ) ) ) )
5 df-denom
 |-  denom = ( a e. QQ |-> ( 2nd ` ( iota_ x e. ( ZZ X. NN ) ( ( ( 1st ` x ) gcd ( 2nd ` x ) ) = 1 /\ a = ( ( 1st ` x ) / ( 2nd ` x ) ) ) ) ) )
6 fvex
 |-  ( 2nd ` ( 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 -> ( denom ` A ) = ( 2nd ` ( iota_ x e. ( ZZ X. NN ) ( ( ( 1st ` x ) gcd ( 2nd ` x ) ) = 1 /\ A = ( ( 1st ` x ) / ( 2nd ` x ) ) ) ) ) )