Definition N_larger_bound n b := match n with
| 0 => larger_bound xH b
| Npos p0 => larger_bound p0 b
end.
Fixpoint lower_bound p0 := match p0 with
| xH => xH
| xO p0 => xO (lower_bound p0)
| xI p0 => xO (lower_bound p0)
end.

Lemma N_larger_bound_mod n m b :
m <> 0 ->
N_larger_bound m b ->
N_larger_bound (n mod m) b.