Counterfactual conditional sentences can be useful in artificial
intelligence. In particular, they allow reasoners to learn from experiences
that they did not quite have. The truth of a counterfactual and the conclusions
that can be drawn from a counterfactual are theory dependent, and different
theories are useful in different circumstances.

A simple class of useful counterfactuals involves a change of one component
of a point in a space provided with a cartesian product structure. We
call these cartesian counterfactuals. Cartesian counterfactuals can be
modeled by assignment and contents functions as in program semantics.
We also study the more general tree-structured counterfactuals.