Metamath Proof Explorer


Theorem spthcycl

Description: A walk is a trivial path if and only if it is both a simple path and a cycle. (Contributed by BTernaryTau, 8-Oct-2023)

Ref Expression
Assertion spthcycl FPathsGPF=FSPathsGPFCyclesGP

Proof

Step Hyp Ref Expression
1 pthistrl FPathsGPFTrailsGP
2 pthiswlk FPathsGPFWalksGP
3 eqid VtxG=VtxG
4 3 wlkp FWalksGPP:0FVtxG
5 4 ffund FWalksGPFunP
6 wlklenvp1 FWalksGPP=F+1
7 6 adantr FWalksGPF=P=F+1
8 wlkv FWalksGPGVFVPV
9 8 simp2d FWalksGPFV
10 hasheq0 FVF=0F=
11 10 biimpar FVF=F=0
12 9 11 sylan FWalksGPF=F=0
13 oveq1 F=0F+1=0+1
14 0p1e1 0+1=1
15 13 14 eqtrdi F=0F+1=1
16 12 15 syl FWalksGPF=F+1=1
17 7 16 eqtrd FWalksGPF=P=1
18 8 simp3d FWalksGPPV
19 hashen1 PVP=1P1𝑜
20 18 19 syl FWalksGPP=1P1𝑜
21 20 biimpa FWalksGPP=1P1𝑜
22 17 21 syldan FWalksGPF=P1𝑜
23 funen1cnv FunPP1𝑜FunP-1
24 5 22 23 syl2an2r FWalksGPF=FunP-1
25 2 24 sylan FPathsGPF=FunP-1
26 isspth FSPathsGPFTrailsGPFunP-1
27 26 biimpri FTrailsGPFunP-1FSPathsGP
28 1 25 27 syl2an2r FPathsGPF=FSPathsGP
29 fveq2 0=FP0=PF
30 29 eqcoms F=0P0=PF
31 12 30 syl FWalksGPF=P0=PF
32 2 31 sylan FPathsGPF=P0=PF
33 iscycl FCyclesGPFPathsGPP0=PF
34 33 biimpri FPathsGPP0=PFFCyclesGP
35 32 34 syldan FPathsGPF=FCyclesGP
36 28 35 jca FPathsGPF=FSPathsGPFCyclesGP
37 spthispth FSPathsGPFPathsGP
38 37 adantr FSPathsGPFCyclesGPFPathsGP
39 notnot FSPathsGP¬¬FSPathsGP
40 cyclnspth FFCyclesGP¬FSPathsGP
41 40 com12 FCyclesGPF¬FSPathsGP
42 41 con3dimp FCyclesGP¬¬FSPathsGP¬F
43 nne ¬FF=
44 42 43 sylib FCyclesGP¬¬FSPathsGPF=
45 39 44 sylan2 FCyclesGPFSPathsGPF=
46 45 ancoms FSPathsGPFCyclesGPF=
47 38 46 jca FSPathsGPFCyclesGPFPathsGPF=
48 36 47 impbii FPathsGPF=FSPathsGPFCyclesGP