This work sets the formal bases for building tools to retrieve classes in object-oriented libraries. In such systems, the user provides a query, formulated as a set of class interfaces, and the tool returns classes in the library that can be used to implement the user's request and automatically builds the corresponding adaptation code. Recursive types model object-oriented features and subtyping of recursive types allows to account for structural subtyping in object-oriented programming languages. We propose subtyping of recursive types in the presence of associative and commutative products---that is, subtyping modulo a restricted form of type isomorphisms---as a model of the relation that exists between the query formulated by the user and the answers retrieved by the tool. We show that this relation is a composition of the usual subtyping relation with equality up to associativity and commutativity of products and we present an efficient decision algorithm for it. We also provide an automatic way of constructing coercions between related types.