Peel and roughly chop the onions and carrots.
Trim and roughly chop the celery.
Peel and finely chop the garlic cloves.
Pick the rosemary leaves, discard the stalks. Finely chop half of leaves, put the rest to one side.
Drain the lentils.
Heat a large pan on a medium heat. Add a good lug of olive oil and the onions, carrots, celery and garlic. Cook gently with the lid on for 8 to 10 minutes, stirring occasionally, or until softened.
Add the chopped rosemary leaves, tinned tomatoes and stock and stir well. Bring to the boil, then add the drained lentils, reduce to a low heat and simmer gently for 30 minutes, or until thick and delicious.
Peel the potatoes, cut them into halves and quarters depending on their size, and put them into a pan of salted, boiling water. Boil for about 10 minutes until tender. Stick a knife into them to check they’re soft all the way through.
Drain in a colander and return them to the pan.
Grate the cheese. Add the milk, butter, most of the cheese and a pinch of salt and pepper to the pan. Finely grate in a few scrapings of nutmeg. Mash until smooth and creamy.
Preheat the oven to 190ºC/375ºF/gas mark 5.
Transfer the lentil mixture to a large ovenproof baking dish. Spoon the mash evenly over the top, poke the remaining rosemary leaves into it to decorate and drizzle with olive oil.
Sprinkle with the remaining grated cheese, then cook in the hot oven for 30 minutes, or until golden and bubbling.
Serve with broccoli or some lovely peas.