Metamath Proof Explorer


Theorem metakunt22

Description: Show that B coincides on the union of bijections of functions. (Contributed by metakunt, 28-May-2024)

Ref Expression
Hypotheses metakunt22.1 φ M
metakunt22.2 φ I
metakunt22.3 φ I M
metakunt22.4 B = x 1 M if x = M M if x < I x + M - I x + 1 - I
metakunt22.5 C = x 1 I 1 x + M - I
metakunt22.6 D = x I M 1 x + 1 - I
metakunt22.7 φ X 1 M
metakunt22.8 φ ¬ X = M
metakunt22.9 φ ¬ X < I
Assertion metakunt22 φ B X = C D M M X

Proof

Step Hyp Ref Expression
1 metakunt22.1 φ M
2 metakunt22.2 φ I
3 metakunt22.3 φ I M
4 metakunt22.4 B = x 1 M if x = M M if x < I x + M - I x + 1 - I
5 metakunt22.5 C = x 1 I 1 x + M - I
6 metakunt22.6 D = x I M 1 x + 1 - I
7 metakunt22.7 φ X 1 M
8 metakunt22.8 φ ¬ X = M
9 metakunt22.9 φ ¬ X < I
10 4 a1i φ B = x 1 M if x = M M if x < I x + M - I x + 1 - I
11 eqeq1 x = X x = M X = M
12 breq1 x = X x < I X < I
13 oveq1 x = X x + M - I = X + M - I
14 oveq1 x = X x + 1 - I = X + 1 - I
15 12 13 14 ifbieq12d x = X if x < I x + M - I x + 1 - I = if X < I X + M - I X + 1 - I
16 11 15 ifbieq2d x = X if x = M M if x < I x + M - I x + 1 - I = if X = M M if X < I X + M - I X + 1 - I
17 16 adantl φ x = X if x = M M if x < I x + M - I x + 1 - I = if X = M M if X < I X + M - I X + 1 - I
18 iffalse ¬ X = M if X = M M if X < I X + M - I X + 1 - I = if X < I X + M - I X + 1 - I
19 8 18 syl φ if X = M M if X < I X + M - I X + 1 - I = if X < I X + M - I X + 1 - I
20 iffalse ¬ X < I if X < I X + M - I X + 1 - I = X + 1 - I
21 9 20 syl φ if X < I X + M - I X + 1 - I = X + 1 - I
22 19 21 eqtrd φ if X = M M if X < I X + M - I X + 1 - I = X + 1 - I
23 22 adantr φ x = X if X = M M if X < I X + M - I X + 1 - I = X + 1 - I
24 17 23 eqtrd φ x = X if x = M M if x < I x + M - I x + 1 - I = X + 1 - I
25 7 elfzelzd φ X
26 1zzd φ 1
27 2 nnzd φ I
28 26 27 zsubcld φ 1 I
29 25 28 zaddcld φ X + 1 - I
30 10 24 7 29 fvmptd φ B X = X + 1 - I
31 1 2 3 4 5 6 metakunt19 φ C Fn 1 I 1 D Fn I M 1 C D Fn 1 I 1 I M 1 M M Fn M
32 31 simpld φ C Fn 1 I 1 D Fn I M 1 C D Fn 1 I 1 I M 1
33 32 simp3d φ C D Fn 1 I 1 I M 1
34 31 simprd φ M M Fn M
35 indir 1 I 1 I M 1 M = 1 I 1 M I M 1 M
36 35 a1i φ 1 I 1 I M 1 M = 1 I 1 M I M 1 M
37 1 2 3 metakunt18 φ 1 I 1 I M 1 = 1 I 1 M = I M 1 M = M - I + 1 M 1 1 M I = M - I + 1 M 1 M = 1 M I M =
38 37 simpld φ 1 I 1 I M 1 = 1 I 1 M = I M 1 M =
39 38 simp2d φ 1 I 1 M =
40 38 simp3d φ I M 1 M =
41 39 40 uneq12d φ 1 I 1 M I M 1 M =
42 unidm =
43 42 a1i φ =
44 41 43 eqtrd φ 1 I 1 M I M 1 M =
45 36 44 eqtrd φ 1 I 1 I M 1 M =
46 1 nnzd φ M
47 46 26 zsubcld φ M 1
48 2 nnred φ I
49 elfznn X 1 M X
50 7 49 syl φ X
51 50 nnred φ X
52 48 51 lenltd φ I X ¬ X < I
53 9 52 mpbird φ I X
54 elfzle2 X 1 M X M
55 7 54 syl φ X M
56 df-ne X M ¬ X = M
57 8 56 sylibr φ X M
58 57 necomd φ M X
59 55 58 jca φ X M M X
60 1 nnred φ M
61 51 60 ltlend φ X < M X M M X
62 59 61 mpbird φ X < M
63 zltlem1 X M X < M X M 1
64 25 46 63 syl2anc φ X < M X M 1
65 62 64 mpbid φ X M 1
66 27 47 25 53 65 elfzd φ X I M 1
67 elun2 X I M 1 X 1 I 1 I M 1
68 66 67 syl φ X 1 I 1 I M 1
69 33 34 45 68 fvun1d φ C D M M X = C D X
70 32 simp1d φ C Fn 1 I 1
71 32 simp2d φ D Fn I M 1
72 38 simp1d φ 1 I 1 I M 1 =
73 70 71 72 66 fvun2d φ C D X = D X
74 6 a1i φ D = x I M 1 x + 1 - I
75 simpr φ x = X x = X
76 75 oveq1d φ x = X x + 1 - I = X + 1 - I
77 25 zred φ X
78 lenlt I X I X ¬ X < I
79 48 77 78 syl2anc φ I X ¬ X < I
80 9 79 mpbird φ I X
81 77 60 ltlend φ X < M X M M X
82 59 81 mpbird φ X < M
83 82 64 mpbid φ X M 1
84 27 47 25 80 83 elfzd φ X I M 1
85 74 76 84 29 fvmptd φ D X = X + 1 - I
86 73 85 eqtrd φ C D X = X + 1 - I
87 69 86 eqtrd φ C D M M X = X + 1 - I
88 87 eqcomd φ X + 1 - I = C D M M X
89 30 88 eqtrd φ B X = C D M M X