Metamath Proof Explorer


Theorem exfo

Description: A relation equivalent to the existence of an onto mapping. The right-hand f is not necessarily a function. (Contributed by NM, 20-Mar-2007)

Ref Expression
Assertion exfo ( ∃ 𝑓 𝑓 : 𝐴onto𝐵 ↔ ∃ 𝑓 ( ∀ 𝑥𝐴 ∃! 𝑦𝐵 𝑥 𝑓 𝑦 ∧ ∀ 𝑥𝐵𝑦𝐴 𝑦 𝑓 𝑥 ) )

Proof

Step Hyp Ref Expression
1 dffo4 ( 𝑓 : 𝐴onto𝐵 ↔ ( 𝑓 : 𝐴𝐵 ∧ ∀ 𝑥𝐵𝑦𝐴 𝑦 𝑓 𝑥 ) )
2 dff4 ( 𝑓 : 𝐴𝐵 ↔ ( 𝑓 ⊆ ( 𝐴 × 𝐵 ) ∧ ∀ 𝑥𝐴 ∃! 𝑦𝐵 𝑥 𝑓 𝑦 ) )
3 2 simprbi ( 𝑓 : 𝐴𝐵 → ∀ 𝑥𝐴 ∃! 𝑦𝐵 𝑥 𝑓 𝑦 )
4 3 anim1i ( ( 𝑓 : 𝐴𝐵 ∧ ∀ 𝑥𝐵𝑦𝐴 𝑦 𝑓 𝑥 ) → ( ∀ 𝑥𝐴 ∃! 𝑦𝐵 𝑥 𝑓 𝑦 ∧ ∀ 𝑥𝐵𝑦𝐴 𝑦 𝑓 𝑥 ) )
5 1 4 sylbi ( 𝑓 : 𝐴onto𝐵 → ( ∀ 𝑥𝐴 ∃! 𝑦𝐵 𝑥 𝑓 𝑦 ∧ ∀ 𝑥𝐵𝑦𝐴 𝑦 𝑓 𝑥 ) )
6 5 eximi ( ∃ 𝑓 𝑓 : 𝐴onto𝐵 → ∃ 𝑓 ( ∀ 𝑥𝐴 ∃! 𝑦𝐵 𝑥 𝑓 𝑦 ∧ ∀ 𝑥𝐵𝑦𝐴 𝑦 𝑓 𝑥 ) )
7 brinxp ( ( 𝑥𝐴𝑦𝐵 ) → ( 𝑥 𝑓 𝑦𝑥 ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) 𝑦 ) )
8 7 reubidva ( 𝑥𝐴 → ( ∃! 𝑦𝐵 𝑥 𝑓 𝑦 ↔ ∃! 𝑦𝐵 𝑥 ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) 𝑦 ) )
9 8 biimpd ( 𝑥𝐴 → ( ∃! 𝑦𝐵 𝑥 𝑓 𝑦 → ∃! 𝑦𝐵 𝑥 ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) 𝑦 ) )
10 9 ralimia ( ∀ 𝑥𝐴 ∃! 𝑦𝐵 𝑥 𝑓 𝑦 → ∀ 𝑥𝐴 ∃! 𝑦𝐵 𝑥 ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) 𝑦 )
11 inss2 ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) ⊆ ( 𝐴 × 𝐵 )
12 10 11 jctil ( ∀ 𝑥𝐴 ∃! 𝑦𝐵 𝑥 𝑓 𝑦 → ( ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) ⊆ ( 𝐴 × 𝐵 ) ∧ ∀ 𝑥𝐴 ∃! 𝑦𝐵 𝑥 ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) 𝑦 ) )
13 dff4 ( ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) : 𝐴𝐵 ↔ ( ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) ⊆ ( 𝐴 × 𝐵 ) ∧ ∀ 𝑥𝐴 ∃! 𝑦𝐵 𝑥 ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) 𝑦 ) )
14 12 13 sylibr ( ∀ 𝑥𝐴 ∃! 𝑦𝐵 𝑥 𝑓 𝑦 → ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) : 𝐴𝐵 )
15 rninxp ( ran ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) = 𝐵 ↔ ∀ 𝑥𝐵𝑦𝐴 𝑦 𝑓 𝑥 )
16 15 biimpri ( ∀ 𝑥𝐵𝑦𝐴 𝑦 𝑓 𝑥 → ran ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) = 𝐵 )
17 14 16 anim12i ( ( ∀ 𝑥𝐴 ∃! 𝑦𝐵 𝑥 𝑓 𝑦 ∧ ∀ 𝑥𝐵𝑦𝐴 𝑦 𝑓 𝑥 ) → ( ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) : 𝐴𝐵 ∧ ran ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) = 𝐵 ) )
18 dffo2 ( ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) : 𝐴onto𝐵 ↔ ( ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) : 𝐴𝐵 ∧ ran ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) = 𝐵 ) )
19 17 18 sylibr ( ( ∀ 𝑥𝐴 ∃! 𝑦𝐵 𝑥 𝑓 𝑦 ∧ ∀ 𝑥𝐵𝑦𝐴 𝑦 𝑓 𝑥 ) → ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) : 𝐴onto𝐵 )
20 vex 𝑓 ∈ V
21 20 inex1 ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) ∈ V
22 foeq1 ( 𝑔 = ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) → ( 𝑔 : 𝐴onto𝐵 ↔ ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) : 𝐴onto𝐵 ) )
23 21 22 spcev ( ( 𝑓 ∩ ( 𝐴 × 𝐵 ) ) : 𝐴onto𝐵 → ∃ 𝑔 𝑔 : 𝐴onto𝐵 )
24 19 23 syl ( ( ∀ 𝑥𝐴 ∃! 𝑦𝐵 𝑥 𝑓 𝑦 ∧ ∀ 𝑥𝐵𝑦𝐴 𝑦 𝑓 𝑥 ) → ∃ 𝑔 𝑔 : 𝐴onto𝐵 )
25 24 exlimiv ( ∃ 𝑓 ( ∀ 𝑥𝐴 ∃! 𝑦𝐵 𝑥 𝑓 𝑦 ∧ ∀ 𝑥𝐵𝑦𝐴 𝑦 𝑓 𝑥 ) → ∃ 𝑔 𝑔 : 𝐴onto𝐵 )
26 foeq1 ( 𝑔 = 𝑓 → ( 𝑔 : 𝐴onto𝐵𝑓 : 𝐴onto𝐵 ) )
27 26 cbvexvw ( ∃ 𝑔 𝑔 : 𝐴onto𝐵 ↔ ∃ 𝑓 𝑓 : 𝐴onto𝐵 )
28 25 27 sylib ( ∃ 𝑓 ( ∀ 𝑥𝐴 ∃! 𝑦𝐵 𝑥 𝑓 𝑦 ∧ ∀ 𝑥𝐵𝑦𝐴 𝑦 𝑓 𝑥 ) → ∃ 𝑓 𝑓 : 𝐴onto𝐵 )
29 6 28 impbii ( ∃ 𝑓 𝑓 : 𝐴onto𝐵 ↔ ∃ 𝑓 ( ∀ 𝑥𝐴 ∃! 𝑦𝐵 𝑥 𝑓 𝑦 ∧ ∀ 𝑥𝐵𝑦𝐴 𝑦 𝑓 𝑥 ) )