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((𝑐 ∈ 2𝑜, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚𝐴, 𝑚𝐵, ∅ ∈ 𝑐), 1𝑜, ∅)), (𝑛 ∈ ℕ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 1546 . . . . 5 (∅ ∈ (𝐶𝑁) → (cadd(𝑁𝐴, 𝑁𝐵, ∅ ∈ (𝐶𝑁)) ↔ (𝑁𝐴𝑁𝐵)))
21adantl 481 . . . 4 ((𝜑 ∧ ∅ ∈ (𝐶𝑁)) → (cadd(𝑁𝐴, 𝑁𝐵, ∅ ∈ (𝐶𝑁)) ↔ (𝑁𝐴𝑁𝐵)))
3 2nn 11062 . . . . . . . . . . 11 2 ∈ ℕ
43a1i 11 . . . . . . . . . 10 (𝜑 → 2 ∈ ℕ)
5 sadcp1.n . . . . . . . . . 10 (𝜑𝑁 ∈ ℕ0)
64, 5nnexpcld 12892 . . . . . . . . 9 (𝜑 → (2↑𝑁) ∈ ℕ)
76nnred 10912 . . . . . . . 8 (𝜑 → (2↑𝑁) ∈ ℝ)
87ad2antrr 758 . . . . . . 7 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (𝑁𝐴𝑁𝐵)) → (2↑𝑁) ∈ ℝ)
9 inss1 3795 . . . . . . . . . . . . 13 (𝐴 ∩ (0..^𝑁)) ⊆ 𝐴
10 sadval.a . . . . . . . . . . . . 13 (𝜑𝐴 ⊆ ℕ0)
119, 10syl5ss 3579 . . . . . . . . . . . 12 (𝜑 → (𝐴 ∩ (0..^𝑁)) ⊆ ℕ0)
12 fzofi 12635 . . . . . . . . . . . . . 14 (0..^𝑁) ∈ Fin
1312a1i 11 . . . . . . . . . . . . 13 (𝜑 → (0..^𝑁) ∈ Fin)
14 inss2 3796 . . . . . . . . . . . . 13 (𝐴 ∩ (0..^𝑁)) ⊆ (0..^𝑁)
15 ssfi 8065 . . . . . . . . . . . . 13 (((0..^𝑁) ∈ Fin ∧ (𝐴 ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → (𝐴 ∩ (0..^𝑁)) ∈ Fin)
1613, 14, 15sylancl 693 . . . . . . . . . . . 12 (𝜑 → (𝐴 ∩ (0..^𝑁)) ∈ Fin)
17 elfpw 8151 . . . . . . . . . . . 12 ((𝐴 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) ↔ ((𝐴 ∩ (0..^𝑁)) ⊆ ℕ0 ∧ (𝐴 ∩ (0..^𝑁)) ∈ Fin))
1811, 16, 17sylanbrc 695 . . . . . . . . . . 11 (𝜑 → (𝐴 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin))
19 bitsf1o 15005 . . . . . . . . . . . . . . 15 (bits ↾ ℕ0):ℕ01-1-onto→(𝒫 ℕ0 ∩ Fin)
20 f1ocnv 6062 . . . . . . . . . . . . . . 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 6040 . . . . . . . . . . . . . . 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 220 . . . . . . . . . . . . 13 𝐾:(𝒫 ℕ0 ∩ Fin)–1-1-onto→ℕ0
26 f1of 6050 . . . . . . . . . . . . 13 (𝐾:(𝒫 ℕ0 ∩ Fin)–1-1-onto→ℕ0𝐾:(𝒫 ℕ0 ∩ Fin)⟶ℕ0)
2725, 26ax-mp 5 . . . . . . . . . . . 12 𝐾:(𝒫 ℕ0 ∩ Fin)⟶ℕ0
2827ffvelrni 6266 . . . . . . . . . . 11 ((𝐴 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) → (𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ ℕ0)
2918, 28syl 17 . . . . . . . . . 10 (𝜑 → (𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ ℕ0)
30 inss1 3795 . . . . . . . . . . . . 13 (𝐵 ∩ (0..^𝑁)) ⊆ 𝐵
31 sadval.b . . . . . . . . . . . . 13 (𝜑𝐵 ⊆ ℕ0)
3230, 31syl5ss 3579 . . . . . . . . . . . 12 (𝜑 → (𝐵 ∩ (0..^𝑁)) ⊆ ℕ0)
33 inss2 3796 . . . . . . . . . . . . 13 (𝐵 ∩ (0..^𝑁)) ⊆ (0..^𝑁)
34 ssfi 8065 . . . . . . . . . . . . 13 (((0..^𝑁) ∈ Fin ∧ (𝐵 ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → (𝐵 ∩ (0..^𝑁)) ∈ Fin)
3513, 33, 34sylancl 693 . . . . . . . . . . . 12 (𝜑 → (𝐵 ∩ (0..^𝑁)) ∈ Fin)
36 elfpw 8151 . . . . . . . . . . . 12 ((𝐵 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) ↔ ((𝐵 ∩ (0..^𝑁)) ⊆ ℕ0 ∧ (𝐵 ∩ (0..^𝑁)) ∈ Fin))
3732, 35, 36sylanbrc 695 . . . . . . . . . . 11 (𝜑 → (𝐵 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin))
3827ffvelrni 6266 . . . . . . . . . . 11 ((𝐵 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) → (𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ ℕ0)
3937, 38syl 17 . . . . . . . . . 10 (𝜑 → (𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ ℕ0)
4029, 39nn0addcld 11232 . . . . . . . . 9 (𝜑 → ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) ∈ ℕ0)
4140nn0red 11229 . . . . . . . 8 (𝜑 → ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) ∈ ℝ)
4241ad2antrr 758 . . . . . . 7 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (𝑁𝐴𝑁𝐵)) → ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) ∈ ℝ)
43 2nn0 11186 . . . . . . . . . . . . 13 2 ∈ ℕ0
4443a1i 11 . . . . . . . . . . . 12 ((𝜑𝑁𝐴) → 2 ∈ ℕ0)
455adantr 480 . . . . . . . . . . . 12 ((𝜑𝑁𝐴) → 𝑁 ∈ ℕ0)
4644, 45nn0expcld 12893 . . . . . . . . . . 11 ((𝜑𝑁𝐴) → (2↑𝑁) ∈ ℕ0)
47 0nn0 11184 . . . . . . . . . . . 12 0 ∈ ℕ0
4847a1i 11 . . . . . . . . . . 11 ((𝜑 ∧ ¬ 𝑁𝐴) → 0 ∈ ℕ0)
4946, 48ifclda 4070 . . . . . . . . . 10 (𝜑 → if(𝑁𝐴, (2↑𝑁), 0) ∈ ℕ0)
5043a1i 11 . . . . . . . . . . . 12 ((𝜑𝑁𝐵) → 2 ∈ ℕ0)
515adantr 480 . . . . . . . . . . . 12 ((𝜑𝑁𝐵) → 𝑁 ∈ ℕ0)
5250, 51nn0expcld 12893 . . . . . . . . . . 11 ((𝜑𝑁𝐵) → (2↑𝑁) ∈ ℕ0)
5347a1i 11 . . . . . . . . . . 11 ((𝜑 ∧ ¬ 𝑁𝐵) → 0 ∈ ℕ0)
5452, 53ifclda 4070 . . . . . . . . . 10 (𝜑 → if(𝑁𝐵, (2↑𝑁), 0) ∈ ℕ0)
5549, 54nn0addcld 11232 . . . . . . . . 9 (𝜑 → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ∈ ℕ0)
5655nn0red 11229 . . . . . . . 8 (𝜑 → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ∈ ℝ)
5756ad2antrr 758 . . . . . . 7 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (𝑁𝐴𝑁𝐵)) → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ∈ ℝ)
58 sadcaddlem.1 . . . . . . . . 9 (𝜑 → (∅ ∈ (𝐶𝑁) ↔ (2↑𝑁) ≤ ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁))))))
5958biimpa 500 . . . . . . . 8 ((𝜑 ∧ ∅ ∈ (𝐶𝑁)) → (2↑𝑁) ≤ ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))))
6059adantr 480 . . . . . . 7 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (𝑁𝐴𝑁𝐵)) → (2↑𝑁) ≤ ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))))
616nnnn0d 11228 . . . . . . . . . . . . 13 (𝜑 → (2↑𝑁) ∈ ℕ0)
62 ifcl 4080 . . . . . . . . . . . . 13 (((2↑𝑁) ∈ ℕ0 ∧ 0 ∈ ℕ0) → if(𝑁𝐵, (2↑𝑁), 0) ∈ ℕ0)
6361, 47, 62sylancl 693 . . . . . . . . . . . 12 (𝜑 → if(𝑁𝐵, (2↑𝑁), 0) ∈ ℕ0)
6463nn0ge0d 11231 . . . . . . . . . . 11 (𝜑 → 0 ≤ if(𝑁𝐵, (2↑𝑁), 0))
657adantr 480 . . . . . . . . . . . . 13 ((𝜑𝑁𝐵) → (2↑𝑁) ∈ ℝ)
66 0red 9920 . . . . . . . . . . . . 13 ((𝜑 ∧ ¬ 𝑁𝐵) → 0 ∈ ℝ)
6765, 66ifclda 4070 . . . . . . . . . . . 12 (𝜑 → if(𝑁𝐵, (2↑𝑁), 0) ∈ ℝ)
687, 67addge01d 10494 . . . . . . . . . . 11 (𝜑 → (0 ≤ if(𝑁𝐵, (2↑𝑁), 0) ↔ (2↑𝑁) ≤ ((2↑𝑁) + if(𝑁𝐵, (2↑𝑁), 0))))
6964, 68mpbid 221 . . . . . . . . . 10 (𝜑 → (2↑𝑁) ≤ ((2↑𝑁) + if(𝑁𝐵, (2↑𝑁), 0)))
7069ad2antrr 758 . . . . . . . . 9 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ 𝑁𝐴) → (2↑𝑁) ≤ ((2↑𝑁) + if(𝑁𝐵, (2↑𝑁), 0)))
71 iftrue 4042 . . . . . . . . . . 11 (𝑁𝐴 → if(𝑁𝐴, (2↑𝑁), 0) = (2↑𝑁))
7271adantl 481 . . . . . . . . . 10 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ 𝑁𝐴) → if(𝑁𝐴, (2↑𝑁), 0) = (2↑𝑁))
7372oveq1d 6564 . . . . . . . . 9 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ 𝑁𝐴) → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) = ((2↑𝑁) + if(𝑁𝐵, (2↑𝑁), 0)))
7470, 73breqtrrd 4611 . . . . . . . 8 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ 𝑁𝐴) → (2↑𝑁) ≤ (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))
75 ifcl 4080 . . . . . . . . . . . . 13 (((2↑𝑁) ∈ ℕ0 ∧ 0 ∈ ℕ0) → if(𝑁𝐴, (2↑𝑁), 0) ∈ ℕ0)
7661, 47, 75sylancl 693 . . . . . . . . . . . 12 (𝜑 → if(𝑁𝐴, (2↑𝑁), 0) ∈ ℕ0)
7776nn0ge0d 11231 . . . . . . . . . . 11 (𝜑 → 0 ≤ if(𝑁𝐴, (2↑𝑁), 0))
787adantr 480 . . . . . . . . . . . . 13 ((𝜑𝑁𝐴) → (2↑𝑁) ∈ ℝ)
79 0red 9920 . . . . . . . . . . . . 13 ((𝜑 ∧ ¬ 𝑁𝐴) → 0 ∈ ℝ)
8078, 79ifclda 4070 . . . . . . . . . . . 12 (𝜑 → if(𝑁𝐴, (2↑𝑁), 0) ∈ ℝ)
817, 80addge02d 10495 . . . . . . . . . . 11 (𝜑 → (0 ≤ if(𝑁𝐴, (2↑𝑁), 0) ↔ (2↑𝑁) ≤ (if(𝑁𝐴, (2↑𝑁), 0) + (2↑𝑁))))
8277, 81mpbid 221 . . . . . . . . . 10 (𝜑 → (2↑𝑁) ≤ (if(𝑁𝐴, (2↑𝑁), 0) + (2↑𝑁)))
8382ad2antrr 758 . . . . . . . . 9 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ 𝑁𝐵) → (2↑𝑁) ≤ (if(𝑁𝐴, (2↑𝑁), 0) + (2↑𝑁)))
84 iftrue 4042 . . . . . . . . . . 11 (𝑁𝐵 → if(𝑁𝐵, (2↑𝑁), 0) = (2↑𝑁))
8584adantl 481 . . . . . . . . . 10 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ 𝑁𝐵) → if(𝑁𝐵, (2↑𝑁), 0) = (2↑𝑁))
8685oveq2d 6565 . . . . . . . . 9 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ 𝑁𝐵) → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) = (if(𝑁𝐴, (2↑𝑁), 0) + (2↑𝑁)))
8783, 86breqtrrd 4611 . . . . . . . 8 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ 𝑁𝐵) → (2↑𝑁) ≤ (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))
8874, 87jaodan 822 . . . . . . 7 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (𝑁𝐴𝑁𝐵)) → (2↑𝑁) ≤ (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))
898, 8, 42, 57, 60, 88le2addd 10525 . . . . . 6 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (𝑁𝐴𝑁𝐵)) → ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))))
9089ex 449 . . . . 5 ((𝜑 ∧ ∅ ∈ (𝐶𝑁)) → ((𝑁𝐴𝑁𝐵) → ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
91 ioran 510 . . . . . 6 (¬ (𝑁𝐴𝑁𝐵) ↔ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵))
92 iffalse 4045 . . . . . . . . . . . . . 14 𝑁𝐴 → if(𝑁𝐴, (2↑𝑁), 0) = 0)
9392ad2antrl 760 . . . . . . . . . . . . 13 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → if(𝑁𝐴, (2↑𝑁), 0) = 0)
94 iffalse 4045 . . . . . . . . . . . . . 14 𝑁𝐵 → if(𝑁𝐵, (2↑𝑁), 0) = 0)
9594ad2antll 761 . . . . . . . . . . . . 13 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → if(𝑁𝐵, (2↑𝑁), 0) = 0)
9693, 95oveq12d 6567 . . . . . . . . . . . 12 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) = (0 + 0))
97 00id 10090 . . . . . . . . . . . 12 (0 + 0) = 0
9896, 97syl6eq 2660 . . . . . . . . . . 11 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) = 0)
9998oveq2d 6565 . . . . . . . . . 10 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) = (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + 0))
10029nn0red 11229 . . . . . . . . . . . . . 14 (𝜑 → (𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ ℝ)
101100ad2antrr 758 . . . . . . . . . . . . 13 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → (𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ ℝ)
10239nn0red 11229 . . . . . . . . . . . . . 14 (𝜑 → (𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ ℝ)
103102ad2antrr 758 . . . . . . . . . . . . 13 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → (𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ ℝ)
104101, 103readdcld 9948 . . . . . . . . . . . 12 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) ∈ ℝ)
105104recnd 9947 . . . . . . . . . . 11 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) ∈ ℂ)
106105addid1d 10115 . . . . . . . . . 10 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + 0) = ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))))
10799, 106eqtrd 2644 . . . . . . . . 9 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) = ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))))
10822fveq1i 6104 . . . . . . . . . . . . . . . 16 (𝐾‘(𝐴 ∩ (0..^𝑁))) = ((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁)))
109108fveq2i 6106 . . . . . . . . . . . . . . 15 ((bits ↾ ℕ0)‘(𝐾‘(𝐴 ∩ (0..^𝑁)))) = ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))))
110 fvres 6117 . . . . . . . . . . . . . . . 16 ((𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ ℕ0 → ((bits ↾ ℕ0)‘(𝐾‘(𝐴 ∩ (0..^𝑁)))) = (bits‘(𝐾‘(𝐴 ∩ (0..^𝑁)))))
11129, 110syl 17 . . . . . . . . . . . . . . 15 (𝜑 → ((bits ↾ ℕ0)‘(𝐾‘(𝐴 ∩ (0..^𝑁)))) = (bits‘(𝐾‘(𝐴 ∩ (0..^𝑁)))))
112 f1ocnvfv2 6433 . . . . . . . . . . . . . . . 16 (((bits ↾ ℕ0):ℕ01-1-onto→(𝒫 ℕ0 ∩ Fin) ∧ (𝐴 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin)) → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁)))) = (𝐴 ∩ (0..^𝑁)))
11319, 18, 112sylancr 694 . . . . . . . . . . . . . . 15 (𝜑 → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁)))) = (𝐴 ∩ (0..^𝑁)))
114109, 111, 1133eqtr3a 2668 . . . . . . . . . . . . . 14 (𝜑 → (bits‘(𝐾‘(𝐴 ∩ (0..^𝑁)))) = (𝐴 ∩ (0..^𝑁)))
115114, 14syl6eqss 3618 . . . . . . . . . . . . 13 (𝜑 → (bits‘(𝐾‘(𝐴 ∩ (0..^𝑁)))) ⊆ (0..^𝑁))
11629nn0zd 11356 . . . . . . . . . . . . . 14 (𝜑 → (𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ ℤ)
117 bitsfzo 14995 . . . . . . . . . . . . . 14 (((𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ ℤ ∧ 𝑁 ∈ ℕ0) → ((𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘(𝐾‘(𝐴 ∩ (0..^𝑁)))) ⊆ (0..^𝑁)))
118116, 5, 117syl2anc 691 . . . . . . . . . . . . 13 (𝜑 → ((𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘(𝐾‘(𝐴 ∩ (0..^𝑁)))) ⊆ (0..^𝑁)))
119115, 118mpbird 246 . . . . . . . . . . . 12 (𝜑 → (𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)))
120 elfzolt2 12348 . . . . . . . . . . . 12 ((𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) → (𝐾‘(𝐴 ∩ (0..^𝑁))) < (2↑𝑁))
121119, 120syl 17 . . . . . . . . . . 11 (𝜑 → (𝐾‘(𝐴 ∩ (0..^𝑁))) < (2↑𝑁))
12222fveq1i 6104 . . . . . . . . . . . . . . . 16 (𝐾‘(𝐵 ∩ (0..^𝑁))) = ((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁)))
123122fveq2i 6106 . . . . . . . . . . . . . . 15 ((bits ↾ ℕ0)‘(𝐾‘(𝐵 ∩ (0..^𝑁)))) = ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁))))
124 fvres 6117 . . . . . . . . . . . . . . . 16 ((𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ ℕ0 → ((bits ↾ ℕ0)‘(𝐾‘(𝐵 ∩ (0..^𝑁)))) = (bits‘(𝐾‘(𝐵 ∩ (0..^𝑁)))))
12539, 124syl 17 . . . . . . . . . . . . . . 15 (𝜑 → ((bits ↾ ℕ0)‘(𝐾‘(𝐵 ∩ (0..^𝑁)))) = (bits‘(𝐾‘(𝐵 ∩ (0..^𝑁)))))
126 f1ocnvfv2 6433 . . . . . . . . . . . . . . . 16 (((bits ↾ ℕ0):ℕ01-1-onto→(𝒫 ℕ0 ∩ Fin) ∧ (𝐵 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin)) → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁)))) = (𝐵 ∩ (0..^𝑁)))
12719, 37, 126sylancr 694 . . . . . . . . . . . . . . 15 (𝜑 → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁)))) = (𝐵 ∩ (0..^𝑁)))
128123, 125, 1273eqtr3a 2668 . . . . . . . . . . . . . 14 (𝜑 → (bits‘(𝐾‘(𝐵 ∩ (0..^𝑁)))) = (𝐵 ∩ (0..^𝑁)))
129128, 33syl6eqss 3618 . . . . . . . . . . . . 13 (𝜑 → (bits‘(𝐾‘(𝐵 ∩ (0..^𝑁)))) ⊆ (0..^𝑁))
13039nn0zd 11356 . . . . . . . . . . . . . 14 (𝜑 → (𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ ℤ)
131 bitsfzo 14995 . . . . . . . . . . . . . 14 (((𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ ℤ ∧ 𝑁 ∈ ℕ0) → ((𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘(𝐾‘(𝐵 ∩ (0..^𝑁)))) ⊆ (0..^𝑁)))
132130, 5, 131syl2anc 691 . . . . . . . . . . . . 13 (𝜑 → ((𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘(𝐾‘(𝐵 ∩ (0..^𝑁)))) ⊆ (0..^𝑁)))
133129, 132mpbird 246 . . . . . . . . . . . 12 (𝜑 → (𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)))
134 elfzolt2 12348 . . . . . . . . . . . 12 ((𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) → (𝐾‘(𝐵 ∩ (0..^𝑁))) < (2↑𝑁))
135133, 134syl 17 . . . . . . . . . . 11 (𝜑 → (𝐾‘(𝐵 ∩ (0..^𝑁))) < (2↑𝑁))
136100, 102, 7, 7, 121, 135lt2addd 10529 . . . . . . . . . 10 (𝜑 → ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) < ((2↑𝑁) + (2↑𝑁)))
137136ad2antrr 758 . . . . . . . . 9 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) < ((2↑𝑁) + (2↑𝑁)))
138107, 137eqbrtrd 4605 . . . . . . . 8 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) < ((2↑𝑁) + (2↑𝑁)))
13980ad2antrr 758 . . . . . . . . . . 11 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → if(𝑁𝐴, (2↑𝑁), 0) ∈ ℝ)
14067ad2antrr 758 . . . . . . . . . . 11 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → if(𝑁𝐵, (2↑𝑁), 0) ∈ ℝ)
141139, 140readdcld 9948 . . . . . . . . . 10 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ∈ ℝ)
142104, 141readdcld 9948 . . . . . . . . 9 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) ∈ ℝ)
1437ad2antrr 758 . . . . . . . . . 10 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → (2↑𝑁) ∈ ℝ)
144143, 143readdcld 9948 . . . . . . . . 9 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → ((2↑𝑁) + (2↑𝑁)) ∈ ℝ)
145142, 144ltnled 10063 . . . . . . . 8 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → ((((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) < ((2↑𝑁) + (2↑𝑁)) ↔ ¬ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
146138, 145mpbid 221 . . . . . . 7 (((𝜑 ∧ ∅ ∈ (𝐶𝑁)) ∧ (¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵)) → ¬ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))))
147146ex 449 . . . . . 6 ((𝜑 ∧ ∅ ∈ (𝐶𝑁)) → ((¬ 𝑁𝐴 ∧ ¬ 𝑁𝐵) → ¬ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
14891, 147syl5bi 231 . . . . 5 ((𝜑 ∧ ∅ ∈ (𝐶𝑁)) → (¬ (𝑁𝐴𝑁𝐵) → ¬ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
14990, 148impcon4bid 216 . . . 4 ((𝜑 ∧ ∅ ∈ (𝐶𝑁)) → ((𝑁𝐴𝑁𝐵) ↔ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
1502, 149bitrd 267 . . 3 ((𝜑 ∧ ∅ ∈ (𝐶𝑁)) → (cadd(𝑁𝐴, 𝑁𝐵, ∅ ∈ (𝐶𝑁)) ↔ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
151 cad0 1547 . . . . 5 (¬ ∅ ∈ (𝐶𝑁) → (cadd(𝑁𝐴, 𝑁𝐵, ∅ ∈ (𝐶𝑁)) ↔ (𝑁𝐴𝑁𝐵)))
152151adantl 481 . . . 4 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (cadd(𝑁𝐴, 𝑁𝐵, ∅ ∈ (𝐶𝑁)) ↔ (𝑁𝐴𝑁𝐵)))
15340nn0ge0d 11231 . . . . . . . . 9 (𝜑 → 0 ≤ ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))))
1547, 7readdcld 9948 . . . . . . . . . 10 (𝜑 → ((2↑𝑁) + (2↑𝑁)) ∈ ℝ)
155154, 41addge02d 10495 . . . . . . . . 9 (𝜑 → (0 ≤ ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) ↔ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + ((2↑𝑁) + (2↑𝑁)))))
156153, 155mpbid 221 . . . . . . . 8 (𝜑 → ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + ((2↑𝑁) + (2↑𝑁))))
157156ad2antrr 758 . . . . . . 7 (((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) ∧ (𝑁𝐴𝑁𝐵)) → ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + ((2↑𝑁) + (2↑𝑁))))
15871, 84oveqan12d 6568 . . . . . . . . 9 ((𝑁𝐴𝑁𝐵) → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) = ((2↑𝑁) + (2↑𝑁)))
159158adantl 481 . . . . . . . 8 (((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) ∧ (𝑁𝐴𝑁𝐵)) → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) = ((2↑𝑁) + (2↑𝑁)))
160159oveq2d 6565 . . . . . . 7 (((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) ∧ (𝑁𝐴𝑁𝐵)) → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) = (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + ((2↑𝑁) + (2↑𝑁))))
161157, 160breqtrrd 4611 . . . . . 6 (((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) ∧ (𝑁𝐴𝑁𝐵)) → ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))))
162161ex 449 . . . . 5 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → ((𝑁𝐴𝑁𝐵) → ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
163100adantr 480 . . . . . . . . . 10 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ ℝ)
164102adantr 480 . . . . . . . . . 10 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ ℝ)
165163, 164readdcld 9948 . . . . . . . . 9 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) ∈ ℝ)
1667adantr 480 . . . . . . . . 9 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (2↑𝑁) ∈ ℝ)
1677, 41lenltd 10062 . . . . . . . . . . . 12 (𝜑 → ((2↑𝑁) ≤ ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) ↔ ¬ ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) < (2↑𝑁)))
16858, 167bitrd 267 . . . . . . . . . . 11 (𝜑 → (∅ ∈ (𝐶𝑁) ↔ ¬ ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) < (2↑𝑁)))
169168con2bid 343 . . . . . . . . . 10 (𝜑 → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) < (2↑𝑁) ↔ ¬ ∅ ∈ (𝐶𝑁)))
170169biimpar 501 . . . . . . . . 9 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) < (2↑𝑁))
171165, 166, 166, 170ltadd1dd 10517 . . . . . . . 8 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (2↑𝑁)) < ((2↑𝑁) + (2↑𝑁)))
172165, 166readdcld 9948 . . . . . . . . 9 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (2↑𝑁)) ∈ ℝ)
173154adantr 480 . . . . . . . . 9 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → ((2↑𝑁) + (2↑𝑁)) ∈ ℝ)
17441, 56readdcld 9948 . . . . . . . . . 10 (𝜑 → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) ∈ ℝ)
175174adantr 480 . . . . . . . . 9 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) ∈ ℝ)
176 ltletr 10008 . . . . . . . . 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)))))
177172, 173, 175, 176syl3anc 1318 . . . . . . . 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)))))
178171, 177mpand 707 . . . . . . 7 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (2↑𝑁)) < (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
17956adantr 480 . . . . . . . 8 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ∈ ℝ)
18041adantr 480 . . . . . . . 8 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → ((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) ∈ ℝ)
181166, 179, 180ltadd2d 10072 . . . . . . 7 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → ((2↑𝑁) < (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ↔ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (2↑𝑁)) < (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
182178, 181sylibrd 248 . . . . . 6 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) → (2↑𝑁) < (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))))
1837, 56ltnled 10063 . . . . . . . 8 (𝜑 → ((2↑𝑁) < (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ↔ ¬ (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ≤ (2↑𝑁)))
18463nn0cnd 11230 . . . . . . . . . . . . 13 (𝜑 → if(𝑁𝐵, (2↑𝑁), 0) ∈ ℂ)
185184addid2d 10116 . . . . . . . . . . . 12 (𝜑 → (0 + if(𝑁𝐵, (2↑𝑁), 0)) = if(𝑁𝐵, (2↑𝑁), 0))
1867leidd 10473 . . . . . . . . . . . . 13 (𝜑 → (2↑𝑁) ≤ (2↑𝑁))
18761nn0ge0d 11231 . . . . . . . . . . . . 13 (𝜑 → 0 ≤ (2↑𝑁))
188 breq1 4586 . . . . . . . . . . . . . 14 ((2↑𝑁) = if(𝑁𝐵, (2↑𝑁), 0) → ((2↑𝑁) ≤ (2↑𝑁) ↔ if(𝑁𝐵, (2↑𝑁), 0) ≤ (2↑𝑁)))
189 breq1 4586 . . . . . . . . . . . . . 14 (0 = if(𝑁𝐵, (2↑𝑁), 0) → (0 ≤ (2↑𝑁) ↔ if(𝑁𝐵, (2↑𝑁), 0) ≤ (2↑𝑁)))
190188, 189ifboth 4074 . . . . . . . . . . . . 13 (((2↑𝑁) ≤ (2↑𝑁) ∧ 0 ≤ (2↑𝑁)) → if(𝑁𝐵, (2↑𝑁), 0) ≤ (2↑𝑁))
191186, 187, 190syl2anc 691 . . . . . . . . . . . 12 (𝜑 → if(𝑁𝐵, (2↑𝑁), 0) ≤ (2↑𝑁))
192185, 191eqbrtrd 4605 . . . . . . . . . . 11 (𝜑 → (0 + if(𝑁𝐵, (2↑𝑁), 0)) ≤ (2↑𝑁))
19392oveq1d 6564 . . . . . . . . . . . 12 𝑁𝐴 → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) = (0 + if(𝑁𝐵, (2↑𝑁), 0)))
194193breq1d 4593 . . . . . . . . . . 11 𝑁𝐴 → ((if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ≤ (2↑𝑁) ↔ (0 + if(𝑁𝐵, (2↑𝑁), 0)) ≤ (2↑𝑁)))
195192, 194syl5ibrcom 236 . . . . . . . . . 10 (𝜑 → (¬ 𝑁𝐴 → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ≤ (2↑𝑁)))
196195con1d 138 . . . . . . . . 9 (𝜑 → (¬ (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ≤ (2↑𝑁) → 𝑁𝐴))
19776nn0cnd 11230 . . . . . . . . . . . . 13 (𝜑 → if(𝑁𝐴, (2↑𝑁), 0) ∈ ℂ)
198197addid1d 10115 . . . . . . . . . . . 12 (𝜑 → (if(𝑁𝐴, (2↑𝑁), 0) + 0) = if(𝑁𝐴, (2↑𝑁), 0))
199 breq1 4586 . . . . . . . . . . . . . 14 ((2↑𝑁) = if(𝑁𝐴, (2↑𝑁), 0) → ((2↑𝑁) ≤ (2↑𝑁) ↔ if(𝑁𝐴, (2↑𝑁), 0) ≤ (2↑𝑁)))
200 breq1 4586 . . . . . . . . . . . . . 14 (0 = if(𝑁𝐴, (2↑𝑁), 0) → (0 ≤ (2↑𝑁) ↔ if(𝑁𝐴, (2↑𝑁), 0) ≤ (2↑𝑁)))
201199, 200ifboth 4074 . . . . . . . . . . . . 13 (((2↑𝑁) ≤ (2↑𝑁) ∧ 0 ≤ (2↑𝑁)) → if(𝑁𝐴, (2↑𝑁), 0) ≤ (2↑𝑁))
202186, 187, 201syl2anc 691 . . . . . . . . . . . 12 (𝜑 → if(𝑁𝐴, (2↑𝑁), 0) ≤ (2↑𝑁))
203198, 202eqbrtrd 4605 . . . . . . . . . . 11 (𝜑 → (if(𝑁𝐴, (2↑𝑁), 0) + 0) ≤ (2↑𝑁))
20494oveq2d 6565 . . . . . . . . . . . 12 𝑁𝐵 → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) = (if(𝑁𝐴, (2↑𝑁), 0) + 0))
205204breq1d 4593 . . . . . . . . . . 11 𝑁𝐵 → ((if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ≤ (2↑𝑁) ↔ (if(𝑁𝐴, (2↑𝑁), 0) + 0) ≤ (2↑𝑁)))
206203, 205syl5ibrcom 236 . . . . . . . . . 10 (𝜑 → (¬ 𝑁𝐵 → (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ≤ (2↑𝑁)))
207206con1d 138 . . . . . . . . 9 (𝜑 → (¬ (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ≤ (2↑𝑁) → 𝑁𝐵))
208196, 207jcad 554 . . . . . . . 8 (𝜑 → (¬ (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) ≤ (2↑𝑁) → (𝑁𝐴𝑁𝐵)))
209183, 208sylbid 229 . . . . . . 7 (𝜑 → ((2↑𝑁) < (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) → (𝑁𝐴𝑁𝐵)))
210209adantr 480 . . . . . 6 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → ((2↑𝑁) < (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)) → (𝑁𝐴𝑁𝐵)))
211182, 210syld 46 . . . . 5 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))) → (𝑁𝐴𝑁𝐵)))
212162, 211impbid 201 . . . 4 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → ((𝑁𝐴𝑁𝐵) ↔ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
213152, 212bitrd 267 . . 3 ((𝜑 ∧ ¬ ∅ ∈ (𝐶𝑁)) → (cadd(𝑁𝐴, 𝑁𝐵, ∅ ∈ (𝐶𝑁)) ↔ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
214150, 213pm2.61dan 828 . 2 (𝜑 → (cadd(𝑁𝐴, 𝑁𝐵, ∅ ∈ (𝐶𝑁)) ↔ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
215 sadval.c . . 3 𝐶 = seq0((𝑐 ∈ 2𝑜, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚𝐴, 𝑚𝐵, ∅ ∈ 𝑐), 1𝑜, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1))))
21610, 31, 215, 5sadcp1 15015 . 2 (𝜑 → (∅ ∈ (𝐶‘(𝑁 + 1)) ↔ cadd(𝑁𝐴, 𝑁𝐵, ∅ ∈ (𝐶𝑁))))
217 2cnd 10970 . . . . 5 (𝜑 → 2 ∈ ℂ)
218217, 5expp1d 12871 . . . 4 (𝜑 → (2↑(𝑁 + 1)) = ((2↑𝑁) · 2))
2196nncnd 10913 . . . . 5 (𝜑 → (2↑𝑁) ∈ ℂ)
220219times2d 11153 . . . 4 (𝜑 → ((2↑𝑁) · 2) = ((2↑𝑁) + (2↑𝑁)))
221218, 220eqtrd 2644 . . 3 (𝜑 → (2↑(𝑁 + 1)) = ((2↑𝑁) + (2↑𝑁)))
22222bitsinvp1 15009 . . . . . 6 ((𝐴 ⊆ ℕ0𝑁 ∈ ℕ0) → (𝐾‘(𝐴 ∩ (0..^(𝑁 + 1)))) = ((𝐾‘(𝐴 ∩ (0..^𝑁))) + if(𝑁𝐴, (2↑𝑁), 0)))
22310, 5, 222syl2anc 691 . . . . 5 (𝜑 → (𝐾‘(𝐴 ∩ (0..^(𝑁 + 1)))) = ((𝐾‘(𝐴 ∩ (0..^𝑁))) + if(𝑁𝐴, (2↑𝑁), 0)))
22422bitsinvp1 15009 . . . . . 6 ((𝐵 ⊆ ℕ0𝑁 ∈ ℕ0) → (𝐾‘(𝐵 ∩ (0..^(𝑁 + 1)))) = ((𝐾‘(𝐵 ∩ (0..^𝑁))) + if(𝑁𝐵, (2↑𝑁), 0)))
22531, 5, 224syl2anc 691 . . . . 5 (𝜑 → (𝐾‘(𝐵 ∩ (0..^(𝑁 + 1)))) = ((𝐾‘(𝐵 ∩ (0..^𝑁))) + if(𝑁𝐵, (2↑𝑁), 0)))
226223, 225oveq12d 6567 . . . 4 (𝜑 → ((𝐾‘(𝐴 ∩ (0..^(𝑁 + 1)))) + (𝐾‘(𝐵 ∩ (0..^(𝑁 + 1))))) = (((𝐾‘(𝐴 ∩ (0..^𝑁))) + if(𝑁𝐴, (2↑𝑁), 0)) + ((𝐾‘(𝐵 ∩ (0..^𝑁))) + if(𝑁𝐵, (2↑𝑁), 0))))
22729nn0cnd 11230 . . . . 5 (𝜑 → (𝐾‘(𝐴 ∩ (0..^𝑁))) ∈ ℂ)
22839nn0cnd 11230 . . . . 5 (𝜑 → (𝐾‘(𝐵 ∩ (0..^𝑁))) ∈ ℂ)
229227, 197, 228, 184add4d 10143 . . . 4 (𝜑 → (((𝐾‘(𝐴 ∩ (0..^𝑁))) + if(𝑁𝐴, (2↑𝑁), 0)) + ((𝐾‘(𝐵 ∩ (0..^𝑁))) + if(𝑁𝐵, (2↑𝑁), 0))) = (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))))
230226, 229eqtrd 2644 . . 3 (𝜑 → ((𝐾‘(𝐴 ∩ (0..^(𝑁 + 1)))) + (𝐾‘(𝐵 ∩ (0..^(𝑁 + 1))))) = (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0))))
231221, 230breq12d 4596 . 2 (𝜑 → ((2↑(𝑁 + 1)) ≤ ((𝐾‘(𝐴 ∩ (0..^(𝑁 + 1)))) + (𝐾‘(𝐵 ∩ (0..^(𝑁 + 1))))) ↔ ((2↑𝑁) + (2↑𝑁)) ≤ (((𝐾‘(𝐴 ∩ (0..^𝑁))) + (𝐾‘(𝐵 ∩ (0..^𝑁)))) + (if(𝑁𝐴, (2↑𝑁), 0) + if(𝑁𝐵, (2↑𝑁), 0)))))
232214, 216, 2313bitr4d 299 1 (𝜑 → (∅ ∈ (𝐶‘(𝑁 + 1)) ↔ (2↑(𝑁 + 1)) ≤ ((𝐾‘(𝐴 ∩ (0..^(𝑁 + 1)))) + (𝐾‘(𝐵 ∩ (0..^(𝑁 + 1)))))))