Set oven to 250 °. Cut the eggplant into 1 cm thick slices and place on a cutting board. Salt and leave for about 10 minutes.
Mash onion, garlic and carrot in oil and tomato puree in a saucepan.
Pour in crushed tomatoes, water, lentils, balsamic vinegar, sugar, thyme, and salt. Boil for 15-20 minutes.
Spread the eggplant on a sheet of baking sheet paper and roll over the oil. Roast high in the oven to fine color, about 10 minutes, (possibly grilling effect).
Turn the eggplant slices with the tomato sauce into a suitable gratin form and top with grated cheese. Grate in the middle of the oven for about 10 minutes.
Mix all ingredients into the sauce and taste with salt. Serve the gratin with the sauce and preferably a green salad.