Message Boards Message Boards

0
|
4043 Views
|
1 Reply
|
2 Total Likes
View groups...
Share
Share this post:

General topology software or how to put into mathematica

Posted 10 years ago

Hi all, is there a software which could enumerate all possible topology defined by x = {a,b,c}, and show them on the screen. if its possible to implement in mathematical how to do it ?

There is no built in function to do this, but it's not too difficult to program for a discrete set of values:

To build it up, I'd first make a function that gives every possible union and intersection of the values of a set:

everyPossibleUnion[set_] := Union@Map[Union @@ # &, Subsets[set, {1, Infinity}]]

everyPossibleIntersection[set_] :=  Union@Map[Intersection @@ # &, Subsets[set, {1, Infinity}]]

From there you can make a function which tests if a set is a topology by basically stating the definition:

mySet = {1, 2, 3, 4}

TopologyQ[pset_] := 
 SubsetQ[pset, {{}, mySet}] && 
  SubsetQ[pset, everyPossibleUnion[pset]] && 
  SubsetQ[pset, everyPossibleIntersection[pset]]

I think I've done this right. It seems to work okay.

indiscreteTopology = {{}, mySet}
TopologyQ[indiscreteTopology]
True

discreteTopology = Subsets@mySet;
TopologyQ[discreteTopology]
True

exTopology = {{}, {2}, {1, 2}, {2, 3}, {1, 2, 3}, {1, 2, 3, 4}};
TopologyQ[exTopology]
True

notATopology = {{}, {1, 2}, {2, 3}, {1, 2, 3, 4}}
TopologyQ[notATopology]
False
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract