Definition age1_list {A} `{ageable A} := list_forall2 age.

Lemma list_join_join_nth {A} {JA: Join A}{PA: Perm_alg A}:
forall n (l: list A) phin phi phia phib phi2,
nth_error l n = Some phin -> list_join phi l phi2 -> join phi2 phia phib ->
exists phic, exists l',
join phin phia phic /\ replace l n phic = Some l' /\ list_join phi l' phib.