I'm using the Wolfram General Topology EntityStore. From it, how would I search EntityList["GeneralTopologyTheorem"] to find, for example, those entities in the list that include the word "compact" in their name.

Here's where I am:

   obj = ResourceObject["General Topology EntityStore"];
   store = ResourceData[obj];
   data = EntityRegister[store]
(* {"GeneralTopologyConcept", "GeneralTopologyTheorem"} *)
   thms = EntityList["GeneralTopologyTheorem"]

The output from the last statement is a list of entites which display as "boxes" labeled with such things as "metric implies Hausdorff".

How do I search the list to find, say, which of those theorems in the store concern being compactt?

My notion is to somehow convert all the labels on those boxes into text and search the list of such texts. But how do I make that conversion? Or is there some better way?


1 Answer 1


This was answered in response to my same question at https://community.wolfram.com/groups/-/m/t/1902474. Namely:

EntityList["GeneralTopologyTheorem"] // CanonicalName //
  Select[StringContainsQ[#, "compact", IgnoreCase -> True] &]
  • $\begingroup$ Could you explain the use of the // Postfix? Is this acting like a Map? $\endgroup$ Commented Mar 26, 2023 at 17:01
  • $\begingroup$ @DougKimzey: In general, the postfix syntax epr // func means the same thing as func[expr]. So it would not act like Map unless func is listable. $\endgroup$
    – murray
    Commented Mar 27, 2023 at 18:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.