Preheat the oven to 160C/320F/Gas 3.
For the lamb shanks and sauce, season the lamb shanks with salt and freshly ground black pepper.
Heat two tablespoons of the oil in a large-lidded casserole or roasting tin over a high heat. When the oil is smoking, add the lamb shanks and fry, turning regularly, until browned all over. Remove from the pan and set aside.
Heat the remaining tablespoon of olive oil in the pan the lamb was cooked in, then add the onion, garlic, carrot, celery and leek and fry until softened and golden-brown. Add the thyme, rosemary and bay leaf, then add the tomato purée and flour and continue to fry for a further 3-4 minutes, stirring until the mixture is well combined and coats the vegetables.
Gradually add the wine, stirring until well combined. Bring the mixture to the boil, then reduce the heat to a simmer and continue to cook for 5-6 minutes, or until the volume of liquid has reduced by half.
Return the lamb shanks to the pan and pour over the lamb stock. Return the mixture to the boil, then cover the pan with a lid. Transfer the lamb to the oven and cook for 2-2½ hours, checking regularly, or until the lamb is tender and cooked to your liking.
When the lamb shanks are cooked, remove the lamb from the cooking liquid and place them onto a baking tray. Keep warm. Strain the cooking liquid through a fine sieve, reserving the strained stock in a clean pan.
Bring the strained stock to the boil, then reduce the heat to a simmer. Simmer until the volume of gravy has reduced by half. Set aside and keep warm.
For the sweet potato purée, boil the sweet potatoes in a pan of salted water for 10-15 minutes, or until tender. Drain well then return to the heat for a few seconds to drive off any excess moisture.
Transfer the boiled sweet potatoes to a food processor and add one tablespoon of the butter and 25ml/1fl oz of the cream. Blend until smooth, adding more butter and cream as necessary, to taste.
For the spinach, heat the butter in a frying pan over a high heat. When the butter is foaming, add the spinach and fry until wilted, stirring regularly.
To serve, place one of the lamb shanks into the centre of each of four serving plates. Place a spoonful of sweet potato purée and a portion of wilted spinach alongside. Drizzle over the gravy.