Melt the butter in a skillet, then saute the leeks till soft.
Use a mandolin to slice the fennel thinly. Then add it to the pan to saute for a few minutes till tender. Season with salt and pepper.
Slice the potatoes as thin as possible. Using a mandolin makes the job very easy.
Grease a shallow casserole dish and lay one first layer of potatoes. Season with salt and pepper. Sprinkle some of the thyme over it.
Pour half of the cream over the potatoes, then sprinkle some of the cheese you've chosen.
Lay the fennel leek mixture evenly over the first layer of potatoes. Then arrange the remaining slices covering the fennel.
Pour the remaining cream over them and sprinkle with cheese and thyme. Don't forgret to season with salt and pepper.
Bake at 375F (200C) for 30 minutes covered with aluminum foil. Uncover for the last ten minutes to get the golden brown color or "gratiner."