(tla+) LET G == INSTANCE Graphs IN G!Path([node |-> {1,2,3}, edge |-> {<<1,2>>, <<2,3>>, <<3,1>>, <<1,3>>}])
{p \in Seq({1, 2, 3}) : <expression line 20, col 14 to line 21, col 68 of module Graphs> }
For the definition AreConnected built on top of Path in Graphs, the new definition SimplePath based on SequencesExt!SeqOf(G.node, Cardinality(G.node)) should work.
https://github.com/tlaplus/CommunityModules/blob/6f9596b80382704f47001943ed35a7e6dad8238b/modules/Graphs.tla#L19
For the definition
AreConnected
built on top ofPath
inGraphs
, the new definitionSimplePath
based onSequencesExt!SeqOf(G.node, Cardinality(G.node))
should work.Definition of
SimplePath
follows e.g. the "A directed path is simple if it has no repeated vertices." given in https://algs4.cs.princeton.edu/42digraph/.