什么是real_of_int
, real
and int
在伊莎贝尔?它们听起来有点像类型,但通常类型的写法类似于x ::real
这些写法就像real x
.
我无法证明以下陈述,
"S ((n*x)+(-x)) = S (n*x)*C (-x) + C (n*x)*S (-x)"
我注意到伊莎贝尔这样写:
S (real_of_int (int (n * x) + - int x)) =
S (real (n * x)) * C (real_of_int (- int x)) + C (real (n * x)) * S (real_of_int (- int x))
所以我希望能够理解这些意味着什么。
当一个人使用 Complex_Main (或基于它的逻辑,例如HOL-Analysis
, HOL-Probability
等)Isabelle 支持从 nat、int 和rat 到 real 的强制转换。如果类型不适合,则会自动添加这些。
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
强制(缩写为of_nat
其中范围固定为实数)和real_of_int :: real ⇒ int
是缩写of_int
其中范围固定为实数。
强制转换本质上是不同数字类型之间的态射,因此有许多态射引理可供它们使用:of_nat (l + n) = of_nat l + of_nat n
等等。最好的方法是使用以下命令来搜索它们:of_nat
and of_int
而不是real_…
缩写。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)