Metamath Proof Explorer


Theorem pellqrexplicit

Description: Condition for a calculated real to be a Pell solution. (Contributed by Stefan O'Rear, 19-Sep-2014)

Ref Expression
Assertion pellqrexplicit D A 0 B 0 A 2 D B 2 = 1 A + D B Pell1QR D

Proof

Step Hyp Ref Expression
1 nn0re A 0 A
2 1 3ad2ant2 D A 0 B 0 A
3 eldifi D D
4 3 3ad2ant1 D A 0 B 0 D
5 4 nnrpd D A 0 B 0 D +
6 5 rpsqrtcld D A 0 B 0 D +
7 6 rpred D A 0 B 0 D
8 nn0re B 0 B
9 8 3ad2ant3 D A 0 B 0 B
10 7 9 remulcld D A 0 B 0 D B
11 2 10 readdcld D A 0 B 0 A + D B
12 11 adantr D A 0 B 0 A 2 D B 2 = 1 A + D B
13 simpl2 D A 0 B 0 A 2 D B 2 = 1 A 0
14 simpl3 D A 0 B 0 A 2 D B 2 = 1 B 0
15 eqidd D A 0 B 0 A 2 D B 2 = 1 A + D B = A + D B
16 simpr D A 0 B 0 A 2 D B 2 = 1 A 2 D B 2 = 1
17 oveq1 a = A a + D b = A + D b
18 17 eqeq2d a = A A + D B = a + D b A + D B = A + D b
19 oveq1 a = A a 2 = A 2
20 19 oveq1d a = A a 2 D b 2 = A 2 D b 2
21 20 eqeq1d a = A a 2 D b 2 = 1 A 2 D b 2 = 1
22 18 21 anbi12d a = A A + D B = a + D b a 2 D b 2 = 1 A + D B = A + D b A 2 D b 2 = 1
23 oveq2 b = B D b = D B
24 23 oveq2d b = B A + D b = A + D B
25 24 eqeq2d b = B A + D B = A + D b A + D B = A + D B
26 oveq1 b = B b 2 = B 2
27 26 oveq2d b = B D b 2 = D B 2
28 27 oveq2d b = B A 2 D b 2 = A 2 D B 2
29 28 eqeq1d b = B A 2 D b 2 = 1 A 2 D B 2 = 1
30 25 29 anbi12d b = B A + D B = A + D b A 2 D b 2 = 1 A + D B = A + D B A 2 D B 2 = 1
31 22 30 rspc2ev A 0 B 0 A + D B = A + D B A 2 D B 2 = 1 a 0 b 0 A + D B = a + D b a 2 D b 2 = 1
32 13 14 15 16 31 syl112anc D A 0 B 0 A 2 D B 2 = 1 a 0 b 0 A + D B = a + D b a 2 D b 2 = 1
33 elpell1qr D A + D B Pell1QR D A + D B a 0 b 0 A + D B = a + D b a 2 D b 2 = 1
34 33 3ad2ant1 D A 0 B 0 A + D B Pell1QR D A + D B a 0 b 0 A + D B = a + D b a 2 D b 2 = 1
35 34 adantr D A 0 B 0 A 2 D B 2 = 1 A + D B Pell1QR D A + D B a 0 b 0 A + D B = a + D b a 2 D b 2 = 1
36 12 32 35 mpbir2and D A 0 B 0 A 2 D B 2 = 1 A + D B Pell1QR D