Metamath Proof Explorer


Theorem metakunt21

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

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

Proof

Step Hyp Ref Expression
1 metakunt21.1 φ M
2 metakunt21.2 φ I
3 metakunt21.3 φ I M
4 metakunt21.4 B = x 1 M if x = M M if x < I x + M - I x + 1 - I
5 metakunt21.5 C = x 1 I 1 x + M - I
6 metakunt21.6 D = x I M 1 x + 1 - I
7 metakunt21.7 φ X 1 M
8 metakunt21.8 φ ¬ X = M
9 metakunt21.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 8 iffalsed φ if X = M M if X < I X + M - I X + 1 - I = if X < I X + M - I X + 1 - I
19 9 iftrued φ if X < I X + M - I X + 1 - I = X + M - I
20 18 19 eqtrd φ if X = M M if X < I X + M - I X + 1 - I = X + M - I
21 20 adantr φ x = X if X = M M if X < I X + M - I X + 1 - I = X + M - I
22 17 21 eqtrd φ x = X if x = M M if x < I x + M - I x + 1 - I = X + M - I
23 7 elfzelzd φ X
24 1 nnzd φ M
25 2 nnzd φ I
26 24 25 zsubcld φ M I
27 23 26 zaddcld φ X + M - I
28 10 22 7 27 fvmptd φ B X = X + M - I
29 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
30 29 simpld φ C Fn 1 I 1 D Fn I M 1 C D Fn 1 I 1 I M 1
31 30 simp3d φ C D Fn 1 I 1 I M 1
32 29 simprd φ M M Fn M
33 indir 1 I 1 I M 1 M = 1 I 1 M I M 1 M
34 33 a1i φ 1 I 1 I M 1 M = 1 I 1 M I M 1 M
35 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 =
36 35 simpld φ 1 I 1 I M 1 = 1 I 1 M = I M 1 M =
37 36 simp2d φ 1 I 1 M =
38 36 simp3d φ I M 1 M =
39 37 38 uneq12d φ 1 I 1 M I M 1 M =
40 unidm =
41 40 a1i φ =
42 39 41 eqtrd φ 1 I 1 M I M 1 M =
43 34 42 eqtrd φ 1 I 1 I M 1 M =
44 1zzd φ 1
45 25 44 zsubcld φ I 1
46 elfznn X 1 M X
47 7 46 syl φ X
48 47 nnge1d φ 1 X
49 zltlem1 X I X < I X I 1
50 23 25 49 syl2anc φ X < I X I 1
51 9 50 mpbid φ X I 1
52 44 45 23 48 51 elfzd φ X 1 I 1
53 elun1 X 1 I 1 X 1 I 1 I M 1
54 52 53 syl φ X 1 I 1 I M 1
55 31 32 43 54 fvun1d φ C D M M X = C D X
56 30 simp1d φ C Fn 1 I 1
57 30 simp2d φ D Fn I M 1
58 36 simp1d φ 1 I 1 I M 1 =
59 56 57 58 52 fvun1d φ C D X = C X
60 5 a1i φ C = x 1 I 1 x + M - I
61 13 adantl φ x = X x + M - I = X + M - I
62 60 61 52 27 fvmptd φ C X = X + M - I
63 59 62 eqtrd φ C D X = X + M - I
64 55 63 eqtrd φ C D M M X = X + M - I
65 64 eqcomd φ X + M - I = C D M M X
66 28 65 eqtrd φ B X = C D M M X