Rule of thumb:
Systematically stating fold-unfold lemmas for each recursive function (1) clarifies its equational intent and (2) saves a lot of grief later on. For example, consider mystery_function_19 from Week 05: the first thing to do was to state fold-unfold lemmas. Yes, the unfold tactic mostly works in the base case(s), but it mostly does not in the induction step(s). Besides, trying to make do without fold-unfold lemmas makes one lose sight of the unity of the approach, as satisfying as it may feel to engage a fight with clearly belligerent windmills and to re-invent an ad-hoc version of the wheel in order to win that fight.
Extracted this chapter from a chapter about miscellanies [21 Mar 2024]