Random Math Notes: Friedrich Hirzebruch, Theorema Egregium, … (2012-06-06)

Perm URL with updates: http://xahlee.org/math/random_math_notes_2012-06-08.html

learned today from my friend Richard Palais that Friedrich Hirzebruch (1927 〜 2012) passed away last week.

Friedrich Ernst Peter Hirzebruch (17 October 1927 – 27 May 2012) was a German mathematician, working in the fields of topology, complex manifolds and algebraic geometry, and a leading figure in his generation. He has been described as “the most important mathematician in the Germany of the postwar period.”

Complex manifolds

In differential geometry, a complex manifold is a manifold with an atlas of charts to the open unit disk[1] in Cn, such that the transition maps are holomorphic.

The term complex manifold is variously used to mean a complex manifold in the sense above (which can be specified as an integrable complex manifold), and an almost complex manifold.

Holomorphic = Holomorphic function. Quote:

In mathematics, holomorphic functions are the central objects of study in complex analysis. A holomorphic function is a complex-valued function of one or more complex variables that is complex differentiable in a neighborhood of every point in its domain. The existence of a complex derivative is a very strong condition, for it implies that any holomorphic function is actually infinitely differentiable and equal to its own Taylor series.

The term analytic function is often used interchangeably with “holomorphic function”, although the word “analytic” is also used in a broader sense to describe any function (real, complex, or of more general type) that is equal to its Taylor series in a neighborhood of each point in its domain. The fact that the class of complex analytic functions coincides with the class of holomorphic functions is a major theorem in complex analysis.

Holomorphic functions are also sometimes referred to as regular functions[1] or as conformal maps. A holomorphic function whose domain is the whole complex plane is called an entire function. The phrase “holomorphic at a point z0” means not just differentiable at z0, but differentiable everywhere within some neighborhood of z0 in the complex plane.


In the mathematical field of topology, a homeomorphism or topological isomorphism or bicontinuous function is a continuous function between topological spaces that has a continuous inverse function. Homeomorphisms are the isomorphisms in the category of topological spaces—that is, they are the mappings that preserve all the topological properties of a given space. Two spaces with a homeomorphism between them are called homeomorphic, and from a topological viewpoint they are the same.

Two most beautiful awe-inspiring theorem i learned from Richard Palais are:

Gauss's Theorema Egregium (Latin: “Remarkable Theorem”) is a foundational result in differential geometry proved by Carl Friedrich Gauss that concerns the curvature of surfaces. The theorem says that the Gaussian curvature of a surface can be determined entirely by measuring angles, distances and their rates on the surface itself, without further reference to the particular way in which the surface is embedded in the ambient 3-dimensional Euclidean space. Thus the Gaussian curvature is an intrinsic invariant of a surface.

Started to write the above, didn't finish….

傷心酒店 (Heartbreak Bar)

Perm URL with updates: http://xahlee.org/music/heartbreak_bar.html

江蕙+施文彬 - 傷心酒店.

Date: 1993

(女) 冷淡的光線, 哀怨的歌聲, 飲酒的人無心情
(女) 世間的繁華, 好像夢一場, 也是沒有用
(男) 暗淡酒店內, 悲傷誰人知, 痛苦吞腹內

(女) 一杯又再來
(男) 妳若有了解
(合) 甭問我從那來

(女) 不願講出來, 鬱悶在心裡, 感情失落的無奈
(女) 苦苦在等待, 還是等不到愛, 虛情的對待
(男) 多情的世界, 找不到真愛, 引我心悲哀

(女) 有愛也罷
(男) 無愛也快活
(合) 今夜伴我是孤單

(合) 冷淡的光線, 哀怨的歌聲, 飲酒的人無心情
(合) 世間的繁華, 好像夢一場, 也是沒有用
(男) 暗淡酒店內, 悲傷誰人知, 痛苦吞腹內




(男) 多情的世界, 找無真情愛, 引我心悲哀

蔡幸娟+傅振輝 - 傷心酒店

Quick translation:

Heartbreak Bar

cold lights, sad music, this drinker has no mood
the beautiful world, a transient dream, useless
this dim lit bar, who can understand, i keep to myself

drink after drink
if you understand
don't ask me where i'm from

unable to to tell, the sadness in my heart, the feelings of heartbreak
waiting for a love, that never came, the uncaring treatment
this beautiful world, but no love for me, only the blues
皓皓 - 伤心酒店 (singing both male/female)

English Accents

Created a index page of all accent related videos, at: http://xahlee.org/lit/index_accents.html.

Here's a excerpt:


Gmail State-Sponsored Attack Warning 2012-06-06

I'm getting a warning from Gmail.

gmail state-sponsored attack warning 2012-06-06
Gmail state-sponsored attack warning 2012-06-06

It started yesterday. I've since turned on Google's 2-steps verification, but the warning still come on today. It's pretty weird, since am in USA, and am not a China activist. Hardly know anyone in China except a few programers recently met on twitter.

Nice Text Column Commands in cua-mode

There's a nice feature of cua-mode. Turn it on, then 【Ctrl+Enter】 to start selecting rectangle. Then, you can start typing to insert text to the whole column, or press 【⌫ Backspace】 to delete to the left every char on the left boundary, or press 【⌦ Delete】 to delete the whole rectangle, or use any of {Cut, 【Ctrl+x】, Copy 【Ctrl+c】, Paste 【Ctrl+v】}. To cancel selection, press 【Ctrl+Enter】 again.

This is much better than emacs's rectangular commands (e.g. kill-rectangleCtrl+x r k】) because it visually highlight only the column selection, and no need for use specialized rectangle commands.

via +Markus Schütz

for more about working with column text, see: Emacs: Manipulate Column Text, string-rectangle, ASCII-Art

emacs url-unhex-string defect

Perm URL with updates: http://xahlee.org/emacs/emacs_bugs.html

The emacs functions {url-unhex-string, gnus-url-unhex-string} returns incorrect result. Example:

(require 'url-util)
;; emacs-24.1.50_2/lisp/url/url-util.el
(url-hexify-string "Gauss–Bonnet_theorem") ; returns "Gauss%E2%80%93Bonnet_theorem"

(url-unhex-string "Gauss%E2%80%93Bonnet_theorem")
;; returns "Gauss\342\200\223Bonnet_theorem"

(require 'gnus-util)
;; emacs-24.1.50_2/lisp/gnus/gnus-util.el
(gnus-url-unhex-string "Gauss%E2%80%93Bonnet_theorem")
;; returns "Gauss–Bonnet_theorem"

;; correct result should be: "Gauss–Bonnet_theorem"

Another issue is, why there's duplicate {url-unhex-string, gnus-url-unhex-string}?

Some discussion and temp solutions at:

Reported to FSF: bug#6252.

For browser's behavior, see: URL Percent Encoding and Unicode. For example of correct behavior in JavaScript, see: JavaScript Encode URL, Escape String.

math: Fractal Gears

fractal gears clockwork by zy0rg
“clockwork” (2012) by zy0rg. img src


CSS 3 Selector not in CSS 2.1

Here's CSS 3 selector syntax that's not in CSS 2.1.

‹tag›[‹attr›^="‹val›"]Matches any ‹tag› element whose ‹attr› attribute value begins with the string "‹val›"
‹tag›[‹attr›$="‹val›"]Matches any ‹tag› element whose ‹attr› attribute value ends with the string "‹val›"
‹tag›[‹attr›*="‹val›"]Matches any ‹tag› element whose ‹attr› attribute value contains the string "‹val›"
‹tag›:rootMatches element ‹tag› that is root of document.
‹tag›:nth-child(‹n›)Matches element ‹tag› that is nth child of its parent.
‹tag›:nth-last-child(‹n›)Matches element ‹tag› that is nth child of its parent, counting from the last one.
‹tag›:nth-of-type(‹n›)Matches element ‹tag› that is nth child of the same type.
‹tag›:nth-last-of-type(‹n›)Same as ‹tag›:nth-of-type(‹n›) but counting from bottom.
‹tag›:last-childMatches element ‹tag› when ‹tag› is the last child of its parent.
‹tag›:first-of-typeSame as ‹tag›:nth-of-type(1)
‹tag›:last-of-typeSame as ‹tag›:first-of-type but the last.
‹tag›:only-childMatches element ‹tag› if it's the only child of its parent.
‹tag›:only-of-typeMatches element ‹tag› if its type is unique among siblings.
‹tag›:emptyMatches element ‹tag› that has no children (including text nodes)
‹tag›:targetMatches element ‹tag› that is the target of the referring URI.
a user interface element ‹tag› that is enabled or disabled
a user interface element ‹tag› which is checked (for instance a radio-button or checkbox)
‹tag›:not(‹s›)Matches element ‹tag› if it's that does not match simple selector ‹s›.


For complete list of CSS2.1 selectors, see http://xahlee.org/js/css_selector_syntax.html


Emacs 24 Package System Problems

Perm URL with updates: http://xahlee.org/emacs/emacs_package_system_problem.html

This page describes some flaws with emacs 24's package system. If you are not familiar what it is, see: A Guide on Emacs 24 Package System.

does anyone have problems with emacs package system?

recently, installed several packages with it: {rainbow-mode, “bookmark+”, smex, “expand-region”}.

But they all have a similar problem related to autoload. For example, let's say rainbow-mode. When opening a CSS file, it's not loaded. You have to manually call it. So, if you want it to activate in CSS, you have to add stuff to your init file. Then, this means the package system does not really automatically manage things. You still have know some elisp, and manually add things to your init file. (we talking about basic activation, not advanced customization)

The issue is more pronounced with modes such as “bookmark+”, smex, “expand-region”. For example, after installing “bookmark+”, restart emacs, then i press 【Ctrl+x r l】 to open my bookmark, it gives a error call-interactively: Symbol's value as variable is void: bmkp-current-bookmark-file.

Apparently, the problem is that bookmark+ is not properly initialized. (when calling bookmark-bmenu-list, it does automatically load bookmark+, but isn't properly initialized) Here, i've spent some 20 min but haven't succeeded in making it work.

Similar problem with {smex, “expand-region”}. For example, smex requires you to define a key for M-x. So i added (global-set-key (kbd "<apps>") 'smex) in my init. But after starting emacs, i press the apps key, i get: “Symbol's function definition is void: smex”. If i put (require 'smex), restart, i get Debugger entered--Lisp error: (file-error "Cannot open load file" "smex"). Next step is to add the load path, which i haven't tried yet. But that seems to defeat half of goodness of package system.

Any insight on this? For emacs 24, is this the way things are?

Here's answer by José A. Romero L. https://groups.google.com/group/gnu.emacs.help/browse_frm/thread/0e83b11fb5c036a4#

Newsgroups: gnu.emacs.help
From: José A. Romero L. 
Date: Mon, 4 Jun 2012 01:58:03 -0700 (PDT)
Local: Mon, Jun 4 2012 4:58 am
Subject: Re: elpa package loading problem?

AFAIK, ELPA relies heavily on correctly declared autoload cookies, especially if you really want to avoid loading whole packages at startup. From my own experience adapting SC to ELPA I know this is not easy to get right from the beginning — you, as a user, may end needing to add the missing autoloads to the xxx-autoloads.el file automatically generated by ELPA (this sucks big time, because your added code is ditched away with every upgrade of the package). ELPA works wonderfully well, but only if the authors of the packages you happen to use did make that extra effort to get things right from the start.

«for emacs 24, is this the way things are?»

Yep, that's just the way it is. I'm afraid you'll have to submit a few bug reports before things start working properly for you.

BTW, for smex I've added this to my .emacs:

(defun jarl/smex ()
  (condition-case description
        (global-set-key (kbd "M-x") 'smex)
        (global-set-key (kbd "M-X") 'smex-major-mode-commands)
        (global-set-key (kbd "C-c C-c M-x") 'execute-extended-command)
    (error (execute-extended-command))))

(global-set-key (kbd "M-x") 'jarl/smex)


Here's example of code to put in your emacs init file to properly setup packages installed from ELPA. Still better than no ELPA.

(add-hook 'css-mode-hook 'rainbow-mode)
(add-to-list 'load-path "~/.emacs.d/elpa/bookmark+-20120516/")
(require 'bookmark+)
(add-to-list 'load-path "~/.emacs.d/elpa/smex-20120301/")
(require 'smex)
(global-set-key (kbd "<apps>") 'smex)   ; make the Menu/Apps key do M-x on Windows. On linux, use (global-set-key (kbd "<menu>") 'smex)
(global-set-key (kbd "<S-apps>") 'smex-major-mode-commands)