Dear Daniel,
In Idris2, the `contrib` package has some building blocks that can help you:
Data.Nat.Division.boundModNatNZ : (numer, denom : Nat) -> (0 denom_nz : NonZero denom) -> (modNatNZ numer denom denom_nz) `LT` denom
and
Data.Nat.Division.DivisionTheorem : (numer : Nat) -> (denom : Nat) -> (0 prf1 : NonZero denom) -> (0 prf2 : NonZero denom) -> numer = modNatNZ numer denom prf1 + (divNatNZ numer denom prf2 * denom)
which you can use to prove that `16 > n = r + m * 4 >= m * 4`.
You will then need to prove this implies `4 > m`: I think this monotonicity is currently missing from the standard library.
Then you can use `Data.Fin.Extra.natToFinLTE` to get a value of type `Fin 4`.
Yours,
Ohad.