Cook the lentils per instructions on the bag until tender; drain if necessary. In a clean tea towel, ring out the tofu to remove as much water as possible; you can break it up as much as possible during this step, too. Preheat oven to 350F. Finely dice or food process mushrooms and onions. Combine in a large bowl with remaining ingredients (except ketchup), stirring until evenly mixed, then grease a muffin tin and portion mixture into them - roughly the size of a baseball. Spread a spoonful of ketchup on top of each. Bake for 60-70 minutes, until deep brown.