Metamath Proof Explorer


Theorem ffnfv

Description: A function maps to a class to which all values belong. (Contributed by NM, 3-Dec-2003)

Ref Expression
Assertion ffnfv ( 𝐹 : 𝐴𝐵 ↔ ( 𝐹 Fn 𝐴 ∧ ∀ 𝑥𝐴 ( 𝐹𝑥 ) ∈ 𝐵 ) )

Proof

Step Hyp Ref Expression
1 ffn ( 𝐹 : 𝐴𝐵𝐹 Fn 𝐴 )
2 ffvelrn ( ( 𝐹 : 𝐴𝐵𝑥𝐴 ) → ( 𝐹𝑥 ) ∈ 𝐵 )
3 2 ralrimiva ( 𝐹 : 𝐴𝐵 → ∀ 𝑥𝐴 ( 𝐹𝑥 ) ∈ 𝐵 )
4 1 3 jca ( 𝐹 : 𝐴𝐵 → ( 𝐹 Fn 𝐴 ∧ ∀ 𝑥𝐴 ( 𝐹𝑥 ) ∈ 𝐵 ) )
5 simpl ( ( 𝐹 Fn 𝐴 ∧ ∀ 𝑥𝐴 ( 𝐹𝑥 ) ∈ 𝐵 ) → 𝐹 Fn 𝐴 )
6 fvelrnb ( 𝐹 Fn 𝐴 → ( 𝑦 ∈ ran 𝐹 ↔ ∃ 𝑥𝐴 ( 𝐹𝑥 ) = 𝑦 ) )
7 6 biimpd ( 𝐹 Fn 𝐴 → ( 𝑦 ∈ ran 𝐹 → ∃ 𝑥𝐴 ( 𝐹𝑥 ) = 𝑦 ) )
8 nfra1 𝑥𝑥𝐴 ( 𝐹𝑥 ) ∈ 𝐵
9 nfv 𝑥 𝑦𝐵
10 rsp ( ∀ 𝑥𝐴 ( 𝐹𝑥 ) ∈ 𝐵 → ( 𝑥𝐴 → ( 𝐹𝑥 ) ∈ 𝐵 ) )
11 eleq1 ( ( 𝐹𝑥 ) = 𝑦 → ( ( 𝐹𝑥 ) ∈ 𝐵𝑦𝐵 ) )
12 11 biimpcd ( ( 𝐹𝑥 ) ∈ 𝐵 → ( ( 𝐹𝑥 ) = 𝑦𝑦𝐵 ) )
13 10 12 syl6 ( ∀ 𝑥𝐴 ( 𝐹𝑥 ) ∈ 𝐵 → ( 𝑥𝐴 → ( ( 𝐹𝑥 ) = 𝑦𝑦𝐵 ) ) )
14 8 9 13 rexlimd ( ∀ 𝑥𝐴 ( 𝐹𝑥 ) ∈ 𝐵 → ( ∃ 𝑥𝐴 ( 𝐹𝑥 ) = 𝑦𝑦𝐵 ) )
15 7 14 sylan9 ( ( 𝐹 Fn 𝐴 ∧ ∀ 𝑥𝐴 ( 𝐹𝑥 ) ∈ 𝐵 ) → ( 𝑦 ∈ ran 𝐹𝑦𝐵 ) )
16 15 ssrdv ( ( 𝐹 Fn 𝐴 ∧ ∀ 𝑥𝐴 ( 𝐹𝑥 ) ∈ 𝐵 ) → ran 𝐹𝐵 )
17 df-f ( 𝐹 : 𝐴𝐵 ↔ ( 𝐹 Fn 𝐴 ∧ ran 𝐹𝐵 ) )
18 5 16 17 sylanbrc ( ( 𝐹 Fn 𝐴 ∧ ∀ 𝑥𝐴 ( 𝐹𝑥 ) ∈ 𝐵 ) → 𝐹 : 𝐴𝐵 )
19 4 18 impbii ( 𝐹 : 𝐴𝐵 ↔ ( 𝐹 Fn 𝐴 ∧ ∀ 𝑥𝐴 ( 𝐹𝑥 ) ∈ 𝐵 ) )