-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDecideDirectedReachability.lean
More file actions
31 lines (21 loc) · 1.14 KB
/
Copy pathDecideDirectedReachability.lean
File metadata and controls
31 lines (21 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import CRNT.Decision.DirectedReachability
import CRNT.Examples.ReversiblePair
/-!
# Deciding directed reachability and strong linkage of `A ⇌ B`
With reachability restricted to the finite vertex type of complexes, full (unbounded)
directed reachability is decidable, as is the strong-linkage-class count. The reversible
pair is strongly connected: `A` and `B` reach each other, forming a single strong linkage
class, all discharged by `decide`.
-/
namespace CRNT.Examples.DecideDirectedReachability
open CRNT CRNT.Examples.ReversiblePair
/-- `A` as a vertex of the finite complex graph. -/
def vA : {c : Complex Species // c ∈ N.complexes} := ⟨cA, by decide⟩
/-- `B` as a vertex of the finite complex graph. -/
def vB : {c : Complex Species // c ∈ N.complexes} := ⟨cB, by decide⟩
/-- Full, unbounded directed reachability is decidable — no depth bound needed. -/
example : N.Reaches vA.val vB.val := by decide
example : N.Reaches vB.val vA.val := by decide
/-- The reversible pair forms a single strong linkage class. -/
theorem numStrongLinkageClasses_eq : N.numStrongLinkageClasses = 1 := by decide
end CRNT.Examples.DecideDirectedReachability