Fixpoint freeVarMap (l : list nat) : (nat -> fol.Term L) -> list nat :=
  match l with
  | nil => fun _ => nil
  | a :: l' => fun m => freeVarTerm L (m a) ++ freeVarMap l' m
  end.

Lemma freeVarMap1 : forall (l : list nat) (m : nat -> fol.Term L) (v n : nat), In v (freeVarTerm L (m n)) -> In n l -> In v (freeVarMap l m).