theory Test imports "~~/src/HOL/Algebra/Ring" begin context ring begin definition of_nat :: "nat \ 'a" where "of_nat n = (op \ \ ^^ n) \" lift_definition of_int :: "int \ 'a" is "\(i, j). of_nat i \ of_nat j" end end