Metamath Proof Explorer


Theorem algcvgb

Description: Two ways of expressing that C is a countdown function for algorithm F . The first is used in these theorems. The second states the condition more intuitively as a conjunction: if the countdown function's value is currently nonzero, it must decrease at the next step; if it has reached zero, it must remain zero at the next step. (Contributed by Paul Chapman, 31-Mar-2011)

Ref Expression
Hypotheses algcvgb.1 F : S S
algcvgb.2 C : S 0
Assertion algcvgb X S C F X 0 C F X < C X C X 0 C F X < C X C X = 0 C F X = 0

Proof

Step Hyp Ref Expression
1 algcvgb.1 F : S S
2 algcvgb.2 C : S 0
3 2 ffvelrni X S C X 0
4 1 ffvelrni X S F X S
5 2 ffvelrni F X S C F X 0
6 4 5 syl X S C F X 0
7 algcvgblem C X 0 C F X 0 C F X 0 C F X < C X C X 0 C F X < C X C X = 0 C F X = 0
8 3 6 7 syl2anc X S C F X 0 C F X < C X C X 0 C F X < C X C X = 0 C F X = 0