This is covered by the following paper. Basically, there are many mathematical facts that seem obvious but must be shown to the Danny compiler.
https://leino.science/papers/krml275.html