Metamath Proof Explorer


Theorem eulerpart

Description: Euler's theorem on partitions, also known as a special case of Glaisher's theorem. Let P be the set of all partitions of N , represented as multisets of positive integers, which is to say functions from NN to NN0 where the value of the function represents the number of repetitions of an individual element, and the sum of all the elements with repetition equals N . Then the set O of all partitions that only consist of odd numbers and the set D of all partitions which have no repeated elements have the same cardinality. This is Metamath 100 proof #45. (Contributed by Thierry Arnoux, 14-Aug-2018) (Revised by Thierry Arnoux, 1-Sep-2019)

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
Assertion eulerpart O = D

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 eqid z | ¬ 2 z = z | ¬ 2 z
5 oveq2 a = x 2 b a = 2 b x
6 oveq2 b = y 2 b = 2 y
7 6 oveq1d b = y 2 b x = 2 y x
8 5 7 cbvmpov a z | ¬ 2 z , b 0 2 b a = x z | ¬ 2 z , y 0 2 y x
9 oveq1 r = m r supp = m supp
10 9 eleq1d r = m r supp Fin m supp Fin
11 10 cbvrabv r 𝒫 0 Fin z | ¬ 2 z | r supp Fin = m 𝒫 0 Fin z | ¬ 2 z | m supp Fin
12 11 eqcomi m 𝒫 0 Fin z | ¬ 2 z | m supp Fin = r 𝒫 0 Fin z | ¬ 2 z | r supp Fin
13 fveq1 t = r t a = r a
14 13 eleq2d t = r b t a b r a
15 14 anbi2d t = r a z | ¬ 2 z b t a a z | ¬ 2 z b r a
16 15 opabbidv t = r a b | a z | ¬ 2 z b t a = a b | a z | ¬ 2 z b r a
17 16 cbvmptv t s 𝒫 0 Fin z | ¬ 2 z | s supp Fin a b | a z | ¬ 2 z b t a = r s 𝒫 0 Fin z | ¬ 2 z | s supp Fin a b | a z | ¬ 2 z b r a
18 oveq1 m = s m supp = s supp
19 18 eleq1d m = s m supp Fin s supp Fin
20 19 cbvrabv m 𝒫 0 Fin z | ¬ 2 z | m supp Fin = s 𝒫 0 Fin z | ¬ 2 z | s supp Fin
21 20 eqcomi s 𝒫 0 Fin z | ¬ 2 z | s supp Fin = m 𝒫 0 Fin z | ¬ 2 z | m supp Fin
22 simpl a = x b = y a = x
23 22 eleq1d a = x b = y a z | ¬ 2 z x z | ¬ 2 z
24 simpr a = x b = y b = y
25 22 fveq2d a = x b = y r a = r x
26 24 25 eleq12d a = x b = y b r a y r x
27 23 26 anbi12d a = x b = y a z | ¬ 2 z b r a x z | ¬ 2 z y r x
28 27 cbvopabv a b | a z | ¬ 2 z b r a = x y | x z | ¬ 2 z y r x
29 21 28 mpteq12i r s 𝒫 0 Fin z | ¬ 2 z | s supp Fin a b | a z | ¬ 2 z b r a = r m 𝒫 0 Fin z | ¬ 2 z | m supp Fin x y | x z | ¬ 2 z y r x
30 17 29 eqtri t s 𝒫 0 Fin z | ¬ 2 z | s supp Fin a b | a z | ¬ 2 z b t a = r m 𝒫 0 Fin z | ¬ 2 z | m supp Fin x y | x z | ¬ 2 z y r x
31 cnveq h = f h -1 = f -1
32 31 imaeq1d h = f h -1 = f -1
33 32 eleq1d h = f h -1 Fin f -1 Fin
34 33 cbvabv h | h -1 Fin = f | f -1 Fin
35 32 sseq1d h = f h -1 z | ¬ 2 z f -1 z | ¬ 2 z
36 35 cbvrabv h 0 | h -1 z | ¬ 2 z = f 0 | f -1 z | ¬ 2 z
37 reseq1 o = q o z | ¬ 2 z = q z | ¬ 2 z
38 37 coeq2d o = q bits o z | ¬ 2 z = bits q z | ¬ 2 z
39 38 fveq2d o = q r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x bits o z | ¬ 2 z = r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x bits q z | ¬ 2 z
40 39 imaeq2d o = q x z | ¬ 2 z , y 0 2 y x r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x bits o z | ¬ 2 z = x z | ¬ 2 z , y 0 2 y x r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x bits q z | ¬ 2 z
41 40 fveq2d o = q 𝟙 x z | ¬ 2 z , y 0 2 y x r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x bits o z | ¬ 2 z = 𝟙 x z | ¬ 2 z , y 0 2 y x r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x bits q z | ¬ 2 z
42 41 cbvmptv o h 0 | h -1 z | ¬ 2 z h | h -1 Fin 𝟙 x z | ¬ 2 z , y 0 2 y x r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x bits o z | ¬ 2 z = q h 0 | h -1 z | ¬ 2 z h | h -1 Fin 𝟙 x z | ¬ 2 z , y 0 2 y x r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x bits q z | ¬ 2 z
43 8 eqcomi x z | ¬ 2 z , y 0 2 y x = a z | ¬ 2 z , b 0 2 b a
44 43 imaeq1i x z | ¬ 2 z , y 0 2 y x r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x bits q z | ¬ 2 z = a z | ¬ 2 z , b 0 2 b a r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x bits q z | ¬ 2 z
45 eqid x y | x z | ¬ 2 z y r x = x y | x z | ¬ 2 z y r x
46 11 45 mpteq12i r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x = r m 𝒫 0 Fin z | ¬ 2 z | m supp Fin x y | x z | ¬ 2 z y r x
47 fveq1 r = t r a = t a
48 47 eleq2d r = t b r a b t a
49 48 anbi2d r = t a z | ¬ 2 z b r a a z | ¬ 2 z b t a
50 49 opabbidv r = t a b | a z | ¬ 2 z b r a = a b | a z | ¬ 2 z b t a
51 50 cbvmptv r s 𝒫 0 Fin z | ¬ 2 z | s supp Fin a b | a z | ¬ 2 z b r a = t s 𝒫 0 Fin z | ¬ 2 z | s supp Fin a b | a z | ¬ 2 z b t a
52 46 29 51 3eqtr2i r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x = t s 𝒫 0 Fin z | ¬ 2 z | s supp Fin a b | a z | ¬ 2 z b t a
53 52 fveq1i r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x bits q z | ¬ 2 z = t s 𝒫 0 Fin z | ¬ 2 z | s supp Fin a b | a z | ¬ 2 z b t a bits q z | ¬ 2 z
54 53 imaeq2i a z | ¬ 2 z , b 0 2 b a r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x bits q z | ¬ 2 z = a z | ¬ 2 z , b 0 2 b a t s 𝒫 0 Fin z | ¬ 2 z | s supp Fin a b | a z | ¬ 2 z b t a bits q z | ¬ 2 z
55 44 54 eqtri x z | ¬ 2 z , y 0 2 y x r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x bits q z | ¬ 2 z = a z | ¬ 2 z , b 0 2 b a t s 𝒫 0 Fin z | ¬ 2 z | s supp Fin a b | a z | ¬ 2 z b t a bits q z | ¬ 2 z
56 55 fveq2i 𝟙 x z | ¬ 2 z , y 0 2 y x r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x bits q z | ¬ 2 z = 𝟙 a z | ¬ 2 z , b 0 2 b a t s 𝒫 0 Fin z | ¬ 2 z | s supp Fin a b | a z | ¬ 2 z b t a bits q z | ¬ 2 z
57 56 mpteq2i q h 0 | h -1 z | ¬ 2 z h | h -1 Fin 𝟙 x z | ¬ 2 z , y 0 2 y x r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x bits q z | ¬ 2 z = q h 0 | h -1 z | ¬ 2 z h | h -1 Fin 𝟙 a z | ¬ 2 z , b 0 2 b a t s 𝒫 0 Fin z | ¬ 2 z | s supp Fin a b | a z | ¬ 2 z b t a bits q z | ¬ 2 z
58 42 57 eqtri o h 0 | h -1 z | ¬ 2 z h | h -1 Fin 𝟙 x z | ¬ 2 z , y 0 2 y x r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x bits o z | ¬ 2 z = q h 0 | h -1 z | ¬ 2 z h | h -1 Fin 𝟙 a z | ¬ 2 z , b 0 2 b a t s 𝒫 0 Fin z | ¬ 2 z | s supp Fin a b | a z | ¬ 2 z b t a bits q z | ¬ 2 z
59 eqid f 0 h | h -1 Fin k f k k = f 0 h | h -1 Fin k f k k
60 1 2 3 4 8 12 30 34 36 58 59 eulerpartlemn o h 0 | h -1 z | ¬ 2 z h | h -1 Fin 𝟙 x z | ¬ 2 z , y 0 2 y x r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x bits o z | ¬ 2 z O : O 1-1 onto D
61 ovex 0 V
62 61 rabex h 0 | h -1 z | ¬ 2 z V
63 62 inex1 h 0 | h -1 z | ¬ 2 z h | h -1 Fin V
64 63 mptex o h 0 | h -1 z | ¬ 2 z h | h -1 Fin 𝟙 x z | ¬ 2 z , y 0 2 y x r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x bits o z | ¬ 2 z V
65 64 resex o h 0 | h -1 z | ¬ 2 z h | h -1 Fin 𝟙 x z | ¬ 2 z , y 0 2 y x r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x bits o z | ¬ 2 z O V
66 f1oeq1 g = o h 0 | h -1 z | ¬ 2 z h | h -1 Fin 𝟙 x z | ¬ 2 z , y 0 2 y x r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x bits o z | ¬ 2 z O g : O 1-1 onto D o h 0 | h -1 z | ¬ 2 z h | h -1 Fin 𝟙 x z | ¬ 2 z , y 0 2 y x r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x bits o z | ¬ 2 z O : O 1-1 onto D
67 65 66 spcev o h 0 | h -1 z | ¬ 2 z h | h -1 Fin 𝟙 x z | ¬ 2 z , y 0 2 y x r r 𝒫 0 Fin z | ¬ 2 z | r supp Fin x y | x z | ¬ 2 z y r x bits o z | ¬ 2 z O : O 1-1 onto D g g : O 1-1 onto D
68 bren O D g g : O 1-1 onto D
69 hasheni O D O = D
70 68 69 sylbir g g : O 1-1 onto D O = D
71 60 67 70 mp2b O = D