Representing patterns in linear relations