'real_of_int' and 'real' in Isabelle?

岁酱吖の 提交于 2019-12-05 19:33:40
Johannes

When one uses Complex_Main (or a logic based on it like HOL-Analysis, HOL-Probability etc) Isabelle supports coercions from nat, int and rat into reals. These are added automatically if the types do not fit.

I.e. if f :: real ⇒ real, n :: nat and i :: int:

f n ↝ f (real n)
f i ↝ f (real_of_int i)

where real :: nat ⇒ real is the nat to real coercion (an abbreviation for of_nat where the range is fixed to real) and real_of_int :: real ⇒ int is the abbreviation for of_int where the range is fixed to real.

The coercions are essentially morphisms between the different numeral types, so there are many morphism lemmas available for them: of_nat (l + n) = of_nat l + of_nat n etc. The best is to search for them using just of_nat and of_int and not the real_… abbreviations.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!