| ▲ | Gehinnn 5 hours ago | |
Using "length of the correctness statement + length of its proof" works quite well as proxy for complexity of a component (the longer, the more complex). Copy pasted functions with subtle changes mean you cannot reuse the proof (DRY). Giant functions with lots of if/else statements however might cause a branch explosion in the proof. The right abstraction removes lots of assumptions that a proof could depend on, limiting the search space and often forcing elegance (this also applies to math, eg. when reasoning with abstract groups instead of integers). The wrong abstraction might force case distinctions on consumers of the abstraction. | ||