The purpose of this paper is twofold. First, we want to explain the basic concepts of optimal presynthesis and synthesis, and show how the theory of subanalytic sets can be used to prove existence theorems. Second, we want to establish the link with several other papers in this volume, by showing how the results on synthesis lead to the search for theorems on the structure of optimal trajectories.