Metamath Proof Explorer


Theorem fompt

Description: Express being onto for a mapping operation. (Contributed by Glauco Siliprandi, 17-Aug-2020)

Ref Expression
Hypothesis fompt.1 𝐹 = ( 𝑥𝐴𝐶 )
Assertion fompt ( 𝐹 : 𝐴onto𝐵 ↔ ( ∀ 𝑥𝐴 𝐶𝐵 ∧ ∀ 𝑦𝐵𝑥𝐴 𝑦 = 𝐶 ) )

Proof

Step Hyp Ref Expression
1 fompt.1 𝐹 = ( 𝑥𝐴𝐶 )
2 nfmpt1 𝑥 ( 𝑥𝐴𝐶 )
3 1 2 nfcxfr 𝑥 𝐹
4 3 dffo3f ( 𝐹 : 𝐴onto𝐵 ↔ ( 𝐹 : 𝐴𝐵 ∧ ∀ 𝑦𝐵𝑥𝐴 𝑦 = ( 𝐹𝑥 ) ) )
5 4 simplbi ( 𝐹 : 𝐴onto𝐵𝐹 : 𝐴𝐵 )
6 1 fmpt ( ∀ 𝑥𝐴 𝐶𝐵𝐹 : 𝐴𝐵 )
7 6 bicomi ( 𝐹 : 𝐴𝐵 ↔ ∀ 𝑥𝐴 𝐶𝐵 )
8 7 biimpi ( 𝐹 : 𝐴𝐵 → ∀ 𝑥𝐴 𝐶𝐵 )
9 5 8 syl ( 𝐹 : 𝐴onto𝐵 → ∀ 𝑥𝐴 𝐶𝐵 )
10 3 foelrnf ( ( 𝐹 : 𝐴onto𝐵𝑦𝐵 ) → ∃ 𝑥𝐴 𝑦 = ( 𝐹𝑥 ) )
11 nfcv 𝑥 𝐴
12 nfcv 𝑥 𝐵
13 3 11 12 nffo 𝑥 𝐹 : 𝐴onto𝐵
14 simpr ( ( ( 𝐹 : 𝐴onto𝐵𝑥𝐴 ) ∧ 𝑦 = ( 𝐹𝑥 ) ) → 𝑦 = ( 𝐹𝑥 ) )
15 simpr ( ( 𝐹 : 𝐴onto𝐵𝑥𝐴 ) → 𝑥𝐴 )
16 9 r19.21bi ( ( 𝐹 : 𝐴onto𝐵𝑥𝐴 ) → 𝐶𝐵 )
17 1 fvmpt2 ( ( 𝑥𝐴𝐶𝐵 ) → ( 𝐹𝑥 ) = 𝐶 )
18 15 16 17 syl2anc ( ( 𝐹 : 𝐴onto𝐵𝑥𝐴 ) → ( 𝐹𝑥 ) = 𝐶 )
19 18 adantr ( ( ( 𝐹 : 𝐴onto𝐵𝑥𝐴 ) ∧ 𝑦 = ( 𝐹𝑥 ) ) → ( 𝐹𝑥 ) = 𝐶 )
20 14 19 eqtrd ( ( ( 𝐹 : 𝐴onto𝐵𝑥𝐴 ) ∧ 𝑦 = ( 𝐹𝑥 ) ) → 𝑦 = 𝐶 )
21 20 ex ( ( 𝐹 : 𝐴onto𝐵𝑥𝐴 ) → ( 𝑦 = ( 𝐹𝑥 ) → 𝑦 = 𝐶 ) )
22 21 ex ( 𝐹 : 𝐴onto𝐵 → ( 𝑥𝐴 → ( 𝑦 = ( 𝐹𝑥 ) → 𝑦 = 𝐶 ) ) )
23 13 22 reximdai ( 𝐹 : 𝐴onto𝐵 → ( ∃ 𝑥𝐴 𝑦 = ( 𝐹𝑥 ) → ∃ 𝑥𝐴 𝑦 = 𝐶 ) )
24 23 adantr ( ( 𝐹 : 𝐴onto𝐵𝑦𝐵 ) → ( ∃ 𝑥𝐴 𝑦 = ( 𝐹𝑥 ) → ∃ 𝑥𝐴 𝑦 = 𝐶 ) )
25 10 24 mpd ( ( 𝐹 : 𝐴onto𝐵𝑦𝐵 ) → ∃ 𝑥𝐴 𝑦 = 𝐶 )
26 25 ralrimiva ( 𝐹 : 𝐴onto𝐵 → ∀ 𝑦𝐵𝑥𝐴 𝑦 = 𝐶 )
27 9 26 jca ( 𝐹 : 𝐴onto𝐵 → ( ∀ 𝑥𝐴 𝐶𝐵 ∧ ∀ 𝑦𝐵𝑥𝐴 𝑦 = 𝐶 ) )
28 6 biimpi ( ∀ 𝑥𝐴 𝐶𝐵𝐹 : 𝐴𝐵 )
29 28 adantr ( ( ∀ 𝑥𝐴 𝐶𝐵 ∧ ∀ 𝑦𝐵𝑥𝐴 𝑦 = 𝐶 ) → 𝐹 : 𝐴𝐵 )
30 nfv 𝑦𝑥𝐴 𝐶𝐵
31 nfra1 𝑦𝑦𝐵𝑥𝐴 𝑦 = 𝐶
32 30 31 nfan 𝑦 ( ∀ 𝑥𝐴 𝐶𝐵 ∧ ∀ 𝑦𝐵𝑥𝐴 𝑦 = 𝐶 )
33 simpll ( ( ( ∀ 𝑥𝐴 𝐶𝐵 ∧ ∀ 𝑦𝐵𝑥𝐴 𝑦 = 𝐶 ) ∧ 𝑦𝐵 ) → ∀ 𝑥𝐴 𝐶𝐵 )
34 rspa ( ( ∀ 𝑦𝐵𝑥𝐴 𝑦 = 𝐶𝑦𝐵 ) → ∃ 𝑥𝐴 𝑦 = 𝐶 )
35 34 adantll ( ( ( ∀ 𝑥𝐴 𝐶𝐵 ∧ ∀ 𝑦𝐵𝑥𝐴 𝑦 = 𝐶 ) ∧ 𝑦𝐵 ) → ∃ 𝑥𝐴 𝑦 = 𝐶 )
36 nfra1 𝑥𝑥𝐴 𝐶𝐵
37 simp3 ( ( ∀ 𝑥𝐴 𝐶𝐵𝑥𝐴𝑦 = 𝐶 ) → 𝑦 = 𝐶 )
38 simpr ( ( ∀ 𝑥𝐴 𝐶𝐵𝑥𝐴 ) → 𝑥𝐴 )
39 rspa ( ( ∀ 𝑥𝐴 𝐶𝐵𝑥𝐴 ) → 𝐶𝐵 )
40 38 39 17 syl2anc ( ( ∀ 𝑥𝐴 𝐶𝐵𝑥𝐴 ) → ( 𝐹𝑥 ) = 𝐶 )
41 40 eqcomd ( ( ∀ 𝑥𝐴 𝐶𝐵𝑥𝐴 ) → 𝐶 = ( 𝐹𝑥 ) )
42 41 3adant3 ( ( ∀ 𝑥𝐴 𝐶𝐵𝑥𝐴𝑦 = 𝐶 ) → 𝐶 = ( 𝐹𝑥 ) )
43 37 42 eqtrd ( ( ∀ 𝑥𝐴 𝐶𝐵𝑥𝐴𝑦 = 𝐶 ) → 𝑦 = ( 𝐹𝑥 ) )
44 43 3exp ( ∀ 𝑥𝐴 𝐶𝐵 → ( 𝑥𝐴 → ( 𝑦 = 𝐶𝑦 = ( 𝐹𝑥 ) ) ) )
45 36 44 reximdai ( ∀ 𝑥𝐴 𝐶𝐵 → ( ∃ 𝑥𝐴 𝑦 = 𝐶 → ∃ 𝑥𝐴 𝑦 = ( 𝐹𝑥 ) ) )
46 45 imp ( ( ∀ 𝑥𝐴 𝐶𝐵 ∧ ∃ 𝑥𝐴 𝑦 = 𝐶 ) → ∃ 𝑥𝐴 𝑦 = ( 𝐹𝑥 ) )
47 33 35 46 syl2anc ( ( ( ∀ 𝑥𝐴 𝐶𝐵 ∧ ∀ 𝑦𝐵𝑥𝐴 𝑦 = 𝐶 ) ∧ 𝑦𝐵 ) → ∃ 𝑥𝐴 𝑦 = ( 𝐹𝑥 ) )
48 47 ex ( ( ∀ 𝑥𝐴 𝐶𝐵 ∧ ∀ 𝑦𝐵𝑥𝐴 𝑦 = 𝐶 ) → ( 𝑦𝐵 → ∃ 𝑥𝐴 𝑦 = ( 𝐹𝑥 ) ) )
49 32 48 ralrimi ( ( ∀ 𝑥𝐴 𝐶𝐵 ∧ ∀ 𝑦𝐵𝑥𝐴 𝑦 = 𝐶 ) → ∀ 𝑦𝐵𝑥𝐴 𝑦 = ( 𝐹𝑥 ) )
50 29 49 jca ( ( ∀ 𝑥𝐴 𝐶𝐵 ∧ ∀ 𝑦𝐵𝑥𝐴 𝑦 = 𝐶 ) → ( 𝐹 : 𝐴𝐵 ∧ ∀ 𝑦𝐵𝑥𝐴 𝑦 = ( 𝐹𝑥 ) ) )
51 50 4 sylibr ( ( ∀ 𝑥𝐴 𝐶𝐵 ∧ ∀ 𝑦𝐵𝑥𝐴 𝑦 = 𝐶 ) → 𝐹 : 𝐴onto𝐵 )
52 27 51 impbii ( 𝐹 : 𝐴onto𝐵 ↔ ( ∀ 𝑥𝐴 𝐶𝐵 ∧ ∀ 𝑦𝐵𝑥𝐴 𝑦 = 𝐶 ) )