let rec map f a = try let (a1, a2) = d_interp a in let b1 = map f a1 and b2 = map f a2 in if a1 == b1 && a2 == b2 then a else mk_mult b1 b2 with Not_found -> f a