Metamath Proof Explorer


Theorem funtpg

Description: A set of three pairs is a function if their first members are different. (Contributed by Alexander van der Vekens, 5-Dec-2017) (Proof shortened by JJ, 14-Jul-2021)

Ref Expression
Assertion funtpg ( ( ( 𝑋𝑈𝑌𝑉𝑍𝑊 ) ∧ ( 𝐴𝐹𝐵𝐺𝐶𝐻 ) ∧ ( 𝑋𝑌𝑋𝑍𝑌𝑍 ) ) → Fun { ⟨ 𝑋 , 𝐴 ⟩ , ⟨ 𝑌 , 𝐵 ⟩ , ⟨ 𝑍 , 𝐶 ⟩ } )

Proof

Step Hyp Ref Expression
1 3simpa ( ( 𝑋𝑈𝑌𝑉𝑍𝑊 ) → ( 𝑋𝑈𝑌𝑉 ) )
2 3simpa ( ( 𝐴𝐹𝐵𝐺𝐶𝐻 ) → ( 𝐴𝐹𝐵𝐺 ) )
3 simp1 ( ( 𝑋𝑌𝑋𝑍𝑌𝑍 ) → 𝑋𝑌 )
4 funprg ( ( ( 𝑋𝑈𝑌𝑉 ) ∧ ( 𝐴𝐹𝐵𝐺 ) ∧ 𝑋𝑌 ) → Fun { ⟨ 𝑋 , 𝐴 ⟩ , ⟨ 𝑌 , 𝐵 ⟩ } )
5 1 2 3 4 syl3an ( ( ( 𝑋𝑈𝑌𝑉𝑍𝑊 ) ∧ ( 𝐴𝐹𝐵𝐺𝐶𝐻 ) ∧ ( 𝑋𝑌𝑋𝑍𝑌𝑍 ) ) → Fun { ⟨ 𝑋 , 𝐴 ⟩ , ⟨ 𝑌 , 𝐵 ⟩ } )
6 simp3 ( ( 𝑋𝑈𝑌𝑉𝑍𝑊 ) → 𝑍𝑊 )
7 simp3 ( ( 𝐴𝐹𝐵𝐺𝐶𝐻 ) → 𝐶𝐻 )
8 funsng ( ( 𝑍𝑊𝐶𝐻 ) → Fun { ⟨ 𝑍 , 𝐶 ⟩ } )
9 6 7 8 syl2an ( ( ( 𝑋𝑈𝑌𝑉𝑍𝑊 ) ∧ ( 𝐴𝐹𝐵𝐺𝐶𝐻 ) ) → Fun { ⟨ 𝑍 , 𝐶 ⟩ } )
10 9 3adant3 ( ( ( 𝑋𝑈𝑌𝑉𝑍𝑊 ) ∧ ( 𝐴𝐹𝐵𝐺𝐶𝐻 ) ∧ ( 𝑋𝑌𝑋𝑍𝑌𝑍 ) ) → Fun { ⟨ 𝑍 , 𝐶 ⟩ } )
11 dmpropg ( ( 𝐴𝐹𝐵𝐺 ) → dom { ⟨ 𝑋 , 𝐴 ⟩ , ⟨ 𝑌 , 𝐵 ⟩ } = { 𝑋 , 𝑌 } )
12 dmsnopg ( 𝐶𝐻 → dom { ⟨ 𝑍 , 𝐶 ⟩ } = { 𝑍 } )
13 11 12 ineqan12d ( ( ( 𝐴𝐹𝐵𝐺 ) ∧ 𝐶𝐻 ) → ( dom { ⟨ 𝑋 , 𝐴 ⟩ , ⟨ 𝑌 , 𝐵 ⟩ } ∩ dom { ⟨ 𝑍 , 𝐶 ⟩ } ) = ( { 𝑋 , 𝑌 } ∩ { 𝑍 } ) )
14 13 3impa ( ( 𝐴𝐹𝐵𝐺𝐶𝐻 ) → ( dom { ⟨ 𝑋 , 𝐴 ⟩ , ⟨ 𝑌 , 𝐵 ⟩ } ∩ dom { ⟨ 𝑍 , 𝐶 ⟩ } ) = ( { 𝑋 , 𝑌 } ∩ { 𝑍 } ) )
15 disjprsn ( ( 𝑋𝑍𝑌𝑍 ) → ( { 𝑋 , 𝑌 } ∩ { 𝑍 } ) = ∅ )
16 15 3adant1 ( ( 𝑋𝑌𝑋𝑍𝑌𝑍 ) → ( { 𝑋 , 𝑌 } ∩ { 𝑍 } ) = ∅ )
17 14 16 sylan9eq ( ( ( 𝐴𝐹𝐵𝐺𝐶𝐻 ) ∧ ( 𝑋𝑌𝑋𝑍𝑌𝑍 ) ) → ( dom { ⟨ 𝑋 , 𝐴 ⟩ , ⟨ 𝑌 , 𝐵 ⟩ } ∩ dom { ⟨ 𝑍 , 𝐶 ⟩ } ) = ∅ )
18 17 3adant1 ( ( ( 𝑋𝑈𝑌𝑉𝑍𝑊 ) ∧ ( 𝐴𝐹𝐵𝐺𝐶𝐻 ) ∧ ( 𝑋𝑌𝑋𝑍𝑌𝑍 ) ) → ( dom { ⟨ 𝑋 , 𝐴 ⟩ , ⟨ 𝑌 , 𝐵 ⟩ } ∩ dom { ⟨ 𝑍 , 𝐶 ⟩ } ) = ∅ )
19 funun ( ( ( Fun { ⟨ 𝑋 , 𝐴 ⟩ , ⟨ 𝑌 , 𝐵 ⟩ } ∧ Fun { ⟨ 𝑍 , 𝐶 ⟩ } ) ∧ ( dom { ⟨ 𝑋 , 𝐴 ⟩ , ⟨ 𝑌 , 𝐵 ⟩ } ∩ dom { ⟨ 𝑍 , 𝐶 ⟩ } ) = ∅ ) → Fun ( { ⟨ 𝑋 , 𝐴 ⟩ , ⟨ 𝑌 , 𝐵 ⟩ } ∪ { ⟨ 𝑍 , 𝐶 ⟩ } ) )
20 5 10 18 19 syl21anc ( ( ( 𝑋𝑈𝑌𝑉𝑍𝑊 ) ∧ ( 𝐴𝐹𝐵𝐺𝐶𝐻 ) ∧ ( 𝑋𝑌𝑋𝑍𝑌𝑍 ) ) → Fun ( { ⟨ 𝑋 , 𝐴 ⟩ , ⟨ 𝑌 , 𝐵 ⟩ } ∪ { ⟨ 𝑍 , 𝐶 ⟩ } ) )
21 df-tp { ⟨ 𝑋 , 𝐴 ⟩ , ⟨ 𝑌 , 𝐵 ⟩ , ⟨ 𝑍 , 𝐶 ⟩ } = ( { ⟨ 𝑋 , 𝐴 ⟩ , ⟨ 𝑌 , 𝐵 ⟩ } ∪ { ⟨ 𝑍 , 𝐶 ⟩ } )
22 21 funeqi ( Fun { ⟨ 𝑋 , 𝐴 ⟩ , ⟨ 𝑌 , 𝐵 ⟩ , ⟨ 𝑍 , 𝐶 ⟩ } ↔ Fun ( { ⟨ 𝑋 , 𝐴 ⟩ , ⟨ 𝑌 , 𝐵 ⟩ } ∪ { ⟨ 𝑍 , 𝐶 ⟩ } ) )
23 20 22 sylibr ( ( ( 𝑋𝑈𝑌𝑉𝑍𝑊 ) ∧ ( 𝐴𝐹𝐵𝐺𝐶𝐻 ) ∧ ( 𝑋𝑌𝑋𝑍𝑌𝑍 ) ) → Fun { ⟨ 𝑋 , 𝐴 ⟩ , ⟨ 𝑌 , 𝐵 ⟩ , ⟨ 𝑍 , 𝐶 ⟩ } )