Reasoning with Sets

Set Reasoning

Reasoning with Sets in Processes


Let us create an example to show reasoning with sets.

Suppose you are creating a nutrition App, and you are interested in people’s diet.

Asking the user for their eaten_regularly set

Suppose you create a Process and ask the user the following multi-select question:

Let us give the value name eaten_regularly to this select question.

The values of select questions have the data type symbol set.

So the response value of this question will be the set of symbols associated with the options selected by the user.

Asking the user for their finds_expensive set

Suppose you ask a second question multi-select question with the same options (and importantly, the same associated symbols).

Let us give the value name finds_expensive to this select question.

And now compute

Maybe now you want to calculate: which foods are eaten even though considered expensive?

This will be the intersection of the two sets

  • eaten_regularly
  • finds_expensive

How do we do this?

Defining and updating a set variable

Calculating a new set and updating set variable

Reasoning with symbols sets defined at Project level

We can also define symbols and sets project-wide, and reason with them.

For example, we could define Project Symbols for each of the foods, and define Project Symbol Sets with various combinations.

Here is an example of a set called foods containing symbols for the foods above

Within a Process, we can choose to associate Project-level symbols with options:

So when we are doing set calculations, we can make use of sets defined at the Project-level: