Metamath Proof Explorer


Theorem usgredg2vlem2

Description: Lemma 2 for usgredg2v . (Contributed by Alexander van der Vekens, 4-Jan-2018) (Revised by AV, 18-Oct-2020)

Ref Expression
Hypotheses usgredg2v.v 𝑉 = ( Vtx ‘ 𝐺 )
usgredg2v.e 𝐸 = ( iEdg ‘ 𝐺 )
usgredg2v.a 𝐴 = { 𝑥 ∈ dom 𝐸𝑁 ∈ ( 𝐸𝑥 ) }
Assertion usgredg2vlem2 ( ( 𝐺 ∈ USGraph ∧ 𝑌𝐴 ) → ( 𝐼 = ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) → ( 𝐸𝑌 ) = { 𝐼 , 𝑁 } ) )

Proof

Step Hyp Ref Expression
1 usgredg2v.v 𝑉 = ( Vtx ‘ 𝐺 )
2 usgredg2v.e 𝐸 = ( iEdg ‘ 𝐺 )
3 usgredg2v.a 𝐴 = { 𝑥 ∈ dom 𝐸𝑁 ∈ ( 𝐸𝑥 ) }
4 fveq2 ( 𝑥 = 𝑌 → ( 𝐸𝑥 ) = ( 𝐸𝑌 ) )
5 4 eleq2d ( 𝑥 = 𝑌 → ( 𝑁 ∈ ( 𝐸𝑥 ) ↔ 𝑁 ∈ ( 𝐸𝑌 ) ) )
6 5 3 elrab2 ( 𝑌𝐴 ↔ ( 𝑌 ∈ dom 𝐸𝑁 ∈ ( 𝐸𝑌 ) ) )
7 6 biimpi ( 𝑌𝐴 → ( 𝑌 ∈ dom 𝐸𝑁 ∈ ( 𝐸𝑌 ) ) )
8 1 2 usgredgreu ( ( 𝐺 ∈ USGraph ∧ 𝑌 ∈ dom 𝐸𝑁 ∈ ( 𝐸𝑌 ) ) → ∃! 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑁 , 𝑧 } )
9 8 3expb ( ( 𝐺 ∈ USGraph ∧ ( 𝑌 ∈ dom 𝐸𝑁 ∈ ( 𝐸𝑌 ) ) ) → ∃! 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑁 , 𝑧 } )
10 1 2 3 usgredg2vlem1 ( ( 𝐺 ∈ USGraph ∧ 𝑌𝐴 ) → ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) ∈ 𝑉 )
11 10 adantlr ( ( ( 𝐺 ∈ USGraph ∧ ( 𝑌 ∈ dom 𝐸𝑁 ∈ ( 𝐸𝑌 ) ) ) ∧ 𝑌𝐴 ) → ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) ∈ 𝑉 )
12 11 ad4ant23 ( ( ( ( ∃! 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑁 , 𝑧 } ∧ ( 𝐺 ∈ USGraph ∧ ( 𝑌 ∈ dom 𝐸𝑁 ∈ ( 𝐸𝑌 ) ) ) ) ∧ 𝑌𝐴 ) ∧ 𝐼 = ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) ) → ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) ∈ 𝑉 )
13 eleq1 ( 𝐼 = ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) → ( 𝐼𝑉 ↔ ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) ∈ 𝑉 ) )
14 13 adantl ( ( ( ( ∃! 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑁 , 𝑧 } ∧ ( 𝐺 ∈ USGraph ∧ ( 𝑌 ∈ dom 𝐸𝑁 ∈ ( 𝐸𝑌 ) ) ) ) ∧ 𝑌𝐴 ) ∧ 𝐼 = ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) ) → ( 𝐼𝑉 ↔ ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) ∈ 𝑉 ) )
15 12 14 mpbird ( ( ( ( ∃! 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑁 , 𝑧 } ∧ ( 𝐺 ∈ USGraph ∧ ( 𝑌 ∈ dom 𝐸𝑁 ∈ ( 𝐸𝑌 ) ) ) ) ∧ 𝑌𝐴 ) ∧ 𝐼 = ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) ) → 𝐼𝑉 )
16 prcom { 𝑁 , 𝑧 } = { 𝑧 , 𝑁 }
17 16 eqeq2i ( ( 𝐸𝑌 ) = { 𝑁 , 𝑧 } ↔ ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } )
18 17 reubii ( ∃! 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑁 , 𝑧 } ↔ ∃! 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } )
19 18 biimpi ( ∃! 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑁 , 𝑧 } → ∃! 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } )
20 19 ad3antrrr ( ( ( ( ∃! 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑁 , 𝑧 } ∧ ( 𝐺 ∈ USGraph ∧ ( 𝑌 ∈ dom 𝐸𝑁 ∈ ( 𝐸𝑌 ) ) ) ) ∧ 𝑌𝐴 ) ∧ 𝐼 = ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) ) → ∃! 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } )
21 preq1 ( 𝑧 = 𝐼 → { 𝑧 , 𝑁 } = { 𝐼 , 𝑁 } )
22 21 eqeq2d ( 𝑧 = 𝐼 → ( ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ↔ ( 𝐸𝑌 ) = { 𝐼 , 𝑁 } ) )
23 22 riota2 ( ( 𝐼𝑉 ∧ ∃! 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) → ( ( 𝐸𝑌 ) = { 𝐼 , 𝑁 } ↔ ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) = 𝐼 ) )
24 15 20 23 syl2anc ( ( ( ( ∃! 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑁 , 𝑧 } ∧ ( 𝐺 ∈ USGraph ∧ ( 𝑌 ∈ dom 𝐸𝑁 ∈ ( 𝐸𝑌 ) ) ) ) ∧ 𝑌𝐴 ) ∧ 𝐼 = ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) ) → ( ( 𝐸𝑌 ) = { 𝐼 , 𝑁 } ↔ ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) = 𝐼 ) )
25 24 exbiri ( ( ( ∃! 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑁 , 𝑧 } ∧ ( 𝐺 ∈ USGraph ∧ ( 𝑌 ∈ dom 𝐸𝑁 ∈ ( 𝐸𝑌 ) ) ) ) ∧ 𝑌𝐴 ) → ( 𝐼 = ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) → ( ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) = 𝐼 → ( 𝐸𝑌 ) = { 𝐼 , 𝑁 } ) ) )
26 25 com13 ( ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) = 𝐼 → ( 𝐼 = ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) → ( ( ( ∃! 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑁 , 𝑧 } ∧ ( 𝐺 ∈ USGraph ∧ ( 𝑌 ∈ dom 𝐸𝑁 ∈ ( 𝐸𝑌 ) ) ) ) ∧ 𝑌𝐴 ) → ( 𝐸𝑌 ) = { 𝐼 , 𝑁 } ) ) )
27 26 eqcoms ( 𝐼 = ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) → ( 𝐼 = ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) → ( ( ( ∃! 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑁 , 𝑧 } ∧ ( 𝐺 ∈ USGraph ∧ ( 𝑌 ∈ dom 𝐸𝑁 ∈ ( 𝐸𝑌 ) ) ) ) ∧ 𝑌𝐴 ) → ( 𝐸𝑌 ) = { 𝐼 , 𝑁 } ) ) )
28 27 pm2.43i ( 𝐼 = ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) → ( ( ( ∃! 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑁 , 𝑧 } ∧ ( 𝐺 ∈ USGraph ∧ ( 𝑌 ∈ dom 𝐸𝑁 ∈ ( 𝐸𝑌 ) ) ) ) ∧ 𝑌𝐴 ) → ( 𝐸𝑌 ) = { 𝐼 , 𝑁 } ) )
29 28 expdcom ( ( ∃! 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑁 , 𝑧 } ∧ ( 𝐺 ∈ USGraph ∧ ( 𝑌 ∈ dom 𝐸𝑁 ∈ ( 𝐸𝑌 ) ) ) ) → ( 𝑌𝐴 → ( 𝐼 = ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) → ( 𝐸𝑌 ) = { 𝐼 , 𝑁 } ) ) )
30 9 29 mpancom ( ( 𝐺 ∈ USGraph ∧ ( 𝑌 ∈ dom 𝐸𝑁 ∈ ( 𝐸𝑌 ) ) ) → ( 𝑌𝐴 → ( 𝐼 = ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) → ( 𝐸𝑌 ) = { 𝐼 , 𝑁 } ) ) )
31 30 expcom ( ( 𝑌 ∈ dom 𝐸𝑁 ∈ ( 𝐸𝑌 ) ) → ( 𝐺 ∈ USGraph → ( 𝑌𝐴 → ( 𝐼 = ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) → ( 𝐸𝑌 ) = { 𝐼 , 𝑁 } ) ) ) )
32 31 com23 ( ( 𝑌 ∈ dom 𝐸𝑁 ∈ ( 𝐸𝑌 ) ) → ( 𝑌𝐴 → ( 𝐺 ∈ USGraph → ( 𝐼 = ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) → ( 𝐸𝑌 ) = { 𝐼 , 𝑁 } ) ) ) )
33 7 32 mpcom ( 𝑌𝐴 → ( 𝐺 ∈ USGraph → ( 𝐼 = ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) → ( 𝐸𝑌 ) = { 𝐼 , 𝑁 } ) ) )
34 33 impcom ( ( 𝐺 ∈ USGraph ∧ 𝑌𝐴 ) → ( 𝐼 = ( 𝑧𝑉 ( 𝐸𝑌 ) = { 𝑧 , 𝑁 } ) → ( 𝐸𝑌 ) = { 𝐼 , 𝑁 } ) )