For almost all applications, basic types such as INTEGER are not sufficient. For example, to represent mathematical objects such as…