Metamath Proof Explorer


Theorem rdgeqoa

Description: If a recursive function with an initial value A at step N is equal to itself with an initial value B at step M , then every finite number of successor steps will also be equal. (Contributed by ML, 21-Oct-2020)

Ref Expression
Assertion rdgeqoa NOnMOnXωrecFAN=recFBMrecFAN+𝑜X=recFBM+𝑜X

Proof

Step Hyp Ref Expression
1 simp3 NOnMOnXωXω
2 eleq1 x=XxωXω
3 2 3anbi3d x=XNOnMOnxωNOnMOnXω
4 oveq2 x=XN+𝑜x=N+𝑜X
5 4 fveq2d x=XrecFAN+𝑜x=recFAN+𝑜X
6 oveq2 x=XM+𝑜x=M+𝑜X
7 6 fveq2d x=XrecFBM+𝑜x=recFBM+𝑜X
8 5 7 eqeq12d x=XrecFAN+𝑜x=recFBM+𝑜xrecFAN+𝑜X=recFBM+𝑜X
9 8 imbi2d x=XrecFAN=recFBMrecFAN+𝑜x=recFBM+𝑜xrecFAN=recFBMrecFAN+𝑜X=recFBM+𝑜X
10 3 9 imbi12d x=XNOnMOnxωrecFAN=recFBMrecFAN+𝑜x=recFBM+𝑜xNOnMOnXωrecFAN=recFBMrecFAN+𝑜X=recFBM+𝑜X
11 peano1 ω
12 oa0 NOnN+𝑜=N
13 12 fveq2d NOnrecFAN+𝑜=recFAN
14 13 eqcomd NOnrecFAN=recFAN+𝑜
15 oa0 MOnM+𝑜=M
16 15 fveq2d MOnrecFBM+𝑜=recFBM
17 16 eqcomd MOnrecFBM=recFBM+𝑜
18 14 17 eqeqan12d NOnMOnrecFAN=recFBMrecFAN+𝑜=recFBM+𝑜
19 18 biimpd NOnMOnrecFAN=recFBMrecFAN+𝑜=recFBM+𝑜
20 eleq1 x=xωω
21 20 3anbi3d x=NOnMOnxωNOnMOnω
22 11 biantru MOnMOnω
23 22 anbi2i NOnMOnNOnMOnω
24 3anass NOnMOnωNOnMOnω
25 23 24 bitr4i NOnMOnNOnMOnω
26 21 25 bitr4di x=NOnMOnxωNOnMOn
27 oveq2 x=N+𝑜x=N+𝑜
28 27 fveq2d x=recFAN+𝑜x=recFAN+𝑜
29 oveq2 x=M+𝑜x=M+𝑜
30 29 fveq2d x=recFBM+𝑜x=recFBM+𝑜
31 28 30 eqeq12d x=recFAN+𝑜x=recFBM+𝑜xrecFAN+𝑜=recFBM+𝑜
32 31 imbi2d x=recFAN=recFBMrecFAN+𝑜x=recFBM+𝑜xrecFAN=recFBMrecFAN+𝑜=recFBM+𝑜
33 26 32 imbi12d x=NOnMOnxωrecFAN=recFBMrecFAN+𝑜x=recFBM+𝑜xNOnMOnrecFAN=recFBMrecFAN+𝑜=recFBM+𝑜
34 19 33 mpbiri x=NOnMOnxωrecFAN=recFBMrecFAN+𝑜x=recFBM+𝑜x
35 34 ax-gen xx=NOnMOnxωrecFAN=recFBMrecFAN+𝑜x=recFBM+𝑜x
36 sbc6g ω[˙/x]˙NOnMOnxωrecFAN=recFBMrecFAN+𝑜x=recFBM+𝑜xxx=NOnMOnxωrecFAN=recFBMrecFAN+𝑜x=recFBM+𝑜x
37 35 36 mpbiri ω[˙/x]˙NOnMOnxωrecFAN=recFBMrecFAN+𝑜x=recFBM+𝑜x
38 11 37 ax-mp [˙/x]˙NOnMOnxωrecFAN=recFBMrecFAN+𝑜x=recFBM+𝑜x
39 peano2b xωsucxω
40 39 3anbi3i NOnMOnxωNOnMOnsucxω
41 40 imbi1i NOnMOnxωrecFAN=recFBMrecFAN+𝑜x=recFBM+𝑜xNOnMOnsucxωrecFAN=recFBMrecFAN+𝑜x=recFBM+𝑜x
42 nnon xωxOn
43 oacl NOnxOnN+𝑜xOn
44 oacl MOnxOnM+𝑜xOn
45 43 44 anim12i NOnxOnMOnxOnN+𝑜xOnM+𝑜xOn
46 45 3impdir NOnMOnxOnN+𝑜xOnM+𝑜xOn
47 rdgsuc N+𝑜xOnrecFAsucN+𝑜x=FrecFAN+𝑜x
48 fveq2 recFAN+𝑜x=recFBM+𝑜xFrecFAN+𝑜x=FrecFBM+𝑜x
49 47 48 sylan9eqr recFAN+𝑜x=recFBM+𝑜xN+𝑜xOnrecFAsucN+𝑜x=FrecFBM+𝑜x
50 49 adantrr recFAN+𝑜x=recFBM+𝑜xN+𝑜xOnM+𝑜xOnrecFAsucN+𝑜x=FrecFBM+𝑜x
51 rdgsuc M+𝑜xOnrecFBsucM+𝑜x=FrecFBM+𝑜x
52 51 ad2antll recFAN+𝑜x=recFBM+𝑜xN+𝑜xOnM+𝑜xOnrecFBsucM+𝑜x=FrecFBM+𝑜x
53 50 52 eqtr4d recFAN+𝑜x=recFBM+𝑜xN+𝑜xOnM+𝑜xOnrecFAsucN+𝑜x=recFBsucM+𝑜x
54 46 53 sylan2 recFAN+𝑜x=recFBM+𝑜xNOnMOnxOnrecFAsucN+𝑜x=recFBsucM+𝑜x
55 54 ancoms NOnMOnxOnrecFAN+𝑜x=recFBM+𝑜xrecFAsucN+𝑜x=recFBsucM+𝑜x
56 42 55 syl3anl3 NOnMOnxωrecFAN+𝑜x=recFBM+𝑜xrecFAsucN+𝑜x=recFBsucM+𝑜x
57 onasuc NOnxωN+𝑜sucx=sucN+𝑜x
58 57 fveq2d NOnxωrecFAN+𝑜sucx=recFAsucN+𝑜x
59 58 3adant2 NOnMOnxωrecFAN+𝑜sucx=recFAsucN+𝑜x
60 59 adantr NOnMOnxωrecFAN+𝑜x=recFBM+𝑜xrecFAN+𝑜sucx=recFAsucN+𝑜x
61 onasuc MOnxωM+𝑜sucx=sucM+𝑜x
62 61 fveq2d MOnxωrecFBM+𝑜sucx=recFBsucM+𝑜x
63 62 3adant1 NOnMOnxωrecFBM+𝑜sucx=recFBsucM+𝑜x
64 63 adantr NOnMOnxωrecFAN+𝑜x=recFBM+𝑜xrecFBM+𝑜sucx=recFBsucM+𝑜x
65 56 60 64 3eqtr4d NOnMOnxωrecFAN+𝑜x=recFBM+𝑜xrecFAN+𝑜sucx=recFBM+𝑜sucx
66 65 ex NOnMOnxωrecFAN+𝑜x=recFBM+𝑜xrecFAN+𝑜sucx=recFBM+𝑜sucx
67 66 imim2d NOnMOnxωrecFAN=recFBMrecFAN+𝑜x=recFBM+𝑜xrecFAN=recFBMrecFAN+𝑜sucx=recFBM+𝑜sucx
68 40 67 sylbir NOnMOnsucxωrecFAN=recFBMrecFAN+𝑜x=recFBM+𝑜xrecFAN=recFBMrecFAN+𝑜sucx=recFBM+𝑜sucx
69 68 a2i NOnMOnsucxωrecFAN=recFBMrecFAN+𝑜x=recFBM+𝑜xNOnMOnsucxωrecFAN=recFBMrecFAN+𝑜sucx=recFBM+𝑜sucx
70 41 69 sylbi NOnMOnxωrecFAN=recFBMrecFAN+𝑜x=recFBM+𝑜xNOnMOnsucxωrecFAN=recFBMrecFAN+𝑜sucx=recFBM+𝑜sucx
71 sbcimg sucxω[˙sucx/x]˙NOnMOnxωrecFAN=recFBMrecFAN+𝑜x=recFBM+𝑜x[˙sucx/x]˙NOnMOnxω[˙sucx/x]˙recFAN=recFBMrecFAN+𝑜x=recFBM+𝑜x
72 sbc3an [˙sucx/x]˙NOnMOnxω[˙sucx/x]˙NOn[˙sucx/x]˙MOn[˙sucx/x]˙xω
73 sbcg sucxω[˙sucx/x]˙NOnNOn
74 sbcg sucxω[˙sucx/x]˙MOnMOn
75 sbcel1v [˙sucx/x]˙xωsucxω
76 75 a1i sucxω[˙sucx/x]˙xωsucxω
77 73 74 76 3anbi123d sucxω[˙sucx/x]˙NOn[˙sucx/x]˙MOn[˙sucx/x]˙xωNOnMOnsucxω
78 72 77 bitrid sucxω[˙sucx/x]˙NOnMOnxωNOnMOnsucxω
79 sbcimg sucxω[˙sucx/x]˙recFAN=recFBMrecFAN+𝑜x=recFBM+𝑜x[˙sucx/x]˙recFAN=recFBM[˙sucx/x]˙recFAN+𝑜x=recFBM+𝑜x
80 sbcg sucxω[˙sucx/x]˙recFAN=recFBMrecFAN=recFBM
81 sbceqg sucxω[˙sucx/x]˙recFAN+𝑜x=recFBM+𝑜xsucx/xrecFAN+𝑜x=sucx/xrecFBM+𝑜x
82 csbfv12 sucx/xrecFAN+𝑜x=sucx/xrecFAsucx/xN+𝑜x
83 csbconstg sucxωsucx/xrecFA=recFA
84 csbov123 sucx/xN+𝑜x=sucx/xNsucx/x+𝑜sucx/xx
85 csbconstg sucxωsucx/x+𝑜=+𝑜
86 csbconstg sucxωsucx/xN=N
87 csbvarg sucxωsucx/xx=sucx
88 85 86 87 oveq123d sucxωsucx/xNsucx/x+𝑜sucx/xx=N+𝑜sucx
89 84 88 eqtrid sucxωsucx/xN+𝑜x=N+𝑜sucx
90 83 89 fveq12d sucxωsucx/xrecFAsucx/xN+𝑜x=recFAN+𝑜sucx
91 82 90 eqtrid sucxωsucx/xrecFAN+𝑜x=recFAN+𝑜sucx
92 csbfv12 sucx/xrecFBM+𝑜x=sucx/xrecFBsucx/xM+𝑜x
93 csbconstg sucxωsucx/xrecFB=recFB
94 csbov123 sucx/xM+𝑜x=sucx/xMsucx/x+𝑜sucx/xx
95 csbconstg sucxωsucx/xM=M
96 85 95 87 oveq123d sucxωsucx/xMsucx/x+𝑜sucx/xx=M+𝑜sucx
97 94 96 eqtrid sucxωsucx/xM+𝑜x=M+𝑜sucx
98 93 97 fveq12d sucxωsucx/xrecFBsucx/xM+𝑜x=recFBM+𝑜sucx
99 92 98 eqtrid sucxωsucx/xrecFBM+𝑜x=recFBM+𝑜sucx
100 91 99 eqeq12d sucxωsucx/xrecFAN+𝑜x=sucx/xrecFBM+𝑜xrecFAN+𝑜sucx=recFBM+𝑜sucx
101 81 100 bitrd sucxω[˙sucx/x]˙recFAN+𝑜x=recFBM+𝑜xrecFAN+𝑜sucx=recFBM+𝑜sucx
102 80 101 imbi12d sucxω[˙sucx/x]˙recFAN=recFBM[˙sucx/x]˙recFAN+𝑜x=recFBM+𝑜xrecFAN=recFBMrecFAN+𝑜sucx=recFBM+𝑜sucx
103 79 102 bitrd sucxω[˙sucx/x]˙recFAN=recFBMrecFAN+𝑜x=recFBM+𝑜xrecFAN=recFBMrecFAN+𝑜sucx=recFBM+𝑜sucx
104 78 103 imbi12d sucxω[˙sucx/x]˙NOnMOnxω[˙sucx/x]˙recFAN=recFBMrecFAN+𝑜x=recFBM+𝑜xNOnMOnsucxωrecFAN=recFBMrecFAN+𝑜sucx=recFBM+𝑜sucx
105 71 104 bitrd sucxω[˙sucx/x]˙NOnMOnxωrecFAN=recFBMrecFAN+𝑜x=recFBM+𝑜xNOnMOnsucxωrecFAN=recFBMrecFAN+𝑜sucx=recFBM+𝑜sucx
106 70 105 imbitrrid sucxωNOnMOnxωrecFAN=recFBMrecFAN+𝑜x=recFBM+𝑜x[˙sucx/x]˙NOnMOnxωrecFAN=recFBMrecFAN+𝑜x=recFBM+𝑜x
107 39 106 sylbi xωNOnMOnxωrecFAN=recFBMrecFAN+𝑜x=recFBM+𝑜x[˙sucx/x]˙NOnMOnxωrecFAN=recFBMrecFAN+𝑜x=recFBM+𝑜x
108 38 107 findes xωNOnMOnxωrecFAN=recFBMrecFAN+𝑜x=recFBM+𝑜x
109 10 108 vtoclga XωNOnMOnXωrecFAN=recFBMrecFAN+𝑜X=recFBM+𝑜X
110 1 109 mpcom NOnMOnXωrecFAN=recFBMrecFAN+𝑜X=recFBM+𝑜X