End Def.Record classfun : predArgType :=
  Classfun {cfun_val; _ : is_class_fun G cfun_val}.Record classfun : predArgType :=
  Classfun {cfun_val; _ : is_class_fun G cfun_val}.Record classfun : predArgType :=
  Classfun {cfun_val; _ : is_class_fun G cfun_val}.upJ.
Qed.(* The default expansion lemma cfunE requires key = 0. *)
Fact classfun_key : unit.Definition Cfun := locked_with classfun_key (fun flag : nat => Classfun).Canonical cfun_eqType := Eval hnf in EqType classfun cfun_eqMixin.Canonical cfun_choiceType := Eval hnf in ChoiceType classfun cfun_choiceMixin.Definition fun_of_cfun phi := cfun_val phi : gT -> algC.

Lemma cfunElock k f fP : @Cfun k (finfun f) fP =1 f.