Metamath Proof Explorer


Theorem reuccatpfxs1

Description: There is a unique word having the length of a given word increased by 1 with the given word as prefix if there is a unique symbol which extends the given word. (Contributed by Alexander van der Vekens, 6-Oct-2018) (Revised by AV, 21-Jan-2022) (Revised by AV, 13-Oct-2022)

Ref Expression
Hypothesis reuccatpfxs1.1 _ v X
Assertion reuccatpfxs1 W Word V x X x Word V x = W + 1 ∃! v V W ++ ⟨“ v ”⟩ X ∃! x X W = x prefix W

Proof

Step Hyp Ref Expression
1 reuccatpfxs1.1 _ v X
2 eleq1w x = y x Word V y Word V
3 fveqeq2 x = y x = W + 1 y = W + 1
4 2 3 anbi12d x = y x Word V x = W + 1 y Word V y = W + 1
5 4 cbvralvw x X x Word V x = W + 1 y X y Word V y = W + 1
6 1 nfel2 v W ++ ⟨“ u ”⟩ X
7 1 nfel2 v W ++ ⟨“ x ”⟩ X
8 s1eq v = x ⟨“ v ”⟩ = ⟨“ x ”⟩
9 8 oveq2d v = x W ++ ⟨“ v ”⟩ = W ++ ⟨“ x ”⟩
10 9 eleq1d v = x W ++ ⟨“ v ”⟩ X W ++ ⟨“ x ”⟩ X
11 s1eq x = u ⟨“ x ”⟩ = ⟨“ u ”⟩
12 11 oveq2d x = u W ++ ⟨“ x ”⟩ = W ++ ⟨“ u ”⟩
13 12 eleq1d x = u W ++ ⟨“ x ”⟩ X W ++ ⟨“ u ”⟩ X
14 6 7 10 13 reu8nf ∃! v V W ++ ⟨“ v ”⟩ X v V W ++ ⟨“ v ”⟩ X u V W ++ ⟨“ u ”⟩ X v = u
15 nfv v W Word V
16 nfv v y Word V y = W + 1
17 1 16 nfralw v y X y Word V y = W + 1
18 15 17 nfan v W Word V y X y Word V y = W + 1
19 nfv v W = x prefix W
20 1 19 nfreuw v ∃! x X W = x prefix W
21 simprl W Word V y X y Word V y = W + 1 v V W ++ ⟨“ v ”⟩ X u V W ++ ⟨“ u ”⟩ X v = u W ++ ⟨“ v ”⟩ X
22 simpl W Word V y X y Word V y = W + 1 W Word V
23 22 ad2antrr W Word V y X y Word V y = W + 1 v V W ++ ⟨“ v ”⟩ X u V W ++ ⟨“ u ”⟩ X v = u W Word V
24 23 anim1i W Word V y X y Word V y = W + 1 v V W ++ ⟨“ v ”⟩ X u V W ++ ⟨“ u ”⟩ X v = u x X W Word V x X
25 simplrr W Word V y X y Word V y = W + 1 v V W ++ ⟨“ v ”⟩ X u V W ++ ⟨“ u ”⟩ X v = u x X u V W ++ ⟨“ u ”⟩ X v = u
26 simp-4r W Word V y X y Word V y = W + 1 v V W ++ ⟨“ v ”⟩ X u V W ++ ⟨“ u ”⟩ X v = u x X y X y Word V y = W + 1
27 reuccatpfxs1lem W Word V x X u V W ++ ⟨“ u ”⟩ X v = u y X y Word V y = W + 1 W = x prefix W x = W ++ ⟨“ v ”⟩
28 24 25 26 27 syl3anc W Word V y X y Word V y = W + 1 v V W ++ ⟨“ v ”⟩ X u V W ++ ⟨“ u ”⟩ X v = u x X W = x prefix W x = W ++ ⟨“ v ”⟩
29 oveq1 x = W ++ ⟨“ v ”⟩ x prefix W = W ++ ⟨“ v ”⟩ prefix W
30 s1cl v V ⟨“ v ”⟩ Word V
31 22 30 anim12i W Word V y X y Word V y = W + 1 v V W Word V ⟨“ v ”⟩ Word V
32 31 ad2antrr W Word V y X y Word V y = W + 1 v V W ++ ⟨“ v ”⟩ X u V W ++ ⟨“ u ”⟩ X v = u x X W Word V ⟨“ v ”⟩ Word V
33 pfxccat1 W Word V ⟨“ v ”⟩ Word V W ++ ⟨“ v ”⟩ prefix W = W
34 32 33 syl W Word V y X y Word V y = W + 1 v V W ++ ⟨“ v ”⟩ X u V W ++ ⟨“ u ”⟩ X v = u x X W ++ ⟨“ v ”⟩ prefix W = W
35 29 34 sylan9eqr W Word V y X y Word V y = W + 1 v V W ++ ⟨“ v ”⟩ X u V W ++ ⟨“ u ”⟩ X v = u x X x = W ++ ⟨“ v ”⟩ x prefix W = W
36 35 eqcomd W Word V y X y Word V y = W + 1 v V W ++ ⟨“ v ”⟩ X u V W ++ ⟨“ u ”⟩ X v = u x X x = W ++ ⟨“ v ”⟩ W = x prefix W
37 36 ex W Word V y X y Word V y = W + 1 v V W ++ ⟨“ v ”⟩ X u V W ++ ⟨“ u ”⟩ X v = u x X x = W ++ ⟨“ v ”⟩ W = x prefix W
38 28 37 impbid W Word V y X y Word V y = W + 1 v V W ++ ⟨“ v ”⟩ X u V W ++ ⟨“ u ”⟩ X v = u x X W = x prefix W x = W ++ ⟨“ v ”⟩
39 38 ralrimiva W Word V y X y Word V y = W + 1 v V W ++ ⟨“ v ”⟩ X u V W ++ ⟨“ u ”⟩ X v = u x X W = x prefix W x = W ++ ⟨“ v ”⟩
40 reu6i W ++ ⟨“ v ”⟩ X x X W = x prefix W x = W ++ ⟨“ v ”⟩ ∃! x X W = x prefix W
41 21 39 40 syl2anc W Word V y X y Word V y = W + 1 v V W ++ ⟨“ v ”⟩ X u V W ++ ⟨“ u ”⟩ X v = u ∃! x X W = x prefix W
42 41 exp31 W Word V y X y Word V y = W + 1 v V W ++ ⟨“ v ”⟩ X u V W ++ ⟨“ u ”⟩ X v = u ∃! x X W = x prefix W
43 18 20 42 rexlimd W Word V y X y Word V y = W + 1 v V W ++ ⟨“ v ”⟩ X u V W ++ ⟨“ u ”⟩ X v = u ∃! x X W = x prefix W
44 14 43 syl5bi W Word V y X y Word V y = W + 1 ∃! v V W ++ ⟨“ v ”⟩ X ∃! x X W = x prefix W
45 5 44 sylan2b W Word V x X x Word V x = W + 1 ∃! v V W ++ ⟨“ v ”⟩ X ∃! x X W = x prefix W