ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  undifdc GIF version

Theorem undifdc 6901
Description: Union of complementary parts into whole. This is a case where we can strengthen undifss 3495 from subset to equality. (Contributed by Jim Kingdon, 17-Jun-2022.)
Assertion
Ref Expression
undifdc ((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) → 𝐴 = (𝐵 ∪ (𝐴𝐵)))
Distinct variable groups:   𝑥,𝐴,𝑦   𝑦,𝐵
Allowed substitution hint:   𝐵(𝑥)

Proof of Theorem undifdc
Dummy variables 𝑣 𝑤 𝑧 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 id 19 . . . 4 (𝑤 = ∅ → 𝑤 = ∅)
2 difeq2 3239 . . . 4 (𝑤 = ∅ → (𝐴𝑤) = (𝐴 ∖ ∅))
31, 2uneq12d 3282 . . 3 (𝑤 = ∅ → (𝑤 ∪ (𝐴𝑤)) = (∅ ∪ (𝐴 ∖ ∅)))
43eqeq2d 2182 . 2 (𝑤 = ∅ → (𝐴 = (𝑤 ∪ (𝐴𝑤)) ↔ 𝐴 = (∅ ∪ (𝐴 ∖ ∅))))
5 id 19 . . . 4 (𝑤 = 𝑣𝑤 = 𝑣)
6 difeq2 3239 . . . 4 (𝑤 = 𝑣 → (𝐴𝑤) = (𝐴𝑣))
75, 6uneq12d 3282 . . 3 (𝑤 = 𝑣 → (𝑤 ∪ (𝐴𝑤)) = (𝑣 ∪ (𝐴𝑣)))
87eqeq2d 2182 . 2 (𝑤 = 𝑣 → (𝐴 = (𝑤 ∪ (𝐴𝑤)) ↔ 𝐴 = (𝑣 ∪ (𝐴𝑣))))
9 id 19 . . . 4 (𝑤 = (𝑣 ∪ {𝑧}) → 𝑤 = (𝑣 ∪ {𝑧}))
10 difeq2 3239 . . . 4 (𝑤 = (𝑣 ∪ {𝑧}) → (𝐴𝑤) = (𝐴 ∖ (𝑣 ∪ {𝑧})))
119, 10uneq12d 3282 . . 3 (𝑤 = (𝑣 ∪ {𝑧}) → (𝑤 ∪ (𝐴𝑤)) = ((𝑣 ∪ {𝑧}) ∪ (𝐴 ∖ (𝑣 ∪ {𝑧}))))
1211eqeq2d 2182 . 2 (𝑤 = (𝑣 ∪ {𝑧}) → (𝐴 = (𝑤 ∪ (𝐴𝑤)) ↔ 𝐴 = ((𝑣 ∪ {𝑧}) ∪ (𝐴 ∖ (𝑣 ∪ {𝑧})))))
13 id 19 . . . 4 (𝑤 = 𝐵𝑤 = 𝐵)
14 difeq2 3239 . . . 4 (𝑤 = 𝐵 → (𝐴𝑤) = (𝐴𝐵))
1513, 14uneq12d 3282 . . 3 (𝑤 = 𝐵 → (𝑤 ∪ (𝐴𝑤)) = (𝐵 ∪ (𝐴𝐵)))
1615eqeq2d 2182 . 2 (𝑤 = 𝐵 → (𝐴 = (𝑤 ∪ (𝐴𝑤)) ↔ 𝐴 = (𝐵 ∪ (𝐴𝐵))))
17 un0 3448 . . . 4 ((𝐴 ∖ ∅) ∪ ∅) = (𝐴 ∖ ∅)
18 uncom 3271 . . . 4 ((𝐴 ∖ ∅) ∪ ∅) = (∅ ∪ (𝐴 ∖ ∅))
19 dif0 3485 . . . 4 (𝐴 ∖ ∅) = 𝐴
2017, 18, 193eqtr3ri 2200 . . 3 𝐴 = (∅ ∪ (𝐴 ∖ ∅))
2120a1i 9 . 2 ((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) → 𝐴 = (∅ ∪ (𝐴 ∖ ∅)))
22 difundi 3379 . . . . . . 7 (𝐴 ∖ (𝑣 ∪ {𝑧})) = ((𝐴𝑣) ∩ (𝐴 ∖ {𝑧}))
2322uneq2i 3278 . . . . . 6 ((𝑣 ∪ {𝑧}) ∪ (𝐴 ∖ (𝑣 ∪ {𝑧}))) = ((𝑣 ∪ {𝑧}) ∪ ((𝐴𝑣) ∩ (𝐴 ∖ {𝑧})))
24 undi 3375 . . . . . 6 ((𝑣 ∪ {𝑧}) ∪ ((𝐴𝑣) ∩ (𝐴 ∖ {𝑧}))) = (((𝑣 ∪ {𝑧}) ∪ (𝐴𝑣)) ∩ ((𝑣 ∪ {𝑧}) ∪ (𝐴 ∖ {𝑧})))
2523, 24eqtri 2191 . . . . 5 ((𝑣 ∪ {𝑧}) ∪ (𝐴 ∖ (𝑣 ∪ {𝑧}))) = (((𝑣 ∪ {𝑧}) ∪ (𝐴𝑣)) ∩ ((𝑣 ∪ {𝑧}) ∪ (𝐴 ∖ {𝑧})))
26 uncom 3271 . . . . . . . . 9 (𝑣 ∪ {𝑧}) = ({𝑧} ∪ 𝑣)
2726uneq1i 3277 . . . . . . . 8 ((𝑣 ∪ {𝑧}) ∪ (𝐴𝑣)) = (({𝑧} ∪ 𝑣) ∪ (𝐴𝑣))
28 unass 3284 . . . . . . . 8 (({𝑧} ∪ 𝑣) ∪ (𝐴𝑣)) = ({𝑧} ∪ (𝑣 ∪ (𝐴𝑣)))
2927, 28eqtri 2191 . . . . . . 7 ((𝑣 ∪ {𝑧}) ∪ (𝐴𝑣)) = ({𝑧} ∪ (𝑣 ∪ (𝐴𝑣)))
30 simp3 994 . . . . . . . . . . . 12 ((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) → 𝐵𝐴)
3130ad3antrrr 489 . . . . . . . . . . 11 (((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) ∧ 𝐴 = (𝑣 ∪ (𝐴𝑣))) → 𝐵𝐴)
32 simplrr 531 . . . . . . . . . . . 12 (((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) ∧ 𝐴 = (𝑣 ∪ (𝐴𝑣))) → 𝑧 ∈ (𝐵𝑣))
3332eldifad 3132 . . . . . . . . . . 11 (((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) ∧ 𝐴 = (𝑣 ∪ (𝐴𝑣))) → 𝑧𝐵)
3431, 33sseldd 3148 . . . . . . . . . 10 (((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) ∧ 𝐴 = (𝑣 ∪ (𝐴𝑣))) → 𝑧𝐴)
3534snssd 3725 . . . . . . . . 9 (((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) ∧ 𝐴 = (𝑣 ∪ (𝐴𝑣))) → {𝑧} ⊆ 𝐴)
36 ssequn1 3297 . . . . . . . . 9 ({𝑧} ⊆ 𝐴 ↔ ({𝑧} ∪ 𝐴) = 𝐴)
3735, 36sylib 121 . . . . . . . 8 (((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) ∧ 𝐴 = (𝑣 ∪ (𝐴𝑣))) → ({𝑧} ∪ 𝐴) = 𝐴)
38 simpr 109 . . . . . . . . 9 (((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) ∧ 𝐴 = (𝑣 ∪ (𝐴𝑣))) → 𝐴 = (𝑣 ∪ (𝐴𝑣)))
3938uneq2d 3281 . . . . . . . 8 (((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) ∧ 𝐴 = (𝑣 ∪ (𝐴𝑣))) → ({𝑧} ∪ 𝐴) = ({𝑧} ∪ (𝑣 ∪ (𝐴𝑣))))
4037, 39eqtr3d 2205 . . . . . . 7 (((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) ∧ 𝐴 = (𝑣 ∪ (𝐴𝑣))) → 𝐴 = ({𝑧} ∪ (𝑣 ∪ (𝐴𝑣))))
4129, 40eqtr4id 2222 . . . . . 6 (((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) ∧ 𝐴 = (𝑣 ∪ (𝐴𝑣))) → ((𝑣 ∪ {𝑧}) ∪ (𝐴𝑣)) = 𝐴)
42 unass 3284 . . . . . . . 8 ((𝑣 ∪ {𝑧}) ∪ (𝐴 ∖ {𝑧})) = (𝑣 ∪ ({𝑧} ∪ (𝐴 ∖ {𝑧})))
43 uncom 3271 . . . . . . . . . 10 ({𝑧} ∪ (𝐴 ∖ {𝑧})) = ((𝐴 ∖ {𝑧}) ∪ {𝑧})
44 simp1 992 . . . . . . . . . . . 12 ((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) → ∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦)
4544ad3antrrr 489 . . . . . . . . . . 11 (((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) ∧ 𝐴 = (𝑣 ∪ (𝐴𝑣))) → ∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦)
46 dcdifsnid 6483 . . . . . . . . . . 11 ((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝑧𝐴) → ((𝐴 ∖ {𝑧}) ∪ {𝑧}) = 𝐴)
4745, 34, 46syl2anc 409 . . . . . . . . . 10 (((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) ∧ 𝐴 = (𝑣 ∪ (𝐴𝑣))) → ((𝐴 ∖ {𝑧}) ∪ {𝑧}) = 𝐴)
4843, 47eqtrid 2215 . . . . . . . . 9 (((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) ∧ 𝐴 = (𝑣 ∪ (𝐴𝑣))) → ({𝑧} ∪ (𝐴 ∖ {𝑧})) = 𝐴)
4948uneq2d 3281 . . . . . . . 8 (((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) ∧ 𝐴 = (𝑣 ∪ (𝐴𝑣))) → (𝑣 ∪ ({𝑧} ∪ (𝐴 ∖ {𝑧}))) = (𝑣𝐴))
5042, 49eqtrid 2215 . . . . . . 7 (((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) ∧ 𝐴 = (𝑣 ∪ (𝐴𝑣))) → ((𝑣 ∪ {𝑧}) ∪ (𝐴 ∖ {𝑧})) = (𝑣𝐴))
51 simplrl 530 . . . . . . . . 9 (((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) ∧ 𝐴 = (𝑣 ∪ (𝐴𝑣))) → 𝑣𝐵)
5251, 31sstrd 3157 . . . . . . . 8 (((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) ∧ 𝐴 = (𝑣 ∪ (𝐴𝑣))) → 𝑣𝐴)
53 ssequn1 3297 . . . . . . . 8 (𝑣𝐴 ↔ (𝑣𝐴) = 𝐴)
5452, 53sylib 121 . . . . . . 7 (((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) ∧ 𝐴 = (𝑣 ∪ (𝐴𝑣))) → (𝑣𝐴) = 𝐴)
5550, 54eqtrd 2203 . . . . . 6 (((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) ∧ 𝐴 = (𝑣 ∪ (𝐴𝑣))) → ((𝑣 ∪ {𝑧}) ∪ (𝐴 ∖ {𝑧})) = 𝐴)
5641, 55ineq12d 3329 . . . . 5 (((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) ∧ 𝐴 = (𝑣 ∪ (𝐴𝑣))) → (((𝑣 ∪ {𝑧}) ∪ (𝐴𝑣)) ∩ ((𝑣 ∪ {𝑧}) ∪ (𝐴 ∖ {𝑧}))) = (𝐴𝐴))
5725, 56eqtrid 2215 . . . 4 (((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) ∧ 𝐴 = (𝑣 ∪ (𝐴𝑣))) → ((𝑣 ∪ {𝑧}) ∪ (𝐴 ∖ (𝑣 ∪ {𝑧}))) = (𝐴𝐴))
58 inidm 3336 . . . 4 (𝐴𝐴) = 𝐴
5957, 58eqtr2di 2220 . . 3 (((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) ∧ 𝐴 = (𝑣 ∪ (𝐴𝑣))) → 𝐴 = ((𝑣 ∪ {𝑧}) ∪ (𝐴 ∖ (𝑣 ∪ {𝑧}))))
6059ex 114 . 2 ((((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) ∧ 𝑣 ∈ Fin) ∧ (𝑣𝐵𝑧 ∈ (𝐵𝑣))) → (𝐴 = (𝑣 ∪ (𝐴𝑣)) → 𝐴 = ((𝑣 ∪ {𝑧}) ∪ (𝐴 ∖ (𝑣 ∪ {𝑧})))))
61 simp2 993 . 2 ((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) → 𝐵 ∈ Fin)
624, 8, 12, 16, 21, 60, 61findcard2sd 6870 1 ((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵 ∈ Fin ∧ 𝐵𝐴) → 𝐴 = (𝐵 ∪ (𝐴𝐵)))
Colors of variables: wff set class
Syntax hints:  wi 4  wa 103  DECID wdc 829  w3a 973   = wceq 1348  wcel 2141  wral 2448  cdif 3118  cun 3119  cin 3120  wss 3121  c0 3414  {csn 3583  Fincfn 6718
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 609  ax-in2 610  ax-io 704  ax-5 1440  ax-7 1441  ax-gen 1442  ax-ie1 1486  ax-ie2 1487  ax-8 1497  ax-10 1498  ax-11 1499  ax-i12 1500  ax-bndl 1502  ax-4 1503  ax-17 1519  ax-i9 1523  ax-ial 1527  ax-i5r 1528  ax-13 2143  ax-14 2144  ax-ext 2152  ax-coll 4104  ax-sep 4107  ax-nul 4115  ax-pow 4160  ax-pr 4194  ax-un 4418  ax-setind 4521  ax-iinf 4572
This theorem depends on definitions:  df-bi 116  df-dc 830  df-3or 974  df-3an 975  df-tru 1351  df-fal 1354  df-nf 1454  df-sb 1756  df-eu 2022  df-mo 2023  df-clab 2157  df-cleq 2163  df-clel 2166  df-nfc 2301  df-ne 2341  df-ral 2453  df-rex 2454  df-reu 2455  df-rab 2457  df-v 2732  df-sbc 2956  df-csb 3050  df-dif 3123  df-un 3125  df-in 3127  df-ss 3134  df-nul 3415  df-if 3527  df-pw 3568  df-sn 3589  df-pr 3590  df-op 3592  df-uni 3797  df-int 3832  df-iun 3875  df-br 3990  df-opab 4051  df-mpt 4052  df-tr 4088  df-id 4278  df-iord 4351  df-on 4353  df-suc 4356  df-iom 4575  df-xp 4617  df-rel 4618  df-cnv 4619  df-co 4620  df-dm 4621  df-rn 4622  df-res 4623  df-ima 4624  df-iota 5160  df-fun 5200  df-fn 5201  df-f 5202  df-f1 5203  df-fo 5204  df-f1o 5205  df-fv 5206  df-er 6513  df-en 6719  df-fin 6721
This theorem is referenced by:  undiffi  6902
  Copyright terms: Public domain W3C validator