Duality in analysis from the point of view of triples