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

Theorem indexfi 9333
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 38636. (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 1947 . . . . . 6 Ⅎ𝑧𝜑
2 nfsbc1v 3759 . . . . . 6 Ⅎ𝑦[𝑧 / 𝑦]𝜑
3 sbceq1a 3750 . . . . . 6 (𝑦 = 𝑧 → (𝜑 ↔ [𝑧 / 𝑦]𝜑))
41, 2, 3cbvrexw 3306 . . . . 5 (∃𝑦 ∈ 𝐵 𝜑 ↔ ∃𝑧 ∈ 𝐵 [𝑧 / 𝑦]𝜑)
54ralbii 3109 . . . 4 (∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝐵 𝜑 ↔ ∀𝑥 ∈ 𝐴 ∃𝑧 ∈ 𝐵 [𝑧 / 𝑦]𝜑)
6 dfsbcq 3741 . . . . 5 (𝑧 = (𝑓‘𝑥) → ([𝑧 / 𝑦]𝜑 ↔ [(𝑓‘𝑥) / 𝑦]𝜑))
76ac6sfi 9259 . . . 4 ((𝐴 ∈ Fin ∧ ∀𝑥 ∈ 𝐴 ∃𝑧 ∈ 𝐵 [𝑧 / 𝑦]𝜑) → ∃𝑓(𝑓:𝐴⟶𝐵 ∧ ∀𝑥 ∈ 𝐴 [(𝑓‘𝑥) / 𝑦]𝜑))
85, 7sylan2b 606 . . 3 ((𝐴 ∈ Fin ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝐵 𝜑) → ∃𝑓(𝑓:𝐴⟶𝐵 ∧ ∀𝑥 ∈ 𝐴 [(𝑓‘𝑥) / 𝑦]𝜑))
9 simpll 779 . . . . 5 (((𝐴 ∈ Fin ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝐵 𝜑) ∧ (𝑓:𝐴⟶𝐵 ∧ ∀𝑥 ∈ 𝐴 [(𝑓‘𝑥) / 𝑦]𝜑)) → 𝐴 ∈ Fin)
10 ffn 6701 . . . . . . 7 (𝑓:𝐴⟶𝐵 → 𝑓 Fn 𝐴)
1110ad2antrl 741 . . . . . 6 (((𝐴 ∈ Fin ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝐵 𝜑) ∧ (𝑓:𝐴⟶𝐵 ∧ ∀𝑥 ∈ 𝐴 [(𝑓‘𝑥) / 𝑦]𝜑)) → 𝑓 Fn 𝐴)
12 dffn4 6794 . . . . . 6 (𝑓 Fn 𝐴 ↔ 𝑓:𝐴–onto→ran 𝑓)
1311, 12sylib 221 . . . . 5 (((𝐴 ∈ Fin ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝐵 𝜑) ∧ (𝑓:𝐴⟶𝐵 ∧ ∀𝑥 ∈ 𝐴 [(𝑓‘𝑥) / 𝑦]𝜑)) → 𝑓:𝐴–onto→ran 𝑓)
14 fofi 9289 . . . . 5 ((𝐴 ∈ Fin ∧ 𝑓:𝐴–onto→ran 𝑓) → ran 𝑓 ∈ Fin)
159, 13, 14syl2anc 596 . . . 4 (((𝐴 ∈ Fin ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝐵 𝜑) ∧ (𝑓:𝐴⟶𝐵 ∧ ∀𝑥 ∈ 𝐴 [(𝑓‘𝑥) / 𝑦]𝜑)) → ran 𝑓 ∈ Fin)
16 frn 6709 . . . . 5 (𝑓:𝐴⟶𝐵 → ran 𝑓 ⊆ 𝐵)
1716ad2antrl 741 . . . 4 (((𝐴 ∈ Fin ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝐵 𝜑) ∧ (𝑓:𝐴⟶𝐵 ∧ ∀𝑥 ∈ 𝐴 [(𝑓‘𝑥) / 𝑦]𝜑)) → ran 𝑓 ⊆ 𝐵)
18 fnfvelrn 7072 . . . . . . . . 9 ((𝑓 Fn 𝐴 ∧ 𝑥 ∈ 𝐴) → (𝑓‘𝑥) ∈ ran 𝑓)
1910, 18sylan 592 . . . . . . . 8 ((𝑓:𝐴⟶𝐵 ∧ 𝑥 ∈ 𝐴) → (𝑓‘𝑥) ∈ ran 𝑓)
20 rspesbca 3828 . . . . . . . . 9 (((𝑓‘𝑥) ∈ ran 𝑓 ∧ [(𝑓‘𝑥) / 𝑦]𝜑) → ∃𝑦 ∈ ran 𝑓𝜑)
2120ex 418 . . . . . . . 8 ((𝑓‘𝑥) ∈ ran 𝑓 → ([(𝑓‘𝑥) / 𝑦]𝜑 → ∃𝑦 ∈ ran 𝑓𝜑))
2219, 21syl 18 . . . . . . 7 ((𝑓:𝐴⟶𝐵 ∧ 𝑥 ∈ 𝐴) → ([(𝑓‘𝑥) / 𝑦]𝜑 → ∃𝑦 ∈ ran 𝑓𝜑))
2322ralimdva 3175 . . . . . 6 (𝑓:𝐴⟶𝐵 → (∀𝑥 ∈ 𝐴 [(𝑓‘𝑥) / 𝑦]𝜑 → ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ ran 𝑓𝜑))
2423imp 412 . . . . 5 ((𝑓:𝐴⟶𝐵 ∧ ∀𝑥 ∈ 𝐴 [(𝑓‘𝑥) / 𝑦]𝜑) → ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ ran 𝑓𝜑)
2524adantl 487 . . . 4 (((𝐴 ∈ Fin ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝐵 𝜑) ∧ (𝑓:𝐴⟶𝐵 ∧ ∀𝑥 ∈ 𝐴 [(𝑓‘𝑥) / 𝑦]𝜑)) → ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ ran 𝑓𝜑)
26 simpr 490 . . . . . . . 8 ((((𝐴 ∈ Fin ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝐵 𝜑) ∧ (𝑓:𝐴⟶𝐵 ∧ ∀𝑥 ∈ 𝐴 [(𝑓‘𝑥) / 𝑦]𝜑)) ∧ 𝑤 ∈ 𝐴) → 𝑤 ∈ 𝐴)
27 simprr 785 . . . . . . . . . 10 (((𝐴 ∈ Fin ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝐵 𝜑) ∧ (𝑓:𝐴⟶𝐵 ∧ ∀𝑥 ∈ 𝐴 [(𝑓‘𝑥) / 𝑦]𝜑)) → ∀𝑥 ∈ 𝐴 [(𝑓‘𝑥) / 𝑦]𝜑)
28 nfv 1947 . . . . . . . . . . 11 Ⅎ𝑤[(𝑓‘𝑥) / 𝑦]𝜑
29 nfsbc1v 3759 . . . . . . . . . . 11 Ⅎ𝑥[𝑤 / 𝑥][(𝑓‘𝑤) / 𝑦]𝜑
30 fveq2 6877 . . . . . . . . . . . . 13 (𝑥 = 𝑤 → (𝑓‘𝑥) = (𝑓‘𝑤))
3130sbceq1d 3744 . . . . . . . . . . . 12 (𝑥 = 𝑤 → ([(𝑓‘𝑥) / 𝑦]𝜑 ↔ [(𝑓‘𝑤) / 𝑦]𝜑))
32 sbceq1a 3750 . . . . . . . . . . . 12 (𝑥 = 𝑤 → ([(𝑓‘𝑤) / 𝑦]𝜑 ↔ [𝑤 / 𝑥][(𝑓‘𝑤) / 𝑦]𝜑))
3331, 32bitrd 282 . . . . . . . . . . 11 (𝑥 = 𝑤 → ([(𝑓‘𝑥) / 𝑦]𝜑 ↔ [𝑤 / 𝑥][(𝑓‘𝑤) / 𝑦]𝜑))
3428, 29, 33cbvralw 3305 . . . . . . . . . 10 (∀𝑥 ∈ 𝐴 [(𝑓‘𝑥) / 𝑦]𝜑 ↔ ∀𝑤 ∈ 𝐴 [𝑤 / 𝑥][(𝑓‘𝑤) / 𝑦]𝜑)
3527, 34sylib 221 . . . . . . . . 9 (((𝐴 ∈ Fin ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝐵 𝜑) ∧ (𝑓:𝐴⟶𝐵 ∧ ∀𝑥 ∈ 𝐴 [(𝑓‘𝑥) / 𝑦]𝜑)) → ∀𝑤 ∈ 𝐴 [𝑤 / 𝑥][(𝑓‘𝑤) / 𝑦]𝜑)
3635r19.21bi 3255 . . . . . . . 8 ((((𝐴 ∈ Fin ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝐵 𝜑) ∧ (𝑓:𝐴⟶𝐵 ∧ ∀𝑥 ∈ 𝐴 [(𝑓‘𝑥) / 𝑦]𝜑)) ∧ 𝑤 ∈ 𝐴) → [𝑤 / 𝑥][(𝑓‘𝑤) / 𝑦]𝜑)
37 rspesbca 3828 . . . . . . . 8 ((𝑤 ∈ 𝐴 ∧ [𝑤 / 𝑥][(𝑓‘𝑤) / 𝑦]𝜑) → ∃𝑥 ∈ 𝐴 [(𝑓‘𝑤) / 𝑦]𝜑)
3826, 36, 37syl2anc 596 . . . . . . 7 ((((𝐴 ∈ Fin ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝐵 𝜑) ∧ (𝑓:𝐴⟶𝐵 ∧ ∀𝑥 ∈ 𝐴 [(𝑓‘𝑥) / 𝑦]𝜑)) ∧ 𝑤 ∈ 𝐴) → ∃𝑥 ∈ 𝐴 [(𝑓‘𝑤) / 𝑦]𝜑)
3938ralrimiva 3155 . . . . . 6 (((𝐴 ∈ Fin ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝐵 𝜑) ∧ (𝑓:𝐴⟶𝐵 ∧ ∀𝑥 ∈ 𝐴 [(𝑓‘𝑥) / 𝑦]𝜑)) → ∀𝑤 ∈ 𝐴 ∃𝑥 ∈ 𝐴 [(𝑓‘𝑤) / 𝑦]𝜑)
40 dfsbcq 3741 . . . . . . . . 9 (𝑧 = (𝑓‘𝑤) → ([𝑧 / 𝑦]𝜑 ↔ [(𝑓‘𝑤) / 𝑦]𝜑))
4140rexbidv 3187 . . . . . . . 8 (𝑧 = (𝑓‘𝑤) → (∃𝑥 ∈ 𝐴 [𝑧 / 𝑦]𝜑 ↔ ∃𝑥 ∈ 𝐴 [(𝑓‘𝑤) / 𝑦]𝜑))
4241ralrn 7080 . . . . . . 7 (𝑓 Fn 𝐴 → (∀𝑧 ∈ ran 𝑓∃𝑥 ∈ 𝐴 [𝑧 / 𝑦]𝜑 ↔ ∀𝑤 ∈ 𝐴 ∃𝑥 ∈ 𝐴 [(𝑓‘𝑤) / 𝑦]𝜑))
4311, 42syl 18 . . . . . 6 (((𝐴 ∈ Fin ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝐵 𝜑) ∧ (𝑓:𝐴⟶𝐵 ∧ ∀𝑥 ∈ 𝐴 [(𝑓‘𝑥) / 𝑦]𝜑)) → (∀𝑧 ∈ ran 𝑓∃𝑥 ∈ 𝐴 [𝑧 / 𝑦]𝜑 ↔ ∀𝑤 ∈ 𝐴 ∃𝑥 ∈ 𝐴 [(𝑓‘𝑤) / 𝑦]𝜑))
4439, 43mpbird 260 . . . . 5 (((𝐴 ∈ Fin ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝐵 𝜑) ∧ (𝑓:𝐴⟶𝐵 ∧ ∀𝑥 ∈ 𝐴 [(𝑓‘𝑥) / 𝑦]𝜑)) → ∀𝑧 ∈ ran 𝑓∃𝑥 ∈ 𝐴 [𝑧 / 𝑦]𝜑)
45 nfv 1947 . . . . . 6 Ⅎ𝑧∃𝑥 ∈ 𝐴 𝜑
46 nfcv 2923 . . . . . . 7 Ⅎ𝑦𝐴
4746, 2nfrexw 3311 . . . . . 6 Ⅎ𝑦∃𝑥 ∈ 𝐴 [𝑧 / 𝑦]𝜑
483rexbidv 3187 . . . . . 6 (𝑦 = 𝑧 → (∃𝑥 ∈ 𝐴 𝜑 ↔ ∃𝑥 ∈ 𝐴 [𝑧 / 𝑦]𝜑))
4945, 47, 48cbvralw 3305 . . . . 5 (∀𝑦 ∈ ran 𝑓∃𝑥 ∈ 𝐴 𝜑 ↔ ∀𝑧 ∈ ran 𝑓∃𝑥 ∈ 𝐴 [𝑧 / 𝑦]𝜑)
5044, 49sylibr 237 . . . 4 (((𝐴 ∈ Fin ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝐵 𝜑) ∧ (𝑓:𝐴⟶𝐵 ∧ ∀𝑥 ∈ 𝐴 [(𝑓‘𝑥) / 𝑦]𝜑)) → ∀𝑦 ∈ ran 𝑓∃𝑥 ∈ 𝐴 𝜑)
51 sseq1 3956 . . . . . 6 (𝑐 = ran 𝑓 → (𝑐 ⊆ 𝐵 ↔ ran 𝑓 ⊆ 𝐵))
52 rexeq 3316 . . . . . . 7 (𝑐 = ran 𝑓 → (∃𝑦 ∈ 𝑐 𝜑 ↔ ∃𝑦 ∈ ran 𝑓𝜑))
5352ralbidv 3186 . . . . . 6 (𝑐 = ran 𝑓 → (∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝑐 𝜑 ↔ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ ran 𝑓𝜑))
54 raleq 3317 . . . . . 6 (𝑐 = ran 𝑓 → (∀𝑦 ∈ 𝑐 ∃𝑥 ∈ 𝐴 𝜑 ↔ ∀𝑦 ∈ ran 𝑓∃𝑥 ∈ 𝐴 𝜑))
5551, 53, 543anbi123d 1464 . . . . 5 (𝑐 = ran 𝑓 → ((𝑐 ⊆ 𝐵 ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝑐 𝜑 ∧ ∀𝑦 ∈ 𝑐 ∃𝑥 ∈ 𝐴 𝜑) ↔ (ran 𝑓 ⊆ 𝐵 ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ ran 𝑓𝜑 ∧ ∀𝑦 ∈ ran 𝑓∃𝑥 ∈ 𝐴 𝜑)))
5655rspcev 3577 . . . 4 ((ran 𝑓 ∈ Fin ∧ (ran 𝑓 ⊆ 𝐵 ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ ran 𝑓𝜑 ∧ ∀𝑦 ∈ ran 𝑓∃𝑥 ∈ 𝐴 𝜑)) → ∃𝑐 ∈ Fin (𝑐 ⊆ 𝐵 ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝑐 𝜑 ∧ ∀𝑦 ∈ 𝑐 ∃𝑥 ∈ 𝐴 𝜑))
5715, 17, 25, 50, 56syl13anc 1399 . . 3 (((𝐴 ∈ Fin ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝐵 𝜑) ∧ (𝑓:𝐴⟶𝐵 ∧ ∀𝑥 ∈ 𝐴 [(𝑓‘𝑥) / 𝑦]𝜑)) → ∃𝑐 ∈ Fin (𝑐 ⊆ 𝐵 ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝑐 𝜑 ∧ ∀𝑦 ∈ 𝑐 ∃𝑥 ∈ 𝐴 𝜑))
588, 57exlimddv 1968 . 2 ((𝐴 ∈ Fin ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝐵 𝜑) → ∃𝑐 ∈ Fin (𝑐 ⊆ 𝐵 ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝑐 𝜑 ∧ ∀𝑦 ∈ 𝑐 ∃𝑥 ∈ 𝐴 𝜑))
59583adant2 1149 1 ((𝐴 ∈ Fin ∧ 𝐵 ∈ 𝑀 ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝐵 𝜑) → ∃𝑐 ∈ Fin (𝑐 ⊆ 𝐵 ∧ ∀𝑥 ∈ 𝐴 ∃𝑦 ∈ 𝑐 𝜑 ∧ ∀𝑦 ∈ 𝑐 ∃𝑥 ∈ 𝐴 𝜑))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:   → wi 4   ↔ wb 209   ∧ wa 401   ∧ w3a 1103   = wceq 1570  ∃wex 1812   ∈ wcel 2145  ∀wral 3077  ∃wrex 3087  [wsbc 3739   ⊆ wss 3899  ran crn 5652   Fn wfn 6526  ⟶wf 6527  –onto→wfo 6529  ‘cfv 6531  Fincfn 8957
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1828  ax-4 1842  ax-5 1943  ax-6 2000  ax-7 2041  ax-8 2147  ax-9 2155  ax-10 2178  ax-11 2194  ax-12 2213  ax-ext 2733  ax-sep 5249  ax-nul 5260  ax-pr 5391  ax-un 7740
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3or 1104  df-3an 1105  df-tru 1573  df-fal 1583  df-ex 1813  df-nf 1817  df-sb 2100  df-mo 2565  df-eu 2595  df-clab 2740  df-cleq 2753  df-clel 2836  df-nfc 2910  df-ne 2957  df-ral 3078  df-rex 3088  df-reu 3367  df-rab 3414  df-v 3453  df-sbc 3740  df-dif 3902  df-un 3904  df-in 3906  df-ss 3916  df-pss 3919  df-nul 4280  df-if 4483  df-pw 4559  df-sn 4585  df-pr 4587  df-op 4591  df-uni 4868  df-br 5104  df-opab 5168  df-mpt 5187  df-tr 5213  df-id 5546  df-eprel 5551  df-po 5559  df-so 5560  df-fr 5604  df-we 5606  df-xp 5657  df-rel 5658  df-cnv 5659  df-co 5660  df-dm 5661  df-rn 5662  df-res 5663  df-ima 5664  df-ord 6358  df-on 6359  df-lim 6360  df-suc 6361  df-iota 6487  df-fun 6533  df-fn 6534  df-f 6535  df-f1 6536  df-fo 6537  df-f1o 6538  df-fv 6539  df-om 7867  df-1o 8460  df-en 8958  df-dom 8959  df-fin 8961
This theorem is used by:  filbcmb  38642
  Copyright terms: Public domain W3C validator