Soak the white beans overnight in plenty of cold water. Then put them in a sieve and rinse well with cold water.
Put the beans in a saucepan with 3 liters of water, garlic and bay leaves and bring to a boil. Reduce the temperature and cook the beans, uncovered, over low heat until tender, a good 1 hour. Meanwhile, remove turbidity a few times with a perforated ladle.
Add ham bone and thyme to beans 10 minutes before end of cooking time. Remove the pot from the heat and let the beans stand for a while. Drain and collect some of the cooking water. Remove the smoked meat bone.
Just before serving, salt the white beans and mix with a little cooking water and olive oil.