Definition get_IR_input_keys (l : list IR) : list K :=
    filterMap (fun x => match x with
                          | IRI k => Some k
                          | _ => None
                        end) l.

(* Specifications: *)
Lemma get_IR_input_keys_defn : forall x l, get_IR_input_keys (x :: l) = match x with | IRI k => k :: get_IR_input_keys l | _ => get_IR_input_keys l end.