Fixpoint upd (i : nat) {A} new (l : list A) : option (list A) :=
match i, l with
| O, _ :: l => Some (new :: l)
| _, nil => None
| S i, x :: l =>
match upd i new l with
| Some l' => Some (x :: l')
| None => None
end
end.

Lemma age_by_overflow {A} {_ : ageable A} {JA: Join A} (x : A) n : le (level x) n -> age_by n x = age_by (level x) x.