まず通常の温度というものはエントロピー,エネルギー,その他エントロピーの示量変数に対し熱力学的に
と定義される.右辺の意味を,エントロピーの存在と性質を認め温度の定義を知らない立場になって考える.ある孤立系を少なくとも熱的に接触したそれぞれ平衡状態の系A,Bに分割することを考える.系A,Bのエネルギーとその他示量変数をそれぞれ,,,とすると孤立系のエネルギーとその他示量変数は,である.孤立系が平衡状態のときはそれぞれ,,,であるとする.系A,Bがそれぞれ平衡である状態から,孤立系が自発的に平衡状態になることを考える.それぞれが平衡状態のときの孤立系のエントロピーはとし,系A,Bのエントロピーはそれぞれ,であるとする.は平衡状態で要請より最大になるため,エネルギーに対して連続的微分可能である要請より
である.エントロピーは示量変数であるためである.よって
であり,とりあえず例の右辺は熱平衡状態で等しくなる物理量であるといえる.
ここからは平衡状態の孤立系とそれぞれ平衡状態の系A,Bのエントロピーの関数形は同じであるとする.これは物理学的には平衡状態の孤立系で系A,Bの間に体積の無視できる透熱壁がある場合でも,それを取り除いても自発的変化が起こらない場合を考えるということである.さてエントロピーの最大原理より
である.ただし等号は元から孤立系が平衡状態であった場合である.ここで
を満たす量,,,を考える.すると
であるため
とエントロピーはエネルギーの広義上凸関数であることがわかる.よって
が成り立つ.またエントロピーは要請よりエネルギーの狭義単調増加関数であるため
が成り立つ.よって例の右辺は正の実数を終域とするエネルギーの広義単調減少関数であるといえる.孤立系の平衡状態とはエネルギーだけ系Aは,系Bは異なる状態からの自発的変化を考える.孤立系の平衡状態になると系Aから系Bにだけエネルギーが移動したと考えられる.例の右辺はエネルギーの広義単調減少関数であるため
が成り立つ.ここで広義温度という物理量を熱的接触によりエネルギーが流出する側が高く(高温),流入する側が低い(低温),物理量であると定める.また温度はそれのみで例の右辺が決まる物理量であると定める.ある広義温度に対し
という関数を考えると,例の右辺の性質より
が成り立つ.よって関数は正の実数を終域とする広義温度の狭義単調減少関数である.今,この関数を決めると具体的な温度が決まる.これはは狭義単調減少関数であり逆関数が存在するため,例の右辺の狭義単調減少関数を決めるのと同値である.を
とすると,これは通常の温度である.他の簡単な狭義単調減少関数は
である.この温度はの終域より負に値をとる.通常の温度との関係は
である.この温度はエントロピー表示の熱力学や,統計力学に便利である.日常的に使用するには気持ちが悪いのでCelsius温度のように定数を加えることで下駄を履かせて
としたものを考えるといいかもしれない.ただしは何かしらの絶対温度の単位であり,,はその逆数である.このようにしてエントロピーの存在と性質を認める立場なら,温度はエントロピーのエネルギー偏微分の狭義単調減少関数であればどのように定義してもいいのである.
物理学徒のための常用単位系2
前回(物理学徒のための常用単位系 - うべの時空代数)とは異なり温度の逆数の負の単位を適切なスケールに調節し,温度は通常の温度の逆数の負(新しい温度の定義 - うべの時空代数)を使うようにした.
量 | 記号 | sux | cheks | SI |
---|---|---|---|---|
時間 | ||||
長さ | ||||
質量 | ||||
電圧 | ||||
温度 | ||||
周波数 | ||||
力 | ||||
エネルギー | ||||
仕事率 | ||||
圧力 | ||||
電荷 | ||||
電流 | ||||
電気抵抗 | ||||
コンダクタンス | ||||
キャパシタンス | ||||
インダクタンス | ||||
磁束 | ||||
電子ボルト | ||||
相対温度 | ||||
面積 | ||||
体積 | ||||
速度 | ||||
加速度 | ||||
運動量 | ||||
角運動量 | ||||
電場 | ||||
磁場 | ||||
電束密度 | ||||
磁束密度 | ||||
密度 | ||||
誘電率 | ||||
透磁率 | ||||
電気抵抗率 | ||||
電気伝導率 | ||||
比熱容量 | ||||
光速 | ||||
Planck定数 | ||||
素電荷 | ||||
Boltzmann定数 | ||||
真空の誘電率 | ||||
真空の透磁率 | ||||
真空のインピーダンス | ||||
Josephson定数 | ||||
von Klitzing定数 |
物理学徒のための常用単位系
この単位系の利点は光速,Plank定数,素電荷,Boltzmann定数がの冪乗で表されることである.これは,真空の誘電率や真空の透磁率が微細構造定数を含む簡単な値で表される,ジュールと電子ボルトの変換が容易になるといった利点を生む.この単位系の記号は長さの単位,質量の単位を除きSI単位系のものにを付けて表される.時間の単位はSI単位系と同じを用いる.この単位系をsux単位系と称す.表はsux単位での組立,4定数(光速,Plank定数,素電荷,Boltzmann定数)とでの値,SI単位系での値である.
量 | 記号 | sux | cheks | SI |
---|---|---|---|---|
時間 | ||||
長さ | ||||
質量 | ||||
電圧 | ||||
絶対温度 | ||||
周波数 | ||||
力 | ||||
エネルギー | ||||
仕事率 | ||||
圧力 | ||||
電荷 | ||||
電流 | ||||
電気抵抗 | ||||
コンダクタンス | ||||
キャパシタンス | ||||
インダクタンス | ||||
磁束 | ||||
電子ボルト | ||||
相対温度 | ||||
面積 | ||||
体積 | ||||
速度 | ||||
加速度 | ||||
運動量 | ||||
角運動量 | ||||
電場 | ||||
磁場 | ||||
電束密度 | ||||
磁束密度 | ||||
密度 | ||||
誘電率 | ||||
透磁率 | ||||
電気抵抗率 | ||||
電気伝導率 | ||||
比熱容量 | ||||
光速 | ||||
Planck定数 | ||||
素電荷 | ||||
Boltzmann定数 | ||||
真空の誘電率 | ||||
真空の透磁率 | ||||
真空のインピーダンス | ||||
Josephson定数 | ||||
von Klitzing定数 |
幾何代数微分と共変解析力学
次元実線型空間とその上の非退化な計量の二次空間の幾何代数(次元非退化実Clifford代数)を考える.の次斉次元の集合を,の元から次の斉次な部分全体を抜き出す写像を
とする.斉次元多変数実数値関数
と斉次元多変数斉次元値関数
を考え,全ての引数の斉次な任意の変分
に対して
を満たす斉次元多変数斉次元値関数組が1つに決まるときはで微分可能であるといい,をのに関する偏導関数や偏微分といい
と書く.幾何代数は一般的に非可換であるがの中では2つの同次数斉次元の積は交換してもいいため
としても同値である.
簡単な例としては
という関数は
であるため
であり
という関数は
であるため
である.
この幾何代数微分は解析力学に用いることができ,共変性が明らかな定式化に役立つ.その前に本記事で用いる記号や公式を纏めておく.
:Dirac作用素.
:Dirac作用素のうち次数を上げる部分.
:Dirac作用素のうち次数を下げる部分.形式的にはと書ける.
:右から左に作用するDirac作用素.同様に,などとする.
:体積形式..
,に対し
というLeibniz則が成り立つ.また詳しく考察,証明していないが恐らく成り立つであろう,に対し
という公式を用いる.幾何代数を用いてStokesの定理を記述する方法は模索中である.被積分部分がスカラーであればいいので
という積分が考えられ,Stokesの定理としたいのは
といったものである.何かいい案があれば教えてください.
斉次元場の作用
を考える.が微分可能ならば,の下で作用の変分を計算すると作用原理より
と共変定式化されたEuler-Lagrange方程式が得られる.
Hamilton形式をWeyl代数で
こんにちは.うべです.発見があったので137億年ぶりにはてなブログを書きます.
正準方程式は一般化座標・一般化運動量,あるいはもっと一般的に正準変換されて正準共役量
に対し行列を使って
と書ける.またPoisson括弧は相空間上関数に対し
と書ける.これらはシンプレクティック形式によるHamilton形式をDarboux基底での行列表現で書き換えたものである.相空間上の一般の基底での座標では
によって
と変換される.この合同な変換のうちが不変なものを物理では正準変化といい,数学ではシンプレクティック同相写像という.
今日では擬Riemann幾何学もシンプレクティック幾何学も可微分多様体上で展開される幾何学は微分形式と方向微分(接ベクトル)を用いて記述される.しかしこれは私自身のマインドのお話であるが,双線型形式を備えた可微分多様体はその双線型形式についての商代数で記述する方が自然だと思う.つまり擬Riemann多様体は非退化対称双線型形式なので(非退化実)Clifford代数,シンプレクティック多様体は非退化反対称双線型形式なのでWeyl代数によって記述されるべきだと考える.というわけで今回はHamilton形式をWeyl代数で記述してみる.ここでは微分記号を
とする.
次元シンプレクティック多様体上のある点近傍を考え,局所座標系を与える.局所座標の偏微分による基底に対しシンプレクティック形式の成分を
と定める.この接空間のWeyl代数,つまりテンソル代数の,接空間の元に対して
の形の元が生成するイデアルによる商代数を考える.この商によってテンソル積に継承される積を並置で表し,偏微分の基底に対応する元は,それ以外の接空間の元やシンプレクティック形式の文字は接空間のものを使う.すると接空間の元(に対応するWeyl代数の元)に対し
が成り立つことが書ける.ここで交換子
を定める.が接空間の元ならば
が成り立つ.またシンプレクティック形式の成分の逆を
と定め,双対基底
を定める.これは
を満たす.そしてWeyl代数におけるDirac作用素を
と定める.ちなみに接空間の基底として局所座標の偏微分を選んだので接空間は方向微分の集合であるが,それに対応する商代数の基底は,商代数は接空間のテンソル代数の集合の集合であり,その元は接空間のテンソル代数の「集合」であるため,基底には微分的な構造は継承されない.
これを用いてHamilton形式はかなり自然に記述できる.ここでは場はよく分かっていないので粒子(運動のパラメータ:,正準変数:)のものを考える.まずHamiltonベクトル場はハミルトニアンに対しと書けて,正準方程式は相空間上の速度に対し
と書ける.またPoisson括弧は相空間上の可微分関数に対し
と書ける.
実用性は知らん.
時空代数のクラス
#pragma once /*st.h*/ #include <stdio.h> #include <math.h> class st { public: double est[4][4] = { 0.0 }; static const st gamma0; static const st gamma1; static const st gamma2; static const st gamma3; st operator+(const st& e2)const; st operator-(const st& e2)const; st operator*(const st& e2)const; st operator/(const st& e2)const; st operator+(double s)const; st operator-(double s)const; st operator*(double s)const; st operator/(double s)const; //st operator+(double s, const st& e2); //st operator-(double s, const st& e2); //st operator/(double s, const st& e2); //st operator*(double s, const st& e2); st operator+()const; st operator-()const; st& operator+=(const st& e2); st& operator-=(const st& e2); st& operator*=(const st& e2); st& operator/=(const st& e2); st& operator =(double s); st& operator+=(double s); st& operator-=(double s); st& operator*=(double s); st& operator/=(double s); double DETST()const; st IST()const; static st WST(const st& e1, const st& e2); static st VST(const st& e1, const st& e2); static st CST(const st& e1, const st& e2); static st AST(const st& e1, const st& e2); st WST(const st& e2)const; st VST(const st& e2)const; st CST(const st& e2)const; st AST(const st& e2)const; st ATST(const st& T)const; st PTST(const st& T)const; st RST(double u[4])const; st BST(double u[4])const; st MST(double m[4])const; }; const st st::gamma0 = { 0.0,0.0,0.0,0.0,1.0 }; const st st::gamma1 = { 0.0,0.0,0.0,0.0,0.0,1.0 }; const st st::gamma2 = { 0.0,0.0,0.0,0.0,0.0,0.0,1.0 }; const st st::gamma3 = { 0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0 }; st st::operator+(const st& e2)const { st e3; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { e3.est[i][j] = est[i][j] + e2.est[i][j]; } } return e3; } st st::operator-(const st& e2)const { st e3; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { e3.est[i][j] = est[i][j] - e2.est[i][j]; } } return e3; } st st::operator*(const st& e2)const { st e3; e3.est[0][0] = est[0][0] * e2.est[0][0] - est[2][0] * e2.est[2][0] - est[1][0] * e2.est[1][0] + est[1][1] * e2.est[1][1] + est[1][2] * e2.est[1][2] + est[1][3] * e2.est[1][3] - est[3][0] * e2.est[3][0] + est[3][1] * e2.est[3][1] + est[3][2] * e2.est[3][2] + est[3][3] * e2.est[3][3] + est[0][1] * e2.est[0][1] + est[0][2] * e2.est[0][2] + est[0][3] * e2.est[0][3] - est[2][1] * e2.est[2][1] - est[2][2] * e2.est[2][2] - est[2][3] * e2.est[2][3]; e3.est[1][0] = est[0][0] * e2.est[1][0] + est[1][0] * e2.est[0][0] - est[2][0] * e2.est[3][0] + est[3][0] * e2.est[2][0] - est[1][1] * e2.est[0][1] - est[1][2] * e2.est[0][2] - est[1][3] * e2.est[0][3] + est[0][1] * e2.est[1][1] + est[0][2] * e2.est[1][2] + est[0][3] * e2.est[1][3] - est[3][1] * e2.est[2][1] - est[3][2] * e2.est[2][2] - est[3][3] * e2.est[2][3] - est[2][1] * e2.est[3][1] - est[2][2] * e2.est[3][2] - est[2][3] * e2.est[3][3]; e3.est[1][1] = est[0][0] * e2.est[1][1] + est[1][1] * e2.est[0][0] - est[2][0] * e2.est[3][1] + est[3][1] * e2.est[2][0] - est[1][0] * e2.est[0][1] - est[1][2] * e2.est[2][3] + est[1][3] * e2.est[2][2] + est[0][1] * e2.est[1][0] - est[2][2] * e2.est[1][3] + est[2][3] * e2.est[1][2] - est[3][0] * e2.est[2][1] + est[3][2] * e2.est[0][3] - est[3][3] * e2.est[0][2] - est[2][1] * e2.est[3][0] - est[0][2] * e2.est[3][3] + est[0][3] * e2.est[3][2]; e3.est[1][2] = est[0][0] * e2.est[1][2] + est[1][2] * e2.est[0][0] - est[2][0] * e2.est[3][2] + est[3][2] * e2.est[2][0] - est[1][0] * e2.est[0][2] - est[1][3] * e2.est[2][1] + est[1][1] * e2.est[2][3] + est[0][2] * e2.est[1][0] - est[2][3] * e2.est[1][1] + est[2][1] * e2.est[1][3] - est[3][0] * e2.est[2][2] + est[3][3] * e2.est[0][1] - est[3][1] * e2.est[0][3] - est[2][2] * e2.est[3][0] - est[0][3] * e2.est[3][1] + est[0][1] * e2.est[3][3]; e3.est[1][3] = est[0][0] * e2.est[1][3] + est[1][3] * e2.est[0][0] - est[2][0] * e2.est[3][3] + est[3][3] * e2.est[2][0] - est[1][0] * e2.est[0][3] - est[1][1] * e2.est[2][2] + est[1][2] * e2.est[2][1] + est[0][3] * e2.est[1][0] - est[2][1] * e2.est[1][2] + est[2][2] * e2.est[1][1] - est[3][0] * e2.est[2][3] + est[3][1] * e2.est[0][2] - est[3][2] * e2.est[0][1] - est[2][3] * e2.est[3][0] - est[0][1] * e2.est[3][2] + est[0][2] * e2.est[3][1]; e3.est[0][1] = est[0][0] * e2.est[0][1] + est[0][1] * e2.est[0][0] - est[2][0] * e2.est[2][1] - est[2][1] * e2.est[2][0] + est[1][0] * e2.est[1][1] - est[1][1] * e2.est[1][0] + est[3][0] * e2.est[3][1] - est[3][1] * e2.est[3][0] + est[1][2] * e2.est[3][3] - est[1][3] * e2.est[3][2] - est[3][2] * e2.est[1][3] + est[3][3] * e2.est[1][2] - est[0][2] * e2.est[2][3] + est[0][3] * e2.est[2][2] - est[2][2] * e2.est[0][3] + est[2][3] * e2.est[0][2]; e3.est[0][2] = est[0][0] * e2.est[0][2] + est[0][2] * e2.est[0][0] - est[2][0] * e2.est[2][2] - est[2][2] * e2.est[2][0] + est[1][0] * e2.est[1][2] - est[1][2] * e2.est[1][0] + est[3][0] * e2.est[3][2] - est[3][2] * e2.est[3][0] + est[1][3] * e2.est[3][1] - est[1][1] * e2.est[3][3] - est[3][3] * e2.est[1][1] + est[3][1] * e2.est[1][3] - est[0][3] * e2.est[2][1] + est[0][1] * e2.est[2][3] - est[2][3] * e2.est[0][1] + est[2][1] * e2.est[0][3]; e3.est[0][3] = est[0][0] * e2.est[0][3] + est[0][3] * e2.est[0][0] - est[2][0] * e2.est[2][3] - est[2][3] * e2.est[2][0] + est[1][0] * e2.est[1][3] - est[1][3] * e2.est[1][0] + est[3][0] * e2.est[3][3] - est[3][3] * e2.est[3][0] + est[1][1] * e2.est[3][2] - est[1][2] * e2.est[3][1] - est[3][1] * e2.est[1][2] + est[3][2] * e2.est[1][1] - est[0][1] * e2.est[2][2] + est[0][2] * e2.est[2][1] - est[2][1] * e2.est[0][2] + est[2][2] * e2.est[0][1]; e3.est[2][1] = est[0][0] * e2.est[2][1] + est[2][1] * e2.est[0][0] + est[2][0] * e2.est[0][1] + est[0][1] * e2.est[2][0] + est[1][2] * e2.est[1][3] - est[1][3] * e2.est[1][2] + est[3][2] * e2.est[3][3] - est[3][3] * e2.est[3][2] - est[1][0] * e2.est[3][1] + est[1][1] * e2.est[3][0] + est[3][0] * e2.est[1][1] - est[3][1] * e2.est[1][0] + est[0][2] * e2.est[0][3] - est[0][3] * e2.est[0][2] - est[2][2] * e2.est[2][3] + est[2][3] * e2.est[2][2]; e3.est[2][2] = est[0][0] * e2.est[2][2] + est[2][2] * e2.est[0][0] + est[2][0] * e2.est[0][2] + est[0][2] * e2.est[2][0] + est[1][3] * e2.est[1][1] - est[1][1] * e2.est[1][3] + est[3][3] * e2.est[3][1] - est[3][1] * e2.est[3][3] - est[1][0] * e2.est[3][2] + est[1][2] * e2.est[3][0] + est[3][0] * e2.est[1][2] - est[3][2] * e2.est[1][0] + est[0][3] * e2.est[0][1] - est[0][1] * e2.est[0][3] - est[2][3] * e2.est[2][1] + est[2][1] * e2.est[2][3]; e3.est[2][3] = est[0][0] * e2.est[2][3] + est[2][3] * e2.est[0][0] + est[2][0] * e2.est[0][3] + est[0][3] * e2.est[2][0] + est[1][1] * e2.est[1][2] - est[1][2] * e2.est[1][1] + est[3][1] * e2.est[3][2] - est[3][2] * e2.est[3][1] - est[1][0] * e2.est[3][3] + est[1][3] * e2.est[3][0] + est[3][0] * e2.est[1][3] - est[3][3] * e2.est[1][0] + est[0][1] * e2.est[0][2] - est[0][2] * e2.est[0][1] - est[2][1] * e2.est[2][2] + est[2][2] * e2.est[2][1]; e3.est[3][0] = est[0][0] * e2.est[3][0] + est[3][0] * e2.est[0][0] + est[2][0] * e2.est[1][0] - est[1][0] * e2.est[2][0] + est[1][1] * e2.est[2][1] + est[1][2] * e2.est[2][2] + est[1][3] * e2.est[2][3] + est[2][1] * e2.est[1][1] + est[2][2] * e2.est[1][2] + est[2][3] * e2.est[1][3] - est[3][1] * e2.est[0][1] - est[3][2] * e2.est[0][2] - est[3][3] * e2.est[0][3] + est[0][1] * e2.est[3][1] + est[0][2] * e2.est[3][2] + est[0][3] * e2.est[3][3]; e3.est[3][1] = est[0][0] * e2.est[3][1] + est[3][1] * e2.est[0][0] + est[2][0] * e2.est[1][1] - est[1][1] * e2.est[2][0] + est[1][0] * e2.est[2][1] - est[1][2] * e2.est[0][3] + est[1][3] * e2.est[0][2] + est[2][1] * e2.est[1][0] + est[0][2] * e2.est[1][3] - est[0][3] * e2.est[1][2] - est[3][0] * e2.est[0][1] - est[3][2] * e2.est[2][3] + est[3][3] * e2.est[2][2] + est[0][1] * e2.est[3][0] - est[2][2] * e2.est[3][3] + est[2][3] * e2.est[3][2]; e3.est[3][2] = est[0][0] * e2.est[3][2] + est[3][2] * e2.est[0][0] + est[2][0] * e2.est[1][2] - est[1][2] * e2.est[2][0] + est[1][0] * e2.est[2][2] - est[1][3] * e2.est[0][1] + est[1][1] * e2.est[0][3] + est[2][2] * e2.est[1][0] + est[0][3] * e2.est[1][1] - est[0][1] * e2.est[1][3] - est[3][0] * e2.est[0][2] - est[3][3] * e2.est[2][1] + est[3][1] * e2.est[2][3] + est[0][2] * e2.est[3][0] - est[2][3] * e2.est[3][1] + est[2][1] * e2.est[3][3]; e3.est[3][3] = est[0][0] * e2.est[3][3] + est[3][3] * e2.est[0][0] + est[2][0] * e2.est[1][3] - est[1][3] * e2.est[2][0] + est[1][0] * e2.est[2][3] - est[1][1] * e2.est[0][2] + est[1][2] * e2.est[0][1] + est[2][3] * e2.est[1][0] + est[0][1] * e2.est[1][2] - est[0][2] * e2.est[1][1] - est[3][0] * e2.est[0][3] - est[3][1] * e2.est[2][2] + est[3][2] * e2.est[2][1] + est[0][3] * e2.est[3][0] - est[2][1] * e2.est[3][2] + est[2][2] * e2.est[3][1]; e3.est[2][0] = est[0][0] * e2.est[2][0] + est[2][0] * e2.est[0][0] + est[1][0] * e2.est[3][0] - est[1][1] * e2.est[3][1] - est[1][2] * e2.est[3][2] - est[1][3] * e2.est[3][3] - est[3][0] * e2.est[1][0] + est[3][1] * e2.est[1][1] + est[3][2] * e2.est[1][2] + est[3][3] * e2.est[1][3] + est[0][1] * e2.est[2][1] + est[0][2] * e2.est[2][2] + est[0][3] * e2.est[2][3] + est[2][1] * e2.est[0][1] + est[2][2] * e2.est[0][2] + est[2][3] * e2.est[0][3]; return e3; } st st::operator/(const st& e2)const { return *this * e2.IST(); } st st::operator+(double s)const { st e3 = *this; e3.est[0][0] += s; return e3; } st st::operator-(double s)const { st e3 = *this; e3.est[0][0] -= s; return e3; } st st::operator*(double s)const { st e3; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { e3.est[i][j] = est[i][j] * s; } } return e3; } st st::operator/(double s)const { st e3; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { e3.est[i][j] = est[i][j] / s; } } return e3; } st operator+(double s, const st& e2) { st e3 = e2; e3.est[0][0] += s; return e3; } st operator-(double s, const st& e2) { st e3 = -e2; e3.est[0][0] += s; return e3; } st operator*(double s, const st& e2) { st e3; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { e3.est[i][j] = s * e2.est[i][j]; } } return e3; } st operator/(double s, const st& e2) { return s * e2.IST(); } st st::operator+()const { return *this; } st st::operator-()const { st e2; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { e2.est[i][j] = -est[i][j]; } } return e2; } st& st::operator+=(const st& e2) { for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { est[i][j] += e2.est[i][j]; } } return *this; } st& st::operator-=(const st& e2) { for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { est[i][j] -= e2.est[i][j]; } } return *this; } st& st::operator*=(const st& e2) { *this = *this * e2; return *this; } st& st::operator/=(const st& e2) { *this = *this / e2; return *this; } st& st::operator =(double s) { st e = { s }; *this = e; return *this; } st& st::operator+=(double s) { est[0][0] += s; return *this; } st& st::operator-=(double s) { est[0][0] -= s; return *this; } st& st::operator*=(double s) { for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { est[i][j] *= s; } } return *this; } st& st::operator/=(double s) { for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { est[i][j] = est[i][j] / s; } } return *this; } double st::DETST()const { st e2 = *this; e2.est[0][0] *= -1; e2.est[3][0] *= -1; e2.est[3][1] *= -1; e2.est[3][2] *= -1; e2.est[3][3] *= -1; e2.est[2][0] *= -1; st e3 = *this * e2; e3.est[0][0] *= -1; return (*this * e2 * e3).est[0][0]; } st st::IST()const { const double EPS = pow(24.0, -24.0); double det = DETST(); if (fabs(det) > EPS) { st e = { 1 / det }, e2 = *this; e2.est[0][0] *= -1; e2.est[3][0] *= -1; e2.est[3][1] *= -1; e2.est[3][2] *= -1; e2.est[3][3] *= -1; e2.est[2][0] *= -1; st e3 = *this * e2; e3.est[0][0] *= -1; return e2 * e3 * e; } printf("\a"); return *this; } st st::WST(const st& e1, const st& e2) { st e3; e3.est[0][0] = e1.est[0][0] * e2.est[0][0]; e3.est[1][0] = e1.est[0][0] * e2.est[1][0] + e1.est[1][0] * e2.est[0][0]; e3.est[1][1] = e1.est[0][0] * e2.est[1][1] + e1.est[1][1] * e2.est[0][0]; e3.est[1][2] = e1.est[0][0] * e2.est[1][2] + e1.est[1][2] * e2.est[0][0]; e3.est[1][3] = e1.est[0][0] * e2.est[1][3] + e1.est[1][3] * e2.est[0][0]; e3.est[0][1] = e1.est[0][0] * e2.est[0][1] + e1.est[0][1] * e2.est[0][0] + e1.est[1][0] * e2.est[1][1] - e1.est[1][1] * e2.est[1][0]; e3.est[0][2] = e1.est[0][0] * e2.est[0][2] + e1.est[0][2] * e2.est[0][0] + e1.est[1][0] * e2.est[1][2] - e1.est[1][2] * e2.est[1][0]; e3.est[0][3] = e1.est[0][0] * e2.est[0][3] + e1.est[0][3] * e2.est[0][0] + e1.est[1][0] * e2.est[1][3] - e1.est[1][3] * e2.est[1][0]; e3.est[2][1] = e1.est[0][0] * e2.est[2][1] + e1.est[2][1] * e2.est[0][0] + e1.est[1][2] * e2.est[1][3] - e1.est[1][3] * e2.est[1][2]; e3.est[2][2] = e1.est[0][0] * e2.est[2][2] + e1.est[2][2] * e2.est[0][0] + e1.est[1][3] * e2.est[1][1] - e1.est[1][1] * e2.est[1][3]; e3.est[2][3] = e1.est[0][0] * e2.est[2][3] + e1.est[2][3] * e2.est[0][0] + e1.est[1][1] * e2.est[1][2] - e1.est[1][2] * e2.est[1][1]; e3.est[3][0] = e1.est[0][0] * e2.est[3][0] + e1.est[3][0] * e2.est[0][0] + e1.est[1][1] * e2.est[2][1] + e1.est[1][2] * e2.est[2][2] + e1.est[1][3] * e2.est[2][3] + e1.est[2][1] * e2.est[1][1] + e1.est[2][2] * e2.est[1][2] + e1.est[2][3] * e2.est[1][3]; e3.est[3][1] = e1.est[0][0] * e2.est[3][1] + e1.est[3][1] * e2.est[0][0] + e1.est[1][0] * e2.est[2][1] - e1.est[1][2] * e2.est[0][3] + e1.est[1][3] * e2.est[0][2] + e1.est[2][1] * e2.est[1][0] + e1.est[0][2] * e2.est[1][3] - e1.est[0][3] * e2.est[1][2]; e3.est[3][2] = e1.est[0][0] * e2.est[3][2] + e1.est[3][2] * e2.est[0][0] + e1.est[1][0] * e2.est[2][2] - e1.est[1][3] * e2.est[0][1] + e1.est[1][1] * e2.est[0][3] + e1.est[2][2] * e2.est[1][0] + e1.est[0][3] * e2.est[1][1] - e1.est[0][1] * e2.est[1][3]; e3.est[3][3] = e1.est[0][0] * e2.est[3][3] + e1.est[3][3] * e2.est[0][0] + e1.est[1][0] * e2.est[2][3] - e1.est[1][1] * e2.est[0][2] + e1.est[1][2] * e2.est[0][1] + e1.est[2][3] * e2.est[1][0] + e1.est[0][1] * e2.est[1][2] - e1.est[0][2] * e2.est[1][1]; e3.est[2][0] = e1.est[0][0] * e2.est[2][0] + e1.est[2][0] * e2.est[0][0] + e1.est[1][0] * e2.est[3][0] - e1.est[1][1] * e2.est[3][1] - e1.est[1][2] * e2.est[3][2] - e1.est[1][3] * e2.est[3][3] - e1.est[3][0] * e2.est[1][0] + e1.est[3][1] * e2.est[1][1] + e1.est[3][2] * e2.est[1][2] + e1.est[3][3] * e2.est[1][3] + e1.est[0][1] * e2.est[2][1] + e1.est[0][2] * e2.est[2][2] + e1.est[0][3] * e2.est[2][3] + e1.est[2][1] * e2.est[0][1] + e1.est[2][2] * e2.est[0][2] + e1.est[2][3] * e2.est[0][3]; return e3; } st st::VST(const st& e1, const st& e2) { return e1 * e2 - WST(e1, e2); } st st::CST(const st& e1, const st& e2) { return (e1 * e2 + e2 * e1) / 2.0; } st st::AST(const st& e1, const st& e2) { return (e1 * e2 - e2 * e1) / 2.0; } st st::WST(const st& e2)const { return WST(*this, e2); } st st::VST(const st& e2)const { return VST(*this, e2); } st st::CST(const st& e2)const { return VST(*this, e2); } st st::AST(const st& e2)const { return AST(*this, e2); } st st::ATST(const st& T)const { const double EPS = pow(24.0, -24.0); if (fabs(T.DETST()) > EPS) { return T.IST() * *this * T; } printf("\a"); return *this; } st st::PTST(const st& T)const { const double EPS = pow(24.0, -24.0); if (fabs(T.DETST()) > EPS) { return T * *this * T.IST(); } printf("\a"); return *this; } st st::RST(double u[4])const { st T; T.est[0][0] = cos(u[0] / 2.0); T.est[2][1] = sin(u[0] / 2.0) * u[1] / sqrt(u[1] * u[1] + u[2] * u[2] + u[3] * u[3]); T.est[2][2] = sin(u[0] / 2.0) * u[2] / sqrt(u[1] * u[1] + u[2] * u[2] + u[3] * u[3]); T.est[2][3] = sin(u[0] / 2.0) * u[3] / sqrt(u[1] * u[1] + u[2] * u[2] + u[3] * u[3]); return ATST(T); } st st::BST(double u[4])const { st T; T.est[0][0] = cosh(u[0] / 2.0); T.est[0][1] = sinh(u[0] / 2.0) * u[1] / sqrt(u[1] * u[1] + u[2] * u[2] + u[3] * u[3]); T.est[0][2] = sinh(u[0] / 2.0) * u[2] / sqrt(u[1] * u[1] + u[2] * u[2] + u[3] * u[3]); T.est[0][3] = sinh(u[0] / 2.0) * u[3] / sqrt(u[1] * u[1] + u[2] * u[2] + u[3] * u[3]); return ATST(T); } st st::MST(double m[4])const { st M; M.est[1][0] = m[0]; M.est[1][1] = m[1]; M.est[1][2] = m[2]; M.est[1][3] = m[3]; return -ATST(M); }