Metamath Proof Explorer


Theorem cats1un

Description: Express a word with an extra symbol as the union of the word and the new value. (Contributed by Mario Carneiro, 28-Feb-2016)

Ref Expression
Assertion cats1un A Word X B X A ++ ⟨“ B ”⟩ = A A B

Proof

Step Hyp Ref Expression
1 ccatws1cl A Word X B X A ++ ⟨“ B ”⟩ Word X
2 wrdf A ++ ⟨“ B ”⟩ Word X A ++ ⟨“ B ”⟩ : 0 ..^ A ++ ⟨“ B ”⟩ X
3 1 2 syl A Word X B X A ++ ⟨“ B ”⟩ : 0 ..^ A ++ ⟨“ B ”⟩ X
4 ccatws1len A Word X A ++ ⟨“ B ”⟩ = A + 1
5 4 oveq2d A Word X 0 ..^ A ++ ⟨“ B ”⟩ = 0 ..^ A + 1
6 lencl A Word X A 0
7 nn0uz 0 = 0
8 6 7 eleqtrdi A Word X A 0
9 fzosplitsn A 0 0 ..^ A + 1 = 0 ..^ A A
10 8 9 syl A Word X 0 ..^ A + 1 = 0 ..^ A A
11 5 10 eqtrd A Word X 0 ..^ A ++ ⟨“ B ”⟩ = 0 ..^ A A
12 11 adantr A Word X B X 0 ..^ A ++ ⟨“ B ”⟩ = 0 ..^ A A
13 12 feq2d A Word X B X A ++ ⟨“ B ”⟩ : 0 ..^ A ++ ⟨“ B ”⟩ X A ++ ⟨“ B ”⟩ : 0 ..^ A A X
14 3 13 mpbid A Word X B X A ++ ⟨“ B ”⟩ : 0 ..^ A A X
15 14 ffnd A Word X B X A ++ ⟨“ B ”⟩ Fn 0 ..^ A A
16 wrdf A Word X A : 0 ..^ A X
17 16 adantr A Word X B X A : 0 ..^ A X
18 eqid A B = A B
19 fsng A 0 B X A B : A B A B = A B
20 18 19 mpbiri A 0 B X A B : A B
21 6 20 sylan A Word X B X A B : A B
22 fzodisjsn 0 ..^ A A =
23 22 a1i A Word X B X 0 ..^ A A =
24 fun A : 0 ..^ A X A B : A B 0 ..^ A A = A A B : 0 ..^ A A X B
25 17 21 23 24 syl21anc A Word X B X A A B : 0 ..^ A A X B
26 25 ffnd A Word X B X A A B Fn 0 ..^ A A
27 elun x 0 ..^ A A x 0 ..^ A x A
28 ccats1val1 A Word X x 0 ..^ A A ++ ⟨“ B ”⟩ x = A x
29 28 adantlr A Word X B X x 0 ..^ A A ++ ⟨“ B ”⟩ x = A x
30 simpr A Word X B X x 0 ..^ A x 0 ..^ A
31 fzonel ¬ A 0 ..^ A
32 nelne2 x 0 ..^ A ¬ A 0 ..^ A x A
33 30 31 32 sylancl A Word X B X x 0 ..^ A x A
34 33 necomd A Word X B X x 0 ..^ A A x
35 fvunsn A x A A B x = A x
36 34 35 syl A Word X B X x 0 ..^ A A A B x = A x
37 29 36 eqtr4d A Word X B X x 0 ..^ A A ++ ⟨“ B ”⟩ x = A A B x
38 fvexd A Word X B X A V
39 simpr A Word X B X B X
40 17 fdmd A Word X B X dom A = 0 ..^ A
41 40 eleq2d A Word X B X A dom A A 0 ..^ A
42 31 41 mtbiri A Word X B X ¬ A dom A
43 fsnunfv A V B X ¬ A dom A A A B A = B
44 38 39 42 43 syl3anc A Word X B X A A B A = B
45 simpl A Word X B X A Word X
46 s1cl B X ⟨“ B ”⟩ Word X
47 46 adantl A Word X B X ⟨“ B ”⟩ Word X
48 s1len ⟨“ B ”⟩ = 1
49 1nn 1
50 48 49 eqeltri ⟨“ B ”⟩
51 lbfzo0 0 0 ..^ ⟨“ B ”⟩ ⟨“ B ”⟩
52 50 51 mpbir 0 0 ..^ ⟨“ B ”⟩
53 52 a1i A Word X B X 0 0 ..^ ⟨“ B ”⟩
54 ccatval3 A Word X ⟨“ B ”⟩ Word X 0 0 ..^ ⟨“ B ”⟩ A ++ ⟨“ B ”⟩ 0 + A = ⟨“ B ”⟩ 0
55 45 47 53 54 syl3anc A Word X B X A ++ ⟨“ B ”⟩ 0 + A = ⟨“ B ”⟩ 0
56 s1fv B X ⟨“ B ”⟩ 0 = B
57 56 adantl A Word X B X ⟨“ B ”⟩ 0 = B
58 55 57 eqtrd A Word X B X A ++ ⟨“ B ”⟩ 0 + A = B
59 6 adantr A Word X B X A 0
60 59 nn0cnd A Word X B X A
61 60 addid2d A Word X B X 0 + A = A
62 61 fveq2d A Word X B X A ++ ⟨“ B ”⟩ 0 + A = A ++ ⟨“ B ”⟩ A
63 44 58 62 3eqtr2rd A Word X B X A ++ ⟨“ B ”⟩ A = A A B A
64 elsni x A x = A
65 64 fveq2d x A A ++ ⟨“ B ”⟩ x = A ++ ⟨“ B ”⟩ A
66 64 fveq2d x A A A B x = A A B A
67 65 66 eqeq12d x A A ++ ⟨“ B ”⟩ x = A A B x A ++ ⟨“ B ”⟩ A = A A B A
68 63 67 syl5ibrcom A Word X B X x A A ++ ⟨“ B ”⟩ x = A A B x
69 68 imp A Word X B X x A A ++ ⟨“ B ”⟩ x = A A B x
70 37 69 jaodan A Word X B X x 0 ..^ A x A A ++ ⟨“ B ”⟩ x = A A B x
71 27 70 sylan2b A Word X B X x 0 ..^ A A A ++ ⟨“ B ”⟩ x = A A B x
72 15 26 71 eqfnfvd A Word X B X A ++ ⟨“ B ”⟩ = A A B