Metamath Proof Explorer


Theorem lpadlen1

Description: Length of a left-padded word, in the case the length of the given word W is at least the desired length. (Contributed by Thierry Arnoux, 7-Aug-2023)

Ref Expression
Hypotheses lpadlen.1 φ L 0
lpadlen.2 φ W Word S
lpadlen.3 φ C S
lpadlen1.1 φ L W
Assertion lpadlen1 φ C leftpad W L = W

Proof

Step Hyp Ref Expression
1 lpadlen.1 φ L 0
2 lpadlen.2 φ W Word S
3 lpadlen.3 φ C S
4 lpadlen1.1 φ L W
5 1 2 3 lpadval φ C leftpad W L = 0 ..^ L W × C ++ W
6 1 2 3 4 lpadlem3 φ 0 ..^ L W × C =
7 6 oveq1d φ 0 ..^ L W × C ++ W = ++ W
8 ccatlid W Word S ++ W = W
9 2 8 syl φ ++ W = W
10 5 7 9 3eqtrd φ C leftpad W L = W
11 10 fveq2d φ C leftpad W L = W