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

Theorem indexfi 9127
Description: If for every element of a finite indexing set 𝐴 there exists a corresponding element of another set 𝐵, then there exists a finite subset of 𝐵 consisting only of those elements which are indexed by 𝐴. Proven without the Axiom of Choice, unlike indexdom 35892. (Contributed by Jeff Madsen, 2-Sep-2009.) (Proof shortened by Mario Carneiro, 12-Sep-2015.)
Assertion
Ref Expression
indexfi ((𝐴 ∈ Fin ∧ 𝐵𝑀 ∧ ∀𝑥𝐴𝑦𝐵 𝜑) → ∃𝑐 ∈ Fin (𝑐𝐵 ∧ ∀𝑥𝐴𝑦𝑐 𝜑 ∧ ∀𝑦𝑐𝑥𝐴 𝜑))
Distinct variable groups:   𝑥,𝑐,𝑦,𝐴   𝐵,𝑐,𝑥,𝑦   𝜑,𝑐
Allowed substitution hints:   𝜑(𝑥,𝑦)   𝑀(𝑥,𝑦,𝑐)

Proof of Theorem indexfi
Dummy variables 𝑓 𝑤 𝑧 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 nfv 1917 . . . . . 6 𝑧𝜑
2 nfsbc1v 3736 . . . . . 6 𝑦[𝑧 / 𝑦]𝜑
3 sbceq1a 3727 . . . . . 6 (𝑦 = 𝑧 → (𝜑[𝑧 / 𝑦]𝜑))
41, 2, 3cbvrexw 3374 . . . . 5 (∃𝑦𝐵 𝜑 ↔ ∃𝑧𝐵 [𝑧 / 𝑦]𝜑)
54ralbii 3092 . . . 4 (∀𝑥𝐴𝑦𝐵 𝜑 ↔ ∀𝑥𝐴𝑧𝐵 [𝑧 / 𝑦]𝜑)
6 dfsbcq 3718 . . . . 5 (𝑧 = (𝑓𝑥) → ([𝑧 / 𝑦]𝜑[(𝑓𝑥) / 𝑦]𝜑))
76ac6sfi 9058 . . . 4 ((𝐴 ∈ Fin ∧ ∀𝑥𝐴𝑧𝐵 [𝑧 / 𝑦]𝜑) → ∃𝑓(𝑓:𝐴𝐵 ∧ ∀𝑥𝐴 [(𝑓𝑥) / 𝑦]𝜑))
85, 7sylan2b 594 . . 3 ((𝐴 ∈ Fin ∧ ∀𝑥𝐴𝑦𝐵 𝜑) → ∃𝑓(𝑓:𝐴𝐵 ∧ ∀𝑥𝐴 [(𝑓𝑥) / 𝑦]𝜑))
9 simpll 764 . . . . 5 (((𝐴 ∈ Fin ∧ ∀𝑥𝐴𝑦𝐵 𝜑) ∧ (𝑓:𝐴𝐵 ∧ ∀𝑥𝐴 [(𝑓𝑥) / 𝑦]𝜑)) → 𝐴 ∈ Fin)
10 ffn 6600 . . . . . . 7 (𝑓:𝐴𝐵𝑓 Fn 𝐴)
1110ad2antrl 725 . . . . . 6 (((𝐴 ∈ Fin ∧ ∀𝑥𝐴𝑦𝐵 𝜑) ∧ (𝑓:𝐴𝐵 ∧ ∀𝑥𝐴 [(𝑓𝑥) / 𝑦]𝜑)) → 𝑓 Fn 𝐴)
12 dffn4 6694 . . . . . 6 (𝑓 Fn 𝐴𝑓:𝐴onto→ran 𝑓)
1311, 12sylib 217 . . . . 5 (((𝐴 ∈ Fin ∧ ∀𝑥𝐴𝑦𝐵 𝜑) ∧ (𝑓:𝐴𝐵 ∧ ∀𝑥𝐴 [(𝑓𝑥) / 𝑦]𝜑)) → 𝑓:𝐴onto→ran 𝑓)
14 fofi 9105 . . . . 5 ((𝐴 ∈ Fin ∧ 𝑓:𝐴onto→ran 𝑓) → ran 𝑓 ∈ Fin)
159, 13, 14syl2anc 584 . . . 4 (((𝐴 ∈ Fin ∧ ∀𝑥𝐴𝑦𝐵 𝜑) ∧ (𝑓:𝐴𝐵 ∧ ∀𝑥𝐴 [(𝑓𝑥) / 𝑦]𝜑)) → ran 𝑓 ∈ Fin)
16 frn 6607 . . . . 5 (𝑓:𝐴𝐵 → ran 𝑓𝐵)
1716ad2antrl 725 . . . 4 (((𝐴 ∈ Fin ∧ ∀𝑥𝐴𝑦𝐵 𝜑) ∧ (𝑓:𝐴𝐵 ∧ ∀𝑥𝐴 [(𝑓𝑥) / 𝑦]𝜑)) → ran 𝑓𝐵)
18 fnfvelrn 6958 . . . . . . . . 9 ((𝑓 Fn 𝐴𝑥𝐴) → (𝑓𝑥) ∈ ran 𝑓)
1910, 18sylan 580 . . . . . . . 8 ((𝑓:𝐴𝐵𝑥𝐴) → (𝑓𝑥) ∈ ran 𝑓)
20 rspesbca 3814 . . . . . . . . 9 (((𝑓𝑥) ∈ ran 𝑓[(𝑓𝑥) / 𝑦]𝜑) → ∃𝑦 ∈ ran 𝑓𝜑)
2120ex 413 . . . . . . . 8 ((𝑓𝑥) ∈ ran 𝑓 → ([(𝑓𝑥) / 𝑦]𝜑 → ∃𝑦 ∈ ran 𝑓𝜑))
2219, 21syl 17 . . . . . . 7 ((𝑓:𝐴𝐵𝑥𝐴) → ([(𝑓𝑥) / 𝑦]𝜑 → ∃𝑦 ∈ ran 𝑓𝜑))
2322ralimdva 3108 . . . . . 6 (𝑓:𝐴𝐵 → (∀𝑥𝐴 [(𝑓𝑥) / 𝑦]𝜑 → ∀𝑥𝐴𝑦 ∈ ran 𝑓𝜑))
2423imp 407 . . . . 5 ((𝑓:𝐴𝐵 ∧ ∀𝑥𝐴 [(𝑓𝑥) / 𝑦]𝜑) → ∀𝑥𝐴𝑦 ∈ ran 𝑓𝜑)
2524adantl 482 . . . 4 (((𝐴 ∈ Fin ∧ ∀𝑥𝐴𝑦𝐵 𝜑) ∧ (𝑓:𝐴𝐵 ∧ ∀𝑥𝐴 [(𝑓𝑥) / 𝑦]𝜑)) → ∀𝑥𝐴𝑦 ∈ ran 𝑓𝜑)
26 simpr 485 . . . . . . . 8 ((((𝐴 ∈ Fin ∧ ∀𝑥𝐴𝑦𝐵 𝜑) ∧ (𝑓:𝐴𝐵 ∧ ∀𝑥𝐴 [(𝑓𝑥) / 𝑦]𝜑)) ∧ 𝑤𝐴) → 𝑤𝐴)
27 simprr 770 . . . . . . . . . 10 (((𝐴 ∈ Fin ∧ ∀𝑥𝐴𝑦𝐵 𝜑) ∧ (𝑓:𝐴𝐵 ∧ ∀𝑥𝐴 [(𝑓𝑥) / 𝑦]𝜑)) → ∀𝑥𝐴 [(𝑓𝑥) / 𝑦]𝜑)
28 nfv 1917 . . . . . . . . . . 11 𝑤[(𝑓𝑥) / 𝑦]𝜑
29 nfsbc1v 3736 . . . . . . . . . . 11 𝑥[𝑤 / 𝑥][(𝑓𝑤) / 𝑦]𝜑
30 fveq2 6774 . . . . . . . . . . . . 13 (𝑥 = 𝑤 → (𝑓𝑥) = (𝑓𝑤))
3130sbceq1d 3721 . . . . . . . . . . . 12 (𝑥 = 𝑤 → ([(𝑓𝑥) / 𝑦]𝜑[(𝑓𝑤) / 𝑦]𝜑))
32 sbceq1a 3727 . . . . . . . . . . . 12 (𝑥 = 𝑤 → ([(𝑓𝑤) / 𝑦]𝜑[𝑤 / 𝑥][(𝑓𝑤) / 𝑦]𝜑))
3331, 32bitrd 278 . . . . . . . . . . 11 (𝑥 = 𝑤 → ([(𝑓𝑥) / 𝑦]𝜑[𝑤 / 𝑥][(𝑓𝑤) / 𝑦]𝜑))
3428, 29, 33cbvralw 3373 . . . . . . . . . 10 (∀𝑥𝐴 [(𝑓𝑥) / 𝑦]𝜑 ↔ ∀𝑤𝐴 [𝑤 / 𝑥][(𝑓𝑤) / 𝑦]𝜑)
3527, 34sylib 217 . . . . . . . . 9 (((𝐴 ∈ Fin ∧ ∀𝑥𝐴𝑦𝐵 𝜑) ∧ (𝑓:𝐴𝐵 ∧ ∀𝑥𝐴 [(𝑓𝑥) / 𝑦]𝜑)) → ∀𝑤𝐴 [𝑤 / 𝑥][(𝑓𝑤) / 𝑦]𝜑)
3635r19.21bi 3134 . . . . . . . 8 ((((𝐴 ∈ Fin ∧ ∀𝑥𝐴𝑦𝐵 𝜑) ∧ (𝑓:𝐴𝐵 ∧ ∀𝑥𝐴 [(𝑓𝑥) / 𝑦]𝜑)) ∧ 𝑤𝐴) → [𝑤 / 𝑥][(𝑓𝑤) / 𝑦]𝜑)
37 rspesbca 3814 . . . . . . . 8 ((𝑤𝐴[𝑤 / 𝑥][(𝑓𝑤) / 𝑦]𝜑) → ∃𝑥𝐴 [(𝑓𝑤) / 𝑦]𝜑)
3826, 36, 37syl2anc 584 . . . . . . 7 ((((𝐴 ∈ Fin ∧ ∀𝑥𝐴𝑦𝐵 𝜑) ∧ (𝑓:𝐴𝐵 ∧ ∀𝑥𝐴 [(𝑓𝑥) / 𝑦]𝜑)) ∧ 𝑤𝐴) → ∃𝑥𝐴 [(𝑓𝑤) / 𝑦]𝜑)
3938ralrimiva 3103 . . . . . 6 (((𝐴 ∈ Fin ∧ ∀𝑥𝐴𝑦𝐵 𝜑) ∧ (𝑓:𝐴𝐵 ∧ ∀𝑥𝐴 [(𝑓𝑥) / 𝑦]𝜑)) → ∀𝑤𝐴𝑥𝐴 [(𝑓𝑤) / 𝑦]𝜑)
40 dfsbcq 3718 . . . . . . . . 9 (𝑧 = (𝑓𝑤) → ([𝑧 / 𝑦]𝜑[(𝑓𝑤) / 𝑦]𝜑))
4140rexbidv 3226 . . . . . . . 8 (𝑧 = (𝑓𝑤) → (∃𝑥𝐴 [𝑧 / 𝑦]𝜑 ↔ ∃𝑥𝐴 [(𝑓𝑤) / 𝑦]𝜑))
4241ralrn 6964 . . . . . . 7 (𝑓 Fn 𝐴 → (∀𝑧 ∈ ran 𝑓𝑥𝐴 [𝑧 / 𝑦]𝜑 ↔ ∀𝑤𝐴𝑥𝐴 [(𝑓𝑤) / 𝑦]𝜑))
4311, 42syl 17 . . . . . 6 (((𝐴 ∈ Fin ∧ ∀𝑥𝐴𝑦𝐵 𝜑) ∧ (𝑓:𝐴𝐵 ∧ ∀𝑥𝐴 [(𝑓𝑥) / 𝑦]𝜑)) → (∀𝑧 ∈ ran 𝑓𝑥𝐴 [𝑧 / 𝑦]𝜑 ↔ ∀𝑤𝐴𝑥𝐴 [(𝑓𝑤) / 𝑦]𝜑))
4439, 43mpbird 256 . . . . 5 (((𝐴 ∈ Fin ∧ ∀𝑥𝐴𝑦𝐵 𝜑) ∧ (𝑓:𝐴𝐵 ∧ ∀𝑥𝐴 [(𝑓𝑥) / 𝑦]𝜑)) → ∀𝑧 ∈ ran 𝑓𝑥𝐴 [𝑧 / 𝑦]𝜑)
45 nfv 1917 . . . . . 6 𝑧𝑥𝐴 𝜑
46 nfcv 2907 . . . . . . 7 𝑦𝐴
4746, 2nfrex 3242 . . . . . 6 𝑦𝑥𝐴 [𝑧 / 𝑦]𝜑
483rexbidv 3226 . . . . . 6 (𝑦 = 𝑧 → (∃𝑥𝐴 𝜑 ↔ ∃𝑥𝐴 [𝑧 / 𝑦]𝜑))
4945, 47, 48cbvralw 3373 . . . . 5 (∀𝑦 ∈ ran 𝑓𝑥𝐴 𝜑 ↔ ∀𝑧 ∈ ran 𝑓𝑥𝐴 [𝑧 / 𝑦]𝜑)
5044, 49sylibr 233 . . . 4 (((𝐴 ∈ Fin ∧ ∀𝑥𝐴𝑦𝐵 𝜑) ∧ (𝑓:𝐴𝐵 ∧ ∀𝑥𝐴 [(𝑓𝑥) / 𝑦]𝜑)) → ∀𝑦 ∈ ran 𝑓𝑥𝐴 𝜑)
51 sseq1 3946 . . . . . 6 (𝑐 = ran 𝑓 → (𝑐𝐵 ↔ ran 𝑓𝐵))
52 rexeq 3343 . . . . . . 7 (𝑐 = ran 𝑓 → (∃𝑦𝑐 𝜑 ↔ ∃𝑦 ∈ ran 𝑓𝜑))
5352ralbidv 3112 . . . . . 6 (𝑐 = ran 𝑓 → (∀𝑥𝐴𝑦𝑐 𝜑 ↔ ∀𝑥𝐴𝑦 ∈ ran 𝑓𝜑))
54 raleq 3342 . . . . . 6 (𝑐 = ran 𝑓 → (∀𝑦𝑐𝑥𝐴 𝜑 ↔ ∀𝑦 ∈ ran 𝑓𝑥𝐴 𝜑))
5551, 53, 543anbi123d 1435 . . . . 5 (𝑐 = ran 𝑓 → ((𝑐𝐵 ∧ ∀𝑥𝐴𝑦𝑐 𝜑 ∧ ∀𝑦𝑐𝑥𝐴 𝜑) ↔ (ran 𝑓𝐵 ∧ ∀𝑥𝐴𝑦 ∈ ran 𝑓𝜑 ∧ ∀𝑦 ∈ ran 𝑓𝑥𝐴 𝜑)))
5655rspcev 3561 . . . 4 ((ran 𝑓 ∈ Fin ∧ (ran 𝑓𝐵 ∧ ∀𝑥𝐴𝑦 ∈ ran 𝑓𝜑 ∧ ∀𝑦 ∈ ran 𝑓𝑥𝐴 𝜑)) → ∃𝑐 ∈ Fin (𝑐𝐵 ∧ ∀𝑥𝐴𝑦𝑐 𝜑 ∧ ∀𝑦𝑐𝑥𝐴 𝜑))
5715, 17, 25, 50, 56syl13anc 1371 . . 3 (((𝐴 ∈ Fin ∧ ∀𝑥𝐴𝑦𝐵 𝜑) ∧ (𝑓:𝐴𝐵 ∧ ∀𝑥𝐴 [(𝑓𝑥) / 𝑦]𝜑)) → ∃𝑐 ∈ Fin (𝑐𝐵 ∧ ∀𝑥𝐴𝑦𝑐 𝜑 ∧ ∀𝑦𝑐𝑥𝐴 𝜑))
588, 57exlimddv 1938 . 2 ((𝐴 ∈ Fin ∧ ∀𝑥𝐴𝑦𝐵 𝜑) → ∃𝑐 ∈ Fin (𝑐𝐵 ∧ ∀𝑥𝐴𝑦𝑐 𝜑 ∧ ∀𝑦𝑐𝑥𝐴 𝜑))
59583adant2 1130 1 ((𝐴 ∈ Fin ∧ 𝐵𝑀 ∧ ∀𝑥𝐴𝑦𝐵 𝜑) → ∃𝑐 ∈ Fin (𝑐𝐵 ∧ ∀𝑥𝐴𝑦𝑐 𝜑 ∧ ∀𝑦𝑐𝑥𝐴 𝜑))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 205  wa 396  w3a 1086   = wceq 1539  wex 1782  wcel 2106  wral 3064  wrex 3065  [wsbc 3716  wss 3887  ran crn 5590   Fn wfn 6428  wf 6429  ontowfo 6431  cfv 6433  Fincfn 8733
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1798  ax-4 1812  ax-5 1913  ax-6 1971  ax-7 2011  ax-8 2108  ax-9 2116  ax-10 2137  ax-11 2154  ax-12 2171  ax-ext 2709  ax-sep 5223  ax-nul 5230  ax-pow 5288  ax-pr 5352  ax-un 7588
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 845  df-3or 1087  df-3an 1088  df-tru 1542  df-fal 1552  df-ex 1783  df-nf 1787  df-sb 2068  df-mo 2540  df-eu 2569  df-clab 2716  df-cleq 2730  df-clel 2816  df-nfc 2889  df-ne 2944  df-ral 3069  df-rex 3070  df-reu 3072  df-rab 3073  df-v 3434  df-sbc 3717  df-dif 3890  df-un 3892  df-in 3894  df-ss 3904  df-pss 3906  df-nul 4257  df-if 4460  df-pw 4535  df-sn 4562  df-pr 4564  df-op 4568  df-uni 4840  df-br 5075  df-opab 5137  df-mpt 5158  df-tr 5192  df-id 5489  df-eprel 5495  df-po 5503  df-so 5504  df-fr 5544  df-we 5546  df-xp 5595  df-rel 5596  df-cnv 5597  df-co 5598  df-dm 5599  df-rn 5600  df-res 5601  df-ima 5602  df-ord 6269  df-on 6270  df-lim 6271  df-suc 6272  df-iota 6391  df-fun 6435  df-fn 6436  df-f 6437  df-f1 6438  df-fo 6439  df-f1o 6440  df-fv 6441  df-om 7713  df-1o 8297  df-er 8498  df-en 8734  df-dom 8735  df-fin 8737
This theorem is referenced by:  filbcmb  35898
  Copyright terms: Public domain W3C validator