GoPiGo 小汽車︰格點圖像算術《投影幾何》【五‧線性代數】《導引八》觀察者《符契》

我們必須謹慎區分『合理化

Rationalization (psychology)

In psychology and logic, rationalization or rationalisation (also known as making excuses[1]) is a defense mechanism in which controversial behaviors or feelings are justified and explained in a seemingly rational or logical manner to avoid the true explanation, and are made consciously tolerable—or even admirable and superior—by plausible means.[2] It is also an informal fallacy of reasoning.[3]

Rationalization happens in two steps:

  1. A decision, action, judgement is made for a given reason, or no (known) reason at all.
  2. A rationalization is performed, constructing a seemingly good or logical reason, as an attempt to justify the act after the fact (for oneself or others).

Rationalization encourages irrational or unacceptable behavior, motives, or feelings and often involves ad hoc hypothesizing. This process ranges from fully conscious (e.g. to present an external defense against ridicule from others) to mostly unconscious (e.g. to create a block against internal feelings of guilt or shame). People rationalize for various reasons—sometimes when we think we know ourselves better than we do. Rationalization may differentiate the original deterministic explanation of the behavior or feeling in question.[clarification needed][4][5]

 

和『邏輯一致性

Consistency

In classical deductive logic, a consistent theory is one that does not contain a contradiction.[1][2] The lack of contradiction can be defined in either semantic or syntactic terms. The semantic definition states that a theory is consistent if and only if it has a model, i.e., there exists an interpretation under which all formulas in the theory are true. This is the sense used in traditional Aristotelian logic, although in contemporary mathematical logic the term satisfiable is used instead. The syntactic definition states a theory  T is consistent if and only if there is no formula  \phi such that both  \phi and its negation  {\displaystyle \lnot \phi } are elements of the set  T. Let  A be a set of closed sentences (informally “axioms”) and  {\displaystyle \langle A\rangle } the set of closed sentences provable from A under some (specified, possibly implicitly) formal deductive system. The set of axioms  A is consistent when  \langle A\rangle is.[3]

If there exists a deductive system for which these semantic and syntactic definitions are equivalent for any theory formulated in a particular deductive logic, the logic is called complete.[citation needed] The completeness of the sentential calculus was proved by Paul Bernays in 1918[citation needed][4] and Emil Post in 1921,[5] while the completeness of predicate calculus was proved by Kurt Gödel in 1930,[6] and consistency proofs for arithmetics restricted with respect to the induction axiom schema were proved by Ackermann (1924), von Neumann (1927) and Herbrand (1931).[7] Stronger logics, such as second-order logic, are not complete.

A consistency proof is a mathematical proof that a particular theory is consistent.[8] The early development of mathematical proof theory was driven by the desire to provide finitary consistency proofs for all of mathematics as part of Hilbert’s program. Hilbert’s program was strongly impacted by incompleteness theorems, which showed that sufficiently strong proof theories cannot prove their own consistency (provided that they are in fact consistent).

Although consistency can be proved by means of model theory, it is often done in a purely syntactical way, without any need to reference some model of the logic. The cut-elimination (or equivalently the normalization of the underlying calculus if there is one) implies the consistency of the calculus: since there is obviously no cut-free proof of falsity, there is no contradiction in general.

 

之大不同,努力實證思合『 』符『 』契也◎

文心雕龍‧徵聖

夫鑒周日月,妙極機神;文成規矩,思合符契。或簡言以達旨,或博文以該情;或明理以立體,或隱義以藏用。故《春秋》一字以褒貶,「喪服」舉輕以包重:此簡言以達旨也。《邠詩》聯章以積句 ,《儒行》縟說以繁辭:此博文以該情也。書契斷決以象《夬》,文章昭晰以象《離》:此明理以立體也。「四象」精義以曲隱,「五例」微辭以婉晦:此隱義以藏用也。故知繁略殊形,隱顯異術;抑引隨時,變通會適。征之周、孔,則文有師矣。

 

故進一步再探『透視』關係之『分式線性變換』形式

設有 l, l^{'} 兩線,而且 z_1, z_2, z{z_1}^{'}, {z_2}^{'},z^{'} 是那兩線上共線和對應之三點。已知 {z_1}^{'} = \alpha z_1, \ {z_2}^{'} = \beta z_2, \ z^{'} = \gamma z ,那麼這兩線之間形成透視關係,同時滿足『分式線性變換』形式。

可得

z^{'} = \frac{\alpha \cdot \beta \cdot z \cdot (z_2-z_1) }{(\alpha - \beta) z + (\beta \cdot z_2 - \alpha \cdot z_1)}}

= \frac{\alpha \cdot \beta \cdot z \cdot (z_2-z_1) }{\alpha ( z -z_1) - \beta (z -z_2)} 也。

─── 摘自《GoPiGo 小汽車︰格點圖像算術《投影幾何》【五‧線性代數】《導引七‧變換組合 VI‧VIII 》

 

的『變換分解一致性』呦︰

pi@raspberrypi:~ $ ipython3
Python 3.4.2 (default, Oct 19 2014, 13:31:11) 
Type "copyright", "credits" or "license" for more information.

IPython 2.3.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: from sympy import *

In [2]: init_printing()

In [3]: z1,z2,α,β,λ = symbols('z1,z2,α,β,λ')

In [4]: z = (1-λ)*z1 + λ*z2

In [5]: z
Out[5]: z₁⋅(-λ + 1) + z₂⋅λ

In [6]: H1 = Matrix([[z2-z,-z1*(z2-z)],[z2-z1,-z*(z2-z1)]])

In [7]: H1
Out[7]: 
⎡-z₁⋅(-λ + 1) - z₂⋅λ + z₂   -z₁⋅(-z₁⋅(-λ + 1) - z₂⋅λ + z₂) ⎤
⎢                                                          ⎥
⎣        -z₁ + z₂          (-z₁ + z₂)⋅(-z₁⋅(-λ + 1) - z₂⋅λ)⎦

In [8]: zp = (α*β*z*(z2-z1))/((α-β)*z + (β*z2-α*z1))

In [9]: zp
Out[9]: 
    α⋅β⋅(-z₁ + z₂)⋅(z₁⋅(-λ + 1) + z₂⋅λ)    
───────────────────────────────────────────
-z₁⋅α + z₂⋅β + (α - β)⋅(z₁⋅(-λ + 1) + z₂⋅λ)

In [10]: H2 = Matrix([[β*z2-zp,- α*z1*(β*z2-zp)],[β*z2-α*z1,- zp*(β*z2-α*z1)]])

In [11]: H2
Out[11]: 
⎡           α⋅β⋅(-z₁ + z₂)⋅(z₁⋅(-λ + 1) + z₂⋅λ)            ⎛           α⋅β⋅(-z
⎢z₂⋅β - ───────────────────────────────────────────  -z₁⋅α⋅⎜z₂⋅β - ───────────
⎢       -z₁⋅α + z₂⋅β + (α - β)⋅(z₁⋅(-λ + 1) + z₂⋅λ)        ⎝       -z₁⋅α + z₂⋅
⎢                                                                             
⎢                                                       -α⋅β⋅(-z₁ + z₂)⋅(-z₁⋅α
⎢                   -z₁⋅α + z₂⋅β                        ──────────────────────
⎣                                                           -z₁⋅α + z₂⋅β + (α 

₁ + z₂)⋅(z₁⋅(-λ + 1) + z₂⋅λ)    ⎞⎤
────────────────────────────────⎟⎥
β + (α - β)⋅(z₁⋅(-λ + 1) + z₂⋅λ)⎠⎥
                                 ⎥
 + z₂⋅β)⋅(z₁⋅(-λ + 1) + z₂⋅λ)    ⎥
──────────────────────────────   ⎥
- β)⋅(z₁⋅(-λ + 1) + z₂⋅λ)        ⎦

In [12]: H2反矩陣 = H2.inv()

In [13]: H2反矩陣
Out[13]: 
⎡                  ⎛           α⋅β⋅(-z₁ + z₂)⋅(z₁⋅(-λ + 1) + z₂⋅λ)    ⎞       
⎢z₁⋅(-z₁⋅α + z₂⋅β)⋅⎜z₂⋅β - ───────────────────────────────────────────⎟⋅(α⋅λ -
⎢                  ⎝       -z₁⋅α + z₂⋅β + (α - β)⋅(z₁⋅(-λ + 1) + z₂⋅λ)⎠       
⎢─────────────────────────────────────────────────────────────────────────────
⎢          2   ⎛  2  2                   2  2⎞                                
⎢         β ⋅λ⋅⎝z₁ ⋅α  - 2⋅z₁⋅z₂⋅α⋅β + z₂ ⋅β ⎠⋅(z₁⋅α⋅λ - z₁⋅α - z₂⋅β⋅λ + z₂⋅β)
⎢                                                                             
⎢                                                                            2
⎢                                              (-z₁⋅α + z₂⋅β)⋅(α⋅λ - β⋅λ + β) 
⎢                           ──────────────────────────────────────────────────
⎢                                 ⎛  2  2                   2  2⎞             
⎣                           α⋅β⋅λ⋅⎝z₁ ⋅α  - 2⋅z₁⋅z₂⋅α⋅β + z₂ ⋅β ⎠⋅(z₁⋅α⋅λ - z₁

         3                                          ⎛           α⋅β⋅(-z₁ + z₂)
 β⋅λ + β)                                       -z₁⋅⎜z₂⋅β - ──────────────────
                       α⋅λ - β⋅λ + β                ⎝       -z₁⋅α + z₂⋅β + (α 
────────── + ─────────────────────────────────  ──────────────────────────────
2            β⋅(z₁⋅α⋅λ - z₁⋅α - z₂⋅β⋅λ + z₂⋅β)         ⎛  2  2                
                                                   β⋅λ⋅⎝z₁ ⋅α  - 2⋅z₁⋅z₂⋅α⋅β +
                                                                              
                                                                              
                                                                            -(
───────────────────                                                ───────────
                                                                       ⎛  2  2
⋅α - z₂⋅β⋅λ + z₂⋅β)                                                α⋅λ⋅⎝z₁ ⋅α 

⋅(z₁⋅(-λ + 1) + z₂⋅λ)    ⎞                2 ⎤
─────────────────────────⎟⋅(α⋅λ - β⋅λ + β)  ⎥
- β)⋅(z₁⋅(-λ + 1) + z₂⋅λ)⎠                  ⎥
────────────────────────────────────────────⎥
   2  2⎞                                    ⎥
 z₂ ⋅β ⎠⋅(z₁⋅α⋅λ - z₁⋅α - z₂⋅β⋅λ + z₂⋅β)    ⎥
                                            ⎥
                                            ⎥
α⋅λ - β⋅λ + β)                              ⎥
────────────────────────                    ⎥
                   2  2⎞                    ⎥
 - 2⋅z₁⋅z₂⋅α⋅β + z₂ ⋅β ⎠                    ⎦

In [14]: H = H2反矩陣 * H1

In [15]: H
Out[15]: 
⎡                ⎛           α⋅β⋅(-z₁ + z₂)⋅(z₁⋅(-λ + 1) + z₂⋅λ)    ⎞         
⎢  z₁⋅(-z₁ + z₂)⋅⎜z₂⋅β - ───────────────────────────────────────────⎟⋅(α⋅λ - β
⎢                ⎝       -z₁⋅α + z₂⋅β + (α - β)⋅(z₁⋅(-λ + 1) + z₂⋅λ)⎠         
⎢- ───────────────────────────────────────────────────────────────────────────
⎢              ⎛  2  2                   2  2⎞                                
⎢          β⋅λ⋅⎝z₁ ⋅α  - 2⋅z₁⋅z₂⋅α⋅β + z₂ ⋅β ⎠⋅(z₁⋅α⋅λ - z₁⋅α - z₂⋅β⋅λ + z₂⋅β)
⎢                                                                             
⎢                                                                             
⎢                                                                        (-z₁ 
⎢                                                                 - ──────────
⎢                                                                       ⎛  2  
⎣                                                                   α⋅λ⋅⎝z₁ ⋅α

       2   ⎛                  ⎛           α⋅β⋅(-z₁ + z₂)⋅(z₁⋅(-λ + 1) + z₂⋅λ) 
⋅λ + β)    ⎜z₁⋅(-z₁⋅α + z₂⋅β)⋅⎜z₂⋅β - ────────────────────────────────────────
           ⎜                  ⎝       -z₁⋅α + z₂⋅β + (α - β)⋅(z₁⋅(-λ + 1) + z₂
──────── + ⎜──────────────────────────────────────────────────────────────────
           ⎜          2   ⎛  2  2                   2  2⎞                     
           ⎝         β ⋅λ⋅⎝z₁ ⋅α  - 2⋅z₁⋅z₂⋅α⋅β + z₂ ⋅β ⎠⋅(z₁⋅α⋅λ - z₁⋅α - z₂⋅
                                                                              
                                                                              
+ z₂)⋅(α⋅λ - β⋅λ + β)             (-z₁⋅α + z₂⋅β)⋅(-z₁⋅(-λ + 1) - z₂⋅λ + z₂)⋅(α
───────────────────────── + ──────────────────────────────────────────────────
2                   2  2⎞         ⎛  2  2                   2  2⎞             
  - 2⋅z₁⋅z₂⋅α⋅β + z₂ ⋅β ⎠   α⋅β⋅λ⋅⎝z₁ ⋅α  - 2⋅z₁⋅z₂⋅α⋅β + z₂ ⋅β ⎠⋅(z₁⋅α⋅λ - z₁

   ⎞                3                                    ⎞                    
───⎟⋅(α⋅λ - β⋅λ + β)                                     ⎟                    
⋅λ)⎠                              α⋅λ - β⋅λ + β          ⎟                    
───────────────────── + ─────────────────────────────────⎟⋅(-z₁⋅(-λ + 1) - z₂⋅
           2            β⋅(z₁⋅α⋅λ - z₁⋅α - z₂⋅β⋅λ + z₂⋅β)⎟                    
β⋅λ + z₂⋅β)                                              ⎠                    
                                                                              
             2                                                                
⋅λ - β⋅λ + β)                                                                 
───────────────────                                                           
                                                                              
⋅α - z₂⋅β⋅λ + z₂⋅β)                                                           

              ⎛                  ⎛           α⋅β⋅(-z₁ + z₂)⋅(z₁⋅(-λ + 1) + z₂⋅
              ⎜z₁⋅(-z₁⋅α + z₂⋅β)⋅⎜z₂⋅β - ─────────────────────────────────────
              ⎜                  ⎝       -z₁⋅α + z₂⋅β + (α - β)⋅(z₁⋅(-λ + 1) +
λ + z₂)  - z₁⋅⎜───────────────────────────────────────────────────────────────
              ⎜          2   ⎛  2  2                   2  2⎞                  
              ⎝         β ⋅λ⋅⎝z₁ ⋅α  - 2⋅z₁⋅z₂⋅α⋅β + z₂ ⋅β ⎠⋅(z₁⋅α⋅λ - z₁⋅α - 
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              

λ)    ⎞                3                                    ⎞                 
──────⎟⋅(α⋅λ - β⋅λ + β)                                     ⎟                 
 z₂⋅λ)⎠                              α⋅λ - β⋅λ + β          ⎟                 
──────────────────────── + ─────────────────────────────────⎟⋅(-z₁⋅(-λ + 1) - 
              2            β⋅(z₁⋅α⋅λ - z₁⋅α - z₂⋅β⋅λ + z₂⋅β)⎟                 
z₂⋅β⋅λ + z₂⋅β)                                              ⎠                 
                                                                              
                                                                    2         
        z₁⋅(-z₁⋅α + z₂⋅β)⋅(-z₁⋅(-λ + 1) - z₂⋅λ + z₂)⋅(α⋅λ - β⋅λ + β)        (-
  - ───────────────────────────────────────────────────────────────────── - ──
          ⎛  2  2                   2  2⎞                                     
    α⋅β⋅λ⋅⎝z₁ ⋅α  - 2⋅z₁⋅z₂⋅α⋅β + z₂ ⋅β ⎠⋅(z₁⋅α⋅λ - z₁⋅α - z₂⋅β⋅λ + z₂⋅β)     

                                                 ⎛           α⋅β⋅(-z₁ + z₂)⋅(z
             z₁⋅(-z₁ + z₂)⋅(-z₁⋅(-λ + 1) - z₂⋅λ)⋅⎜z₂⋅β - ─────────────────────
                                                 ⎝       -z₁⋅α + z₂⋅β + (α - β
z₂⋅λ + z₂) - ─────────────────────────────────────────────────────────────────
                                    ⎛  2  2                   2  2⎞           
                                β⋅λ⋅⎝z₁ ⋅α  - 2⋅z₁⋅z₂⋅α⋅β + z₂ ⋅β ⎠⋅(z₁⋅α⋅λ - 
                                                                              
                                                                              
z₁ + z₂)⋅(-z₁⋅(-λ + 1) - z₂⋅λ)⋅(α⋅λ - β⋅λ + β)                                
──────────────────────────────────────────────                                
        ⎛  2  2                   2  2⎞                                       
    α⋅λ⋅⎝z₁ ⋅α  - 2⋅z₁⋅z₂⋅α⋅β + z₂ ⋅β ⎠                                       

₁⋅(-λ + 1) + z₂⋅λ)    ⎞                2⎤
──────────────────────⎟⋅(α⋅λ - β⋅λ + β) ⎥
)⋅(z₁⋅(-λ + 1) + z₂⋅λ)⎠                 ⎥
────────────────────────────────────────⎥
                                        ⎥
z₁⋅α - z₂⋅β⋅λ + z₂⋅β)                   ⎥
                                        ⎥
                                        ⎥
                                        ⎥
                                        ⎥
                                        ⎥
                                        ⎦

In [16]: H[0,0].simplify()
Out[16]: 
  2         2         2                                               2       
z₁ ⋅α⋅λ - z₁ ⋅β⋅λ + z₁ ⋅β - 2⋅z₁⋅z₂⋅α⋅λ + 2⋅z₁⋅z₂⋅β⋅λ - 2⋅z₁⋅z₂⋅β + z₂ ⋅α⋅λ - 
──────────────────────────────────────────────────────────────────────────────
                                  2  2                   2  2                 
                                z₁ ⋅α  - 2⋅z₁⋅z₂⋅α⋅β + z₂ ⋅β                  

  2         2  
z₂ ⋅β⋅λ + z₂ ⋅β
───────────────
               
               

In [17]: H[0,1].simplify()
Out[17]: 0

In [18]: H[1,0].simplify()
Out[18]: 
      2                               2         2       2                     
- z₁⋅α ⋅λ + 2⋅z₁⋅α⋅β⋅λ - z₁⋅α⋅β - z₁⋅β ⋅λ + z₁⋅β  + z₂⋅α ⋅λ - 2⋅z₂⋅α⋅β⋅λ + z₂⋅
──────────────────────────────────────────────────────────────────────────────
                                    ⎛  2  2                   2  2⎞           
                                α⋅β⋅⎝z₁ ⋅α  - 2⋅z₁⋅z₂⋅α⋅β + z₂ ⋅β ⎠           

          2         2
α⋅β + z₂⋅β ⋅λ - z₂⋅β 
─────────────────────
                     
                     

In [19]: H[1,1].simplify()
Out[19]: 
z₁⋅α⋅λ - z₁⋅β⋅λ + z₁⋅β - z₂⋅α⋅λ + z₂⋅β⋅λ - z₂⋅β
───────────────────────────────────────────────
               α⋅β⋅(z₁⋅α - z₂⋅β)               

In [20]: (H[1,1].simplify())/(H[1,0].simplify())
Out[20]: 
                 ⎛  2  2                   2  2⎞                              
                 ⎝z₁ ⋅α  - 2⋅z₁⋅z₂⋅α⋅β + z₂ ⋅β ⎠⋅(z₁⋅α⋅λ - z₁⋅β⋅λ + z₁⋅β - z₂⋅
──────────────────────────────────────────────────────────────────────────────
              ⎛      2                               2         2       2      
(z₁⋅α - z₂⋅β)⋅⎝- z₁⋅α ⋅λ + 2⋅z₁⋅α⋅β⋅λ - z₁⋅α⋅β - z₁⋅β ⋅λ + z₁⋅β  + z₂⋅α ⋅λ - 2

                                     
α⋅λ + z₂⋅β⋅λ - z₂⋅β)                 
─────────────────────────────────────
                         2         2⎞
⋅z₂⋅α⋅β⋅λ + z₂⋅α⋅β + z₂⋅β ⋅λ - z₂⋅β ⎠

In [21]: ((H[1,1].simplify())/(H[1,0].simplify())).simplify()
Out[21]: 
-z₁⋅α + z₂⋅β
────────────
   α - β    

In [22]: 

 

In [22]: ((H[0,0].simplify())/(H[1,0].simplify())).simplify()
Out[22]: 
-α⋅β⋅(z₁ - z₂) 
───────────────
     α - β     

 

In [26]: 分子 = - z1*α**2*λ + 2*z1*α*β*λ - z1*α*β - z1*β**2*λ + z1*β**2 + z2*α**2*λ - 2*z2*α*β*λ + z2*α*β + z2*β**2*λ - z2*β**2

In [27]: 分子
Out[27]: 
      2                               2         2       2                     
- z₁⋅α ⋅λ + 2⋅z₁⋅α⋅β⋅λ - z₁⋅α⋅β - z₁⋅β ⋅λ + z₁⋅β  + z₂⋅α ⋅λ - 2⋅z₂⋅α⋅β⋅λ + z₂⋅

          2         2
α⋅β + z₂⋅β ⋅λ - z₂⋅β 

In [28]: 分子.factor()
Out[28]: -(z₁ - z₂)⋅(α - β)⋅(α⋅λ - β⋅λ + β)

In [29]: 分母 = α*β*(z1**2*α**2 - 2*z1*z2*α*β + z2**2*β**2)

In [30]: 分母
Out[30]: 
    ⎛  2  2                   2  2⎞
α⋅β⋅⎝z₁ ⋅α  - 2⋅z₁⋅z₂⋅α⋅β + z₂ ⋅β ⎠

In [31]: 分母.factor()
Out[31]: 
                 2
α⋅β⋅(z₁⋅α - z₂⋅β) 

In [32]: