In mathematics, metonymy occurs as generalization and specialization. Whenever you hear ``for example'' or ``more generally'' you know that metonymy is afoot.
Metonymy is important in mathematics because it is is the main internal process by which the raw material of mathematics is generated. The urge to generalize is one of the forces that drive mathematical inquiry. I do not know how many years separated the discovery ``the sum of the angles in a triangle is equal to two right angles'' from the discovery of the corresponding facts for polygons with more sides than three, but my guess is not many. Conversely, considering examples is a reliable method of beginning the investigation of a mathematical phenomenon. Suppose you are asked to prove the addition formula for binomial coefficients:
Cn+1k+1 = Cnk +Cnk+1
where Cnk = n!/k!(n-k)! as usual. This is the law that makes Pascal's triangle work. If you have never done it before, you can look for guidance by examining some simple cases.For example (n=5, k=3, leaving out the multiplication signs)