1. A method comprising: evaluating, by a rule engine executed by a processing device, facts in a working memory stored on a data storage device against a rule with repetitions; and creating, by the rule engine, a multi-dimensional tuple to hold a set of the facts that matches the rule, the multi-dimensional tuple comprising a plurality of elements, wherein each of the plurality of elements comprises a complex index, and wherein each of the plurality of elements is a single fact or a tree structure for holding a plurality of facts of a repetition group that matches the rule with repetitions.