Section AHom.
Variable K : fieldType.
Section Class_Def.
Variables aT rT : FalgType K.
Definition ahom_in (U : {vspace aT}) (f : 'Hom(aT, rT)) :=
let fM_at x y := f (x * y) == f x * f y in
all (fun x => all (fM_at x) (vbasis U)) (vbasis U) && (f 1 == 1).

Lemma ahomP {f : 'Hom(aT, rT)} : reflect (lrmorphism f) (ahom_in {:aT} f).
Structure ahom := AHom {ahval :> 'Hom(aT, rT); _ : ahom_in {:aT} ahval}.