Section join_hom_fun.
Variables (Key A: Type)
(Key_dec_eq: forall k1 k2: Key, {k1=k2}+{~k1=k2})
(JA: Join A).
(* Definition saKey := sa_equiv Key. Definition saKeyA := sa_prod saKey saA. Definition saKeyAList := sa_list saKeyA. Definition saSum := sa_sum saA sa_unit. Definition saRange := sa_bijection _ _ (bij_sa_sum_option A) _ saSum. *)
Fixpoint lookup k (rho: list (Key*A)) :=
match rho with
| nil => None
| (k', a) :: rho' =>
if Key_dec_eq k k' then Some a else lookup k rho'
end.
Instance Join_Key : Join Key := @Join_equiv Key.
End join_hom_fun.
Arguments lookup [Key A] _ _ _.

Lemma join_hom2_identity  {A}{B}{C}
`{Perm_alg A}{SA: Sep_alg A}{CA: Disj_alg A}
`{Perm_alg B}{SB: Sep_alg B}{CB: Disj_alg B}
`{Perm_alg C}{SC: Sep_alg C}{CC: Disj_alg C}:
forall (g: A -> B -> C) a1 b1,
identity a1 -> identity b1 -> join_hom2 g -> identity (g a1 b1).