init commit again

This commit is contained in:
Peter
2023-11-01 09:29:33 +01:00
parent 448147e7da
commit d6c745207b
250 changed files with 15552 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
### Graphs
[
Type directed-graphs
Funcon is-cyclic
Funcon topological-sort
]
Meta-variables
GT <: ground-values
Type
directed-graphs(GT) ~> maps(GT, sets(GT))
/*
`directed-graphs(GT)` models directed graphs with vertices of type `GT`,
represented as maps from vertices to the set of vertices to which the
vertex has an edge. E.g., the graph
(1)--->(2)
would be represented as `{ 1 |-> {2}, 2 |-> {} }`
*/
Built-in Funcon
is-cyclic(_:directed-graphs(GT)) : =>booleans
Built-in Funcon
topological-sort(_:directed-graphs(GT)) : =>(GT)*
/*
`topological-sort(DG)` returns a topological ordering of the vertices
of the graph `DG`, as a sequence of vertices, provided that `DG` is not
cyclic.
*/