Metamath Proof Explorer


Theorem algr0

Description: The value of the algorithm iterator R at 0 is the initial state A . (Contributed by Paul Chapman, 31-Mar-2011) (Revised by Mario Carneiro, 28-May-2014)

Ref Expression
Hypotheses algrf.1 Z = M
algrf.2 R = seq M F 1 st Z × A
algrf.3 φ M
algrf.4 φ A S
Assertion algr0 φ R M = A

Proof

Step Hyp Ref Expression
1 algrf.1 Z = M
2 algrf.2 R = seq M F 1 st Z × A
3 algrf.3 φ M
4 algrf.4 φ A S
5 2 fveq1i R M = seq M F 1 st Z × A M
6 seq1 M seq M F 1 st Z × A M = Z × A M
7 3 6 syl φ seq M F 1 st Z × A M = Z × A M
8 uzid M M M
9 3 8 syl φ M M
10 9 1 eleqtrrdi φ M Z
11 fvconst2g A S M Z Z × A M = A
12 4 10 11 syl2anc φ Z × A M = A
13 7 12 eqtrd φ seq M F 1 st Z × A M = A
14 5 13 eqtrid φ R M = A