1. A method comprising: obtaining a specification of a matrix, the matrix has a first predetermined dimension, the matrix comprises one or more cells, each cell having a value, the specification comprises a transition relation defining transformation of a first state of the matrix to a second state of the matrix; defining, by a computer, a reference model of the matrix comprising: defining a reference index, the reference index has a non-deterministic value; defining a reference matrix comprising one or more reference cells, the reference matrix having a second predetermined dimension, the second predetermined dimension is smaller than the first predetermined dimension, each of the reference cells corresponds to two or more cells of the matrix, wherein the reference model preserves the specification, a value of a portion of the reference cells depends on a value of the reference index; and producing the reference model on a non-transitory computer readable media; performing, by the computer, formal verification using the reference model; whereby the matrix is transformed to a reference model, preserving a behavior defined by the specification, and whereby the reference model comprises a fewer number of cells than the matrix.