use objects instead of tuples because tuples are serialized as arrays in JSON
instead of having a list of objects containing each a fact and its origin, let's have a map of origin -> list of facts
sort facts, rules, checks etc should be sorted (sorting strings, not objects, to keep it simple), because we use sets everywhere, and their order can be random