(* An association list has unique keys if the keys appear only once *)
Inductive unique_key : list (A * B) -> Prop :=
  | unique_key_nil : unique_key nil
  | unique_key_cons :
      forall (a : A) (b : B) l,
      (forall b : B, ~ In (a, b) l) ->
      unique_key l -> unique_key ((a, b) :: l).(* An association list has unique keys if the keys appear only once *)
Inductive unique_key : list (A * B) -> Prop :=
  | unique_key_nil : unique_key nil
  | unique_key_cons :
      forall (a : A) (b : B) l,
      (forall b : B, ~ In (a, b) l) ->
      unique_key l -> unique_key ((a, b) :: l).(* An association list has unique keys if the keys appear only once *)
Inductive unique_key : list (A * B) -> Prop :=
  | unique_key_nil : unique_key nil
  | unique_key_cons :
      forall (a : A) (b : B) l,
      (forall b : B, ~ In (a, b) l) ->
      unique_key l -> unique_key ((a, b) :: l).

Theorem unique_key_app : forall l1 l2, unique_key l1 -> unique_key l2 -> (forall a b c, In (a, b) l1 -> In (a, c) l2 -> False) -> unique_key (l1 ++ l2).