機遇創生論 1.6.1

這段改編自 2010 年 4 月 18 日的對話。

.

這個大統一理論的成員,包括(但不止於):

精簡圖:

種子論
反白論
間書原理
完備知識論:學海無涯 唯勤是岸 學海無涯 回頭是岸

自由決定論

它們可以大統一的成因,在於它們除了各個自成一國外,還可以合體理解和應用。

在故事《龍珠》中,主角只要找到七粒龍珠,「神龍」就要出現,實現你一個願望。雖然只有一個,但可以是任何。

年輕時,我有一個讀書壓力,覺得有很多重要而精采的東西要學習,沒有足夠時間;覺得只要學少了任何一樣,就會損失慘重。

其實不然。

閱讀一門通用知識的書本到一定數量後,你會發現,資料和知識會重覆。那時,你就再沒需要,閱讀該個主題的書籍。反而,再閱讀的話,會搞亂你在該門學問上,已建立的知識體系。

那就有如在該門知識中,你已經找齊七粒龍珠,「神龍」出現了,你可以實現任何願望。

— Me@2020-06-27 05:36:42 PM

.

.

2020.06.28 Sunday (c) All rights reserved by ACHK

Ex 1.8.2.2 Implementation of $\delta$

Structure and Interpretation of Classical Mechanics

.

(define (((delta eta) f) q)
  (define (g epsilon)
    (f (+ q (* epsilon eta))))
  ((D g) 0))

(define eta (literal-function 'eta))

(define q (literal-function 'q))

— Patrick Eli Catach

.

Code

(define (f q)
  (compose (literal-function 'f (-> (UP Real) Real)) q))

and

(define (f q) (compose (literal-function 'f) q))

have the same effect. If you execute

(show-expression ((((delta eta) f) q) 't))

you will get

\displaystyle{\delta_\eta f[q] = \eta(t) Df(q(t))}

.

It seems not to make sense, because \displaystyle{f} is functional. Its input is a path function, not a real number. We cannot differentiate it with respect to its argument, which is a path.

It actually make sense in this special case because now

(define (f q)
  (compose (literal-function 'f (-> (UP Real) Real)) q))

In other words, \displaystyle{f} is a function of one argument only. And variation itself can be expressed in terms of differentiation:

\displaystyle{ \begin{aligned} g( \epsilon ) &= f[q + \epsilon \eta] \\  \delta_\eta f[q] &= \lim_{\epsilon \to 0} \left( \frac{g(\epsilon) - g(0)}{\epsilon} \right) = D g(0) \\ \end{aligned}}

So

\displaystyle{ \begin{aligned}  &\delta_\eta f[q] \\ &= \left. \frac{d}{d \epsilon} f[q + \epsilon \eta] \right|_{x=a}  \\ \end{aligned}}

No. This explanation is not correct. Even if \displaystyle{f} is a function of one argument only, it is still a path function. Its input argument is a path, not a number. Different path inputs will give different outputs.

The correct explanation should be the following.

(define (f q) (compose (literal-function 'f) q)) 

(define eta (literal-function 'eta))

(define q (literal-function 'q))

These lines actually imply that \displaystyle{f} is just a path-independent function.

\displaystyle{ \begin{aligned} \delta_\eta f[q] &= \lim_{\epsilon \to 0} \left( \frac{f[q+\epsilon \eta]-f[q]}{\epsilon} \right) \\ \end{aligned}}

If the function \displaystyle{f} is just a path-independent,

\displaystyle{ \begin{aligned} \delta_\eta f[q] &= \lim_{\epsilon \to 0} \left( \frac{f(q+\epsilon \eta)-f(q)}{\epsilon} \right) \\ \end{aligned}}

For the time \displaystyle{t} that \displaystyle{\eta(t) \ne 0},

\displaystyle{ \begin{aligned}  \delta_\eta f[q]  &= \eta \lim_{\epsilon \to 0} \left( \frac{f(q+\epsilon \eta)-f(q)}{\epsilon \eta} \right) \\  &= \eta(t) D f(q(t)) \\  \end{aligned}}

So the above lines of code are not correct, because they do not represent a path-dependent function. The correct code (for one-dimensional path \displaystyle{q(t)}) should be

(define (((delta eta) f) q)
  (define (g epsilon)
    (f (+ q (* epsilon eta))))
    ((D g) 0))

(define (f q)
   (compose (literal-function 'f 
              (-> (UP Real (UP* Real) (UP* Real)) Real))
            (Gamma q)))

(define q (literal-function 'q (-> Real (UP Real))))

(define eta (literal-function 'eta (-> Real (UP Real))))

(print-expression ((((delta eta) f) q) 't))

(show-expression ((((delta eta) f) q) 't))

The result is

\displaystyle{ \begin{aligned}  &\delta_\eta f[q] \\ &= D \eta(t) \partial_2 f \left( \begin{bmatrix} t \\ q(t) \\ Dq(t) \end{bmatrix} \right) + \eta(t) \partial_1 f \left( \begin{bmatrix} t \\ q(t) \\ Dq(t) \end{bmatrix} \right)  \\  \end{aligned}}

But this has a problem. It seems that \displaystyle{f} is still not a function with a path as input. It is just a function with 3 real numbers as inputs.

Note that the path-dependent function \displaystyle{f} is not really a general functional. A general functional can depend on an input function in any ways. For example,

\displaystyle{F[y] = y(3)}

\displaystyle{F[y] = \int_0^1 y(x) dx}

A functional that defines the arc length of a curve:

\displaystyle{L[y] = \int_a^b \sqrt{1 + \left( \frac{dy}{dx} \right)^2} dx}

– The Calculus of Variations

– Brian Keng

The function \displaystyle{f} is not an ordinary function because its input is not a real number, but a path-function \displaystyle{q(t)}. In other words, it does not depend on individual values of \displaystyle{q(t)} at different individual times. Instead, its output depends on the whole path \displaystyle{q(t)}. However, the function \displaystyle{f} is not a general functional either.

It is not a general functional in the sense that its input is not a general mathematical function, but a (function that represents a) path \displaystyle{q(t)}. Also, \displaystyle{f} depends on \displaystyle{q} in a specific way:

(define (f q)
   (compose (literal-function 'f 
              (-> (UP Real (UP* Real) (UP* Real)) Real))
            (Gamma q)))

\displaystyle{ \begin{aligned}  &f[q] \\ &= f(\Gamma[q]) \\  &= f \left( (t, q(t), Dq(t)) \right) \\  &= f(t, q(t), Dq(t)) \\  \end{aligned}}

So, besides being a (non-general) functional, \displaystyle{f[q]}, with a path, \displaystyle{q}, as input, \displaystyle{f} can also be regarded as an ordinary function that has 3 real number inputs: \displaystyle{t}, \displaystyle{q(t)}, and \displaystyle{Dq(t)}.

We can vary with respect to a path (the \displaystyle{q} itself), but we cannot differentiate with respect to a path. We can only differentiate with respect to the values of the path \displaystyle{q(t)}.

For simplicity, we consider the case that the path \displaystyle{q(t)} is one-dimensional. Only in the sense that \displaystyle{f} can also be regarded as an ordinary function that has 3 real number inputs, it can use the chain rule of ordinary differentiation:

\displaystyle{ \begin{aligned}  &\delta_\eta f[q] \\ &= D \eta(t) \partial_2 f \left( \begin{bmatrix} t \\ q(t) \\ Dq(t) \end{bmatrix} \right) + \eta(t) \partial_1 f \left( \begin{bmatrix} t \\ q(t) \\ Dq(t) \end{bmatrix} \right)  \\  \end{aligned}}

— Me@2020-06-20 01:17:39 PM

.

.

2020.06.24 Wednesday (c) All rights reserved by ACHK