Metamath Proof Explorer


Theorem cycls

Description: The set of cycles (in an undirected graph). (Contributed by Alexander van der Vekens, 30-Oct-2017) (Revised by AV, 31-Jan-2021)

Ref Expression
Assertion cycls ( Cycles ‘ 𝐺 ) = { ⟨ 𝑓 , 𝑝 ⟩ ∣ ( 𝑓 ( Paths ‘ 𝐺 ) 𝑝 ∧ ( 𝑝 ‘ 0 ) = ( 𝑝 ‘ ( ♯ ‘ 𝑓 ) ) ) }

Proof

Step Hyp Ref Expression
1 biidd ( ( ⊤ ∧ 𝑔 = 𝐺 ) → ( ( 𝑝 ‘ 0 ) = ( 𝑝 ‘ ( ♯ ‘ 𝑓 ) ) ↔ ( 𝑝 ‘ 0 ) = ( 𝑝 ‘ ( ♯ ‘ 𝑓 ) ) ) )
2 wksv { ⟨ 𝑓 , 𝑝 ⟩ ∣ 𝑓 ( Walks ‘ 𝐺 ) 𝑝 } ∈ V
3 pthiswlk ( 𝑓 ( Paths ‘ 𝐺 ) 𝑝𝑓 ( Walks ‘ 𝐺 ) 𝑝 )
4 3 ssopab2i { ⟨ 𝑓 , 𝑝 ⟩ ∣ 𝑓 ( Paths ‘ 𝐺 ) 𝑝 } ⊆ { ⟨ 𝑓 , 𝑝 ⟩ ∣ 𝑓 ( Walks ‘ 𝐺 ) 𝑝 }
5 2 4 ssexi { ⟨ 𝑓 , 𝑝 ⟩ ∣ 𝑓 ( Paths ‘ 𝐺 ) 𝑝 } ∈ V
6 5 a1i ( ⊤ → { ⟨ 𝑓 , 𝑝 ⟩ ∣ 𝑓 ( Paths ‘ 𝐺 ) 𝑝 } ∈ V )
7 df-cycls Cycles = ( 𝑔 ∈ V ↦ { ⟨ 𝑓 , 𝑝 ⟩ ∣ ( 𝑓 ( Paths ‘ 𝑔 ) 𝑝 ∧ ( 𝑝 ‘ 0 ) = ( 𝑝 ‘ ( ♯ ‘ 𝑓 ) ) ) } )
8 1 6 7 fvmptopab ( ⊤ → ( Cycles ‘ 𝐺 ) = { ⟨ 𝑓 , 𝑝 ⟩ ∣ ( 𝑓 ( Paths ‘ 𝐺 ) 𝑝 ∧ ( 𝑝 ‘ 0 ) = ( 𝑝 ‘ ( ♯ ‘ 𝑓 ) ) ) } )
9 8 mptru ( Cycles ‘ 𝐺 ) = { ⟨ 𝑓 , 𝑝 ⟩ ∣ ( 𝑓 ( Paths ‘ 𝐺 ) 𝑝 ∧ ( 𝑝 ‘ 0 ) = ( 𝑝 ‘ ( ♯ ‘ 𝑓 ) ) ) }