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 cfunP phi psi : phi =1 psi <-> phi = psi.