Metamath Proof Explorer


Theorem metakunt20

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

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

Proof

Step Hyp Ref Expression
1 metakunt20.1 φ M
2 metakunt20.2 φ I
3 metakunt20.3 φ I M
4 metakunt20.4 B = x 1 M if x = M M if x < I x + M - I x + 1 - I
5 metakunt20.5 C = x 1 I 1 x + M - I
6 metakunt20.6 D = x I M 1 x + 1 - I
7 metakunt20.7 φ X 1 M
8 metakunt20.8 φ X = M
9 4 a1i φ B = x 1 M if x = M M if x < I x + M - I x + 1 - I
10 eqeq1 x = X x = M X = M
11 breq1 x = X x < I X < I
12 oveq1 x = X x + M - I = X + M - I
13 oveq1 x = X x + 1 - I = X + 1 - I
14 11 12 13 ifbieq12d x = X if x < I x + M - I x + 1 - I = if X < I X + M - I X + 1 - I
15 10 14 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
16 15 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
17 iftrue X = M if X = M M if X < I X + M - I X + 1 - I = M
18 8 17 syl φ if X = M M if X < I X + M - I X + 1 - I = M
19 18 adantr φ x = X if X = M M if X < I X + M - I X + 1 - I = M
20 8 eqcomd φ M = X
21 20 adantr φ x = X M = X
22 19 21 eqtrd φ x = X if X = M M if X < I X + M - I X + 1 - I = X
23 16 22 eqtrd φ x = X if x = M M if x < I x + M - I x + 1 - I = X
24 9 23 7 7 fvmptd φ B X = X
25 8 fveq2d φ M M X = M M M
26 fvsng M M M M M = M
27 1 1 26 syl2anc φ M M M = M
28 25 27 eqtrd φ M M X = M
29 28 eqcomd φ M = M M X
30 24 8 29 3eqtrd φ B X = M M X
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 1 nnzd φ M
36 fzsn M M M = M
37 35 36 syl φ M M = M
38 37 ineq2d φ 1 I 1 I M 1 M M = 1 I 1 I M 1 M
39 38 eqcomd φ 1 I 1 I M 1 M = 1 I 1 I M 1 M M
40 2 nncnd φ I
41 1 nncnd φ M
42 40 41 pncan3d φ I + M - I = M
43 42 oveq2d φ 1 ..^ I + M - I = 1 ..^ M
44 fzoval M 1 ..^ M = 1 M 1
45 35 44 syl φ 1 ..^ M = 1 M 1
46 43 45 eqtrd φ 1 ..^ I + M - I = 1 M 1
47 46 eqcomd φ 1 M 1 = 1 ..^ I + M - I
48 nnuz = 1
49 2 48 eleqtrdi φ I 1
50 2 nnzd φ I
51 50 35 jca φ I M
52 znn0sub I M I M M I 0
53 51 52 syl φ I M M I 0
54 3 53 mpbid φ M I 0
55 fzoun I 1 M I 0 1 ..^ I + M - I = 1 ..^ I I ..^ I + M - I
56 49 54 55 syl2anc φ 1 ..^ I + M - I = 1 ..^ I I ..^ I + M - I
57 47 56 eqtrd φ 1 M 1 = 1 ..^ I I ..^ I + M - I
58 fzoval I 1 ..^ I = 1 I 1
59 50 58 syl φ 1 ..^ I = 1 I 1
60 42 oveq2d φ I ..^ I + M - I = I ..^ M
61 fzoval M I ..^ M = I M 1
62 35 61 syl φ I ..^ M = I M 1
63 60 62 eqtrd φ I ..^ I + M - I = I M 1
64 59 63 uneq12d φ 1 ..^ I I ..^ I + M - I = 1 I 1 I M 1
65 57 64 eqtrd φ 1 M 1 = 1 I 1 I M 1
66 65 ineq1d φ 1 M 1 M M = 1 I 1 I M 1 M M
67 66 eqcomd φ 1 I 1 I M 1 M M = 1 M 1 M M
68 1 nnred φ M
69 68 ltm1d φ M 1 < M
70 fzdisj M 1 < M 1 M 1 M M =
71 69 70 syl φ 1 M 1 M M =
72 67 71 eqtrd φ 1 I 1 I M 1 M M =
73 39 72 eqtrd φ 1 I 1 I M 1 M =
74 elsng X 1 M X M X = M
75 7 74 syl φ X M X = M
76 8 75 mpbird φ X M
77 33 34 73 76 fvun2d φ C D M M X = M M X
78 77 eqcomd φ M M X = C D M M X
79 30 78 eqtrd φ B X = C D M M X