Metamath Proof Explorer


Theorem ifpprsnss

Description: An unordered pair is a singleton or a subset of itself. This theorem is helpful to convert theorems about walks in arbitrary graphs into theorems about walks in pseudographs. (Contributed by AV, 27-Feb-2021)

Ref Expression
Assertion ifpprsnss ( 𝑃 = { 𝐴 , 𝐵 } → if- ( 𝐴 = 𝐵 , 𝑃 = { 𝐴 } , { 𝐴 , 𝐵 } ⊆ 𝑃 ) )

Proof

Step Hyp Ref Expression
1 preq2 ( 𝐵 = 𝐴 → { 𝐴 , 𝐵 } = { 𝐴 , 𝐴 } )
2 dfsn2 { 𝐴 } = { 𝐴 , 𝐴 }
3 1 2 eqtr4di ( 𝐵 = 𝐴 → { 𝐴 , 𝐵 } = { 𝐴 } )
4 3 eqcoms ( 𝐴 = 𝐵 → { 𝐴 , 𝐵 } = { 𝐴 } )
5 4 eqeq2d ( 𝐴 = 𝐵 → ( 𝑃 = { 𝐴 , 𝐵 } ↔ 𝑃 = { 𝐴 } ) )
6 5 biimpac ( ( 𝑃 = { 𝐴 , 𝐵 } ∧ 𝐴 = 𝐵 ) → 𝑃 = { 𝐴 } )
7 eqimss2 ( 𝑃 = { 𝐴 , 𝐵 } → { 𝐴 , 𝐵 } ⊆ 𝑃 )
8 7 adantr ( ( 𝑃 = { 𝐴 , 𝐵 } ∧ ¬ 𝐴 = 𝐵 ) → { 𝐴 , 𝐵 } ⊆ 𝑃 )
9 6 8 ifpimpda ( 𝑃 = { 𝐴 , 𝐵 } → if- ( 𝐴 = 𝐵 , 𝑃 = { 𝐴 } , { 𝐴 , 𝐵 } ⊆ 𝑃 ) )