Metamath Proof Explorer


Theorem marypha1

Description: (Philip) Hall's marriage theorem, sufficiency: a finite relation contains an injection if there is no subset of its domain which would be forced to violate the pigeonhole principle. (Contributed by Stefan O'Rear, 20-Feb-2015)

Ref Expression
Hypotheses marypha1.a φAFin
marypha1.b φBFin
marypha1.c φCA×B
marypha1.d φdAdCd
Assertion marypha1 φf𝒫Cf:A1-1B

Proof

Step Hyp Ref Expression
1 marypha1.a φAFin
2 marypha1.b φBFin
3 marypha1.c φCA×B
4 marypha1.d φdAdCd
5 elpwi d𝒫AdA
6 5 4 sylan2 φd𝒫AdCd
7 6 ralrimiva φd𝒫AdCd
8 imaeq1 c=Ccd=Cd
9 8 breq2d c=CdcddCd
10 9 ralbidv c=Cd𝒫Adcdd𝒫AdCd
11 pweq c=C𝒫c=𝒫C
12 11 rexeqdv c=Cf𝒫cf:A1-1Vf𝒫Cf:A1-1V
13 10 12 imbi12d c=Cd𝒫Adcdf𝒫cf:A1-1Vd𝒫AdCdf𝒫Cf:A1-1V
14 xpeq2 b=BA×b=A×B
15 14 pweqd b=B𝒫A×b=𝒫A×B
16 15 raleqdv b=Bc𝒫A×bd𝒫Adcdf𝒫cf:A1-1Vc𝒫A×Bd𝒫Adcdf𝒫cf:A1-1V
17 16 imbi2d b=BAFinc𝒫A×bd𝒫Adcdf𝒫cf:A1-1VAFinc𝒫A×Bd𝒫Adcdf𝒫cf:A1-1V
18 marypha1lem AFinbFinc𝒫A×bd𝒫Adcdf𝒫cf:A1-1V
19 18 com12 bFinAFinc𝒫A×bd𝒫Adcdf𝒫cf:A1-1V
20 17 19 vtoclga BFinAFinc𝒫A×Bd𝒫Adcdf𝒫cf:A1-1V
21 2 1 20 sylc φc𝒫A×Bd𝒫Adcdf𝒫cf:A1-1V
22 1 2 xpexd φA×BV
23 22 3 sselpwd φC𝒫A×B
24 13 21 23 rspcdva φd𝒫AdCdf𝒫Cf:A1-1V
25 7 24 mpd φf𝒫Cf:A1-1V
26 elpwi f𝒫CfC
27 26 3 sylan9ssr φf𝒫CfA×B
28 rnss fA×BranfranA×B
29 27 28 syl φf𝒫CranfranA×B
30 rnxpss ranA×BB
31 29 30 sstrdi φf𝒫CranfB
32 f1ssr f:A1-1VranfBf:A1-1B
33 32 expcom ranfBf:A1-1Vf:A1-1B
34 31 33 syl φf𝒫Cf:A1-1Vf:A1-1B
35 34 reximdva φf𝒫Cf:A1-1Vf𝒫Cf:A1-1B
36 25 35 mpd φf𝒫Cf:A1-1B