Metamath Proof Explorer


Theorem rmyluc

Description: The Y sequence is a Lucas sequence, definable via this second-order recurrence with rmy0 and rmy1 . Part 3 of equation 2.12 of JonesMatijasevic p. 695. JonesMatijasevic uses this theorem to redefine the X and Y sequences to have domain ( ZZ X. ZZ ) , which simplifies some later theorems. It may shorten the derivation to use this as our initial definition. Incidentally, the X sequence satisfies the exact same recurrence. (Contributed by Stefan O'Rear, 1-Oct-2014)

Ref Expression
Assertion rmyluc A 2 N A Y rm N + 1 = 2 A Y rm N A A Y rm N 1

Proof

Step Hyp Ref Expression
1 peano2z N N + 1
2 frmy Y rm : 2 ×
3 2 fovcl A 2 N + 1 A Y rm N + 1
4 1 3 sylan2 A 2 N A Y rm N + 1
5 4 zcnd A 2 N A Y rm N + 1
6 2cn 2
7 2 fovcl A 2 N A Y rm N
8 7 zcnd A 2 N A Y rm N
9 eluzelcn A 2 A
10 9 adantr A 2 N A
11 8 10 mulcld A 2 N A Y rm N A
12 mulcl 2 A Y rm N A 2 A Y rm N A
13 6 11 12 sylancr A 2 N 2 A Y rm N A
14 peano2zm N N 1
15 2 fovcl A 2 N 1 A Y rm N 1
16 14 15 sylan2 A 2 N A Y rm N 1
17 16 zcnd A 2 N A Y rm N 1
18 13 17 subcld A 2 N 2 A Y rm N A A Y rm N 1
19 rmyp1 A 2 N A Y rm N + 1 = A Y rm N A + A X rm N
20 rmym1 A 2 N A Y rm N 1 = A Y rm N A A X rm N
21 19 20 oveq12d A 2 N A Y rm N + 1 + A Y rm N 1 = A Y rm N A + A X rm N + A Y rm N A A X rm N
22 frmx X rm : 2 × 0
23 22 fovcl A 2 N A X rm N 0
24 23 nn0cnd A 2 N A X rm N
25 11 24 11 ppncand A 2 N A Y rm N A + A X rm N + A Y rm N A A X rm N = A Y rm N A + A Y rm N A
26 13 17 npcand A 2 N 2 A Y rm N A - A Y rm N 1 + A Y rm N 1 = 2 A Y rm N A
27 11 2timesd A 2 N 2 A Y rm N A = A Y rm N A + A Y rm N A
28 26 27 eqtr2d A 2 N A Y rm N A + A Y rm N A = 2 A Y rm N A - A Y rm N 1 + A Y rm N 1
29 21 25 28 3eqtrd A 2 N A Y rm N + 1 + A Y rm N 1 = 2 A Y rm N A - A Y rm N 1 + A Y rm N 1
30 5 18 17 29 addcan2ad A 2 N A Y rm N + 1 = 2 A Y rm N A A Y rm N 1