Metamath Proof Explorer


Theorem pell1qrge1

Description: A Pell solution in the first quadrant is at least 1. (Contributed by Stefan O'Rear, 17-Sep-2014)

Ref Expression
Assertion pell1qrge1 ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ( Pell1QR ‘ 𝐷 ) ) → 1 ≤ 𝐴 )

Proof

Step Hyp Ref Expression
1 elpell1qr ( 𝐷 ∈ ( ℕ ∖ ◻NN ) → ( 𝐴 ∈ ( Pell1QR ‘ 𝐷 ) ↔ ( 𝐴 ∈ ℝ ∧ ∃ 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ( 𝐴 = ( 𝑎 + ( ( √ ‘ 𝐷 ) · 𝑏 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) ) ) )
2 1red ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → 1 ∈ ℝ )
3 simplrl ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → 𝑎 ∈ ℕ0 )
4 3 nn0red ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → 𝑎 ∈ ℝ )
5 eldifi ( 𝐷 ∈ ( ℕ ∖ ◻NN ) → 𝐷 ∈ ℕ )
6 5 ad3antrrr ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → 𝐷 ∈ ℕ )
7 6 nnnn0d ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → 𝐷 ∈ ℕ0 )
8 7 nn0red ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → 𝐷 ∈ ℝ )
9 7 nn0ge0d ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → 0 ≤ 𝐷 )
10 8 9 resqrtcld ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → ( √ ‘ 𝐷 ) ∈ ℝ )
11 simplrr ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → 𝑏 ∈ ℕ0 )
12 11 nn0red ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → 𝑏 ∈ ℝ )
13 10 12 remulcld ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → ( ( √ ‘ 𝐷 ) · 𝑏 ) ∈ ℝ )
14 4 13 readdcld ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → ( 𝑎 + ( ( √ ‘ 𝐷 ) · 𝑏 ) ) ∈ ℝ )
15 2nn0 2 ∈ ℕ0
16 15 a1i ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → 2 ∈ ℕ0 )
17 11 16 nn0expcld ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → ( 𝑏 ↑ 2 ) ∈ ℕ0 )
18 7 17 nn0mulcld ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → ( 𝐷 · ( 𝑏 ↑ 2 ) ) ∈ ℕ0 )
19 18 nn0ge0d ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → 0 ≤ ( 𝐷 · ( 𝑏 ↑ 2 ) ) )
20 18 nn0red ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → ( 𝐷 · ( 𝑏 ↑ 2 ) ) ∈ ℝ )
21 2 20 addge02d ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → ( 0 ≤ ( 𝐷 · ( 𝑏 ↑ 2 ) ) ↔ 1 ≤ ( ( 𝐷 · ( 𝑏 ↑ 2 ) ) + 1 ) ) )
22 19 21 mpbid ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → 1 ≤ ( ( 𝐷 · ( 𝑏 ↑ 2 ) ) + 1 ) )
23 sq1 ( 1 ↑ 2 ) = 1
24 23 a1i ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → ( 1 ↑ 2 ) = 1 )
25 nn0cn ( 𝑎 ∈ ℕ0𝑎 ∈ ℂ )
26 25 ad2antrl ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) → 𝑎 ∈ ℂ )
27 26 sqcld ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) → ( 𝑎 ↑ 2 ) ∈ ℂ )
28 5 ad2antrr ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) → 𝐷 ∈ ℕ )
29 28 nncnd ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) → 𝐷 ∈ ℂ )
30 nn0cn ( 𝑏 ∈ ℕ0𝑏 ∈ ℂ )
31 30 ad2antll ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) → 𝑏 ∈ ℂ )
32 31 sqcld ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) → ( 𝑏 ↑ 2 ) ∈ ℂ )
33 29 32 mulcld ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) → ( 𝐷 · ( 𝑏 ↑ 2 ) ) ∈ ℂ )
34 1cnd ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) → 1 ∈ ℂ )
35 27 33 34 subaddd ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) → ( ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ↔ ( ( 𝐷 · ( 𝑏 ↑ 2 ) ) + 1 ) = ( 𝑎 ↑ 2 ) ) )
36 35 biimpa ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → ( ( 𝐷 · ( 𝑏 ↑ 2 ) ) + 1 ) = ( 𝑎 ↑ 2 ) )
37 36 eqcomd ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → ( 𝑎 ↑ 2 ) = ( ( 𝐷 · ( 𝑏 ↑ 2 ) ) + 1 ) )
38 22 24 37 3brtr4d ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → ( 1 ↑ 2 ) ≤ ( 𝑎 ↑ 2 ) )
39 0le1 0 ≤ 1
40 39 a1i ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → 0 ≤ 1 )
41 3 nn0ge0d ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → 0 ≤ 𝑎 )
42 2 4 40 41 le2sqd ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → ( 1 ≤ 𝑎 ↔ ( 1 ↑ 2 ) ≤ ( 𝑎 ↑ 2 ) ) )
43 38 42 mpbird ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → 1 ≤ 𝑎 )
44 8 9 sqrtge0d ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → 0 ≤ ( √ ‘ 𝐷 ) )
45 11 nn0ge0d ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → 0 ≤ 𝑏 )
46 10 12 44 45 mulge0d ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → 0 ≤ ( ( √ ‘ 𝐷 ) · 𝑏 ) )
47 4 13 addge01d ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → ( 0 ≤ ( ( √ ‘ 𝐷 ) · 𝑏 ) ↔ 𝑎 ≤ ( 𝑎 + ( ( √ ‘ 𝐷 ) · 𝑏 ) ) ) )
48 46 47 mpbid ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → 𝑎 ≤ ( 𝑎 + ( ( √ ‘ 𝐷 ) · 𝑏 ) ) )
49 2 4 14 43 48 letrd ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → 1 ≤ ( 𝑎 + ( ( √ ‘ 𝐷 ) · 𝑏 ) ) )
50 49 adantrl ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( 𝐴 = ( 𝑎 + ( ( √ ‘ 𝐷 ) · 𝑏 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) ) → 1 ≤ ( 𝑎 + ( ( √ ‘ 𝐷 ) · 𝑏 ) ) )
51 simprl ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( 𝐴 = ( 𝑎 + ( ( √ ‘ 𝐷 ) · 𝑏 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) ) → 𝐴 = ( 𝑎 + ( ( √ ‘ 𝐷 ) · 𝑏 ) ) )
52 50 51 breqtrrd ( ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) ∧ ( 𝐴 = ( 𝑎 + ( ( √ ‘ 𝐷 ) · 𝑏 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) ) → 1 ≤ 𝐴 )
53 52 ex ( ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) ∧ ( 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ) ) → ( ( 𝐴 = ( 𝑎 + ( ( √ ‘ 𝐷 ) · 𝑏 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → 1 ≤ 𝐴 ) )
54 53 rexlimdvva ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ℝ ) → ( ∃ 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ( 𝐴 = ( 𝑎 + ( ( √ ‘ 𝐷 ) · 𝑏 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) → 1 ≤ 𝐴 ) )
55 54 expimpd ( 𝐷 ∈ ( ℕ ∖ ◻NN ) → ( ( 𝐴 ∈ ℝ ∧ ∃ 𝑎 ∈ ℕ0𝑏 ∈ ℕ0 ( 𝐴 = ( 𝑎 + ( ( √ ‘ 𝐷 ) · 𝑏 ) ) ∧ ( ( 𝑎 ↑ 2 ) − ( 𝐷 · ( 𝑏 ↑ 2 ) ) ) = 1 ) ) → 1 ≤ 𝐴 ) )
56 1 55 sylbid ( 𝐷 ∈ ( ℕ ∖ ◻NN ) → ( 𝐴 ∈ ( Pell1QR ‘ 𝐷 ) → 1 ≤ 𝐴 ) )
57 56 imp ( ( 𝐷 ∈ ( ℕ ∖ ◻NN ) ∧ 𝐴 ∈ ( Pell1QR ‘ 𝐷 ) ) → 1 ≤ 𝐴 )