Metamath Proof Explorer


Theorem isupwlkg

Description: Generalization of isupwlk : Conditions for two classes to represent a simple walk. (Contributed by AV, 5-Nov-2021)

Ref Expression
Hypotheses upwlksfval.v 𝑉 = ( Vtx ‘ 𝐺 )
upwlksfval.i 𝐼 = ( iEdg ‘ 𝐺 )
Assertion isupwlkg ( 𝐺𝑊 → ( 𝐹 ( UPWalks ‘ 𝐺 ) 𝑃 ↔ ( 𝐹 ∈ Word dom 𝐼𝑃 : ( 0 ... ( ♯ ‘ 𝐹 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ( 𝐼 ‘ ( 𝐹𝑘 ) ) = { ( 𝑃𝑘 ) , ( 𝑃 ‘ ( 𝑘 + 1 ) ) } ) ) )

Proof

Step Hyp Ref Expression
1 upwlksfval.v 𝑉 = ( Vtx ‘ 𝐺 )
2 upwlksfval.i 𝐼 = ( iEdg ‘ 𝐺 )
3 1 2 upwlksfval ( 𝐺 ∈ V → ( UPWalks ‘ 𝐺 ) = { ⟨ 𝑓 , 𝑝 ⟩ ∣ ( 𝑓 ∈ Word dom 𝐼𝑝 : ( 0 ... ( ♯ ‘ 𝑓 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑓 ) ) ( 𝐼 ‘ ( 𝑓𝑘 ) ) = { ( 𝑝𝑘 ) , ( 𝑝 ‘ ( 𝑘 + 1 ) ) } ) } )
4 3 brfvopab ( 𝐹 ( UPWalks ‘ 𝐺 ) 𝑃 → ( 𝐺 ∈ V ∧ 𝐹 ∈ V ∧ 𝑃 ∈ V ) )
5 4 a1i ( 𝐺𝑊 → ( 𝐹 ( UPWalks ‘ 𝐺 ) 𝑃 → ( 𝐺 ∈ V ∧ 𝐹 ∈ V ∧ 𝑃 ∈ V ) ) )
6 elex ( 𝐺𝑊𝐺 ∈ V )
7 elex ( 𝐹 ∈ Word dom 𝐼𝐹 ∈ V )
8 ovex ( 0 ... ( ♯ ‘ 𝐹 ) ) ∈ V
9 1 fvexi 𝑉 ∈ V
10 8 9 fpm ( 𝑃 : ( 0 ... ( ♯ ‘ 𝐹 ) ) ⟶ 𝑉𝑃 ∈ ( 𝑉pm ( 0 ... ( ♯ ‘ 𝐹 ) ) ) )
11 10 elexd ( 𝑃 : ( 0 ... ( ♯ ‘ 𝐹 ) ) ⟶ 𝑉𝑃 ∈ V )
12 7 11 anim12i ( ( 𝐹 ∈ Word dom 𝐼𝑃 : ( 0 ... ( ♯ ‘ 𝐹 ) ) ⟶ 𝑉 ) → ( 𝐹 ∈ V ∧ 𝑃 ∈ V ) )
13 12 3adant3 ( ( 𝐹 ∈ Word dom 𝐼𝑃 : ( 0 ... ( ♯ ‘ 𝐹 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ( 𝐼 ‘ ( 𝐹𝑘 ) ) = { ( 𝑃𝑘 ) , ( 𝑃 ‘ ( 𝑘 + 1 ) ) } ) → ( 𝐹 ∈ V ∧ 𝑃 ∈ V ) )
14 6 13 anim12i ( ( 𝐺𝑊 ∧ ( 𝐹 ∈ Word dom 𝐼𝑃 : ( 0 ... ( ♯ ‘ 𝐹 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ( 𝐼 ‘ ( 𝐹𝑘 ) ) = { ( 𝑃𝑘 ) , ( 𝑃 ‘ ( 𝑘 + 1 ) ) } ) ) → ( 𝐺 ∈ V ∧ ( 𝐹 ∈ V ∧ 𝑃 ∈ V ) ) )
15 14 ex ( 𝐺𝑊 → ( ( 𝐹 ∈ Word dom 𝐼𝑃 : ( 0 ... ( ♯ ‘ 𝐹 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ( 𝐼 ‘ ( 𝐹𝑘 ) ) = { ( 𝑃𝑘 ) , ( 𝑃 ‘ ( 𝑘 + 1 ) ) } ) → ( 𝐺 ∈ V ∧ ( 𝐹 ∈ V ∧ 𝑃 ∈ V ) ) ) )
16 3anass ( ( 𝐺 ∈ V ∧ 𝐹 ∈ V ∧ 𝑃 ∈ V ) ↔ ( 𝐺 ∈ V ∧ ( 𝐹 ∈ V ∧ 𝑃 ∈ V ) ) )
17 15 16 syl6ibr ( 𝐺𝑊 → ( ( 𝐹 ∈ Word dom 𝐼𝑃 : ( 0 ... ( ♯ ‘ 𝐹 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ( 𝐼 ‘ ( 𝐹𝑘 ) ) = { ( 𝑃𝑘 ) , ( 𝑃 ‘ ( 𝑘 + 1 ) ) } ) → ( 𝐺 ∈ V ∧ 𝐹 ∈ V ∧ 𝑃 ∈ V ) ) )
18 1 2 isupwlk ( ( 𝐺 ∈ V ∧ 𝐹 ∈ V ∧ 𝑃 ∈ V ) → ( 𝐹 ( UPWalks ‘ 𝐺 ) 𝑃 ↔ ( 𝐹 ∈ Word dom 𝐼𝑃 : ( 0 ... ( ♯ ‘ 𝐹 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ( 𝐼 ‘ ( 𝐹𝑘 ) ) = { ( 𝑃𝑘 ) , ( 𝑃 ‘ ( 𝑘 + 1 ) ) } ) ) )
19 18 a1i ( 𝐺𝑊 → ( ( 𝐺 ∈ V ∧ 𝐹 ∈ V ∧ 𝑃 ∈ V ) → ( 𝐹 ( UPWalks ‘ 𝐺 ) 𝑃 ↔ ( 𝐹 ∈ Word dom 𝐼𝑃 : ( 0 ... ( ♯ ‘ 𝐹 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ( 𝐼 ‘ ( 𝐹𝑘 ) ) = { ( 𝑃𝑘 ) , ( 𝑃 ‘ ( 𝑘 + 1 ) ) } ) ) ) )
20 5 17 19 pm5.21ndd ( 𝐺𝑊 → ( 𝐹 ( UPWalks ‘ 𝐺 ) 𝑃 ↔ ( 𝐹 ∈ Word dom 𝐼𝑃 : ( 0 ... ( ♯ ‘ 𝐹 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝐹 ) ) ( 𝐼 ‘ ( 𝐹𝑘 ) ) = { ( 𝑃𝑘 ) , ( 𝑃 ‘ ( 𝑘 + 1 ) ) } ) ) )