Metamath Proof Explorer


Theorem algcvga

Description: The countdown function C remains 0 after N steps. (Contributed by Paul Chapman, 22-Jun-2011)

Ref Expression
Hypotheses algcvga.1 F : S S
algcvga.2 R = seq 0 F 1 st 0 × A
algcvga.3 C : S 0
algcvga.4 z S C F z 0 C F z < C z
algcvga.5 N = C A
Assertion algcvga A S K N C R K = 0

Proof

Step Hyp Ref Expression
1 algcvga.1 F : S S
2 algcvga.2 R = seq 0 F 1 st 0 × A
3 algcvga.3 C : S 0
4 algcvga.4 z S C F z 0 C F z < C z
5 algcvga.5 N = C A
6 3 ffvelrni A S C A 0
7 5 6 eqeltrid A S N 0
8 nn0z N 0 N
9 eluz1 N K N K N K
10 2fveq3 m = N C R m = C R N
11 10 eqeq1d m = N C R m = 0 C R N = 0
12 11 imbi2d m = N A S C R m = 0 A S C R N = 0
13 2fveq3 m = k C R m = C R k
14 13 eqeq1d m = k C R m = 0 C R k = 0
15 14 imbi2d m = k A S C R m = 0 A S C R k = 0
16 2fveq3 m = k + 1 C R m = C R k + 1
17 16 eqeq1d m = k + 1 C R m = 0 C R k + 1 = 0
18 17 imbi2d m = k + 1 A S C R m = 0 A S C R k + 1 = 0
19 2fveq3 m = K C R m = C R K
20 19 eqeq1d m = K C R m = 0 C R K = 0
21 20 imbi2d m = K A S C R m = 0 A S C R K = 0
22 1 2 3 4 5 algcvg A S C R N = 0
23 22 a1i N A S C R N = 0
24 nn0ge0 N 0 0 N
25 24 adantr N 0 k 0 N
26 0re 0
27 nn0re N 0 N
28 zre k k
29 letr 0 N k 0 N N k 0 k
30 26 27 28 29 mp3an3an N 0 k 0 N N k 0 k
31 25 30 mpand N 0 k N k 0 k
32 elnn0z k 0 k 0 k
33 32 simplbi2 k 0 k k 0
34 33 adantl N 0 k 0 k k 0
35 31 34 syld N 0 k N k k 0
36 7 35 sylan A S k N k k 0
37 36 impr A S k N k k 0
38 37 expcom k N k A S k 0
39 38 3adant1 N k N k A S k 0
40 39 ancld N k N k A S A S k 0
41 nn0uz 0 = 0
42 0zd A S 0
43 id A S A S
44 1 a1i A S F : S S
45 41 2 42 43 44 algrf A S R : 0 S
46 45 ffvelrnda A S k 0 R k S
47 2fveq3 z = R k C F z = C F R k
48 47 neeq1d z = R k C F z 0 C F R k 0
49 fveq2 z = R k C z = C R k
50 47 49 breq12d z = R k C F z < C z C F R k < C R k
51 48 50 imbi12d z = R k C F z 0 C F z < C z C F R k 0 C F R k < C R k
52 51 4 vtoclga R k S C F R k 0 C F R k < C R k
53 1 3 algcvgb R k S C F R k 0 C F R k < C R k C R k 0 C F R k < C R k C R k = 0 C F R k = 0
54 simpr C R k 0 C F R k < C R k C R k = 0 C F R k = 0 C R k = 0 C F R k = 0
55 53 54 syl6bi R k S C F R k 0 C F R k < C R k C R k = 0 C F R k = 0
56 52 55 mpd R k S C R k = 0 C F R k = 0
57 46 56 syl A S k 0 C R k = 0 C F R k = 0
58 41 2 42 43 44 algrp1 A S k 0 R k + 1 = F R k
59 58 fveqeq2d A S k 0 C R k + 1 = 0 C F R k = 0
60 57 59 sylibrd A S k 0 C R k = 0 C R k + 1 = 0
61 40 60 syl6 N k N k A S C R k = 0 C R k + 1 = 0
62 61 a2d N k N k A S C R k = 0 A S C R k + 1 = 0
63 12 15 18 21 23 62 uzind N K N K A S C R K = 0
64 63 3expib N K N K A S C R K = 0
65 9 64 sylbid N K N A S C R K = 0
66 8 65 syl N 0 K N A S C R K = 0
67 66 com3r A S N 0 K N C R K = 0
68 7 67 mpd A S K N C R K = 0