Metamath Proof Explorer


Theorem pfxval0

Description: Value of a prefix operation. This theorem should only be used in proofs if L e. NN0 is not available. Otherwise (and usually), pfxval should be used. (Contributed by AV, 3-Dec-2022) (New usage is discouraged.)

Ref Expression
Assertion pfxval0 S Word A S prefix L = S substr 0 L

Proof

Step Hyp Ref Expression
1 pfxval S Word A L 0 S prefix L = S substr 0 L
2 simpr S V L 0 L 0
3 2 con3i ¬ L 0 ¬ S V L 0
4 3 adantl S Word A ¬ L 0 ¬ S V L 0
5 pfxnndmnd ¬ S V L 0 S prefix L =
6 4 5 syl S Word A ¬ L 0 S prefix L =
7 simpr 0 0 L 0 L 0
8 7 con3i ¬ L 0 ¬ 0 0 L 0
9 swrdnnn0nd S Word A ¬ 0 0 L 0 S substr 0 L =
10 8 9 sylan2 S Word A ¬ L 0 S substr 0 L =
11 6 10 eqtr4d S Word A ¬ L 0 S prefix L = S substr 0 L
12 1 11 pm2.61dan S Word A S prefix L = S substr 0 L