Metamath Proof Explorer


Theorem map0cor

Description: A function exists iff an empty codomain is accompanied with an empty domain. (Contributed by Zhi Wang, 1-Oct-2024)

Ref Expression
Hypotheses map0cor.1 ( 𝜑𝐴𝑉 )
map0cor.2 ( 𝜑𝐵𝑊 )
Assertion map0cor ( 𝜑 → ( ( 𝐵 = ∅ → 𝐴 = ∅ ) ↔ ∃ 𝑓 𝑓 : 𝐴𝐵 ) )

Proof

Step Hyp Ref Expression
1 map0cor.1 ( 𝜑𝐴𝑉 )
2 map0cor.2 ( 𝜑𝐵𝑊 )
3 biid ( 𝐴 ≠ ∅ ↔ 𝐴 ≠ ∅ )
4 3 necon2bbii ( 𝐴 = ∅ ↔ ¬ 𝐴 ≠ ∅ )
5 4 imbi2i ( ( 𝐵 = ∅ → 𝐴 = ∅ ) ↔ ( 𝐵 = ∅ → ¬ 𝐴 ≠ ∅ ) )
6 imnan ( ( 𝐵 = ∅ → ¬ 𝐴 ≠ ∅ ) ↔ ¬ ( 𝐵 = ∅ ∧ 𝐴 ≠ ∅ ) )
7 5 6 bitri ( ( 𝐵 = ∅ → 𝐴 = ∅ ) ↔ ¬ ( 𝐵 = ∅ ∧ 𝐴 ≠ ∅ ) )
8 map0g ( ( 𝐵𝑊𝐴𝑉 ) → ( ( 𝐵m 𝐴 ) = ∅ ↔ ( 𝐵 = ∅ ∧ 𝐴 ≠ ∅ ) ) )
9 8 notbid ( ( 𝐵𝑊𝐴𝑉 ) → ( ¬ ( 𝐵m 𝐴 ) = ∅ ↔ ¬ ( 𝐵 = ∅ ∧ 𝐴 ≠ ∅ ) ) )
10 7 9 bitr4id ( ( 𝐵𝑊𝐴𝑉 ) → ( ( 𝐵 = ∅ → 𝐴 = ∅ ) ↔ ¬ ( 𝐵m 𝐴 ) = ∅ ) )
11 neq0 ( ¬ ( 𝐵m 𝐴 ) = ∅ ↔ ∃ 𝑓 𝑓 ∈ ( 𝐵m 𝐴 ) )
12 11 a1i ( ( 𝐵𝑊𝐴𝑉 ) → ( ¬ ( 𝐵m 𝐴 ) = ∅ ↔ ∃ 𝑓 𝑓 ∈ ( 𝐵m 𝐴 ) ) )
13 elmapg ( ( 𝐵𝑊𝐴𝑉 ) → ( 𝑓 ∈ ( 𝐵m 𝐴 ) ↔ 𝑓 : 𝐴𝐵 ) )
14 13 exbidv ( ( 𝐵𝑊𝐴𝑉 ) → ( ∃ 𝑓 𝑓 ∈ ( 𝐵m 𝐴 ) ↔ ∃ 𝑓 𝑓 : 𝐴𝐵 ) )
15 10 12 14 3bitrd ( ( 𝐵𝑊𝐴𝑉 ) → ( ( 𝐵 = ∅ → 𝐴 = ∅ ) ↔ ∃ 𝑓 𝑓 : 𝐴𝐵 ) )
16 2 1 15 syl2anc ( 𝜑 → ( ( 𝐵 = ∅ → 𝐴 = ∅ ) ↔ ∃ 𝑓 𝑓 : 𝐴𝐵 ) )