Metamath Proof Explorer


Theorem pfxval

Description: Value of a prefix operation. (Contributed by AV, 2-May-2020)

Ref Expression
Assertion pfxval S V L 0 S prefix L = S substr 0 L

Proof

Step Hyp Ref Expression
1 df-pfx prefix = s V , l 0 s substr 0 l
2 1 a1i S V L 0 prefix = s V , l 0 s substr 0 l
3 simpl s = S l = L s = S
4 opeq2 l = L 0 l = 0 L
5 4 adantl s = S l = L 0 l = 0 L
6 3 5 oveq12d s = S l = L s substr 0 l = S substr 0 L
7 6 adantl S V L 0 s = S l = L s substr 0 l = S substr 0 L
8 elex S V S V
9 8 adantr S V L 0 S V
10 simpr S V L 0 L 0
11 ovexd S V L 0 S substr 0 L V
12 2 7 9 10 11 ovmpod S V L 0 S prefix L = S substr 0 L