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:SS
algcvgb.2 C:S0
Assertion algcvgb XSCFX0CFX<CXCX0CFX<CXCX=0CFX=0

Proof

Step Hyp Ref Expression
1 algcvgb.1 F:SS
2 algcvgb.2 C:S0
3 2 ffvelcdmi XSCX0
4 1 ffvelcdmi XSFXS
5 2 ffvelcdmi FXSCFX0
6 4 5 syl XSCFX0
7 algcvgblem CX0CFX0CFX0CFX<CXCX0CFX<CXCX=0CFX=0
8 3 6 7 syl2anc XSCFX0CFX<CXCX0CFX<CXCX=0CFX=0