Dependent Type-Checking Modulo Associativity And Commutativity