I am experimenting with second order graphs (by this I mean graphs whose vertices are themselves graphs).
This works to a limited extent as you can see here: http://www.euclideanspace.com/maths/standards/program/mycode/discrete/graph/design/multilevel/ The problem is that that it only works for a specific domain: DirectedGraph(DirectedGraph(String) I would like it to work for a more general category: FiniteGraph(FiniteGraph(SetCategory) where: DirectedGraph(S) is a domain that extends category FiniteGraph(S) One problem that I have, in trying to make it more general, is that the 'has' keyword seems to match on a category for the outer type but not the inner type. To explain what I mean by this I wrote this test code: FiniteGraph(S): Category == Definition where S: SetCategory <snip> hasTest:()->OutputForm add <snip> hasTest():OutputForm == vconcat([_ hconcat(outputForm("S has DirectedGraph(String)"),_ (S has DirectedGraph(String))::OutputForm),_ hconcat(outputForm("S has FiniteGraph(String)"),_ (S has FiniteGraph(String))::OutputForm),_ hconcat(outputForm("S has DirectedGraph(SetCategory)"),_ (S has DirectedGraph(SetCategory))::OutputForm),_ hconcat(outputForm("S has FiniteGraph(SetCategory)"),_ (S has FiniteGraph(SetCategory))::OutputForm) ]) When I run this I get: (1) -> hasTest()$DirectedGraph(DirectedGraph(String)) (1) "S has DirectedGraph(String)"true "S has FiniteGraph(String)"true "S has DirectedGraph(SetCategory)"false "S has FiniteGraph(SetCategory)"false Type: OutputForm So this matches on FiniteGraph as I would expect since: DirectedGraph(S) extends category FiniteGraph(S) But it does not match on SetCategory even though String has SetCategory is true. Is there any way that I can get this to work for any SetCategory and not just String? Martin -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/fricas-devel?hl=en.
