Peel and finely chop the garlic. Wash the thyme, dab dry, remove leaves except for a little to garnish, pluck from the stalks and chop coarsely. Peel potatoes, wash and cut lengthwise into very thin slices.
Mix with garlic, oil, 1 tsp salt and 1/2 tsp pepper in a bowl. Grate cheese. Divide the potatoes into 4 ovenproof forms (each containing approx. 300 ml). Sprinkle cheese over them. Place the moulds on the oven rack, leaving some space for the meat, cover with aluminium foil and bake in the preheated oven (electric cooker: 175 °C/ convection oven: 150 °C/ gas: level 2) for approx. 50 minutes.
Remove foil and bake potatoes for another 15-20 minutes until golden brown. Rinse and drain the lentils. Wash apples, grate dry, quarter, core and dice. Peel, wash and chop the carrots.
Peel the shallots and cut into strips. Melt butter in a pot. Fry diced apples, carrots and shallots until translucent, turn them over and take them out. Add lentils and vegetable stock to the pot, bring to the boil, cover and cook for 30-35 minutes, if necessary add some water in between.
Approx. 5 minutes before the end of the cooking time, stir in apples, shallots, calvados, vinegar and cream and finish cooking. Season lentils with salt, pepper and sugar. Wash the meat, dab dry, cut the skin several times.
Heat a pan without fat. First roast the duck breast on the skin side for 4-5 minutes, then continue roasting on the meat side for about 1 minute. Season the meat with salt and pepper, place in an ovenproof dish and cook in the oven for 8-10 minutes medium rare next to the gratin.
Take out the meat, wrap it individually in aluminium foil and let it rest in a warm place for about 5 minutes. Remove gratin from the oven. Cut the meat into slices. Arrange gratin, lentils and meat on plates, garnish with thyme.