Metamath Proof Explorer


Theorem eulerpartlemr

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

Ref Expression
Hypotheses eulerpart.p 𝑃 = { 𝑓 ∈ ( ℕ0m ℕ ) ∣ ( ( 𝑓 “ ℕ ) ∈ Fin ∧ Σ 𝑘 ∈ ℕ ( ( 𝑓𝑘 ) · 𝑘 ) = 𝑁 ) }
eulerpart.o 𝑂 = { 𝑔𝑃 ∣ ∀ 𝑛 ∈ ( 𝑔 “ ℕ ) ¬ 2 ∥ 𝑛 }
eulerpart.d 𝐷 = { 𝑔𝑃 ∣ ∀ 𝑛 ∈ ℕ ( 𝑔𝑛 ) ≤ 1 }
eulerpart.j 𝐽 = { 𝑧 ∈ ℕ ∣ ¬ 2 ∥ 𝑧 }
eulerpart.f 𝐹 = ( 𝑥𝐽 , 𝑦 ∈ ℕ0 ↦ ( ( 2 ↑ 𝑦 ) · 𝑥 ) )
eulerpart.h 𝐻 = { 𝑟 ∈ ( ( 𝒫 ℕ0 ∩ Fin ) ↑m 𝐽 ) ∣ ( 𝑟 supp ∅ ) ∈ Fin }
eulerpart.m 𝑀 = ( 𝑟𝐻 ↦ { ⟨ 𝑥 , 𝑦 ⟩ ∣ ( 𝑥𝐽𝑦 ∈ ( 𝑟𝑥 ) ) } )
eulerpart.r 𝑅 = { 𝑓 ∣ ( 𝑓 “ ℕ ) ∈ Fin }
eulerpart.t 𝑇 = { 𝑓 ∈ ( ℕ0m ℕ ) ∣ ( 𝑓 “ ℕ ) ⊆ 𝐽 }
eulerpart.g 𝐺 = ( 𝑜 ∈ ( 𝑇𝑅 ) ↦ ( ( 𝟭 ‘ ℕ ) ‘ ( 𝐹 “ ( 𝑀 ‘ ( bits ∘ ( 𝑜𝐽 ) ) ) ) ) )
Assertion eulerpartlemr 𝑂 = ( ( 𝑇𝑅 ) ∩ 𝑃 )

Proof

Step Hyp Ref Expression
1 eulerpart.p 𝑃 = { 𝑓 ∈ ( ℕ0m ℕ ) ∣ ( ( 𝑓 “ ℕ ) ∈ Fin ∧ Σ 𝑘 ∈ ℕ ( ( 𝑓𝑘 ) · 𝑘 ) = 𝑁 ) }
2 eulerpart.o 𝑂 = { 𝑔𝑃 ∣ ∀ 𝑛 ∈ ( 𝑔 “ ℕ ) ¬ 2 ∥ 𝑛 }
3 eulerpart.d 𝐷 = { 𝑔𝑃 ∣ ∀ 𝑛 ∈ ℕ ( 𝑔𝑛 ) ≤ 1 }
4 eulerpart.j 𝐽 = { 𝑧 ∈ ℕ ∣ ¬ 2 ∥ 𝑧 }
5 eulerpart.f 𝐹 = ( 𝑥𝐽 , 𝑦 ∈ ℕ0 ↦ ( ( 2 ↑ 𝑦 ) · 𝑥 ) )
6 eulerpart.h 𝐻 = { 𝑟 ∈ ( ( 𝒫 ℕ0 ∩ Fin ) ↑m 𝐽 ) ∣ ( 𝑟 supp ∅ ) ∈ Fin }
7 eulerpart.m 𝑀 = ( 𝑟𝐻 ↦ { ⟨ 𝑥 , 𝑦 ⟩ ∣ ( 𝑥𝐽𝑦 ∈ ( 𝑟𝑥 ) ) } )
8 eulerpart.r 𝑅 = { 𝑓 ∣ ( 𝑓 “ ℕ ) ∈ Fin }
9 eulerpart.t 𝑇 = { 𝑓 ∈ ( ℕ0m ℕ ) ∣ ( 𝑓 “ ℕ ) ⊆ 𝐽 }
10 eulerpart.g 𝐺 = ( 𝑜 ∈ ( 𝑇𝑅 ) ↦ ( ( 𝟭 ‘ ℕ ) ‘ ( 𝐹 “ ( 𝑀 ‘ ( bits ∘ ( 𝑜𝐽 ) ) ) ) ) )
11 elin ( ∈ ( 𝑇𝑅 ) ↔ ( 𝑇𝑅 ) )
12 11 anbi1i ( ( ∈ ( 𝑇𝑅 ) ∧ 𝑃 ) ↔ ( ( 𝑇𝑅 ) ∧ 𝑃 ) )
13 elin ( ∈ ( ( 𝑇𝑅 ) ∩ 𝑃 ) ↔ ( ∈ ( 𝑇𝑅 ) ∧ 𝑃 ) )
14 1 2 3 eulerpartlemo ( 𝑂 ↔ ( 𝑃 ∧ ∀ 𝑛 ∈ ( “ ℕ ) ¬ 2 ∥ 𝑛 ) )
15 cnveq ( 𝑓 = 𝑓 = )
16 15 imaeq1d ( 𝑓 = → ( 𝑓 “ ℕ ) = ( “ ℕ ) )
17 16 eleq1d ( 𝑓 = → ( ( 𝑓 “ ℕ ) ∈ Fin ↔ ( “ ℕ ) ∈ Fin ) )
18 fveq1 ( 𝑓 = → ( 𝑓𝑘 ) = ( 𝑘 ) )
19 18 oveq1d ( 𝑓 = → ( ( 𝑓𝑘 ) · 𝑘 ) = ( ( 𝑘 ) · 𝑘 ) )
20 19 sumeq2sdv ( 𝑓 = → Σ 𝑘 ∈ ℕ ( ( 𝑓𝑘 ) · 𝑘 ) = Σ 𝑘 ∈ ℕ ( ( 𝑘 ) · 𝑘 ) )
21 20 eqeq1d ( 𝑓 = → ( Σ 𝑘 ∈ ℕ ( ( 𝑓𝑘 ) · 𝑘 ) = 𝑁 ↔ Σ 𝑘 ∈ ℕ ( ( 𝑘 ) · 𝑘 ) = 𝑁 ) )
22 17 21 anbi12d ( 𝑓 = → ( ( ( 𝑓 “ ℕ ) ∈ Fin ∧ Σ 𝑘 ∈ ℕ ( ( 𝑓𝑘 ) · 𝑘 ) = 𝑁 ) ↔ ( ( “ ℕ ) ∈ Fin ∧ Σ 𝑘 ∈ ℕ ( ( 𝑘 ) · 𝑘 ) = 𝑁 ) ) )
23 22 1 elrab2 ( 𝑃 ↔ ( ∈ ( ℕ0m ℕ ) ∧ ( ( “ ℕ ) ∈ Fin ∧ Σ 𝑘 ∈ ℕ ( ( 𝑘 ) · 𝑘 ) = 𝑁 ) ) )
24 23 simplbi ( 𝑃 ∈ ( ℕ0m ℕ ) )
25 cnvimass ( “ ℕ ) ⊆ dom
26 nn0ex 0 ∈ V
27 nnex ℕ ∈ V
28 26 27 elmap ( ∈ ( ℕ0m ℕ ) ↔ : ℕ ⟶ ℕ0 )
29 fdm ( : ℕ ⟶ ℕ0 → dom = ℕ )
30 28 29 sylbi ( ∈ ( ℕ0m ℕ ) → dom = ℕ )
31 25 30 sseqtrid ( ∈ ( ℕ0m ℕ ) → ( “ ℕ ) ⊆ ℕ )
32 24 31 syl ( 𝑃 → ( “ ℕ ) ⊆ ℕ )
33 32 sselda ( ( 𝑃𝑛 ∈ ( “ ℕ ) ) → 𝑛 ∈ ℕ )
34 33 ralrimiva ( 𝑃 → ∀ 𝑛 ∈ ( “ ℕ ) 𝑛 ∈ ℕ )
35 34 biantrurd ( 𝑃 → ( ∀ 𝑛 ∈ ( “ ℕ ) ¬ 2 ∥ 𝑛 ↔ ( ∀ 𝑛 ∈ ( “ ℕ ) 𝑛 ∈ ℕ ∧ ∀ 𝑛 ∈ ( “ ℕ ) ¬ 2 ∥ 𝑛 ) ) )
36 24 biantrurd ( 𝑃 → ( ( ∀ 𝑛 ∈ ( “ ℕ ) 𝑛 ∈ ℕ ∧ ∀ 𝑛 ∈ ( “ ℕ ) ¬ 2 ∥ 𝑛 ) ↔ ( ∈ ( ℕ0m ℕ ) ∧ ( ∀ 𝑛 ∈ ( “ ℕ ) 𝑛 ∈ ℕ ∧ ∀ 𝑛 ∈ ( “ ℕ ) ¬ 2 ∥ 𝑛 ) ) ) )
37 23 simprbi ( 𝑃 → ( ( “ ℕ ) ∈ Fin ∧ Σ 𝑘 ∈ ℕ ( ( 𝑘 ) · 𝑘 ) = 𝑁 ) )
38 37 simpld ( 𝑃 → ( “ ℕ ) ∈ Fin )
39 38 biantrud ( 𝑃 → ( ( ∈ ( ℕ0m ℕ ) ∧ ( ∀ 𝑛 ∈ ( “ ℕ ) 𝑛 ∈ ℕ ∧ ∀ 𝑛 ∈ ( “ ℕ ) ¬ 2 ∥ 𝑛 ) ) ↔ ( ( ∈ ( ℕ0m ℕ ) ∧ ( ∀ 𝑛 ∈ ( “ ℕ ) 𝑛 ∈ ℕ ∧ ∀ 𝑛 ∈ ( “ ℕ ) ¬ 2 ∥ 𝑛 ) ) ∧ ( “ ℕ ) ∈ Fin ) ) )
40 35 36 39 3bitrd ( 𝑃 → ( ∀ 𝑛 ∈ ( “ ℕ ) ¬ 2 ∥ 𝑛 ↔ ( ( ∈ ( ℕ0m ℕ ) ∧ ( ∀ 𝑛 ∈ ( “ ℕ ) 𝑛 ∈ ℕ ∧ ∀ 𝑛 ∈ ( “ ℕ ) ¬ 2 ∥ 𝑛 ) ) ∧ ( “ ℕ ) ∈ Fin ) ) )
41 dfss3 ( ( “ ℕ ) ⊆ 𝐽 ↔ ∀ 𝑛 ∈ ( “ ℕ ) 𝑛𝐽 )
42 breq2 ( 𝑧 = 𝑛 → ( 2 ∥ 𝑧 ↔ 2 ∥ 𝑛 ) )
43 42 notbid ( 𝑧 = 𝑛 → ( ¬ 2 ∥ 𝑧 ↔ ¬ 2 ∥ 𝑛 ) )
44 43 4 elrab2 ( 𝑛𝐽 ↔ ( 𝑛 ∈ ℕ ∧ ¬ 2 ∥ 𝑛 ) )
45 44 ralbii ( ∀ 𝑛 ∈ ( “ ℕ ) 𝑛𝐽 ↔ ∀ 𝑛 ∈ ( “ ℕ ) ( 𝑛 ∈ ℕ ∧ ¬ 2 ∥ 𝑛 ) )
46 r19.26 ( ∀ 𝑛 ∈ ( “ ℕ ) ( 𝑛 ∈ ℕ ∧ ¬ 2 ∥ 𝑛 ) ↔ ( ∀ 𝑛 ∈ ( “ ℕ ) 𝑛 ∈ ℕ ∧ ∀ 𝑛 ∈ ( “ ℕ ) ¬ 2 ∥ 𝑛 ) )
47 41 45 46 3bitri ( ( “ ℕ ) ⊆ 𝐽 ↔ ( ∀ 𝑛 ∈ ( “ ℕ ) 𝑛 ∈ ℕ ∧ ∀ 𝑛 ∈ ( “ ℕ ) ¬ 2 ∥ 𝑛 ) )
48 47 anbi2i ( ( ∈ ( ℕ0m ℕ ) ∧ ( “ ℕ ) ⊆ 𝐽 ) ↔ ( ∈ ( ℕ0m ℕ ) ∧ ( ∀ 𝑛 ∈ ( “ ℕ ) 𝑛 ∈ ℕ ∧ ∀ 𝑛 ∈ ( “ ℕ ) ¬ 2 ∥ 𝑛 ) ) )
49 48 anbi1i ( ( ( ∈ ( ℕ0m ℕ ) ∧ ( “ ℕ ) ⊆ 𝐽 ) ∧ ( “ ℕ ) ∈ Fin ) ↔ ( ( ∈ ( ℕ0m ℕ ) ∧ ( ∀ 𝑛 ∈ ( “ ℕ ) 𝑛 ∈ ℕ ∧ ∀ 𝑛 ∈ ( “ ℕ ) ¬ 2 ∥ 𝑛 ) ) ∧ ( “ ℕ ) ∈ Fin ) )
50 40 49 bitr4di ( 𝑃 → ( ∀ 𝑛 ∈ ( “ ℕ ) ¬ 2 ∥ 𝑛 ↔ ( ( ∈ ( ℕ0m ℕ ) ∧ ( “ ℕ ) ⊆ 𝐽 ) ∧ ( “ ℕ ) ∈ Fin ) ) )
51 16 sseq1d ( 𝑓 = → ( ( 𝑓 “ ℕ ) ⊆ 𝐽 ↔ ( “ ℕ ) ⊆ 𝐽 ) )
52 51 9 elrab2 ( 𝑇 ↔ ( ∈ ( ℕ0m ℕ ) ∧ ( “ ℕ ) ⊆ 𝐽 ) )
53 vex ∈ V
54 53 17 8 elab2 ( 𝑅 ↔ ( “ ℕ ) ∈ Fin )
55 52 54 anbi12i ( ( 𝑇𝑅 ) ↔ ( ( ∈ ( ℕ0m ℕ ) ∧ ( “ ℕ ) ⊆ 𝐽 ) ∧ ( “ ℕ ) ∈ Fin ) )
56 50 55 bitr4di ( 𝑃 → ( ∀ 𝑛 ∈ ( “ ℕ ) ¬ 2 ∥ 𝑛 ↔ ( 𝑇𝑅 ) ) )
57 56 pm5.32i ( ( 𝑃 ∧ ∀ 𝑛 ∈ ( “ ℕ ) ¬ 2 ∥ 𝑛 ) ↔ ( 𝑃 ∧ ( 𝑇𝑅 ) ) )
58 ancom ( ( 𝑃 ∧ ( 𝑇𝑅 ) ) ↔ ( ( 𝑇𝑅 ) ∧ 𝑃 ) )
59 14 57 58 3bitri ( 𝑂 ↔ ( ( 𝑇𝑅 ) ∧ 𝑃 ) )
60 12 13 59 3bitr4ri ( 𝑂 ∈ ( ( 𝑇𝑅 ) ∩ 𝑃 ) )
61 60 eqriv 𝑂 = ( ( 𝑇𝑅 ) ∩ 𝑃 )