Metamath Proof Explorer


Theorem iscrct

Description: Sufficient and necessary conditions for a pair of functions to be a circuit (in an undirected graph): A pair of function "is" (represents) a circuit iff it is a closed trail. (Contributed by Alexander van der Vekens, 30-Oct-2017) (Revised by AV, 31-Jan-2021) (Revised by AV, 30-Oct-2021)

Ref Expression
Assertion iscrct ( 𝐹 ( Circuits ‘ 𝐺 ) 𝑃 ↔ ( 𝐹 ( Trails ‘ 𝐺 ) 𝑃 ∧ ( 𝑃 ‘ 0 ) = ( 𝑃 ‘ ( ♯ ‘ 𝐹 ) ) ) )

Proof

Step Hyp Ref Expression
1 crcts ( Circuits ‘ 𝐺 ) = { ⟨ 𝑓 , 𝑝 ⟩ ∣ ( 𝑓 ( Trails ‘ 𝐺 ) 𝑝 ∧ ( 𝑝 ‘ 0 ) = ( 𝑝 ‘ ( ♯ ‘ 𝑓 ) ) ) }
2 fveq1 ( 𝑝 = 𝑃 → ( 𝑝 ‘ 0 ) = ( 𝑃 ‘ 0 ) )
3 2 adantl ( ( 𝑓 = 𝐹𝑝 = 𝑃 ) → ( 𝑝 ‘ 0 ) = ( 𝑃 ‘ 0 ) )
4 simpr ( ( 𝑓 = 𝐹𝑝 = 𝑃 ) → 𝑝 = 𝑃 )
5 fveq2 ( 𝑓 = 𝐹 → ( ♯ ‘ 𝑓 ) = ( ♯ ‘ 𝐹 ) )
6 5 adantr ( ( 𝑓 = 𝐹𝑝 = 𝑃 ) → ( ♯ ‘ 𝑓 ) = ( ♯ ‘ 𝐹 ) )
7 4 6 fveq12d ( ( 𝑓 = 𝐹𝑝 = 𝑃 ) → ( 𝑝 ‘ ( ♯ ‘ 𝑓 ) ) = ( 𝑃 ‘ ( ♯ ‘ 𝐹 ) ) )
8 3 7 eqeq12d ( ( 𝑓 = 𝐹𝑝 = 𝑃 ) → ( ( 𝑝 ‘ 0 ) = ( 𝑝 ‘ ( ♯ ‘ 𝑓 ) ) ↔ ( 𝑃 ‘ 0 ) = ( 𝑃 ‘ ( ♯ ‘ 𝐹 ) ) ) )
9 reltrls Rel ( Trails ‘ 𝐺 )
10 1 8 9 brfvopabrbr ( 𝐹 ( Circuits ‘ 𝐺 ) 𝑃 ↔ ( 𝐹 ( Trails ‘ 𝐺 ) 𝑃 ∧ ( 𝑃 ‘ 0 ) = ( 𝑃 ‘ ( ♯ ‘ 𝐹 ) ) ) )