Metamath Proof Explorer


Theorem upgrtrls

Description: The set of trails in a pseudograph, definition of walks expanded. (Contributed by Alexander van der Vekens, 20-Oct-2017) (Revised by AV, 7-Jan-2021)

Ref Expression
Hypotheses upgrtrls.v 𝑉 = ( Vtx ‘ 𝐺 )
upgrtrls.i 𝐼 = ( iEdg ‘ 𝐺 )
Assertion upgrtrls ( 𝐺 ∈ UPGraph → ( Trails ‘ 𝐺 ) = { ⟨ 𝑓 , 𝑝 ⟩ ∣ ( ( 𝑓 ∈ Word dom 𝐼 ∧ Fun 𝑓 ) ∧ 𝑝 : ( 0 ... ( ♯ ‘ 𝑓 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑓 ) ) ( 𝐼 ‘ ( 𝑓𝑘 ) ) = { ( 𝑝𝑘 ) , ( 𝑝 ‘ ( 𝑘 + 1 ) ) } ) } )

Proof

Step Hyp Ref Expression
1 upgrtrls.v 𝑉 = ( Vtx ‘ 𝐺 )
2 upgrtrls.i 𝐼 = ( iEdg ‘ 𝐺 )
3 trlsfval ( Trails ‘ 𝐺 ) = { ⟨ 𝑓 , 𝑝 ⟩ ∣ ( 𝑓 ( Walks ‘ 𝐺 ) 𝑝 ∧ Fun 𝑓 ) }
4 1 2 upgriswlk ( 𝐺 ∈ UPGraph → ( 𝑓 ( Walks ‘ 𝐺 ) 𝑝 ↔ ( 𝑓 ∈ Word dom 𝐼𝑝 : ( 0 ... ( ♯ ‘ 𝑓 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑓 ) ) ( 𝐼 ‘ ( 𝑓𝑘 ) ) = { ( 𝑝𝑘 ) , ( 𝑝 ‘ ( 𝑘 + 1 ) ) } ) ) )
5 4 anbi1d ( 𝐺 ∈ UPGraph → ( ( 𝑓 ( Walks ‘ 𝐺 ) 𝑝 ∧ Fun 𝑓 ) ↔ ( ( 𝑓 ∈ Word dom 𝐼𝑝 : ( 0 ... ( ♯ ‘ 𝑓 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑓 ) ) ( 𝐼 ‘ ( 𝑓𝑘 ) ) = { ( 𝑝𝑘 ) , ( 𝑝 ‘ ( 𝑘 + 1 ) ) } ) ∧ Fun 𝑓 ) ) )
6 an32 ( ( ( 𝑓 ∈ Word dom 𝐼 ∧ ( 𝑝 : ( 0 ... ( ♯ ‘ 𝑓 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑓 ) ) ( 𝐼 ‘ ( 𝑓𝑘 ) ) = { ( 𝑝𝑘 ) , ( 𝑝 ‘ ( 𝑘 + 1 ) ) } ) ) ∧ Fun 𝑓 ) ↔ ( ( 𝑓 ∈ Word dom 𝐼 ∧ Fun 𝑓 ) ∧ ( 𝑝 : ( 0 ... ( ♯ ‘ 𝑓 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑓 ) ) ( 𝐼 ‘ ( 𝑓𝑘 ) ) = { ( 𝑝𝑘 ) , ( 𝑝 ‘ ( 𝑘 + 1 ) ) } ) ) )
7 3anass ( ( 𝑓 ∈ Word dom 𝐼𝑝 : ( 0 ... ( ♯ ‘ 𝑓 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑓 ) ) ( 𝐼 ‘ ( 𝑓𝑘 ) ) = { ( 𝑝𝑘 ) , ( 𝑝 ‘ ( 𝑘 + 1 ) ) } ) ↔ ( 𝑓 ∈ Word dom 𝐼 ∧ ( 𝑝 : ( 0 ... ( ♯ ‘ 𝑓 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑓 ) ) ( 𝐼 ‘ ( 𝑓𝑘 ) ) = { ( 𝑝𝑘 ) , ( 𝑝 ‘ ( 𝑘 + 1 ) ) } ) ) )
8 7 anbi1i ( ( ( 𝑓 ∈ Word dom 𝐼𝑝 : ( 0 ... ( ♯ ‘ 𝑓 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑓 ) ) ( 𝐼 ‘ ( 𝑓𝑘 ) ) = { ( 𝑝𝑘 ) , ( 𝑝 ‘ ( 𝑘 + 1 ) ) } ) ∧ Fun 𝑓 ) ↔ ( ( 𝑓 ∈ Word dom 𝐼 ∧ ( 𝑝 : ( 0 ... ( ♯ ‘ 𝑓 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑓 ) ) ( 𝐼 ‘ ( 𝑓𝑘 ) ) = { ( 𝑝𝑘 ) , ( 𝑝 ‘ ( 𝑘 + 1 ) ) } ) ) ∧ Fun 𝑓 ) )
9 3anass ( ( ( 𝑓 ∈ Word dom 𝐼 ∧ Fun 𝑓 ) ∧ 𝑝 : ( 0 ... ( ♯ ‘ 𝑓 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑓 ) ) ( 𝐼 ‘ ( 𝑓𝑘 ) ) = { ( 𝑝𝑘 ) , ( 𝑝 ‘ ( 𝑘 + 1 ) ) } ) ↔ ( ( 𝑓 ∈ Word dom 𝐼 ∧ Fun 𝑓 ) ∧ ( 𝑝 : ( 0 ... ( ♯ ‘ 𝑓 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑓 ) ) ( 𝐼 ‘ ( 𝑓𝑘 ) ) = { ( 𝑝𝑘 ) , ( 𝑝 ‘ ( 𝑘 + 1 ) ) } ) ) )
10 6 8 9 3bitr4i ( ( ( 𝑓 ∈ Word dom 𝐼𝑝 : ( 0 ... ( ♯ ‘ 𝑓 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑓 ) ) ( 𝐼 ‘ ( 𝑓𝑘 ) ) = { ( 𝑝𝑘 ) , ( 𝑝 ‘ ( 𝑘 + 1 ) ) } ) ∧ Fun 𝑓 ) ↔ ( ( 𝑓 ∈ Word dom 𝐼 ∧ Fun 𝑓 ) ∧ 𝑝 : ( 0 ... ( ♯ ‘ 𝑓 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑓 ) ) ( 𝐼 ‘ ( 𝑓𝑘 ) ) = { ( 𝑝𝑘 ) , ( 𝑝 ‘ ( 𝑘 + 1 ) ) } ) )
11 5 10 bitrdi ( 𝐺 ∈ UPGraph → ( ( 𝑓 ( Walks ‘ 𝐺 ) 𝑝 ∧ Fun 𝑓 ) ↔ ( ( 𝑓 ∈ Word dom 𝐼 ∧ Fun 𝑓 ) ∧ 𝑝 : ( 0 ... ( ♯ ‘ 𝑓 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑓 ) ) ( 𝐼 ‘ ( 𝑓𝑘 ) ) = { ( 𝑝𝑘 ) , ( 𝑝 ‘ ( 𝑘 + 1 ) ) } ) ) )
12 11 opabbidv ( 𝐺 ∈ UPGraph → { ⟨ 𝑓 , 𝑝 ⟩ ∣ ( 𝑓 ( Walks ‘ 𝐺 ) 𝑝 ∧ Fun 𝑓 ) } = { ⟨ 𝑓 , 𝑝 ⟩ ∣ ( ( 𝑓 ∈ Word dom 𝐼 ∧ Fun 𝑓 ) ∧ 𝑝 : ( 0 ... ( ♯ ‘ 𝑓 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑓 ) ) ( 𝐼 ‘ ( 𝑓𝑘 ) ) = { ( 𝑝𝑘 ) , ( 𝑝 ‘ ( 𝑘 + 1 ) ) } ) } )
13 3 12 syl5eq ( 𝐺 ∈ UPGraph → ( Trails ‘ 𝐺 ) = { ⟨ 𝑓 , 𝑝 ⟩ ∣ ( ( 𝑓 ∈ Word dom 𝐼 ∧ Fun 𝑓 ) ∧ 𝑝 : ( 0 ... ( ♯ ‘ 𝑓 ) ) ⟶ 𝑉 ∧ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑓 ) ) ( 𝐼 ‘ ( 𝑓𝑘 ) ) = { ( 𝑝𝑘 ) , ( 𝑝 ‘ ( 𝑘 + 1 ) ) } ) } )