2018年5月22日火曜日

Rubyによる 超準解析 クラス.(HyperRael,MathExt)

Rubyによる 超準解析 クラス.(HyperRael,MathExt)

超実数体とは,(大雑把に云えば) 実数体にライプニッツ的な無限小を添加して出来る体のことだ. 微分等, 通常の実数では limit を使う場面で, 超実数体内部の四則演算として直接求めることが出来る.
超準的な計算では, 無限小や∞の強さもわかるので 無限小/無限小, 無限小*∞, ∞/∞ 等の計算が矛盾無く解釈可能となる. ただし単なる体なので, 真の0(無限小でなく) については, 0*∞=0 で, 0/0 や 1/0 は定義されない. この点は IEEE754 的な浮動小数点計算で 1.0/0.0 で Infinity を返すような気持の悪さは解消できる.
Ruby で 超実数(HyperReal) の計算を実行する クラスを作成. 興味がある方は polynomial-ruby.tar.gz をどうぞ.
今のところ, 四則演算に関して, 超準的な計算を実行できる. また, MathExt モジュ-ルで sin, cos, sqrt 等の初等的な関数が HyperReal, Rational, RationalPoly 等を受け付けるように拡張した. 内部では Polynomial クラスに頼っているので, polynomial と同梱している.
内部の計算では RationalPoly を使用しているので Float の場合のような 桁落ちや桁溢れの問題は無い. RationalPoly の係数も, デフォルトでは Float を Rational に変換して扱うようになっている. Float から Rational への変換では桁落ちしないようになっている.
最大の欠点は, RationalPoly の弱点を引き継いで, 四則演算をくりかえすと爆発的にデ-タ-のサイズが増してしまい 計算が遅くなる点にある. Rational と HyperReal に関しては, 精度を指定して 内部表現を簡約/近似するメソッドを用意した.
一応使えるはずだけど, まだ細かい仕様が洗練されていない. 興味がある方は使ってみて改善案等を送って頂けるとありがたい. "kodama@kobe-kosen.ac.jp" までお願いします.

例1. 0/0 , ∞/∞ の扱い.

x~1 のときの (x^2-1)/(x^2+x-2) の値. (注1. ~ は普通 2重波線で書き, (x)-(1) が無限小と云うこと.) x を∞にしたときの (x*x*2+x*3+4)/(x*x*5+x*6+7) の値.
##### test1.rb ファイルの内容 
require "hyperreal"

# x=1 # 通常の Integer を与える. ZeroDivisionErrorになる.
# printf "%s\n", (x*x-1)/(x*x+x-2)

x=1.0 # 通常の Float を与える.
a = x*x-1; b = x*x+x-2
printf "%s/%s=%s\n",a,b,a/b

x=HyperReal::Epsilon+1 # 無限小を加える.
a = x*x-1; b = x*x+x-2
printf "%s/%s=%s\n",a,b,a/b

x=HyperReal::Infinity # ∞
a = x*x*2+x*3+4; b = x*x*5+x*6+7
printf "%s/%s=%s\n",a,b,a/b
これを実行する.
$ ruby test1.rb
0/0=NaN  ------- Floatの計算ではダメダメ
0/0=2/3  ------- 勝利! (^_^)v
Infinity/Infinity=2/5  ------- ∞/∞ も問題無し

例2. 微分

微分は単に dx=無限小 としたときの, df/dx = (f(x+dx)-f(x))/dx の標準実数部分として計算できる. limit は不要. ライプニッツ的微分の概念をほぼそのまま実行できる事になる. まあ, Polynomial, RationalPoly クラスに derivative があるので, 多項式の微分だけが目的ならそのほうが良いはず...
###### test2.rb ファイルの内容
require "hyperreal"
require "polynomial"

f=Poly("5x^3+6x^2+7x+8"); x=2; dx=HyperReal::Epsilon
df=(f.substitute(dx+x)-f.substitute(x))
# 超準解析的に...
printf "f=%s, f'(%s)=%s\n",f, x, df/dx

# Polynomial クラスの微分で...
printf "f'=%s, f'(%s)=%s\n", f.derivative, x, f.derivative.substitute(x)
これを実行する
$ ruby test2.rb
f=5x^(3)+6x^(2)+7x+8, f'(2)=91
f'=15x^(2)+12x+7, f'(2)=91

高階自動微分

超準演算を観点を変えてみると, 高次の微分係数まで一気に求まる 高階の自動微分型とみなすことができる.
こんな風に関数を用意し, 1+epsilon を代入する.
require "hyprereal"
def f(x)
return (2*x+3)/(4*x+5)
end

x = Rational(1)
e = HyperReal::Epsilon

printf "f(1)=%s\n", f(x)
printf "f(1+e)=%s\n", f(x+e)
これを Ruby で実行してみると5/9 の結果が出て来る. f(1)=5/9 f(1+e)=5/9
ここで, HyperReal での内部表現を覗いてみよう. 1+e を (2*x+3)/(4*x+5) に代入したものがそのまま見えている. 更に, この e に関しての有理多項式を多項式近似してやる.
printf "f(1+e)=%s\n", f(x+e).to_s(false)
printf "f(1+e)=%s\n", f(x+e).approx(3).to_s(false)
実行結果.
f(1+e)=(5+2e)/(9+4e)
f(1+e)=(3645-162e+72e^(2)-32e^(3))/(6561)
この f(1+e)の HyperReal 表現を f(1+e) のテ-ラ-展開とみなす事ができ, 微分係数の指数型母関数が得られた事になるので, HyperReal を "高階の自動微分型" と考える事ができる.
printf "f(1+e)=%s\n", f(e+x).to_approx_poly.to_s("text","e",false)
実行結果は以下のようになる.
f(1+e)=5/9-2e/81+8e^(2)/729-32e^(3)/6561
つまり, 普通に四則演算を用いて関数を書けば, そのままHyperReal を与える事ができ, 高階の自動微分も行うことができるわけだ.
結局,無限小の世界では, 関数の値と関数芽の情報を区別する必要が無くなってしまうということらしい.http://www.math.kobe-u.ac.jp/HOME/kodama/tips-HyperReal.html

ゼロ除算の発見は日本です:

∞???
∞は定まった数ではない・
人工知能はゼロ除算ができるでしょうか:

とても興味深く読みました:
ゼロ除算の発見と重要性を指摘した:日本、再生核研究所

ゼロ除算関係論文・本

\documentclass[12pt]{article}
\usepackage{latexsym,amsmath,amssymb,amsfonts,amstext,amsthm}
\numberwithin{equation}{section}
\begin{document}
\title{\bf  Announcement 412:  The 4th birthday of the division by zero $z/0=0$ \\
(2018.2.2)}
\author{{\it Institute of Reproducing Kernels}\\
Kawauchi-cho, 5-1648-16,\\
Kiryu 376-0041, Japan\\
 }
\date{\today}
\maketitle
 The Institute of Reproducing Kernels is dealing with the theory of division by zero calculus and declares that the division by zero was discovered as $0/0=1/0=z/0=0$ in a natural sense on 2014.2.2. The result shows a new basic idea on the universe and space since Aristotelēs (BC384 - BC322) and Euclid (BC 3 Century - ), and the division by zero is since Brahmagupta  (598 - 668 ?).
In particular,  Brahmagupta defined as $0/0=0$ in Brāhmasphuṭasiddhānta (628), however, our world history stated that his definition $0/0=0$ is wrong over 1300 years, but, we showed that his definition is suitable.
 For the details, see the references and the site: http://okmr.yamatoblog.net/

We wrote a global book manuscript \cite{s18} with 154 pages
 and stated in the preface and last section of the manuscript as follows:
\bigskip


{\bf Preface}
\medskip

 The division by zero has a long and mysterious story over the world (see, for example, H. G. Romig \cite{romig} and Google site with the division by zero) with its physical viewpoints since the document of zero in India on AD 628. In particular, note that Brahmagupta (598 -668 ?) established the four arithmetic operations by introducing $0$ and at the same time he defined as $0/0=0$ in
Brhmasphuasiddhnta. Our world history, however, stated that his definition $0/0=0$ is wrong over 1300 years, but, we will see that his definition is right and suitable.

 The division by zero $1/0=0/0=z/0$ itself will be quite clear and trivial with several natural extensions of the fractions against the mysterously long history, as we can see from the concepts of the Moore-Penrose generalized inverses or the Tikhonov regularization method to the fundamental equation $az=b$, whose solution leads to the definition $z =b/a$.

  However, the result (definition) will show that
      for the elementary mapping
\begin{equation}
W = \frac{1}{z},
\end{equation}
the image of $z=0$ is $W=0$ ({\bf should be defined from the form}). This fact seems to be a curious one in connection with our well-established popular image for the  point at infinity on the Riemann sphere (\cite{ahlfors}). �As the representation of the point at infinity of the Riemann sphere by the
zero $z =  0$, we will see some delicate relations between $0$ and $\infty$ which show a strong
discontinuity at the point of infinity on the Riemann sphere. We did not consider any value of the elementary function $W =1/ z $ at the origin $z = 0$, because we did not consider the division by zero
$1/ 0$ in a good way. Many and many people consider its value by the limiting like $+\infty $ and  $- \infty$ or the
point at infinity as $\infty$. However, their basic idea comes from {\bf continuity} with the common sense or
based on the basic idea of Aristotle.  --
 For the related Greece philosophy, see \cite{a,b,c}. However, as the division by zero we will consider its value of
the function $W =1 /z$ as zero at $z = 0$. We will see that this new definition is valid widely in
mathematics and mathematical sciences, see  (\cite{mos,osm}) for example. Therefore, the division by zero will give great impacts to calculus, Euclidean geometry, analytic geometry, differential equations,  complex analysis in the undergraduate level and to our basic ideas for the space and universe.

We have to arrange globally our modern mathematics in our undergraduate level. Our common sense on the division by zero will be wrong, with our basic idea on the space and the universe since Aristotle and Euclid. We would like to show clearly these facts in this book. The content is in the undergraduate level.

\bigskip
\bigskip

{\bf Conclusion}
\medskip


 Apparently, the common sense on the division by zero with a long and mysterious history is wrong and our basic idea on the space around the point at infinity is also wrong since Euclid. On the gradient or on derivatives we have a great missing since $\tan (\pi/2) = 0$. Our mathematics is also wrong in elementary mathematics on the division by zero.

This book is an elementary mathematics  on our division by zero as the first publication of  books for the topics. The contents  have wide connections to various fields beyond mathematics. The author expects the readers write some philosophy, papers and essays on the division by zero from this simple source book.

The division by zero theory may be developed and expanded greatly as in the author's conjecture whose break theory was recently given surprisingly and deeply by  Professor Qi'an Guan \cite{guan} since 30 years proposed  in \cite{s88} (the original is in \cite {s79}).

We have to arrange globally our modern mathematics with our division by zero  in our undergraduate level.

We have to change our basic ideas for our space and world.

We have to change globally our textbooks and scientific books on the division by zero.






\bibliographystyle{plain}
\begin{thebibliography}{10}

\bibitem{ahlfors}
L. V. Ahlfors, Complex Analysis, McGraw-Hill Book Company, 1966.


\bibitem{cs}
L. P.  Castro and S. Saitoh,  Fractional functions and their representations,  Complex Anal. Oper. Theory {\bf7} (2013), no. 4, 1049-1063.

\bibitem{guan}
Q.  Guan,  A proof of Saitoh's conjecture for conjugate Hardy H2 kernels, arXiv:1712.04207.


\bibitem{kmsy}
M. Kuroda, H. Michiwaki, S. Saitoh, and M. Yamane,
New meanings of the division by zero and interpretations on $100/0=0$ and on $0/0=0$,
Int. J. Appl. Math.  {\bf 27} (2014), no 2, pp. 191-198,  DOI: 10.12732/ijam.v27i2.9.

\bibitem{ms16}
T. Matsuura and S. Saitoh,
Matrices and division by zero z/0=0,
Advances in Linear Algebra \& Matrix Theory, {\bf 6}(2016), 51-58
Published Online June 2016 in SciRes.   http://www.scirp.org/journal/alamt
\\ http://dx.doi.org/10.4236/alamt.2016.62007.

\bibitem{ms18}
T. Matsuura and S. Saitoh,
Division by zero calculus and singular integrals. (Submitted for publication)

\bibitem{mms18}
T. Matsuura, H. Michiwaki and S. Saitoh,
$\log 0= \log \infty =0$ and applications. Differential and Difference Equations with Applications. Springer Proceedings in Mathematics \& Statistics.

\bibitem{msy}
H. Michiwaki, S. Saitoh and  M.Yamada,
Reality of the division by zero $z/0=0$.  IJAPM  International J. of Applied Physics and Math. {\bf 6}(2015), 1--8. http://www.ijapm.org/show-63-504-1.html

\bibitem{mos}
H. Michiwaki, H. Okumura and S. Saitoh,
 Division by Zero $z/0 = 0$ in Euclidean Spaces,
 International Journal of Mathematics and Computation, {\bf 2}8(2017); Issue  1, 2017), 1-16.


\bibitem{osm}
H. Okumura, S. Saitoh and T. Matsuura, Relations of   $0$ and  $\infty$,
Journal of Technology and Social Science (JTSS), {\bf 1}(2017),  70-77.

\bibitem{os}
H. Okumura and S. Saitoh, The Descartes circles theorem and division by zero calculus. https://arxiv.org/abs/1711.04961 (2017.11.14).

\bibitem{o}
H. Okumura, Wasan geometry with the division by 0. https://arxiv.org/abs/1711.06947 International  Journal of Geometry.

\bibitem{os18}
H. Okumura and S. Saitoh,
Applications of the division by zero calculus to Wasan geometry.
(Submitted for publication).

\bibitem{ps18}
S. Pinelas and S. Saitoh,
Division by zero calculus and differential equations. Differential and Difference Equations with Applications. Springer Proceedings in Mathematics \& Statistics.

\bibitem{romig}
H. G. Romig, Discussions: Early History of Division by Zero,
American Mathematical Monthly, Vol. {\bf 3}1, No. 8. (Oct., 1924), pp. 387-389.


\bibitem{s79}
S. Saitoh, The Bergman norm and the Szeg$\ddot{o}$ norm, Trans. Amer. Math. Soc. {\bf 249} (1979), no. 2, 261--279.

\bibitem{s88}
 S. Saitoh, Theory of reproducing kernels and its applications. Pitman Research Notes in Mathematics Series, {\bf 189}. Longman Scientific \& Technical, Harlow; copublished in the United States with John Wiley \& Sons, Inc., New York, 1988. x+157 pp. ISBN: 0-582-03564-3

\bibitem{s14}
S. Saitoh, Generalized inversions of Hadamard and tensor products for matrices,  Advances in Linear Algebra \& Matrix Theory.  {\bf 4}  (2014), no. 2,  87--95. http://www.scirp.org/journal/ALAMT/

\bibitem{s16}
S. Saitoh, A reproducing kernel theory with some general applications,
Qian,T./Rodino,L.(eds.): Mathematical Analysis, Probability and Applications - Plenary Lectures: Isaac 2015, Macau, China, Springer Proceedings in Mathematics and Statistics,  {\bf 177}(2016),     151-182. (Springer) .

\bibitem{s17}
S. Saitoh, Mysterious Properties of the Point at Infinity、
arXiv:1712.09467 [math.GM](2017.12.17).

\bibitem{s18}
S. Saitoh, Division by zero calculus (154 pages: draft): (http://okmr.yamatoblog.net/)

\bibitem{ttk}
S.-E. Takahasi, M. Tsukada and Y. Kobayashi,  Classification of continuous fractional binary operations on the real and complex fields,  Tokyo Journal of Mathematics,   {\bf 38}(2015), no. 2, 369-380.

\bibitem{a}
https://philosophy.kent.edu/OPA2/sites/default/files/012001.pdf

\bibitem{b}
http://publish.uwo.ca/~jbell/The 20Continuous.pdf

\bibitem{c}
http://www.mathpages.com/home/kmath526/kmath526.htm



\bibitem{ann179}
Announcement 179 (2014.8.30): Division by zero is clear as z/0=0 and it is fundamental in mathematics.

\bibitem{ann185}
Announcement 185 (2014.10.22): The importance of the division by zero $z/0=0$.

\bibitem{ann237}
Announcement 237 (2015.6.18):  A reality of the division by zero $z/0=0$ by  geometrical optics.

\bibitem{ann246}
Announcement 246 (2015.9.17): An interpretation of the division by zero $1/0=0$ by the gradients of lines.

\bibitem{ann247}
Announcement 247 (2015.9.22): The gradient of y-axis is zero and $\tan (\pi/2) =0$ by the division by zero $1/0=0$.

\bibitem{ann250}
Announcement 250 (2015.10.20): What are numbers? -  the Yamada field containing the division by zero $z/0=0$.

\bibitem{ann252}
Announcement 252 (2015.11.1): Circles and
curvature - an interpretation by Mr.
Hiroshi Michiwaki of the division by
zero $r/0 = 0$.

\bibitem{ann281}
Announcement 281 (2016.2.1): The importance of the division by zero $z/0=0$.

\bibitem{ann282}
Announcement 282 (2016.2.2): The Division by Zero $z/0=0$ on the Second Birthday.

\bibitem{ann293}
Announcement 293 (2016.3.27):  Parallel lines on the Euclidean plane from the viewpoint of division by zero 1/0=0.

\bibitem{ann300}
Announcement 300 (2016.05.22): New challenges on the division by zero z/0=0.

\bibitem{ann326}
 Announcement 326 (2016.10.17): The division by zero z/0=0 - its impact to human beings through education and research.

 \bibitem{ann352}
Announcement 352(2017.2.2):   On the third birthday of the division by zero z/0=0.

\bibitem{ann354}
Announcement 354(2017.2.8): What are $n = 2,1,0$ regular polygons inscribed in a disc? -- relations of $0$ and infinity.

\bibitem{362}
Announcement 362(2017.5.5): Discovery of the division by zero as  $0/0=1/0=z/0=0$

 \bibitem{380}
Announcement 380 (2017.8.21):  What is the zero?

\bibitem{388}
Announcement 388(2017.10.29):   Information and ideas on zero and division by zero (a project).

 \bibitem{409}
Announcement 409 (2018.1.29.):  Various Publication Projects on the Division by Zero.

\bibitem{410}
Announcement 410 (2018.1 30.):  What is mathematics? -- beyond logic; for great challengers on the division by zero.


\end{thebibliography}

\end{document}


List of division by zero:

\bibitem{os18}
H. Okumura and S. Saitoh,
Remarks for The Twin Circles of Archimedes in a Skewed Arbelos by H. Okumura and M. Watanabe, Forum Geometricorum.

Saburou Saitoh, Mysterious Properties of the Point at Infinity、
arXiv:1712.09467 [math.GM]

Hiroshi Okumura and Saburou Saitoh
The Descartes circles theorem and division by zero calculus. 2017.11.14

L. P. Castro and S. Saitoh, Fractional functions and their representations, Complex Anal. Oper. Theory {\bf7} (2013), no. 4, 1049-1063.

M. Kuroda, H. Michiwaki, S. Saitoh, and M. Yamane,
New meanings of the division by zero and interpretations on $100/0=0$ and on $0/0=0$, Int. J. Appl. Math. {\bf 27} (2014), no 2, pp. 191-198, DOI: 10.12732/ijam.v27i2.9.

T. Matsuura and S. Saitoh,
Matrices and division by zero z/0=0,
Advances in Linear Algebra \& Matrix Theory, 2016, 6, 51-58
Published Online June 2016 in SciRes. http://www.scirp.org/journal/alamt
\\ http://dx.doi.org/10.4236/alamt.2016.62007.

T. Matsuura and S. Saitoh,
Division by zero calculus and singular integrals. (Submitted for publication).

T. Matsuura, H. Michiwaki and S. Saitoh,
$\log 0= \log \infty =0$ and applications. (Differential and Difference Equations with Applications. Springer Proceedings in Mathematics \& Statistics.)

H. Michiwaki, S. Saitoh and M.Yamada,
Reality of the division by zero $z/0=0$. IJAPM International J. of Applied Physics and Math. 6(2015), 1--8. http://www.ijapm.org/show-63-504-1.html

H. Michiwaki, H. Okumura and S. Saitoh,
Division by Zero $z/0 = 0$ in Euclidean Spaces,
International Journal of Mathematics and Computation, 28(2017); Issue 1, 2017), 1-16.

H. Okumura, S. Saitoh and T. Matsuura, Relations of $0$ and $\infty$,
Journal of Technology and Social Science (JTSS), 1(2017), 70-77.

S. Pinelas and S. Saitoh,
Division by zero calculus and differential equations. (Differential and Difference Equations with Applications. Springer Proceedings in Mathematics \& Statistics).

S. Saitoh, Generalized inversions of Hadamard and tensor products for matrices, Advances in Linear Algebra \& Matrix Theory. {\bf 4} (2014), no. 2, 87--95. http://www.scirp.org/journal/ALAMT/

S. Saitoh, A reproducing kernel theory with some general applications,
Qian,T./Rodino,L.(eds.): Mathematical Analysis, Probability and Applications - Plenary Lectures: Isaac 2015, Macau, China, Springer Proceedings in Mathematics and Statistics, {\bf 177}(2016), 151-182. (Springer) .


再生核研究所声明371(2017.6.27)ゼロ除算の講演― 国際会議 https://sites.google.com/site/sandrapinelas/icddea-2017 報告


1/0=0、0/0=0、z/0=0
http://ameblo.jp/syoshinoris/entry-12276045402.html
1/0=0、0/0=0、z/0=0
http://ameblo.jp/syoshinoris/entry-12263708422.html
1/0=0、0/0=0、z/0=0

ソクラテス・プラトン・アリストテレス その他


Title page of Leonhard Euler, Vollständige Anleitung zur Algebra, Vol. 1 (edition of 1771, first published in 1770), and p. 34 from Article 83, where Euler explains why a number divided by zero gives infinity.

私は数学を信じない。 アルバート・アインシュタイン / I don't believe in mathematics. Albert Einstein→ゼロ除算ができなかったからではないでしょうか。

ドキュメンタリー 2017: 神の数式 第2回 宇宙はなぜ生まれたのか


〔NHKスペシャル〕神の数式 完全版 第3回 宇宙はなぜ始まったのか


〔NHKスペシャル〕神の数式 完全版 第1回 この世は何からできているのか

NHKスペシャル 神の数式 完全版 第4回 異次元宇宙は存在するか

                                                 
再生核研究所声明 411(2018.02.02):  ゼロ除算発見4周年を迎えて

ゼロ除算の論文

Mysterious Properties of the Point at Infinity

Algebraic division by zero implemented as quasigeometric multiplication by infinity in real and complex multispatial hyperspaces
Author: Jakub Czajko, 92(2) (2018) 171-197
https://img-proxy.blog-video.jp/images?url=http%3A%2F%2Fwww.worldscientificnews.com%2Fwp-content%2Fplugins%2Ffiletype-icons%2Ficons%2F16%2Ffile_extension_pdf.pngWSN 92(2) (2018) 171-197
                                                                                                                                             

2018.3.18.午前中 最後の講演: 日本数学会 東大駒場、函数方程式論分科会 講演書画カメラ用 原稿
The Japanese Mathematical Society, Annual Meeting at the University of Tokyo. 2018.3.18.
https://ameblo.jp/syoshinoris/entry-12361744016.html より


*057  Pinelas,S./Caraballo,T./Kloeden,P./Graef,J.(eds.):
       Differential and Difference Equations with Applications:
        ICDDEA, Amadora, 2017.
           (Springer Proceedings in Mathematics and Statistics, Vol. 230)
             May 2018       587 pp. 


ゼロ除算の論文が2編、出版になりました:

ICDDEA: International Conference on Differential & Difference Equations and Applications
Differential and Difference Equations with Applications
ICDDEA, Amadora, Portugal, June 2017
• Editors

• (view affiliations)
• Sandra Pinelas
• Tomás Caraballo
• Peter Kloeden
• John R. Graef
Conference proceedingsICDDEA 2017

log0=log∞=0log⁡0=log⁡∞=0 and Applications
Hiroshi Michiwaki, Tsutomu Matuura, Saburou Saitoh
Pages 293-305

Division by Zero Calculus and Differential Equations
Sandra Pinelas, Saburou Saitoh
Pages 399-418

0 件のコメント:

コメントを投稿