Metamath Proof Explorer


Theorem fsetexb

Description: The class of all functions from a class A into a class B is a set iff B is a set or A is not a set or A is empty. (Contributed by AV, 15-Sep-2024)

Ref Expression
Assertion fsetexb ( { 𝑓𝑓 : 𝐴𝐵 } ∈ V ↔ ( 𝐴 ∉ V ∨ 𝐴 = ∅ ∨ 𝐵 ∈ V ) )

Proof

Step Hyp Ref Expression
1 ioran ( ¬ ( ( 𝐴 ∉ V ∨ 𝐴 = ∅ ) ∨ 𝐵 ∈ V ) ↔ ( ¬ ( 𝐴 ∉ V ∨ 𝐴 = ∅ ) ∧ ¬ 𝐵 ∈ V ) )
2 df-nel ( 𝐵 ∉ V ↔ ¬ 𝐵 ∈ V )
3 ioran ( ¬ ( 𝐴 ∉ V ∨ 𝐴 = ∅ ) ↔ ( ¬ 𝐴 ∉ V ∧ ¬ 𝐴 = ∅ ) )
4 nnel ( ¬ 𝐴 ∉ V ↔ 𝐴 ∈ V )
5 df-ne ( 𝐴 ≠ ∅ ↔ ¬ 𝐴 = ∅ )
6 5 bicomi ( ¬ 𝐴 = ∅ ↔ 𝐴 ≠ ∅ )
7 4 6 anbi12i ( ( ¬ 𝐴 ∉ V ∧ ¬ 𝐴 = ∅ ) ↔ ( 𝐴 ∈ V ∧ 𝐴 ≠ ∅ ) )
8 3 7 bitri ( ¬ ( 𝐴 ∉ V ∨ 𝐴 = ∅ ) ↔ ( 𝐴 ∈ V ∧ 𝐴 ≠ ∅ ) )
9 fsetprcnex ( ( ( 𝐴 ∈ V ∧ 𝐴 ≠ ∅ ) ∧ 𝐵 ∉ V ) → { 𝑓𝑓 : 𝐴𝐵 } ∉ V )
10 9 ex ( ( 𝐴 ∈ V ∧ 𝐴 ≠ ∅ ) → ( 𝐵 ∉ V → { 𝑓𝑓 : 𝐴𝐵 } ∉ V ) )
11 8 10 sylbi ( ¬ ( 𝐴 ∉ V ∨ 𝐴 = ∅ ) → ( 𝐵 ∉ V → { 𝑓𝑓 : 𝐴𝐵 } ∉ V ) )
12 2 11 syl5bir ( ¬ ( 𝐴 ∉ V ∨ 𝐴 = ∅ ) → ( ¬ 𝐵 ∈ V → { 𝑓𝑓 : 𝐴𝐵 } ∉ V ) )
13 12 imp ( ( ¬ ( 𝐴 ∉ V ∨ 𝐴 = ∅ ) ∧ ¬ 𝐵 ∈ V ) → { 𝑓𝑓 : 𝐴𝐵 } ∉ V )
14 1 13 sylbi ( ¬ ( ( 𝐴 ∉ V ∨ 𝐴 = ∅ ) ∨ 𝐵 ∈ V ) → { 𝑓𝑓 : 𝐴𝐵 } ∉ V )
15 df-nel ( { 𝑓𝑓 : 𝐴𝐵 } ∉ V ↔ ¬ { 𝑓𝑓 : 𝐴𝐵 } ∈ V )
16 14 15 sylib ( ¬ ( ( 𝐴 ∉ V ∨ 𝐴 = ∅ ) ∨ 𝐵 ∈ V ) → ¬ { 𝑓𝑓 : 𝐴𝐵 } ∈ V )
17 16 con4i ( { 𝑓𝑓 : 𝐴𝐵 } ∈ V → ( ( 𝐴 ∉ V ∨ 𝐴 = ∅ ) ∨ 𝐵 ∈ V ) )
18 df-3or ( ( 𝐴 ∉ V ∨ 𝐴 = ∅ ∨ 𝐵 ∈ V ) ↔ ( ( 𝐴 ∉ V ∨ 𝐴 = ∅ ) ∨ 𝐵 ∈ V ) )
19 17 18 sylibr ( { 𝑓𝑓 : 𝐴𝐵 } ∈ V → ( 𝐴 ∉ V ∨ 𝐴 = ∅ ∨ 𝐵 ∈ V ) )
20 fsetdmprc0 ( 𝐴 ∉ V → { 𝑓𝑓 Fn 𝐴 } = ∅ )
21 ffn ( 𝑓 : 𝐴𝐵𝑓 Fn 𝐴 )
22 21 ss2abi { 𝑓𝑓 : 𝐴𝐵 } ⊆ { 𝑓𝑓 Fn 𝐴 }
23 sseq0 ( ( { 𝑓𝑓 : 𝐴𝐵 } ⊆ { 𝑓𝑓 Fn 𝐴 } ∧ { 𝑓𝑓 Fn 𝐴 } = ∅ ) → { 𝑓𝑓 : 𝐴𝐵 } = ∅ )
24 22 23 mpan ( { 𝑓𝑓 Fn 𝐴 } = ∅ → { 𝑓𝑓 : 𝐴𝐵 } = ∅ )
25 0ex ∅ ∈ V
26 24 25 eqeltrdi ( { 𝑓𝑓 Fn 𝐴 } = ∅ → { 𝑓𝑓 : 𝐴𝐵 } ∈ V )
27 20 26 syl ( 𝐴 ∉ V → { 𝑓𝑓 : 𝐴𝐵 } ∈ V )
28 feq2 ( 𝐴 = ∅ → ( 𝑓 : 𝐴𝐵𝑓 : ∅ ⟶ 𝐵 ) )
29 28 abbidv ( 𝐴 = ∅ → { 𝑓𝑓 : 𝐴𝐵 } = { 𝑓𝑓 : ∅ ⟶ 𝐵 } )
30 fset0 { 𝑓𝑓 : ∅ ⟶ 𝐵 } = { ∅ }
31 29 30 eqtrdi ( 𝐴 = ∅ → { 𝑓𝑓 : 𝐴𝐵 } = { ∅ } )
32 p0ex { ∅ } ∈ V
33 31 32 eqeltrdi ( 𝐴 = ∅ → { 𝑓𝑓 : 𝐴𝐵 } ∈ V )
34 fsetex ( 𝐵 ∈ V → { 𝑓𝑓 : 𝐴𝐵 } ∈ V )
35 27 33 34 3jaoi ( ( 𝐴 ∉ V ∨ 𝐴 = ∅ ∨ 𝐵 ∈ V ) → { 𝑓𝑓 : 𝐴𝐵 } ∈ V )
36 19 35 impbii ( { 𝑓𝑓 : 𝐴𝐵 } ∈ V ↔ ( 𝐴 ∉ V ∨ 𝐴 = ∅ ∨ 𝐵 ∈ V ) )