Metamath Proof Explorer < Previous   Next > Nearby theorems Mirrors  >  Home  >  MPE Home  >  Th. List  >  sadcaddlem Structured version   Visualization version   GIF version

Hypotheses
Ref Expression
sadval.c 𝐶 = seq0((𝑐 ∈ 2o, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚𝐴, 𝑚𝐵, ∅ ∈ 𝑐), 1o, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1))))
sadcaddlem.1 (𝜑 → (∅ ∈ (𝐶𝑁) ↔ (2↑𝑁) ≤ ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁))))))
Assertion
Ref Expression
sadcaddlem (𝜑 → (∅ ∈ (𝐶‘(𝑁 + 1)) ↔ (2↑(𝑁 + 1)) ≤ ((𝐾‘(𝐴 ∩ (0..^(𝑁 + 1)))) + (𝐾‘(𝐵 ∩ (0..^(𝑁 + 1)))))))
Distinct variable groups:   𝑚,𝑐,𝑛   𝐴,𝑐,𝑚   𝐵,𝑐,𝑚   𝑛,𝑁
Allowed substitution hints:   𝜑(𝑚,𝑛,𝑐)   𝐴(𝑛)   𝐵(𝑛)   𝐶(𝑚,𝑛,𝑐)   𝐾(𝑚,𝑛,𝑐)   𝑁(𝑚,𝑐)

StepHypRef Expression
1 cad1 1618 . . . . 5 (∅ ∈ (𝐶𝑁) → (cadd(𝑁𝐴, 𝑁𝐵, ∅ ∈ (𝐶𝑁)) ↔ (𝑁𝐴𝑁𝐵)))
21adantl 485 . . . 4 ((𝜑 ∧ ∅ ∈ (𝐶𝑁)) → (cadd(𝑁𝐴, 𝑁𝐵, ∅ ∈ (𝐶𝑁)) ↔ (𝑁𝐴𝑁𝐵)))
3 2nn 11713 . . . . . . . . . . 11 2 ∈ ℕ
43a1i 11 . . . . . . . . . 10 (𝜑 → 2 ∈ ℕ)
5 sadcp1.n . . . . . . . . . 10 (𝜑𝑁 ∈ ℕ0)
64, 5nnexpcld 13619 . . . . . . . . 9 (𝜑 → (2↑𝑁) ∈ ℕ)
76nnred 11655 . . . . . . . 8 (𝜑 → (2↑𝑁) ∈ ℝ)
87ad2antrr 725 . . . . . . 7 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (𝑁𝐴𝑁𝐵)) → (2↑𝑁) ∈ ℝ)
9 inss1 4157 . . . . . . . . . . . . 13 (𝐴 ∩ (0..^𝑁)) ⊆ 𝐴
10 sadval.a . . . . . . . . . . . . 13 (𝜑𝐴 ⊆ ℕ0)
119, 10sstrid 3927 . . . . . . . . . . . 12 (𝜑 → (𝐴 ∩ (0..^𝑁)) ⊆ ℕ0)
12 fzofi 13354 . . . . . . . . . . . . . 14 (0..^𝑁) ∈ Fin
1312a1i 11 . . . . . . . . . . . . 13 (𝜑 → (0..^𝑁) ∈ Fin)
14 inss2 4158 . . . . . . . . . . . . 13 (𝐴 ∩ (0..^𝑁)) ⊆ (0..^𝑁)
15 ssfi 8737 . . . . . . . . . . . . 13 (((0..^𝑁) ∈ Fin ∧ (𝐴 ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → (𝐴 ∩ (0..^𝑁)) ∈ Fin)
1613, 14, 15sylancl 589 . . . . . . . . . . . 12 (𝜑 → (𝐴 ∩ (0..^𝑁)) ∈ Fin)
17 elfpw 8825 . . . . . . . . . . . 12 ((𝐴 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) ↔ ((𝐴 ∩ (0..^𝑁)) ⊆ ℕ0 ∧ (𝐴 ∩ (0..^𝑁)) ∈ Fin))
1811, 16, 17sylanbrc 586 . . . . . . . . . . 11 (𝜑 → (𝐴 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin))
19 bitsf1o 15801 . . . . . . . . . . . . . . 15 (bits ↾ ℕ0):ℕ01-1-onto→(𝒫 ℕ0 ∩ Fin)
20 f1ocnv 6608 . . . . . . . . . . . . . . 15 ((bits ↾ ℕ0):ℕ01-1-onto→(𝒫 ℕ0 ∩ Fin) → (bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1-onto→ℕ0)
2119, 20ax-mp 5 . . . . . . . . . . . . . 14 (bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1-onto→ℕ0
22 sadcadd.k . . . . . . . . . . . . . . 15 𝐾 = (bits ↾ ℕ0)
23 f1oeq1 6584 . . . . . . . . . . . . . . 15 (𝐾 = (bits ↾ ℕ0) → (𝐾:(𝒫 ℕ0 ∩ Fin)–1-1-onto→ℕ0(bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1-onto→ℕ0))
2422, 23ax-mp 5 . . . . . . . . . . . . . 14 (𝐾:(𝒫 ℕ0 ∩ Fin)–1-1-onto→ℕ0(bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1-onto→ℕ0)
2521, 24mpbir 234 . . . . . . . . . . . . 13 𝐾:(𝒫 ℕ0 ∩ Fin)–1-1-onto→ℕ0
26 f1of 6596 . . . . . . . . . . . . 13 (𝐾:(𝒫 ℕ0 ∩ Fin)–1-1-onto→ℕ0𝐾:(𝒫 ℕ0 ∩ Fin)⟶ℕ0)
2725, 26ax-mp 5 . . . . . . . . . . . 12 𝐾:(𝒫 ℕ0 ∩ Fin)⟶ℕ0
2827ffvelrni 6834 . . . . . . . . . . 11 ((𝐴 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) → (𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ ℕ0)
2918, 28syl 17 . . . . . . . . . 10 (𝜑 → (𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ ℕ0)
30 inss1 4157 . . . . . . . . . . . . 13 (𝐵 ∩ (0..^𝑁)) ⊆ 𝐵
31 sadval.b . . . . . . . . . . . . 13 (𝜑𝐵 ⊆ ℕ0)
3230, 31sstrid 3927 . . . . . . . . . . . 12 (𝜑 → (𝐵 ∩ (0..^𝑁)) ⊆ ℕ0)
33 inss2 4158 . . . . . . . . . . . . 13 (𝐵 ∩ (0..^𝑁)) ⊆ (0..^𝑁)
34 ssfi 8737 . . . . . . . . . . . . 13 (((0..^𝑁) ∈ Fin ∧ (𝐵 ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → (𝐵 ∩ (0..^𝑁)) ∈ Fin)
3513, 33, 34sylancl 589 . . . . . . . . . . . 12 (𝜑 → (𝐵 ∩ (0..^𝑁)) ∈ Fin)
36 elfpw 8825 . . . . . . . . . . . 12 ((𝐵 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) ↔ ((𝐵 ∩ (0..^𝑁)) ⊆ ℕ0 ∧ (𝐵 ∩ (0..^𝑁)) ∈ Fin))
3732, 35, 36sylanbrc 586 . . . . . . . . . . 11 (𝜑 → (𝐵 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin))
3827ffvelrni 6834 . . . . . . . . . . 11 ((𝐵 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) → (𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ ℕ0)
3937, 38syl 17 . . . . . . . . . 10 (𝜑 → (𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ ℕ0)
4029, 39nn0addcld 11964 . . . . . . . . 9 (𝜑 → ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) ∈ ℕ0)
4140nn0red 11961 . . . . . . . 8 (𝜑 → ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) ∈ ℝ)
4241ad2antrr 725 . . . . . . 7 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (𝑁𝐴𝑁𝐵)) → ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) ∈ ℝ)
43 2nn0 11917 . . . . . . . . . . . . 13 2 ∈ ℕ0
4443a1i 11 . . . . . . . . . . . 12 ((𝜑𝑁𝐴) → 2 ∈ ℕ0)
455adantr 484 . . . . . . . . . . . 12 ((𝜑𝑁𝐴) → 𝑁 ∈ ℕ0)
4644, 45nn0expcld 13620 . . . . . . . . . . 11 ((𝜑𝑁𝐴) → (2↑𝑁) ∈ ℕ0)
47 0nn0 11915 . . . . . . . . . . . 12 0 ∈ ℕ0
4847a1i 11 . . . . . . . . . . 11 ((𝜑 ∧ ¬ 𝑁𝐴) → 0 ∈ ℕ0)
4946, 48ifclda 4461 . . . . . . . . . 10 (𝜑 → if(𝑁𝐴, (2↑𝑁), 0) ∈ ℕ0)
5043a1i 11 . . . . . . . . . . . 12 ((𝜑𝑁𝐵) → 2 ∈ ℕ0)
515adantr 484 . . . . . . . . . . . 12 ((𝜑𝑁𝐵) → 𝑁 ∈ ℕ0)
5250, 51nn0expcld 13620 . . . . . . . . . . 11 ((𝜑𝑁𝐵) → (2↑𝑁) ∈ ℕ0)
5347a1i 11 . . . . . . . . . . 11 ((𝜑 ∧ ¬ 𝑁𝐵) → 0 ∈ ℕ0)
5452, 53ifclda 4461 . . . . . . . . . 10 (𝜑 → if(𝑁𝐵, (2↑𝑁), 0) ∈ ℕ0)
5549, 54nn0addcld 11964 . . . . . . . . 9 (𝜑 → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ∈ ℕ0)
5655nn0red 11961 . . . . . . . 8 (𝜑 → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ∈ ℝ)
5756ad2antrr 725 . . . . . . 7 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (𝑁𝐴𝑁𝐵)) → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ∈ ℝ)
58 sadcaddlem.1 . . . . . . . . 9 (𝜑 → (∅ ∈ (𝐶𝑁) ↔ (2↑𝑁) ≤ ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁))))))
5958biimpa 480 . . . . . . . 8 ((𝜑 ∧ ∅ ∈ (𝐶𝑁)) → (2↑𝑁) ≤ ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))))
6059adantr 484 . . . . . . 7 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (𝑁𝐴𝑁𝐵)) → (2↑𝑁) ≤ ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))))
616nnnn0d 11960 . . . . . . . . . . . . 13 (𝜑 → (2↑𝑁) ∈ ℕ0)
62 ifcl 4471 . . . . . . . . . . . . 13 (((2↑𝑁) ∈ ℕ0 ∧ 0 ∈ ℕ0) → if(𝑁𝐵, (2↑𝑁), 0) ∈ ℕ0)
6361, 47, 62sylancl 589 . . . . . . . . . . . 12 (𝜑 → if(𝑁𝐵, (2↑𝑁), 0) ∈ ℕ0)
6463nn0ge0d 11963 . . . . . . . . . . 11 (𝜑 → 0 ≤ if(𝑁𝐵, (2↑𝑁), 0))
657adantr 484 . . . . . . . . . . . . 13 ((𝜑𝑁𝐵) → (2↑𝑁) ∈ ℝ)
66 0red 10648 . . . . . . . . . . . . 13 ((𝜑 ∧ ¬ 𝑁𝐵) → 0 ∈ ℝ)
6765, 66ifclda 4461 . . . . . . . . . . . 12 (𝜑 → if(𝑁𝐵, (2↑𝑁), 0) ∈ ℝ)
687, 67addge01d 11232 . . . . . . . . . . 11 (𝜑 → (0 ≤ if(𝑁𝐵, (2↑𝑁), 0) ↔ (2↑𝑁) ≤ ((2↑𝑁) + if(𝑁𝐵, (2↑𝑁), 0))))
6964, 68mpbid 235 . . . . . . . . . 10 (𝜑 → (2↑𝑁) ≤ ((2↑𝑁) + if(𝑁𝐵, (2↑𝑁), 0)))
7069ad2antrr 725 . . . . . . . . 9 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ 𝑁𝐴) → (2↑𝑁) ≤ ((2↑𝑁) + if(𝑁𝐵, (2↑𝑁), 0)))
71 iftrue 4433 . . . . . . . . . . 11 (𝑁𝐴 → if(𝑁𝐴, (2↑𝑁), 0) = (2↑𝑁))
7271adantl 485 . . . . . . . . . 10 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ 𝑁𝐴) → if(𝑁𝐴, (2↑𝑁), 0) = (2↑𝑁))
7372oveq1d 7157 . . . . . . . . 9 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ 𝑁𝐴) → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) = ((2↑𝑁) + if(𝑁𝐵, (2↑𝑁), 0)))
7470, 73breqtrrd 5061 . . . . . . . 8 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ 𝑁𝐴) → (2↑𝑁) ≤ (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))
75 ifcl 4471 . . . . . . . . . . . . 13 (((2↑𝑁) ∈ ℕ0 ∧ 0 ∈ ℕ0) → if(𝑁𝐴, (2↑𝑁), 0) ∈ ℕ0)
7661, 47, 75sylancl 589 . . . . . . . . . . . 12 (𝜑 → if(𝑁𝐴, (2↑𝑁), 0) ∈ ℕ0)
7776nn0ge0d 11963 . . . . . . . . . . 11 (𝜑 → 0 ≤ if(𝑁𝐴, (2↑𝑁), 0))
787adantr 484 . . . . . . . . . . . . 13 ((𝜑𝑁𝐴) → (2↑𝑁) ∈ ℝ)
79 0red 10648 . . . . . . . . . . . . 13 ((𝜑 ∧ ¬ 𝑁𝐴) → 0 ∈ ℝ)
8078, 79ifclda 4461 . . . . . . . . . . . 12 (𝜑 → if(𝑁𝐴, (2↑𝑁), 0) ∈ ℝ)
817, 80addge02d 11233 . . . . . . . . . . 11 (𝜑 → (0 ≤ if(𝑁𝐴, (2↑𝑁), 0) ↔ (2↑𝑁) ≤ (if(𝑁𝐴, (2↑𝑁), 0) + (2↑𝑁))))
8277, 81mpbid 235 . . . . . . . . . 10 (𝜑 → (2↑𝑁) ≤ (if(𝑁𝐴, (2↑𝑁), 0) + (2↑𝑁)))
8382ad2antrr 725 . . . . . . . . 9 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ 𝑁𝐵) → (2↑𝑁) ≤ (if(𝑁𝐴, (2↑𝑁), 0) + (2↑𝑁)))
84 iftrue 4433 . . . . . . . . . . 11 (𝑁𝐵 → if(𝑁𝐵, (2↑𝑁), 0) = (2↑𝑁))
8584adantl 485 . . . . . . . . . 10 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ 𝑁𝐵) → if(𝑁𝐵, (2↑𝑁), 0) = (2↑𝑁))
8685oveq2d 7158 . . . . . . . . 9 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ 𝑁𝐵) → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) = (if(𝑁𝐴, (2↑𝑁), 0) + (2↑𝑁)))
8783, 86breqtrrd 5061 . . . . . . . 8 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ 𝑁𝐵) → (2↑𝑁) ≤ (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))
8874, 87jaodan 955 . . . . . . 7 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (𝑁𝐴𝑁𝐵)) → (2↑𝑁) ≤ (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))
898, 8, 42, 57, 60, 88le2addd 11263 . . . . . 6 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (𝑁𝐴𝑁𝐵)) → ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))))
9089ex 416 . . . . 5 ((𝜑 ∧ ∅ ∈ (𝐶𝑁)) → ((𝑁𝐴𝑁𝐵) → ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
91 ioran 981 . . . . . 6 (¬ (𝑁𝐴𝑁𝐵) ↔ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵))
92 iffalse 4436 . . . . . . . . . . . . . 14 𝑁𝐴 → if(𝑁𝐴, (2↑𝑁), 0) = 0)
9392ad2antrl 727 . . . . . . . . . . . . 13 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → if(𝑁𝐴, (2↑𝑁), 0) = 0)
94 iffalse 4436 . . . . . . . . . . . . . 14 𝑁𝐵 → if(𝑁𝐵, (2↑𝑁), 0) = 0)
9594ad2antll 728 . . . . . . . . . . . . 13 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → if(𝑁𝐵, (2↑𝑁), 0) = 0)
9693, 95oveq12d 7160 . . . . . . . . . . . 12 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) = (0 + 0))
97 00id 10819 . . . . . . . . . . . 12 (0 + 0) = 0
9896, 97eqtrdi 2849 . . . . . . . . . . 11 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) = 0)
9998oveq2d 7158 . . . . . . . . . 10 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) = (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + 0))
10029nn0red 11961 . . . . . . . . . . . . . 14 (𝜑 → (𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ ℝ)
101100ad2antrr 725 . . . . . . . . . . . . 13 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → (𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ ℝ)
10239nn0red 11961 . . . . . . . . . . . . . 14 (𝜑 → (𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ ℝ)
103102ad2antrr 725 . . . . . . . . . . . . 13 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → (𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ ℝ)
104101, 103readdcld 10674 . . . . . . . . . . . 12 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) ∈ ℝ)
105104recnd 10673 . . . . . . . . . . 11 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) ∈ ℂ)
106105addid1d 10844 . . . . . . . . . 10 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + 0) = ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))))
10799, 106eqtrd 2833 . . . . . . . . 9 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) = ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))))
10822fveq1i 6653 . . . . . . . . . . . . . . . 16 (𝐾‘(𝐴 ∩ (0..^𝑁))) = ((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁)))
109108fveq2i 6655 . . . . . . . . . . . . . . 15 ((bits ↾ ℕ0)‘(𝐾‘(𝐴 ∩ (0..^𝑁)))) = ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))))
11029fvresd 6672 . . . . . . . . . . . . . . 15 (𝜑 → ((bits ↾ ℕ0)‘(𝐾‘(𝐴 ∩ (0..^𝑁)))) = (bits‘(𝐾‘(𝐴 ∩ (0..^𝑁)))))
111 f1ocnvfv2 7019 . . . . . . . . . . . . . . . 16 (((bits ↾ ℕ0):ℕ01-1-onto→(𝒫 ℕ0 ∩ Fin) ∧ (𝐴 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin)) → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁)))) = (𝐴 ∩ (0..^𝑁)))
11219, 18, 111sylancr 590 . . . . . . . . . . . . . . 15 (𝜑 → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁)))) = (𝐴 ∩ (0..^𝑁)))
113109, 110, 1123eqtr3a 2857 . . . . . . . . . . . . . 14 (𝜑 → (bits‘(𝐾‘(𝐴 ∩ (0..^𝑁)))) = (𝐴 ∩ (0..^𝑁)))
114113, 14eqsstrdi 3970 . . . . . . . . . . . . 13 (𝜑 → (bits‘(𝐾‘(𝐴 ∩ (0..^𝑁)))) ⊆ (0..^𝑁))
11529nn0zd 12090 . . . . . . . . . . . . . 14 (𝜑 → (𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ ℤ)
116 bitsfzo 15791 . . . . . . . . . . . . . 14 (((𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ ℤ ∧ 𝑁 ∈ ℕ0) → ((𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘(𝐾‘(𝐴 ∩ (0..^𝑁)))) ⊆ (0..^𝑁)))
117115, 5, 116syl2anc 587 . . . . . . . . . . . . 13 (𝜑 → ((𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘(𝐾‘(𝐴 ∩ (0..^𝑁)))) ⊆ (0..^𝑁)))
118114, 117mpbird 260 . . . . . . . . . . . 12 (𝜑 → (𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)))
119 elfzolt2 13059 . . . . . . . . . . . 12 ((𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) → (𝐾‘(𝐴 ∩ (0..^𝑁))) < (2↑𝑁))
120118, 119syl 17 . . . . . . . . . . 11 (𝜑 → (𝐾‘(𝐴 ∩ (0..^𝑁))) < (2↑𝑁))
12122fveq1i 6653 . . . . . . . . . . . . . . . 16 (𝐾‘(𝐵 ∩ (0..^𝑁))) = ((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁)))
122121fveq2i 6655 . . . . . . . . . . . . . . 15 ((bits ↾ ℕ0)‘(𝐾‘(𝐵 ∩ (0..^𝑁)))) = ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁))))
12339fvresd 6672 . . . . . . . . . . . . . . 15 (𝜑 → ((bits ↾ ℕ0)‘(𝐾‘(𝐵 ∩ (0..^𝑁)))) = (bits‘(𝐾‘(𝐵 ∩ (0..^𝑁)))))
124 f1ocnvfv2 7019 . . . . . . . . . . . . . . . 16 (((bits ↾ ℕ0):ℕ01-1-onto→(𝒫 ℕ0 ∩ Fin) ∧ (𝐵 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin)) → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁)))) = (𝐵 ∩ (0..^𝑁)))
12519, 37, 124sylancr 590 . . . . . . . . . . . . . . 15 (𝜑 → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁)))) = (𝐵 ∩ (0..^𝑁)))
126122, 123, 1253eqtr3a 2857 . . . . . . . . . . . . . 14 (𝜑 → (bits‘(𝐾‘(𝐵 ∩ (0..^𝑁)))) = (𝐵 ∩ (0..^𝑁)))
127126, 33eqsstrdi 3970 . . . . . . . . . . . . 13 (𝜑 → (bits‘(𝐾‘(𝐵 ∩ (0..^𝑁)))) ⊆ (0..^𝑁))
12839nn0zd 12090 . . . . . . . . . . . . . 14 (𝜑 → (𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ ℤ)
129 bitsfzo 15791 . . . . . . . . . . . . . 14 (((𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ ℤ ∧ 𝑁 ∈ ℕ0) → ((𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘(𝐾‘(𝐵 ∩ (0..^𝑁)))) ⊆ (0..^𝑁)))
130128, 5, 129syl2anc 587 . . . . . . . . . . . . 13 (𝜑 → ((𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘(𝐾‘(𝐵 ∩ (0..^𝑁)))) ⊆ (0..^𝑁)))
131127, 130mpbird 260 . . . . . . . . . . . 12 (𝜑 → (𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)))
132 elfzolt2 13059 . . . . . . . . . . . 12 ((𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) → (𝐾‘(𝐵 ∩ (0..^𝑁))) < (2↑𝑁))
133131, 132syl 17 . . . . . . . . . . 11 (𝜑 → (𝐾‘(𝐵 ∩ (0..^𝑁))) < (2↑𝑁))
134100, 102, 7, 7, 120, 133lt2addd 11267 . . . . . . . . . 10 (𝜑 → ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) < ((2↑𝑁) + (2↑𝑁)))
135134ad2antrr 725 . . . . . . . . 9 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) < ((2↑𝑁) + (2↑𝑁)))
136107, 135eqbrtrd 5055 . . . . . . . 8 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) < ((2↑𝑁) + (2↑𝑁)))
13780ad2antrr 725 . . . . . . . . . . 11 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → if(𝑁𝐴, (2↑𝑁), 0) ∈ ℝ)
13867ad2antrr 725 . . . . . . . . . . 11 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → if(𝑁𝐵, (2↑𝑁), 0) ∈ ℝ)
139137, 138readdcld 10674 . . . . . . . . . 10 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ∈ ℝ)
140104, 139readdcld 10674 . . . . . . . . 9 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) ∈ ℝ)
1417ad2antrr 725 . . . . . . . . . 10 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → (2↑𝑁) ∈ ℝ)
142141, 141readdcld 10674 . . . . . . . . 9 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → ((2↑𝑁) + (2↑𝑁)) ∈ ℝ)
143140, 142ltnled 10791 . . . . . . . 8 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → ((((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) < ((2↑𝑁) + (2↑𝑁)) ↔ ¬ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
144136, 143mpbid 235 . . . . . . 7 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → ¬ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))))
145144ex 416 . . . . . 6 ((𝜑 ∧ ∅ ∈ (𝐶𝑁)) → ((¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵) → ¬ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
14691, 145syl5bi 245 . . . . 5 ((𝜑 ∧ ∅ ∈ (𝐶𝑁)) → (¬ (𝑁𝐴𝑁𝐵) → ¬ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
14790, 146impcon4bid 230 . . . 4 ((𝜑 ∧ ∅ ∈ (𝐶𝑁)) → ((𝑁𝐴𝑁𝐵) ↔ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
1482, 147bitrd 282 . . 3 ((𝜑 ∧ ∅ ∈ (𝐶𝑁)) → (cadd(𝑁𝐴, 𝑁𝐵, ∅ ∈ (𝐶𝑁)) ↔ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
149 cad0 1619 . . . . 5 (¬ ∅ ∈ (𝐶𝑁) → (cadd(𝑁𝐴, 𝑁𝐵, ∅ ∈ (𝐶𝑁)) ↔ (𝑁𝐴𝑁𝐵)))
150149adantl 485 . . . 4 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (cadd(𝑁𝐴, 𝑁𝐵, ∅ ∈ (𝐶𝑁)) ↔ (𝑁𝐴𝑁𝐵)))
15140nn0ge0d 11963 . . . . . . . . 9 (𝜑 → 0 ≤ ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))))
1527, 7readdcld 10674 . . . . . . . . . 10 (𝜑 → ((2↑𝑁) + (2↑𝑁)) ∈ ℝ)
153152, 41addge02d 11233 . . . . . . . . 9 (𝜑 → (0 ≤ ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) ↔ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + ((2↑𝑁) + (2↑𝑁)))))
154151, 153mpbid 235 . . . . . . . 8 (𝜑 → ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + ((2↑𝑁) + (2↑𝑁))))
155154ad2antrr 725 . . . . . . 7 (((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) ∧ (𝑁𝐴𝑁𝐵)) → ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + ((2↑𝑁) + (2↑𝑁))))
15671, 84oveqan12d 7161 . . . . . . . . 9 ((𝑁𝐴𝑁𝐵) → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) = ((2↑𝑁) + (2↑𝑁)))
157156adantl 485 . . . . . . . 8 (((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) ∧ (𝑁𝐴𝑁𝐵)) → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) = ((2↑𝑁) + (2↑𝑁)))
158157oveq2d 7158 . . . . . . 7 (((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) ∧ (𝑁𝐴𝑁𝐵)) → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) = (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + ((2↑𝑁) + (2↑𝑁))))
159155, 158breqtrrd 5061 . . . . . 6 (((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) ∧ (𝑁𝐴𝑁𝐵)) → ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))))
160159ex 416 . . . . 5 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → ((𝑁𝐴𝑁𝐵) → ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
161100adantr 484 . . . . . . . . . 10 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ ℝ)
162102adantr 484 . . . . . . . . . 10 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ ℝ)
163161, 162readdcld 10674 . . . . . . . . 9 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) ∈ ℝ)
1647adantr 484 . . . . . . . . 9 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (2↑𝑁) ∈ ℝ)
1657, 41lenltd 10790 . . . . . . . . . . . 12 (𝜑 → ((2↑𝑁) ≤ ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) ↔ ¬ ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) < (2↑𝑁)))
16658, 165bitrd 282 . . . . . . . . . . 11 (𝜑 → (∅ ∈ (𝐶𝑁) ↔ ¬ ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) < (2↑𝑁)))
167166con2bid 358 . . . . . . . . . 10 (𝜑 → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) < (2↑𝑁) ↔ ¬ ∅ ∈ (𝐶𝑁)))
168167biimpar 481 . . . . . . . . 9 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) < (2↑𝑁))
169163, 164, 164, 168ltadd1dd 11255 . . . . . . . 8 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (2↑𝑁)) < ((2↑𝑁) + (2↑𝑁)))
170163, 164readdcld 10674 . . . . . . . . 9 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (2↑𝑁)) ∈ ℝ)
171152adantr 484 . . . . . . . . 9 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → ((2↑𝑁) + (2↑𝑁)) ∈ ℝ)
17241, 56readdcld 10674 . . . . . . . . . 10 (𝜑 → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) ∈ ℝ)
173172adantr 484 . . . . . . . . 9 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) ∈ ℝ)
174 ltletr 10736 . . . . . . . . 9 (((((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (2↑𝑁)) ∈ ℝ ∧ ((2↑𝑁) + (2↑𝑁)) ∈ ℝ ∧ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) ∈ ℝ) → (((((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (2↑𝑁)) < ((2↑𝑁) + (2↑𝑁)) ∧ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))) → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (2↑𝑁)) < (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
175170, 171, 173, 174syl3anc 1368 . . . . . . . 8 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (((((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (2↑𝑁)) < ((2↑𝑁) + (2↑𝑁)) ∧ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))) → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (2↑𝑁)) < (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
176169, 175mpand 694 . . . . . . 7 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (2↑𝑁)) < (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
17756adantr 484 . . . . . . . 8 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ∈ ℝ)
17841adantr 484 . . . . . . . 8 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) ∈ ℝ)
179164, 177, 178ltadd2d 10800 . . . . . . 7 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → ((2↑𝑁) < (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ↔ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (2↑𝑁)) < (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
180176, 179sylibrd 262 . . . . . 6 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) → (2↑𝑁) < (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))))
1817, 56ltnled 10791 . . . . . . . 8 (𝜑 → ((2↑𝑁) < (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ↔ ¬ (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ≤ (2↑𝑁)))
18263nn0cnd 11962 . . . . . . . . . . . . 13 (𝜑 → if(𝑁𝐵, (2↑𝑁), 0) ∈ ℂ)
183182addid2d 10845 . . . . . . . . . . . 12 (𝜑 → (0 + if(𝑁𝐵, (2↑𝑁), 0)) = if(𝑁𝐵, (2↑𝑁), 0))
1847leidd 11210 . . . . . . . . . . . . 13 (𝜑 → (2↑𝑁) ≤ (2↑𝑁))
18561nn0ge0d 11963 . . . . . . . . . . . . 13 (𝜑 → 0 ≤ (2↑𝑁))
186 breq1 5036 . . . . . . . . . . . . . 14 ((2↑𝑁) = if(𝑁𝐵, (2↑𝑁), 0) → ((2↑𝑁) ≤ (2↑𝑁) ↔ if(𝑁𝐵, (2↑𝑁), 0) ≤ (2↑𝑁)))
187 breq1 5036 . . . . . . . . . . . . . 14 (0 = if(𝑁𝐵, (2↑𝑁), 0) → (0 ≤ (2↑𝑁) ↔ if(𝑁𝐵, (2↑𝑁), 0) ≤ (2↑𝑁)))
188186, 187ifboth 4465 . . . . . . . . . . . . 13 (((2↑𝑁) ≤ (2↑𝑁) ∧ 0 ≤ (2↑𝑁)) → if(𝑁𝐵, (2↑𝑁), 0) ≤ (2↑𝑁))
189184, 185, 188syl2anc 587 . . . . . . . . . . . 12 (𝜑 → if(𝑁𝐵, (2↑𝑁), 0) ≤ (2↑𝑁))
190183, 189eqbrtrd 5055 . . . . . . . . . . 11 (𝜑 → (0 + if(𝑁𝐵, (2↑𝑁), 0)) ≤ (2↑𝑁))
19192oveq1d 7157 . . . . . . . . . . . 12 𝑁𝐴 → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) = (0 + if(𝑁𝐵, (2↑𝑁), 0)))
192191breq1d 5043 . . . . . . . . . . 11 𝑁𝐴 → ((if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ≤ (2↑𝑁) ↔ (0 + if(𝑁𝐵, (2↑𝑁), 0)) ≤ (2↑𝑁)))
193190, 192syl5ibrcom 250 . . . . . . . . . 10 (𝜑 → (¬ 𝑁𝐴 → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ≤ (2↑𝑁)))
194193con1d 147 . . . . . . . . 9 (𝜑 → (¬ (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ≤ (2↑𝑁) → 𝑁𝐴))
19576nn0cnd 11962 . . . . . . . . . . . . 13 (𝜑 → if(𝑁𝐴, (2↑𝑁), 0) ∈ ℂ)
196195addid1d 10844 . . . . . . . . . . . 12 (𝜑 → (if(𝑁𝐴, (2↑𝑁), 0) + 0) = if(𝑁𝐴, (2↑𝑁), 0))
197 breq1 5036 . . . . . . . . . . . . . 14 ((2↑𝑁) = if(𝑁𝐴, (2↑𝑁), 0) → ((2↑𝑁) ≤ (2↑𝑁) ↔ if(𝑁𝐴, (2↑𝑁), 0) ≤ (2↑𝑁)))
198 breq1 5036 . . . . . . . . . . . . . 14 (0 = if(𝑁𝐴, (2↑𝑁), 0) → (0 ≤ (2↑𝑁) ↔ if(𝑁𝐴, (2↑𝑁), 0) ≤ (2↑𝑁)))
199197, 198ifboth 4465 . . . . . . . . . . . . 13 (((2↑𝑁) ≤ (2↑𝑁) ∧ 0 ≤ (2↑𝑁)) → if(𝑁𝐴, (2↑𝑁), 0) ≤ (2↑𝑁))
200184, 185, 199syl2anc 587 . . . . . . . . . . . 12 (𝜑 → if(𝑁𝐴, (2↑𝑁), 0) ≤ (2↑𝑁))
201196, 200eqbrtrd 5055 . . . . . . . . . . 11 (𝜑 → (if(𝑁𝐴, (2↑𝑁), 0) + 0) ≤ (2↑𝑁))
20294oveq2d 7158 . . . . . . . . . . . 12 𝑁𝐵 → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) = (if(𝑁𝐴, (2↑𝑁), 0) + 0))
203202breq1d 5043 . . . . . . . . . . 11 𝑁𝐵 → ((if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ≤ (2↑𝑁) ↔ (if(𝑁𝐴, (2↑𝑁), 0) + 0) ≤ (2↑𝑁)))
204201, 203syl5ibrcom 250 . . . . . . . . . 10 (𝜑 → (¬ 𝑁𝐵 → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ≤ (2↑𝑁)))
205204con1d 147 . . . . . . . . 9 (𝜑 → (¬ (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ≤ (2↑𝑁) → 𝑁𝐵))
206194, 205jcad 516 . . . . . . . 8 (𝜑 → (¬ (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ≤ (2↑𝑁) → (𝑁𝐴𝑁𝐵)))
207181, 206sylbid 243 . . . . . . 7 (𝜑 → ((2↑𝑁) < (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) → (𝑁𝐴𝑁𝐵)))
208207adantr 484 . . . . . 6 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → ((2↑𝑁) < (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) → (𝑁𝐴𝑁𝐵)))
209180, 208syld 47 . . . . 5 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) → (𝑁𝐴𝑁𝐵)))
210160, 209impbid 215 . . . 4 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → ((𝑁𝐴𝑁𝐵) ↔ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
211150, 210bitrd 282 . . 3 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (cadd(𝑁𝐴, 𝑁𝐵, ∅ ∈ (𝐶𝑁)) ↔ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
212148, 211pm2.61dan 812 . 2 (𝜑 → (cadd(𝑁𝐴, 𝑁𝐵, ∅ ∈ (𝐶𝑁)) ↔ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
213 sadval.c . . 3 𝐶 = seq0((𝑐 ∈ 2o, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚𝐴, 𝑚𝐵, ∅ ∈ 𝑐), 1o, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1))))
21410, 31, 213, 5sadcp1 15811 . 2 (𝜑 → (∅ ∈ (𝐶‘(𝑁 + 1)) ↔ cadd(𝑁𝐴, 𝑁𝐵, ∅ ∈ (𝐶𝑁))))
215 2cnd 11718 . . . . 5 (𝜑 → 2 ∈ ℂ)
216215, 5expp1d 13524 . . . 4 (𝜑 → (2↑(𝑁 + 1)) = ((2↑𝑁) · 2))
2176nncnd 11656 . . . . 5 (𝜑 → (2↑𝑁) ∈ ℂ)
218217times2d 11884 . . . 4 (𝜑 → ((2↑𝑁) · 2) = ((2↑𝑁) + (2↑𝑁)))
219216, 218eqtrd 2833 . . 3 (𝜑 → (2↑(𝑁 + 1)) = ((2↑𝑁) + (2↑𝑁)))
22022bitsinvp1 15805 . . . . . 6 ((𝐴 ⊆ ℕ0𝑁 ∈ ℕ0) → (𝐾‘(𝐴 ∩ (0..^(𝑁 + 1)))) = ((𝐾‘(𝐴 ∩ (0..^𝑁))) + if(𝑁𝐴, (2↑𝑁), 0)))
22110, 5, 220syl2anc 587 . . . . 5 (𝜑 → (𝐾‘(𝐴 ∩ (0..^(𝑁 + 1)))) = ((𝐾‘(𝐴 ∩ (0..^𝑁))) + if(𝑁𝐴, (2↑𝑁), 0)))
22222bitsinvp1 15805 . . . . . 6 ((𝐵 ⊆ ℕ0𝑁 ∈ ℕ0) → (𝐾‘(𝐵 ∩ (0..^(𝑁 + 1)))) = ((𝐾‘(𝐵 ∩ (0..^𝑁))) + if(𝑁𝐵, (2↑𝑁), 0)))
22331, 5, 222syl2anc 587 . . . . 5 (𝜑 → (𝐾‘(𝐵 ∩ (0..^(𝑁 + 1)))) = ((𝐾‘(𝐵 ∩ (0..^𝑁))) + if(𝑁𝐵, (2↑𝑁), 0)))
224221, 223oveq12d 7160 . . . 4 (𝜑 → ((𝐾‘(𝐴 ∩ (0..^(𝑁 + 1)))) + (𝐾‘(𝐵 ∩ (0..^(𝑁 + 1))))) = (((𝐾‘(𝐴 ∩ (0..^𝑁))) + if(𝑁𝐴, (2↑𝑁), 0)) + ((𝐾‘(𝐵 ∩ (0..^𝑁))) + if(𝑁𝐵, (2↑𝑁), 0))))
22529nn0cnd 11962 . . . . 5 (𝜑 → (𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ ℂ)
22639nn0cnd 11962 . . . . 5 (𝜑 → (𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ ℂ)
227225, 195, 226, 182add4d 10872 . . . 4 (𝜑 → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + if(𝑁𝐴, (2↑𝑁), 0)) + ((𝐾‘(𝐵 ∩ (0..^𝑁))) + if(𝑁𝐵, (2↑𝑁), 0))) = (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))))
228224, 227eqtrd 2833 . . 3 (𝜑 → ((𝐾‘(𝐴 ∩ (0..^(𝑁 + 1)))) + (𝐾‘(𝐵 ∩ (0..^(𝑁 + 1))))) = (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))))
229219, 228breq12d 5046 . 2 (𝜑 → ((2↑(𝑁 + 1)) ≤ ((𝐾‘(𝐴 ∩ (0..^(𝑁 + 1)))) + (𝐾‘(𝐵 ∩ (0..^(𝑁 + 1))))) ↔ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
230212, 214, 2293bitr4d 314 1 (𝜑 → (∅ ∈ (𝐶‘(𝑁 + 1)) ↔ (2↑(𝑁 + 1)) ≤ ((𝐾‘(𝐴 ∩ (0..^(𝑁 + 1)))) + (𝐾‘(𝐵 ∩ (0..^(𝑁 + 1)))))))