[HX] fix typechecking constraint error
[HX] fix typechecking constraint error

innerprod.N must be Nat. But local methods don't support type
constraints, so implement as a class member function and inherit

davidyu/gml,davidyu/gml