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

Theorem xpfi 6895
Description: The Cartesian product of two finite sets is finite. Lemma 8.1.16 of [AczelRathjen], p. 74. (Contributed by Jeff Madsen, 2-Sep-2009.) (Revised by Mario Carneiro, 12-Mar-2015.)
Assertion
Ref Expression
xpfi ((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) → (𝐴 × 𝐵) ∈ Fin)

Proof of Theorem xpfi
Dummy variables 𝑤 𝑥 𝑦 𝑧 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 xpeq1 4618 . . . . 5 (𝑥 = ∅ → (𝑥 × 𝐵) = (∅ × 𝐵))
21eleq1d 2235 . . . 4 (𝑥 = ∅ → ((𝑥 × 𝐵) ∈ Fin ↔ (∅ × 𝐵) ∈ Fin))
32imbi2d 229 . . 3 (𝑥 = ∅ → ((𝐵 ∈ Fin → (𝑥 × 𝐵) ∈ Fin) ↔ (𝐵 ∈ Fin → (∅ × 𝐵) ∈ Fin)))
4 xpeq1 4618 . . . . 5 (𝑥 = (𝑦 ∖ {𝑧}) → (𝑥 × 𝐵) = ((𝑦 ∖ {𝑧}) × 𝐵))
54eleq1d 2235 . . . 4 (𝑥 = (𝑦 ∖ {𝑧}) → ((𝑥 × 𝐵) ∈ Fin ↔ ((𝑦 ∖ {𝑧}) × 𝐵) ∈ Fin))
65imbi2d 229 . . 3 (𝑥 = (𝑦 ∖ {𝑧}) → ((𝐵 ∈ Fin → (𝑥 × 𝐵) ∈ Fin) ↔ (𝐵 ∈ Fin → ((𝑦 ∖ {𝑧}) × 𝐵) ∈ Fin)))
7 xpeq1 4618 . . . . 5 (𝑥 = 𝑦 → (𝑥 × 𝐵) = (𝑦 × 𝐵))
87eleq1d 2235 . . . 4 (𝑥 = 𝑦 → ((𝑥 × 𝐵) ∈ Fin ↔ (𝑦 × 𝐵) ∈ Fin))
98imbi2d 229 . . 3 (𝑥 = 𝑦 → ((𝐵 ∈ Fin → (𝑥 × 𝐵) ∈ Fin) ↔ (𝐵 ∈ Fin → (𝑦 × 𝐵) ∈ Fin)))
10 xpeq1 4618 . . . . 5 (𝑥 = 𝐴 → (𝑥 × 𝐵) = (𝐴 × 𝐵))
1110eleq1d 2235 . . . 4 (𝑥 = 𝐴 → ((𝑥 × 𝐵) ∈ Fin ↔ (𝐴 × 𝐵) ∈ Fin))
1211imbi2d 229 . . 3 (𝑥 = 𝐴 → ((𝐵 ∈ Fin → (𝑥 × 𝐵) ∈ Fin) ↔ (𝐵 ∈ Fin → (𝐴 × 𝐵) ∈ Fin)))
13 0xp 4684 . . . . 5 (∅ × 𝐵) = ∅
14 0fin 6850 . . . . 5 ∅ ∈ Fin
1513, 14eqeltri 2239 . . . 4 (∅ × 𝐵) ∈ Fin
1615a1i 9 . . 3 (𝐵 ∈ Fin → (∅ × 𝐵) ∈ Fin)
17 xpeq1 4618 . . . . . . . 8 (𝑦 = ∅ → (𝑦 × 𝐵) = (∅ × 𝐵))
1817, 15eqeltrdi 2257 . . . . . . 7 (𝑦 = ∅ → (𝑦 × 𝐵) ∈ Fin)
1918a1i13 24 . . . . . 6 ((𝑦 ∈ Fin ∧ 𝐵 ∈ Fin) → (𝑦 = ∅ → (∀𝑧𝑦 (𝐵 ∈ Fin → ((𝑦 ∖ {𝑧}) × 𝐵) ∈ Fin) → (𝑦 × 𝐵) ∈ Fin)))
20 sneq 3587 . . . . . . . . . . . . . . 15 (𝑧 = 𝑤 → {𝑧} = {𝑤})
2120difeq2d 3240 . . . . . . . . . . . . . 14 (𝑧 = 𝑤 → (𝑦 ∖ {𝑧}) = (𝑦 ∖ {𝑤}))
2221xpeq1d 4627 . . . . . . . . . . . . 13 (𝑧 = 𝑤 → ((𝑦 ∖ {𝑧}) × 𝐵) = ((𝑦 ∖ {𝑤}) × 𝐵))
2322eleq1d 2235 . . . . . . . . . . . 12 (𝑧 = 𝑤 → (((𝑦 ∖ {𝑧}) × 𝐵) ∈ Fin ↔ ((𝑦 ∖ {𝑤}) × 𝐵) ∈ Fin))
2423imbi2d 229 . . . . . . . . . . 11 (𝑧 = 𝑤 → ((𝐵 ∈ Fin → ((𝑦 ∖ {𝑧}) × 𝐵) ∈ Fin) ↔ (𝐵 ∈ Fin → ((𝑦 ∖ {𝑤}) × 𝐵) ∈ Fin)))
2524rspcv 2826 . . . . . . . . . 10 (𝑤𝑦 → (∀𝑧𝑦 (𝐵 ∈ Fin → ((𝑦 ∖ {𝑧}) × 𝐵) ∈ Fin) → (𝐵 ∈ Fin → ((𝑦 ∖ {𝑤}) × 𝐵) ∈ Fin)))
2625adantl 275 . . . . . . . . 9 (((𝑦 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ 𝑤𝑦) → (∀𝑧𝑦 (𝐵 ∈ Fin → ((𝑦 ∖ {𝑧}) × 𝐵) ∈ Fin) → (𝐵 ∈ Fin → ((𝑦 ∖ {𝑤}) × 𝐵) ∈ Fin)))
27 pm2.27 40 . . . . . . . . . 10 (𝐵 ∈ Fin → ((𝐵 ∈ Fin → ((𝑦 ∖ {𝑤}) × 𝐵) ∈ Fin) → ((𝑦 ∖ {𝑤}) × 𝐵) ∈ Fin))
2827ad2antlr 481 . . . . . . . . 9 (((𝑦 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ 𝑤𝑦) → ((𝐵 ∈ Fin → ((𝑦 ∖ {𝑤}) × 𝐵) ∈ Fin) → ((𝑦 ∖ {𝑤}) × 𝐵) ∈ Fin))
29 vex 2729 . . . . . . . . . . . . . . 15 𝑤 ∈ V
3029snex 4164 . . . . . . . . . . . . . 14 {𝑤} ∈ V
31 xpexg 4718 . . . . . . . . . . . . . 14 (({𝑤} ∈ V ∧ 𝐵 ∈ Fin) → ({𝑤} × 𝐵) ∈ V)
3230, 31mpan 421 . . . . . . . . . . . . 13 (𝐵 ∈ Fin → ({𝑤} × 𝐵) ∈ V)
33 id 19 . . . . . . . . . . . . 13 (𝐵 ∈ Fin → 𝐵 ∈ Fin)
34 2ndconst 6190 . . . . . . . . . . . . . 14 (𝑤 ∈ V → (2nd ↾ ({𝑤} × 𝐵)):({𝑤} × 𝐵)–1-1-onto𝐵)
3529, 34mp1i 10 . . . . . . . . . . . . 13 (𝐵 ∈ Fin → (2nd ↾ ({𝑤} × 𝐵)):({𝑤} × 𝐵)–1-1-onto𝐵)
36 f1oen2g 6721 . . . . . . . . . . . . 13 ((({𝑤} × 𝐵) ∈ V ∧ 𝐵 ∈ Fin ∧ (2nd ↾ ({𝑤} × 𝐵)):({𝑤} × 𝐵)–1-1-onto𝐵) → ({𝑤} × 𝐵) ≈ 𝐵)
3732, 33, 35, 36syl3anc 1228 . . . . . . . . . . . 12 (𝐵 ∈ Fin → ({𝑤} × 𝐵) ≈ 𝐵)
38 enfii 6840 . . . . . . . . . . . 12 ((𝐵 ∈ Fin ∧ ({𝑤} × 𝐵) ≈ 𝐵) → ({𝑤} × 𝐵) ∈ Fin)
3937, 38mpdan 418 . . . . . . . . . . 11 (𝐵 ∈ Fin → ({𝑤} × 𝐵) ∈ Fin)
4039ad2antlr 481 . . . . . . . . . 10 (((𝑦 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ 𝑤𝑦) → ({𝑤} × 𝐵) ∈ Fin)
41 incom 3314 . . . . . . . . . . . . . 14 ({𝑤} ∩ (𝑦 ∖ {𝑤})) = ((𝑦 ∖ {𝑤}) ∩ {𝑤})
42 disjdif 3481 . . . . . . . . . . . . . 14 ({𝑤} ∩ (𝑦 ∖ {𝑤})) = ∅
4341, 42eqtr3i 2188 . . . . . . . . . . . . 13 ((𝑦 ∖ {𝑤}) ∩ {𝑤}) = ∅
44 xpdisj1 5028 . . . . . . . . . . . . 13 (((𝑦 ∖ {𝑤}) ∩ {𝑤}) = ∅ → (((𝑦 ∖ {𝑤}) × 𝐵) ∩ ({𝑤} × 𝐵)) = ∅)
4543, 44ax-mp 5 . . . . . . . . . . . 12 (((𝑦 ∖ {𝑤}) × 𝐵) ∩ ({𝑤} × 𝐵)) = ∅
46 unfidisj 6887 . . . . . . . . . . . 12 ((((𝑦 ∖ {𝑤}) × 𝐵) ∈ Fin ∧ ({𝑤} × 𝐵) ∈ Fin ∧ (((𝑦 ∖ {𝑤}) × 𝐵) ∩ ({𝑤} × 𝐵)) = ∅) → (((𝑦 ∖ {𝑤}) × 𝐵) ∪ ({𝑤} × 𝐵)) ∈ Fin)
4745, 46mp3an3 1316 . . . . . . . . . . 11 ((((𝑦 ∖ {𝑤}) × 𝐵) ∈ Fin ∧ ({𝑤} × 𝐵) ∈ Fin) → (((𝑦 ∖ {𝑤}) × 𝐵) ∪ ({𝑤} × 𝐵)) ∈ Fin)
48 xpundir 4661 . . . . . . . . . . . . 13 (((𝑦 ∖ {𝑤}) ∪ {𝑤}) × 𝐵) = (((𝑦 ∖ {𝑤}) × 𝐵) ∪ ({𝑤} × 𝐵))
49 fidifsnid 6837 . . . . . . . . . . . . . . 15 ((𝑦 ∈ Fin ∧ 𝑤𝑦) → ((𝑦 ∖ {𝑤}) ∪ {𝑤}) = 𝑦)
5049adantlr 469 . . . . . . . . . . . . . 14 (((𝑦 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ 𝑤𝑦) → ((𝑦 ∖ {𝑤}) ∪ {𝑤}) = 𝑦)
5150xpeq1d 4627 . . . . . . . . . . . . 13 (((𝑦 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ 𝑤𝑦) → (((𝑦 ∖ {𝑤}) ∪ {𝑤}) × 𝐵) = (𝑦 × 𝐵))
5248, 51eqtr3id 2213 . . . . . . . . . . . 12 (((𝑦 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ 𝑤𝑦) → (((𝑦 ∖ {𝑤}) × 𝐵) ∪ ({𝑤} × 𝐵)) = (𝑦 × 𝐵))
5352eleq1d 2235 . . . . . . . . . . 11 (((𝑦 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ 𝑤𝑦) → ((((𝑦 ∖ {𝑤}) × 𝐵) ∪ ({𝑤} × 𝐵)) ∈ Fin ↔ (𝑦 × 𝐵) ∈ Fin))
5447, 53syl5ib 153 . . . . . . . . . 10 (((𝑦 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ 𝑤𝑦) → ((((𝑦 ∖ {𝑤}) × 𝐵) ∈ Fin ∧ ({𝑤} × 𝐵) ∈ Fin) → (𝑦 × 𝐵) ∈ Fin))
5540, 54mpan2d 425 . . . . . . . . 9 (((𝑦 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ 𝑤𝑦) → (((𝑦 ∖ {𝑤}) × 𝐵) ∈ Fin → (𝑦 × 𝐵) ∈ Fin))
5626, 28, 553syld 57 . . . . . . . 8 (((𝑦 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ 𝑤𝑦) → (∀𝑧𝑦 (𝐵 ∈ Fin → ((𝑦 ∖ {𝑧}) × 𝐵) ∈ Fin) → (𝑦 × 𝐵) ∈ Fin))
5756ex 114 . . . . . . 7 ((𝑦 ∈ Fin ∧ 𝐵 ∈ Fin) → (𝑤𝑦 → (∀𝑧𝑦 (𝐵 ∈ Fin → ((𝑦 ∖ {𝑧}) × 𝐵) ∈ Fin) → (𝑦 × 𝐵) ∈ Fin)))
5857exlimdv 1807 . . . . . 6 ((𝑦 ∈ Fin ∧ 𝐵 ∈ Fin) → (∃𝑤 𝑤𝑦 → (∀𝑧𝑦 (𝐵 ∈ Fin → ((𝑦 ∖ {𝑧}) × 𝐵) ∈ Fin) → (𝑦 × 𝐵) ∈ Fin)))
59 fin0or 6852 . . . . . . 7 (𝑦 ∈ Fin → (𝑦 = ∅ ∨ ∃𝑤 𝑤𝑦))
6059adantr 274 . . . . . 6 ((𝑦 ∈ Fin ∧ 𝐵 ∈ Fin) → (𝑦 = ∅ ∨ ∃𝑤 𝑤𝑦))
6119, 58, 60mpjaod 708 . . . . 5 ((𝑦 ∈ Fin ∧ 𝐵 ∈ Fin) → (∀𝑧𝑦 (𝐵 ∈ Fin → ((𝑦 ∖ {𝑧}) × 𝐵) ∈ Fin) → (𝑦 × 𝐵) ∈ Fin))
6261ex 114 . . . 4 (𝑦 ∈ Fin → (𝐵 ∈ Fin → (∀𝑧𝑦 (𝐵 ∈ Fin → ((𝑦 ∖ {𝑧}) × 𝐵) ∈ Fin) → (𝑦 × 𝐵) ∈ Fin)))
6362com23 78 . . 3 (𝑦 ∈ Fin → (∀𝑧𝑦 (𝐵 ∈ Fin → ((𝑦 ∖ {𝑧}) × 𝐵) ∈ Fin) → (𝐵 ∈ Fin → (𝑦 × 𝐵) ∈ Fin)))
643, 6, 9, 12, 16, 63findcard 6854 . 2 (𝐴 ∈ Fin → (𝐵 ∈ Fin → (𝐴 × 𝐵) ∈ Fin))
6564imp 123 1 ((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) → (𝐴 × 𝐵) ∈ Fin)
Colors of variables: wff set class
Syntax hints:  wi 4  wa 103  wo 698   = wceq 1343  wex 1480  wcel 2136  wral 2444  Vcvv 2726  cdif 3113  cun 3114  cin 3115  c0 3409  {csn 3576   class class class wbr 3982   × cxp 4602  cres 4606  1-1-ontowf1o 5187  2nd c2nd 6107  cen 6704  Fincfn 6706
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 604  ax-in2 605  ax-io 699  ax-5 1435  ax-7 1436  ax-gen 1437  ax-ie1 1481  ax-ie2 1482  ax-8 1492  ax-10 1493  ax-11 1494  ax-i12 1495  ax-bndl 1497  ax-4 1498  ax-17 1514  ax-i9 1518  ax-ial 1522  ax-i5r 1523  ax-13 2138  ax-14 2139  ax-ext 2147  ax-coll 4097  ax-sep 4100  ax-nul 4108  ax-pow 4153  ax-pr 4187  ax-un 4411  ax-setind 4514  ax-iinf 4565
This theorem depends on definitions:  df-bi 116  df-dc 825  df-3or 969  df-3an 970  df-tru 1346  df-fal 1349  df-nf 1449  df-sb 1751  df-eu 2017  df-mo 2018  df-clab 2152  df-cleq 2158  df-clel 2161  df-nfc 2297  df-ne 2337  df-ral 2449  df-rex 2450  df-reu 2451  df-rab 2453  df-v 2728  df-sbc 2952  df-csb 3046  df-dif 3118  df-un 3120  df-in 3122  df-ss 3129  df-nul 3410  df-if 3521  df-pw 3561  df-sn 3582  df-pr 3583  df-op 3585  df-uni 3790  df-int 3825  df-iun 3868  df-br 3983  df-opab 4044  df-mpt 4045  df-tr 4081  df-id 4271  df-iord 4344  df-on 4346  df-suc 4349  df-iom 4568  df-xp 4610  df-rel 4611  df-cnv 4612  df-co 4613  df-dm 4614  df-rn 4615  df-res 4616  df-ima 4617  df-iota 5153  df-fun 5190  df-fn 5191  df-f 5192  df-f1 5193  df-fo 5194  df-f1o 5195  df-fv 5196  df-1st 6108  df-2nd 6109  df-1o 6384  df-er 6501  df-en 6707  df-fin 6709
This theorem is referenced by:  3xpfi  6896  hashxp  10739  fsum2dlemstep  11375  fisumcom2  11379  fprod2dlemstep  11563  fprodcom2fi  11567  crth  12156  phimullem  12157
  Copyright terms: Public domain W3C validator