Logical spreadsheet

A logical spreadsheet is a spreadsheet in which formulas take the form of logical constraints rather than function definitions.

In traditional spreadsheet systems, such as Excel, cells are partitioned into "directly specified" cells and "computed" cells and the formulas used to specify the values of computed cells are "functional", i.e. for every combination of values of the directly specified cells, the formulas specify unique values for the computed cells. Logical Spreadsheets relax these restrictions by dispensing with the distinction between directly specified cells and computed cells and generalizing from functional definitions to logical constraints.

As an illustration of the difference between traditional spreadsheets and logical spreadsheets, consider a simple numerical spreadsheet with three cells a, b, and c. Each cell accepts a single integer as value; and there is a formula stating that the value of the third cell is the sum of the values of the other two cells.

Implemented as a traditional spreadsheet, this spreadsheet would allow the user to enter values into cells a and b, and it would automatically compute cell c. For example, if the user were to type 1 into a and 2 into b, it would compute the value 3 for c.

Implemented as a logical spreadsheet, the user would be able to enter values into any of the cells. The user could type 1 into a and 2 into b, and the spreadsheet would compute the value 3 for c. Alternatively, the user could type 2 into b and 3 into c, and the spreadsheet would compute the value 1 for a. And so forth.

In this case, the formula is functional, and the function is invertible. In general, the formulas need not be functional and the functions need not be invertible. For example, in this case, we could write formulas involving inequalities and non-invertible functions (such as square root). More generally, we could build spreadsheets with symbolic, rather than numeric data, and write arbitrary logical constraints on this data.