I think magnesium isn't used
Technically you are right, but this whole topic has a backpack full of naming issues, not only because people use it wrong or simplify it, but also because the manufacturers not always state the complete chemistry and because there are "in between / hybrid chemistries" which are a mix
Also some terms overlap with other ones.
It's also a nice topic for a little deep dive, so shall we? Might be worth copying it over to the FAQ!
I usually try to make an effort to give correct designations hence I use the term lithium cell a lot. This is always correct, but not always very precise. Depends on whether this kind of precision is important.
I use LiIon for all lithium chemistries with a fluid electrolyte and 3.6/3.7V nominal voltage, that covers basically all cylindrical cells. If I were more precise then I would differentiate between their chemistries. Most common ones are lithium cobalt / LiCo / ICR cells, usually found in laptops, powerbanks and so on. Then there is lithium manganese / LiMn / IMR which, unlike the ICR cells, are high drain cells for powertools and similar applications. They were superseded, sort of, by (and now fasten your seatbelts) lithium nickel manganese cobalt / LiNiMnCo / INR cells. This is a hybrid chemistry, not hard to figure out why. These are the main three chemistries, obviously some manufacturers also vary the amounts of the respective element in the mix. Samsungs ICR cells aren't chemically identical to the LG ones and also almost every manufacturer makes several different cells of each type.
There are more chemistries beside these three, a notable one is Teslas lithium aluminium chemistry which is like INR but swaps manganese for aluminium. It is called NCA.
Lithium iron phosphate / LiFe / LiFePo / IFR cells belong to the aforementioned ones technically, but are often handled separately because of their lower nominal voltage of 3.2V.
All of them come in cylindrical forms, LiFe also often in prismatic forms. The other LiIon chemistries come in prismatic forms as well, but not as often as LiFe (I think).
Lithium polymer cells always come in pouch form. They use similar chemistries with cobalt, manganese and so on, but their electrolyte isn't fluid. It isn't completely solid either but a semi solid gel. Basically it is a kind of plastic. They have the advantage of being lightweight and can easily be build in any shape you need.
LiIon: Refers to all of them, specifically ICR, IMR and INR, nominal voltage 3.6V-3-7V, usually cylindrical cells, sometimes prismatic
ICR: LiIon, made to provide highest capacity for applications where runtime is important but high current discharge isn't
IMR: LiIon, high drain cells for applications with high discharge currents
INR: LiIon, like IMR with some of the benefits of ICR while not losing IMR qualities completely
LiFe/LiFePo/LiFePo4/IFR: LiIon, but often mentioned separately because of lower nominal voltage of 3.2V, cylindrical and prismatic cells
LiPo: Like the other LiIons, but separated from them by their semi solid electrolyte, always in non-standard pouch cells
I hope this is comprehensible, I've put some effort into it to make it as clear as possible