Metamath Proof Explorer


Theorem rmxypairf1o

Description: The function used to extract rational and irrational parts in df-rmx and df-rmy in fact achieves a one-to-one mapping from the quadratic irrationals to pairs of integers. (Contributed by Stefan O'Rear, 21-Sep-2014)

Ref Expression
Assertion rmxypairf1o A2b0×1stb+A212ndb:0×1-1 ontoa|c0da=c+A21d

Proof

Step Hyp Ref Expression
1 ovex 1stb+A212ndbV
2 eqid b0×1stb+A212ndb=b0×1stb+A212ndb
3 1 2 fnmpti b0×1stb+A212ndbFn0×
4 3 a1i A2b0×1stb+A212ndbFn0×
5 2 rnmpt ranb0×1stb+A212ndb=a|b0×a=1stb+A212ndb
6 vex cV
7 vex dV
8 6 7 op1std b=cd1stb=c
9 6 7 op2ndd b=cd2ndb=d
10 9 oveq2d b=cdA212ndb=A21d
11 8 10 oveq12d b=cd1stb+A212ndb=c+A21d
12 11 eqeq2d b=cda=1stb+A212ndba=c+A21d
13 12 rexxp b0×a=1stb+A212ndbc0da=c+A21d
14 13 bicomi c0da=c+A21db0×a=1stb+A212ndb
15 14 a1i A2c0da=c+A21db0×a=1stb+A212ndb
16 15 abbidv A2a|c0da=c+A21d=a|b0×a=1stb+A212ndb
17 5 16 eqtr4id A2ranb0×1stb+A212ndb=a|c0da=c+A21d
18 fveq2 b=c1stb=1stc
19 fveq2 b=c2ndb=2ndc
20 19 oveq2d b=cA212ndb=A212ndc
21 18 20 oveq12d b=c1stb+A212ndb=1stc+A212ndc
22 ovex 1stc+A212ndcV
23 21 2 22 fvmpt c0×b0×1stb+A212ndbc=1stc+A212ndc
24 23 ad2antrl A2c0×d0×b0×1stb+A212ndbc=1stc+A212ndc
25 fveq2 b=d1stb=1std
26 fveq2 b=d2ndb=2ndd
27 26 oveq2d b=dA212ndb=A212ndd
28 25 27 oveq12d b=d1stb+A212ndb=1std+A212ndd
29 ovex 1std+A212nddV
30 28 2 29 fvmpt d0×b0×1stb+A212ndbd=1std+A212ndd
31 30 ad2antll A2c0×d0×b0×1stb+A212ndbd=1std+A212ndd
32 24 31 eqeq12d A2c0×d0×b0×1stb+A212ndbc=b0×1stb+A212ndbd1stc+A212ndc=1std+A212ndd
33 rmspecsqrtnq A2A21
34 33 adantr A2c0×d0×A21
35 nn0ssq 0
36 xp1st c0×1stc0
37 36 ad2antrl A2c0×d0×1stc0
38 35 37 sselid A2c0×d0×1stc
39 xp2nd c0×2ndc
40 39 ad2antrl A2c0×d0×2ndc
41 zq 2ndc2ndc
42 40 41 syl A2c0×d0×2ndc
43 xp1st d0×1std0
44 43 ad2antll A2c0×d0×1std0
45 35 44 sselid A2c0×d0×1std
46 xp2nd d0×2ndd
47 46 ad2antll A2c0×d0×2ndd
48 zq 2ndd2ndd
49 47 48 syl A2c0×d0×2ndd
50 qirropth A211stc2ndc1std2ndd1stc+A212ndc=1std+A212ndd1stc=1std2ndc=2ndd
51 34 38 42 45 49 50 syl122anc A2c0×d0×1stc+A212ndc=1std+A212ndd1stc=1std2ndc=2ndd
52 51 biimpd A2c0×d0×1stc+A212ndc=1std+A212ndd1stc=1std2ndc=2ndd
53 xpopth c0×d0×1stc=1std2ndc=2nddc=d
54 53 adantl A2c0×d0×1stc=1std2ndc=2nddc=d
55 52 54 sylibd A2c0×d0×1stc+A212ndc=1std+A212nddc=d
56 32 55 sylbid A2c0×d0×b0×1stb+A212ndbc=b0×1stb+A212ndbdc=d
57 56 ralrimivva A2c0×d0×b0×1stb+A212ndbc=b0×1stb+A212ndbdc=d
58 dff1o6 b0×1stb+A212ndb:0×1-1 ontoa|c0da=c+A21db0×1stb+A212ndbFn0×ranb0×1stb+A212ndb=a|c0da=c+A21dc0×d0×b0×1stb+A212ndbc=b0×1stb+A212ndbdc=d
59 4 17 57 58 syl3anbrc A2b0×1stb+A212ndb:0×1-1 ontoa|c0da=c+A21d