0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

「テンソル場の第1、第2の定義の違いを教えて下さい。」をAI先生へ。sympyで教えて下さい。

0
Last updated at Posted at 2026-05-26

(本日の)ChatGPT先生へ

テンソル場の第1、第2の定義の違いを教えて下さい。

(以下抜粋) 小見出しを表示。何となくわかった部分のみ表示。

テンソル場の「第1の定義」「第2の定義」という言い方は、文脈によって少し流派差がありますが、普通は次の2つを指します。
第1の定義
「座標変換則」で定義する方法...
第2の定義
「多重線形写像」で定義する方法...

(続けて)ChatGPT先生へ

sympy で説明お願いします。

第1の定義

「座標変換則」で見る

from sympy import *
from sympy.diffgeom import *

# 座標
x, y = symbols('x y')

# 回転角
theta = symbols('theta')

# ベクトル成分
V = Matrix([x, y])

# 回転行列
R = Matrix([
    [cos(theta), -sin(theta)],
    [sin(theta),  cos(theta)]
])

# 新座標系での成分
V_new = simplify(R * V)

print(V_new)

2階テンソルの場合

a,b,c,d = symbols('a b c d')

T = Matrix([
    [a,b],
    [c,d]
])

T_new = simplify(R * T * R.T)

pprint(T_new)

第2の定義

「多重線形写像」で見る
例:内積

from sympy import *

# ベクトル
u1,u2 = symbols('u1 u2')
v1,v2 = symbols('v1 v2')

u = Matrix([u1,u2])
v = Matrix([v1,v2])

# 計量テンソル(単位行列)
g = Matrix([
    [1,0],
    [0,1]
])

# 双線形写像
inner = (u.T * g * v)[0]

print(inner)

線形性を確認
SymPyで確認

a,b = symbols('a b')

w1,w2 = symbols('w1 w2')
w = Matrix([w1,w2])

lhs = ((a*u + b*w).T * g * v)[0]

rhs = a*(u.T*g*v)[0] + b*(w.T*g*v)[0]

print(simplify(lhs-rhs))

違いをSymPy的に言うと
第1の定義
第2の定義
...

次に進むなら、
・共変・反変の意味
・双対空間
・テンソル積
・添字が上下になる理由
・diffgeom モジュール
・Einstein記法
・Christoffel記号
・リーマンテンソル
あたりが自然につながります。

???

いつもと違うおすすめです。

Qiita内

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?