Documentation
PfsProgs25
.
Unit13
.
GraphPaths
Search
return to top
source
Imports
Init
Mathlib
Imported by
SimpleGraph
.
acyclic
SimpleGraph
.
connected
subsetsOfLength
subsetsOfLengthSubset
graph₁
source
def
SimpleGraph
.
acyclic
{V :
Type
}
(G :
SimpleGraph
V
)
:
Prop
Equations
G
.acyclic
=
∀ (
v
:
V
) (
p
:
G
.Walk
v
v
),
¬
p
.IsCircuit
Instances For
source
def
SimpleGraph
.
connected
{V :
Type
}
(G :
SimpleGraph
V
)
:
Prop
Equations
G
.connected
=
Nonempty
((
v
w
:
V
) →
G
.Walk
v
w
)
Instances For
source
def
subsetsOfLength
{α :
Type
}
:
ℕ
→
List
α
→
List
(
List
α
)
Equations
subsetsOfLength
0
x✝
=
[
[]
]
subsetsOfLength
n
.succ
[]
=
[]
subsetsOfLength
n
.succ
(
x_2
::
xs
)
=
List.map
(
List.cons
x_2
)
(
subsetsOfLength
n
xs
)
++
subsetsOfLength
(
n
+
1
)
xs
Instances For
source
theorem
subsetsOfLengthSubset
{α :
Type
}
(n :
ℕ
)
(xs l :
List
α
)
:
l
∈
subsetsOfLength
n
xs
→
l
⊆
xs
source
def
graph₁
:
SimpleGraph
(
Fin
4
)
Equations
graph₁
=
SimpleGraph.fromRel
fun (
x
y
:
Fin
4
) =>
(
!
↑
x
==
↑
y
)
=
true
Instances For