Metamath Proof Explorer


Theorem seqomlem1

Description: Lemma for seqom . The underlying recursion generates a sequence of pairs with the expected first values. (Contributed by Stefan O'Rear, 1-Nov-2014) (Revised by Mario Carneiro, 23-Jun-2015)

Ref Expression
Hypothesis seqomlem.a Q = rec i ω , v V suc i i F v I I
Assertion seqomlem1 A ω Q A = A 2 nd Q A

Proof

Step Hyp Ref Expression
1 seqomlem.a Q = rec i ω , v V suc i i F v I I
2 fveq2 a = Q a = Q
3 id a = a =
4 2fveq3 a = 2 nd Q a = 2 nd Q
5 3 4 opeq12d a = a 2 nd Q a = 2 nd Q
6 2 5 eqeq12d a = Q a = a 2 nd Q a Q = 2 nd Q
7 fveq2 a = b Q a = Q b
8 id a = b a = b
9 2fveq3 a = b 2 nd Q a = 2 nd Q b
10 8 9 opeq12d a = b a 2 nd Q a = b 2 nd Q b
11 7 10 eqeq12d a = b Q a = a 2 nd Q a Q b = b 2 nd Q b
12 fveq2 a = suc b Q a = Q suc b
13 id a = suc b a = suc b
14 2fveq3 a = suc b 2 nd Q a = 2 nd Q suc b
15 13 14 opeq12d a = suc b a 2 nd Q a = suc b 2 nd Q suc b
16 12 15 eqeq12d a = suc b Q a = a 2 nd Q a Q suc b = suc b 2 nd Q suc b
17 fveq2 a = A Q a = Q A
18 id a = A a = A
19 2fveq3 a = A 2 nd Q a = 2 nd Q A
20 18 19 opeq12d a = A a 2 nd Q a = A 2 nd Q A
21 17 20 eqeq12d a = A Q a = a 2 nd Q a Q A = A 2 nd Q A
22 1 fveq1i Q = rec i ω , v V suc i i F v I I
23 opex I I V
24 23 rdg0 rec i ω , v V suc i i F v I I = I I
25 22 24 eqtri Q = I I
26 0ex V
27 fvex I I V
28 26 27 op2nd 2 nd I I = I I
29 28 eqcomi I I = 2 nd I I
30 29 opeq2i I I = 2 nd I I
31 id Q = I I Q = I I
32 fveq2 Q = I I 2 nd Q = 2 nd I I
33 32 opeq2d Q = I I 2 nd Q = 2 nd I I
34 30 31 33 3eqtr4a Q = I I Q = 2 nd Q
35 25 34 ax-mp Q = 2 nd Q
36 df-ov b i ω , v V suc i i F v 2 nd Q b = i ω , v V suc i i F v b 2 nd Q b
37 fvex 2 nd Q b V
38 suceq i = b suc i = suc b
39 oveq1 i = b i F v = b F v
40 38 39 opeq12d i = b suc i i F v = suc b b F v
41 oveq2 v = 2 nd Q b b F v = b F 2 nd Q b
42 41 opeq2d v = 2 nd Q b suc b b F v = suc b b F 2 nd Q b
43 eqid i ω , v V suc i i F v = i ω , v V suc i i F v
44 opex suc b b F 2 nd Q b V
45 40 42 43 44 ovmpo b ω 2 nd Q b V b i ω , v V suc i i F v 2 nd Q b = suc b b F 2 nd Q b
46 37 45 mpan2 b ω b i ω , v V suc i i F v 2 nd Q b = suc b b F 2 nd Q b
47 36 46 eqtr3id b ω i ω , v V suc i i F v b 2 nd Q b = suc b b F 2 nd Q b
48 fveqeq2 Q b = b 2 nd Q b i ω , v V suc i i F v Q b = suc b b F 2 nd Q b i ω , v V suc i i F v b 2 nd Q b = suc b b F 2 nd Q b
49 47 48 syl5ibrcom b ω Q b = b 2 nd Q b i ω , v V suc i i F v Q b = suc b b F 2 nd Q b
50 vex b V
51 50 sucex suc b V
52 ovex b F 2 nd Q b V
53 51 52 op2nd 2 nd suc b b F 2 nd Q b = b F 2 nd Q b
54 53 eqcomi b F 2 nd Q b = 2 nd suc b b F 2 nd Q b
55 54 a1i b ω b F 2 nd Q b = 2 nd suc b b F 2 nd Q b
56 55 opeq2d b ω suc b b F 2 nd Q b = suc b 2 nd suc b b F 2 nd Q b
57 id i ω , v V suc i i F v Q b = suc b b F 2 nd Q b i ω , v V suc i i F v Q b = suc b b F 2 nd Q b
58 fveq2 i ω , v V suc i i F v Q b = suc b b F 2 nd Q b 2 nd i ω , v V suc i i F v Q b = 2 nd suc b b F 2 nd Q b
59 58 opeq2d i ω , v V suc i i F v Q b = suc b b F 2 nd Q b suc b 2 nd i ω , v V suc i i F v Q b = suc b 2 nd suc b b F 2 nd Q b
60 57 59 eqeq12d i ω , v V suc i i F v Q b = suc b b F 2 nd Q b i ω , v V suc i i F v Q b = suc b 2 nd i ω , v V suc i i F v Q b suc b b F 2 nd Q b = suc b 2 nd suc b b F 2 nd Q b
61 56 60 syl5ibrcom b ω i ω , v V suc i i F v Q b = suc b b F 2 nd Q b i ω , v V suc i i F v Q b = suc b 2 nd i ω , v V suc i i F v Q b
62 49 61 syld b ω Q b = b 2 nd Q b i ω , v V suc i i F v Q b = suc b 2 nd i ω , v V suc i i F v Q b
63 frsuc b ω rec i ω , v V suc i i F v I I ω suc b = i ω , v V suc i i F v rec i ω , v V suc i i F v I I ω b
64 peano2 b ω suc b ω
65 64 fvresd b ω rec i ω , v V suc i i F v I I ω suc b = rec i ω , v V suc i i F v I I suc b
66 1 fveq1i Q suc b = rec i ω , v V suc i i F v I I suc b
67 65 66 eqtr4di b ω rec i ω , v V suc i i F v I I ω suc b = Q suc b
68 fvres b ω rec i ω , v V suc i i F v I I ω b = rec i ω , v V suc i i F v I I b
69 1 fveq1i Q b = rec i ω , v V suc i i F v I I b
70 68 69 eqtr4di b ω rec i ω , v V suc i i F v I I ω b = Q b
71 70 fveq2d b ω i ω , v V suc i i F v rec i ω , v V suc i i F v I I ω b = i ω , v V suc i i F v Q b
72 63 67 71 3eqtr3d b ω Q suc b = i ω , v V suc i i F v Q b
73 72 fveq2d b ω 2 nd Q suc b = 2 nd i ω , v V suc i i F v Q b
74 73 opeq2d b ω suc b 2 nd Q suc b = suc b 2 nd i ω , v V suc i i F v Q b
75 72 74 eqeq12d b ω Q suc b = suc b 2 nd Q suc b i ω , v V suc i i F v Q b = suc b 2 nd i ω , v V suc i i F v Q b
76 62 75 sylibrd b ω Q b = b 2 nd Q b Q suc b = suc b 2 nd Q suc b
77 6 11 16 21 35 76 finds A ω Q A = A 2 nd Q A