Residuation theory and Boolean matrices