Metamath Proof Explorer


Theorem eulerpartlemr

Description: Lemma for eulerpart . (Contributed by Thierry Arnoux, 13-Nov-2017)

Ref Expression
Hypotheses eulerpart.p P = f 0 | f -1 Fin k f k k = N
eulerpart.o O = g P | n g -1 ¬ 2 n
eulerpart.d D = g P | n g n 1
eulerpart.j J = z | ¬ 2 z
eulerpart.f F = x J , y 0 2 y x
eulerpart.h H = r 𝒫 0 Fin J | r supp Fin
eulerpart.m M = r H x y | x J y r x
eulerpart.r R = f | f -1 Fin
eulerpart.t T = f 0 | f -1 J
eulerpart.g G = o T R 𝟙 F M bits o J
Assertion eulerpartlemr O = T R P

Proof

Step Hyp Ref Expression
1 eulerpart.p P = f 0 | f -1 Fin k f k k = N
2 eulerpart.o O = g P | n g -1 ¬ 2 n
3 eulerpart.d D = g P | n g n 1
4 eulerpart.j J = z | ¬ 2 z
5 eulerpart.f F = x J , y 0 2 y x
6 eulerpart.h H = r 𝒫 0 Fin J | r supp Fin
7 eulerpart.m M = r H x y | x J y r x
8 eulerpart.r R = f | f -1 Fin
9 eulerpart.t T = f 0 | f -1 J
10 eulerpart.g G = o T R 𝟙 F M bits o J
11 elin h T R h T h R
12 11 anbi1i h T R h P h T h R h P
13 elin h T R P h T R h P
14 1 2 3 eulerpartlemo h O h P n h -1 ¬ 2 n
15 cnveq f = h f -1 = h -1
16 15 imaeq1d f = h f -1 = h -1
17 16 eleq1d f = h f -1 Fin h -1 Fin
18 fveq1 f = h f k = h k
19 18 oveq1d f = h f k k = h k k
20 19 sumeq2sdv f = h k f k k = k h k k
21 20 eqeq1d f = h k f k k = N k h k k = N
22 17 21 anbi12d f = h f -1 Fin k f k k = N h -1 Fin k h k k = N
23 22 1 elrab2 h P h 0 h -1 Fin k h k k = N
24 23 simplbi h P h 0
25 cnvimass h -1 dom h
26 nn0ex 0 V
27 nnex V
28 26 27 elmap h 0 h : 0
29 fdm h : 0 dom h =
30 28 29 sylbi h 0 dom h =
31 25 30 sseqtrid h 0 h -1
32 24 31 syl h P h -1
33 32 sselda h P n h -1 n
34 33 ralrimiva h P n h -1 n
35 34 biantrurd h P n h -1 ¬ 2 n n h -1 n n h -1 ¬ 2 n
36 24 biantrurd h P n h -1 n n h -1 ¬ 2 n h 0 n h -1 n n h -1 ¬ 2 n
37 23 simprbi h P h -1 Fin k h k k = N
38 37 simpld h P h -1 Fin
39 38 biantrud h P h 0 n h -1 n n h -1 ¬ 2 n h 0 n h -1 n n h -1 ¬ 2 n h -1 Fin
40 35 36 39 3bitrd h P n h -1 ¬ 2 n h 0 n h -1 n n h -1 ¬ 2 n h -1 Fin
41 dfss3 h -1 J n h -1 n J
42 breq2 z = n 2 z 2 n
43 42 notbid z = n ¬ 2 z ¬ 2 n
44 43 4 elrab2 n J n ¬ 2 n
45 44 ralbii n h -1 n J n h -1 n ¬ 2 n
46 r19.26 n h -1 n ¬ 2 n n h -1 n n h -1 ¬ 2 n
47 41 45 46 3bitri h -1 J n h -1 n n h -1 ¬ 2 n
48 47 anbi2i h 0 h -1 J h 0 n h -1 n n h -1 ¬ 2 n
49 48 anbi1i h 0 h -1 J h -1 Fin h 0 n h -1 n n h -1 ¬ 2 n h -1 Fin
50 40 49 bitr4di h P n h -1 ¬ 2 n h 0 h -1 J h -1 Fin
51 16 sseq1d f = h f -1 J h -1 J
52 51 9 elrab2 h T h 0 h -1 J
53 vex h V
54 53 17 8 elab2 h R h -1 Fin
55 52 54 anbi12i h T h R h 0 h -1 J h -1 Fin
56 50 55 bitr4di h P n h -1 ¬ 2 n h T h R
57 56 pm5.32i h P n h -1 ¬ 2 n h P h T h R
58 ancom h P h T h R h T h R h P
59 14 57 58 3bitri h O h T h R h P
60 12 13 59 3bitr4ri h O h T R P
61 60 eqriv O = T R P