Finite Confluences and Closed Pattern Mining