Geistlib
https://geistlib.xyz/
Recent content on GeistlibSat, 25 Mar 2023 02:40:10 +0100明天我必须穿过清晨去追寻
https://geistlib.xyz/%E6%98%8E%E5%A4%A9%E6%88%91%E5%BF%85%E9%A1%BB%E7%A9%BF%E8%BF%87%E6%B8%85%E6%99%A8%E5%8E%BB%E8%BF%BD%E5%AF%BB/
Sat, 25 Mar 2023 02:40:10 +0100https://geistlib.xyz/%E6%98%8E%E5%A4%A9%E6%88%91%E5%BF%85%E9%A1%BB%E7%A9%BF%E8%BF%87%E6%B8%85%E6%99%A8%E5%8E%BB%E8%BF%BD%E5%AF%BB/<p>
Testament, London, Part VIII.</p>
<p>
<pre class="poem">
明天我必须穿过清晨去追寻
水的透明波纹，风呼吸的痕迹
破碎的雾，晚霞的颜色，还有
时间和星光的气味。在夏季来临前
我必须穿过清晨去追寻
我曾将你的清晨洒在一座座城市
夜无人的街道和彩窗下的寂静
也曾饮用清晨解渴，那温和散开的
冰凉、使心脏冻结着跳跃的温度
可明天我必须穿过清晨去追寻
只有在你的眼中我才能看到自己
叠在平静的海面上，隔于雨幕之外
星光徐徐降落，我必须接住
在它如同眼泪般破碎前接住
并送回天河
只有在你的眼中我才能看到自己
陌生、遥远，格格不入
合眼时遍不再存在
你合眼时我也从我中消失
现在给我自由
明天我必须穿过清晨去追寻
水的透明波纹如何安静地抚摸太阳
询问海鸟哪里有风呼吸的痕迹
拼接倒挂着破碎的雾，组成完整的晚霞
追问雪阖眼时时间和星光的气味
明天我必须穿过清晨去追寻
用一滴眼泪给我自由
</pre>
</p>
Transcription: I Fall in Love Too Easily (Keith Jarrett)
https://geistlib.xyz/transcription-i-fall-in-love-too-easily/
Thu, 23 Mar 2023 22:37:55 +0100https://geistlib.xyz/transcription-i-fall-in-love-too-easily/<p>
Keith Jarrett, Live At Open Theater East 1993, coda for <em>I Fall in Love Too Easily</em>. Based on <a href="https://www.youtube.com/watch?v=epQ0bq76wHw">Pavel Duda's transcription</a>.</p>
<p>
Such a sublime and transcendental piece of improvisation. I just don't understand how is such a beauty possible, and maybe won't ever.</p>
<p>
There might be an A2 on the 2.5-th beat of the 5th bar and a G4 over the 4th beat of the 33th bar. It sounds better with these notes added but I'm not sure.</p>
<div class="center-block" style="text-align: center; margin-left: auto; margin-right: auto;">
<div>
<object data="/img/Keith%20Jarrett%20-%20I%20Fall%20in%20Love%20Too%20Easily.pdf"
type="application/pdf" height="1000px" width="800px" >
</object>
</div>
</div>
Stochastic Music with Band-Pass Filters, 3: Hydrogen Emission Spectra
https://geistlib.xyz/stochastic-music-with-filter-3-hydrogen-emission-spectra/
Mon, 20 Mar 2023 13:41:41 +0100https://geistlib.xyz/stochastic-music-with-filter-3-hydrogen-emission-spectra/
<p>
This is incomplete and requires quite some works. I must not set it as a draft to preview and read what I've written, but at the same time I'd like to synchronize it to the server so that I can think about it when I'm not at home.</p>
<div id="outline-container-headline-1" class="outline-2">
<h2 id="headline-1">
Hydrogen Emission Spectra
</h2>
<div id="outline-text-headline-1" class="outline-text-2">
<p>
We approximate the emission spectra series of hydrogen in the Bohr model using the Rydberg formula
$$
f_{n,m} \propto \Big( \frac{1}{n^2} - \frac{1}{m^2}\Big)
$$
where $n,m$ are respectively the principal quantum number of the lower and upper energy level. For more accurate sound one can consult the <a href="https://www.nist.gov/pml/atomic-spectra-database">NIST Atmoic Spectra Database</a> but that's an overkill. The lowest frequency $f_{n,n+1}$ in a series with fixed $n$ comes from $m = n+1$, so we put $f_{n,n+1}$ to be 660Hz and scale all the $f_{n,m}$ accordingly. In <code>sclang</code> the function <code>f</code> that takes <code>i,len</code> and returns a sequence of sine waves with frequency $\{f_{n,n+1},...,f_{n,n+\operatorname{len}}\}$ is realized through</p>
<div class="src src-sclang">
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="ln"> 1</span><span class="cl">f = { arg i = 1, len = 10; (
</span></span><span class="line"><span class="ln"> 2</span><span class="cl"> z = List.new();
</span></span><span class="line"><span class="ln"> 3</span><span class="cl"> a = List.new();
</span></span><span class="line"><span class="ln"> 4</span><span class="cl"> q = List.new();
</span></span><span class="line"><span class="ln"> 5</span><span class="cl"> p = List.new();
</span></span><span class="line"><span class="ln"> 6</span><span class="cl"> for (i+1, i + len, { arg j;
</span></span><span class="line"><span class="ln"> 7</span><span class="cl"> z.add(((1/i)**2)-((1/j)**2));
</span></span><span class="line"><span class="ln"> 8</span><span class="cl"> a.add(1/(j-i));
</span></span><span class="line"><span class="ln"> 9</span><span class="cl"> p.add( pi *(j-i) / len);
</span></span><span class="line"><span class="ln">10</span><span class="cl"> q.add( - pi * (j-i) / len );}
</span></span><span class="line"><span class="ln">11</span><span class="cl"> );
</span></span><span class="line"><span class="ln">12</span><span class="cl"> { [ Klang.ar(`[z,a,p], freqscale: 660/z.first ) * (1/ (len)) , Klang.ar(`[z,a,q], freqscale: 660/z.first ) * (1/ (len)) ] }
</span></span><span class="line"><span class="ln">13</span><span class="cl">) };
</span></span><span class="line"><span class="ln">14</span><span class="cl">)</span></span></code></pre></div>
</div>
<p>Here the lists <code>a</code>, <code>p</code> and <code>q</code> store the amplitudes and left- and right-channel phases. These are unnecessary and only included for future convenience. With <code>f.value(1,10).play</code> the superposition of sines with frequencies in the sequence $\{f_{1,2},...,f_{1,11}\}$ will be played. Here are some (truncated) superposition of sines inside a series, with the lowest frequency normalized to 660Hz, and with the amplitudes scaled by factors of $\frac{1}{m-n}$; all phases are set to 0 via <code>nil</code>.</p>
<div class="center-block" style="text-align: center; margin-left: auto; margin-right: auto;">
<figure>
<audio class="audio-shortcode" preload="auto" controls>
<source src="https://geistlib.xyz/playlist/stochastic-hydrogen/f1.mp3" type="audio/mp3">
There should have been a video here but your browser does not seem
to support it.
</audio>
<figcaption>
Lyman Series: $n=1$, $\operatorname{max}(m) = 21$
</figcaption>
</figure>
<figure>
<audio class="audio-shortcode" preload="auto" controls>
<source src="https://geistlib.xyz/playlist/stochastic-hydrogen/f2.mp3" type="audio/mp3">
There should have been a video here but your browser does not seem
to support it.
</audio>
<figcaption>
Balmer Series: $n=2$, $\operatorname{max}(m) = 22$
</figcaption>
</figure>
<figure>
<audio class="audio-shortcode" preload="auto" controls>
<source src="https://geistlib.xyz/playlist/stochastic-hydrogen/f3.mp3" type="audio/mp3">
There should have been a video here but your browser does not seem
to support it.
</audio>
<figcaption>
Paschen Series: $n=3$, $\operatorname{max}(m) = 23$
</figcaption>
</figure>
<figure>
<audio class="audio-shortcode" preload="auto" controls>
<source src="https://geistlib.xyz/playlist/stochastic-hydrogen/f4.mp3" type="audio/mp3">
There should have been a video here but your browser does not seem
to support it.
</audio>
<figcaption>
Brackett Series: $n=4$, $\operatorname{max}(m) = 24$
</figcaption>
</figure>
<figure>
<audio class="audio-shortcode" preload="auto" controls>
<source src="https://geistlib.xyz/playlist/stochastic-hydrogen/f5.mp3" type="audio/mp3">
There should have been a video here but your browser does not seem
to support it.
</audio>
<figcaption>
Pfund Series: $n=5$, $\operatorname{max}(m) = 25$
</figcaption>
</figure>
<figure>
<audio class="audio-shortcode" preload="auto" controls>
<source src="https://geistlib.xyz/playlist/stochastic-hydrogen/f6.mp3" type="audio/mp3">
There should have been a video here but your browser does not seem
to support it.
</audio>
<figcaption>
Humphreys Series: $n=6$, $\operatorname{max}(m) = 26$
</figcaption>
</figure>
</div>
<p>
The superposition of $f_{n,m}$ with $n,m$ both varying is realized via</p>
<div class="src src-sclang">
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="ln"> 1</span><span class="cl">(
</span></span><span class="line"><span class="ln"> 2</span><span class="cl">c = { arg i = 1, k = 2, len = 10, fq = 1500 ; (
</span></span><span class="line"><span class="ln"> 3</span><span class="cl"> z = List.new();
</span></span><span class="line"><span class="ln"> 4</span><span class="cl"> a = List.new();
</span></span><span class="line"><span class="ln"> 5</span><span class="cl"> q = List.new();
</span></span><span class="line"><span class="ln"> 6</span><span class="cl"> p = List.new();
</span></span><span class="line"><span class="ln"> 7</span><span class="cl"> for( i, k, { arg l;
</span></span><span class="line"><span class="ln"> 8</span><span class="cl"> for (l+1, l + len, { arg j;
</span></span><span class="line"><span class="ln"> 9</span><span class="cl"> z.add(((1/l)**2)-((1/j)**2));
</span></span><span class="line"><span class="ln">10</span><span class="cl"> a.add(1/((j-l)*l));
</span></span><span class="line"><span class="ln">11</span><span class="cl"> p.add( pi *(j-l) / len);
</span></span><span class="line"><span class="ln">12</span><span class="cl"> q.add( - pi * (j-l) / len );}
</span></span><span class="line"><span class="ln">13</span><span class="cl"> )
</span></span><span class="line"><span class="ln">14</span><span class="cl"> };);
</span></span><span class="line"><span class="ln">15</span><span class="cl"> { [ Klang.ar(`[z,a,p], freqscale: fq/z.first ) * (1/ (len)) , Klang.ar(`[z,a,q], freqscale: fq/z.first ) * (1/ (len)) ] }
</span></span><span class="line"><span class="ln">16</span><span class="cl">) };
</span></span><span class="line"><span class="ln">17</span><span class="cl">)</span></span></code></pre></div>
</div>
<p>where <code>i</code> is the minimal $n$ and <code>k</code> is the maximal $n$. In practice the amplitude should be put in such a way that for a fixed $n$ the larger the $m$ the smaller the amplitude, so that the truncation of the infinite serieses given by <code>len</code> makes sense; the same applies to <code>l</code>. The frequency scaling here is inconvenient since we really want to map more or less all the spectra lines into $[20,20000]$ and globally investigate the acoustics, but using band filters after putting <code>fq</code> to take the value of approx. 20000 or a lower but sufficiently high value would be a better way to achieve this; while for high $n$ the frequency tends to $0$ more rapidly, their amplitudes (transition intensities) should be small. A superposition with amplitude scaled by $\frac{1}{n(m-n)}$ and phases set to 0 sounds like</p>
<div class="center-block" style="text-align: center; margin-left: auto; margin-right: auto;">
<figure>
<audio class="audio-shortcode" preload="auto" controls>
<source src="https://geistlib.xyz/playlist/stochastic-hydrogen/c1-6-7-6000.mp3" type="audio/mp3">
There should have been a video here but your browser does not seem
to support it.
</audio>
<figcaption>
$\operatorname{min}(n) = 1,\operatorname{max}(n) = 6, \operatorname{max} m = n + 7$, $f_{1,2} = 6000$Hz.
</figcaption>
</figure>
</div>
<p>This is only a crude approximation since the amplitudes, corresponding to the transition intensities of spectral lines, are brushed off, and I really didn't care much about the sound quality.</p>
<p>
<div class="remark">
<div class="remark-style">
<span class="remark-head">Remark.</span>
The sound of hydrogen can be crudely seen as operating in quartal harmony. Normalize the series $f_{n,m}$,
$$
f'_{n,m} = \frac{\frac{1}{n^2} - \frac{1}{m^2}}{\frac{1}{n^2} - \frac{1}{(n+1)^2}}
$$
and take the limit over $m\to \infty$,
$$
\nu_n = \frac{1}{1 - \frac{n^2}{(n+1)^2}}.
$$
Scale $\nu_1$ to be $1$, then the first few elements in $\{\nu_i\}_i$ are
$$
1.0, 1.35, 1.71, 2.08, 2.45, 2.83.
$$
Solve the equation $2^{x_n/12} = \nu_n$ for $x_n$, $x_n = 12 \log_2(\nu_n)$, and $x_n$ are
$$
0.0, 5.2, 9.3, 12.7, 15.5, 18.0
$$
approximating quartal harmony in the equal temperament.
<span style="float:right">◈</span>
</div>
</div>
</p>
</div>
</div>
<div id="outline-container-headline-2" class="outline-2">
<h2 id="headline-2">
The 'Sound' of the Groupoid
</h2>
<div id="outline-text-headline-2" class="outline-text-2">
<p>
The Rydberg formula
$$
f_{n,m} \propto \Big(\frac{1}{n^2} - \frac{1}{m^2}\Big)
$$
defines a groupoid $\mathcal{G}$ over the set $I$ of double indices. The frequencies add
$$
f_{ij} + f_{jk} = f_{ik}
$$
whenever $j$ makes sense, so the morphisms are pairs $(i,j): i \to j$. Over the ring $R$ of finite-dimensional linear operators, there is a convolution algebra $R[\mathcal{G}]$ with the convolution product
$$
(AB)((i,k)) := (AB)_{i,k} = \sum_j A_{i,j} B_{j,k},
$$
where $A_{i,j}$ is the $(i,j)$-component of the matrix associated to $A$. The Hamiltonian $H = h\nu$ now gives $H_{i,j} = \delta_{i,j} h \nu_i$ where $\nu_i \propto \frac{1}{n^2}$: the indices corresponds to the difference between energy levels.</p>
<p>
This is similar, but different, from the groupoid in <a href="https://geistlib.xyz/stochastic-music-with-filter-1/">Stochastic Music with Band-Pass Filters, 1: Ideas</a>. Here $f_{ij}$ are <em>frequencies</em> and the groupoid is over the energy levels, while there $\operatorname{SPass}(F_{mn})$ are <em>probabilities</em> for the spectra $F_{mn}$ (roughly speaking the tone associated to the spectra) to appear and the groupoid is over the cutoff frequencies, or equivalently, the resonating frequencies. So there we are dealing with a second-order structure. When the frequencies are allowed to vary we would be dealing with 2-groupoids.</p>
</div>
</div>
Stochastic Music with Band-Pass Filters, 2: Resonance Acoustics
https://geistlib.xyz/stochastic-music-with-filter-2-resonance-acoustics/
Mon, 20 Mar 2023 04:25:47 +0100https://geistlib.xyz/stochastic-music-with-filter-2-resonance-acoustics/
<div id="outline-container-headline-1" class="outline-2">
<h2 id="headline-1">
Resonance
</h2>
<div id="outline-text-headline-1" class="outline-text-2">
<p>Variations in the superposition of sines might come boring since there is no attack and decay. By the utilization of a resonant filter, randomising the quality factor $Q$, and choosing the cutoff distribution in a suitable manner, attack and decay can be realized.</p>
<p>
Recall that for a sinusodially driven resonator, the definition of the $Q$-factor is
$$
Q=\frac{f_r}{\delta f}
$$
where $f_r$ is the <em>resonant frequency</em> and $\delta f$ is the half-maximum bandwidth at $f$. We take $r := 1/Q$.</p>
<p>
Roughly speaking,</p>
<ul>
<li>With a large $Q$-factor ($r = 1/Q < \sqrt{2}$), a sine oscillating near the cutoff frequency would resonate with the resonator.</li>
<li>With $r \geq \sqrt{2}$, there is no resonance, the filter should be seen as a non-resonating one.</li>
</ul>
<p>Furthermore for small $Q$ the transient states are not noticeable (see below for what this means). Hence for the most part the $r$ values smaller than $\sqrt{2}$ would be utilized. Here are some spectra of an approximate saw wave oscillating over $440$Hz passing through low-pass filters with different parameters.</p>
<ul>
<li>The unfiltered spectrum:</li>
</ul>
<div class="center-block" style="text-align: center; margin-left: auto; margin-right: auto;">
<figure>
<img src="https://geistlib.xyz/img/stochastic-acoustics/Rh-unfiltered.jpeg" alt="/img/stochastic-acoustics/Rh-unfiltered.jpeg" title="/img/stochastic-acoustics/Rh-unfiltered.jpeg" height="180px"/>
<figcaption>
Unfiltered
</figcaption>
</figure>
</div>
<ul>
<li>Spectra filtered by rLPF with $r=1/2$; the implementation in supercollider includes the exact sine oscillating over $f$ to be filtered by a filter with $f_c=f$. $r=1/2$ is relatively large, the resonance is not really noticable.</li>
</ul>
<div class="center-block" style="text-align: center; margin-left: auto; margin-right: auto;">
<figure>
<img src="https://geistlib.xyz/img/stochastic-acoustics/Rh-100hz.jpeg" alt="/img/stochastic-acoustics/Rh-100hz.jpeg" title="/img/stochastic-acoustics/Rh-100hz.jpeg" height="180px"/>
<figcaption>
$r=1/2$, $f_c = 100$Hz.
</figcaption>
</figure>
<figure>
<img src="https://geistlib.xyz/img/stochastic-acoustics/Rh-880hz.jpeg" alt="/img/stochastic-acoustics/Rh-880hz.jpeg" title="/img/stochastic-acoustics/Rh-880hz.jpeg" height="180px"/>
<figcaption>
$r=1/2$, $f_c = 880$Hz.
</figcaption>
</figure>
</div>
<ul>
<li>Spectra filtered by rLPF with $r=0.1$. Observe the strong resonance in $880$Hz, which will become more radical with $R$ approaching $0$ (in supercollider it will never approach actual $0$, which corresponds to infinite $Q$).</li>
</ul>
<div class="center-block" style="text-align: center; margin-left: auto; margin-right: auto;">
<figure>
<img src="https://geistlib.xyz/img/stochastic-acoustics/Q10-100hz.jpeg" alt="/img/stochastic-acoustics/Q10-100hz.jpeg" title="/img/stochastic-acoustics/Q10-100hz.jpeg" height="180px"/>
<figcaption>
$r=0.1$, $f_c = 100$Hz.
</figcaption>
</figure>
<figure>
<img src="https://geistlib.xyz/img/stochastic-acoustics/Q10-880hz.jpeg" alt="/img/stochastic-acoustics/Q10-880hz.jpeg" title="/img/stochastic-acoustics/Q10-880hz.jpeg" height="180px"/>
<figcaption>
$r=0.1$, $f_c = 880$Hz.
</figcaption>
</figure>
</div>
<p>
The resonance happens not only on the 'cirtical' frequencies over which the sines are oscillating. The nearer the cutoff $f_c$ is to a sine peak in the unfiltered spectrum that is to be filtered, the stronger the resonance:</p>
<div class="center-block" style="text-align: center; margin-left: auto; margin-right: auto;">
<figure>
<img src="https://geistlib.xyz/img/stochastic-acoustics/Q10-660hz.jpeg" alt="/img/stochastic-acoustics/Q10-660hz.jpeg" title="/img/stochastic-acoustics/Q10-660hz.jpeg" height="180px"/>
<figcaption>
$r=0.1$, $f_c = 660$Hz.
</figcaption>
</figure>
<figure>
<img src="https://geistlib.xyz/img/stochastic-acoustics/Q10-780hz.jpeg" alt="/img/stochastic-acoustics/Q10-780hz.jpeg" title="/img/stochastic-acoustics/Q10-780hz.jpeg" height="180px"/>
<figcaption>
$r=0.1$, $f_c = 780$Hz.
</figcaption>
</figure>
</div>
<p>
This behavior allows for the simulation of <em>attack and release</em>. Given a spectrum whose Fourier modes are represented by a sequence $\{f_i\}_i$, To let a certain mode, say $f_k$ sound louder, one can choose a cutoff frequency near $f_k$ that passes $f_k$. Clipping distorsion can also be achived, but without dynamical compression this might not be acceptable.</p>
</div>
</div>
<div id="outline-container-headline-2" class="outline-2">
<h2 id="headline-2">
Quantitative Behavior
</h2>
<div id="outline-text-headline-2" class="outline-text-2">
<p>
At a more fundamental level, the driven damped oscillation is described by
$$
\frac{d^2 x }{d t^2} + 2\zeta\omega_0 \frac{dx}{dt} + \omega_0^2 x = A\sin(\omega_d t)
$$
where $\zeta = \frac{1}{2Q}$ is the damping ratio, $\omega_0$ is the undamped (angular) frequency and $\omega_d$ is the driving frequency. The steady state solution for $x$ is
$$
x(t) = A [(2\omega_d \omega_0 \zeta)^2 + (\omega_0^2 - \omega_d^2)^2]^{-1/2} \sin(\omega_d t + \phi)
$$
where $\phi$ is the phase that is unimportant for our discussion. Given a low-pass filter with cutoff $f_r$ and a sine oscillation with frequency $f$, the <em>driving frequency</em> $\omega_d$ corresponds to $f$, and the cutoff $f_r$ corresponds to the <em>undamped frequency</em>. The <em>resonant</em> frequency
$$
f_r = f_0 \sqrt{1-2\zeta^2}
$$
is the freqency s.t. if $f_d = f_r$ the amplitude is maximal, with value</p>
\begin{equation}
\label{eq:sta}
\frac{A}{2\omega_0^2 \zeta \sqrt{1-\zeta^2}}
\end{equation}
<p>provided that $\zeta < 1/\sqrt{2}$. There is no resonance for $\zeta \geq 1/\sqrt{2}$, or equivalently $r := \frac{1}{Q} \geq \sqrt{2}$.</p>
<div class="center-block" style="text-align: center; margin-left: auto; margin-right: auto;">
<figure>
<img src="https://geistlib.xyz/img/stochastic-acoustics/resonant-plot.svg" alt="/img/stochastic-acoustics/resonant-plot.svg" title="/img/stochastic-acoustics/resonant-plot.svg" height="200px"/>
<figcaption>
$\zeta = 0.1$; the $x-y$ axes are $\omega-\omega_0$, the $z$-axis is the amplitude $A[...]^{-1/2}$.
</figcaption>
</figure>
<figure>
<img src="https://geistlib.xyz/img/stochastic-acoustics/resonant-plot-1.svg" alt="/img/stochastic-acoustics/resonant-plot-1.svg" title="/img/stochastic-acoustics/resonant-plot-1.svg" height="200px"/>
<figcaption>
$\zeta = 1$; the $x-y$ axes are $\omega-\omega_0$, the $z$-axis is the amplitude $A[...]^{-1/2}$.
</figcaption>
</figure>
</div>
<p>
The transient states need also to be taken into account for very small $r$ (large $Q$) for our purpose. Large $Q$ corresponds to slow dampening of the initial oscillation of the resonator whose amplitude we denote by $A_0$. When $f_c(\tau)$ jumps from $f_c(\tau_0)$ above $f_d$ to $f_c(\tau_1)$ below $f_d$, there is an impulse-like sine attack near $f_c(\tau_1)$ that decays according to $\exp^{-\zeta t}$. More precisely, for small $\zeta$,</p>
\begin{equation}
\label{eq:dec}
x_{tr}(t) = e^{-\zeta t} (C_1 \cos(\omega' t)+ C_2\sin(\omega' t))
\end{equation}
<p>where $\omega' = 2\pi f' = 2\pi \sqrt{f_0^2 - \zeta^2}$. The constants $C_1,C_2$ depend on the initial condition. They are proportional to the amplitude $A_0$ of the initial oscillation and depend also on the phase $\phi$ (from which the complication arising we ignore). When $\zeta$ hence $r$ is small, the decay is relatively slow, and the transient oscillating frequency is near $f_0$.</p>
</div>
</div>
<div id="outline-container-headline-3" class="outline-2">
<h2 id="headline-3">
Concluding Remarks
</h2>
<div id="outline-text-headline-3" class="outline-text-2">
<p>
Practically speaking, since $r$ that really matters is usually smaller than $0.1$, we can safely approximate the resonant frequency $f_r$ with the driving frequency $f_d$, so for varying $f_c$, jumping to a $f_c'$ near a sine over $f$ s.t. the passing band includes $f$ after the jump will let $f$ oscillate strongly, simultaing an attack over $f$. The amplitude is given by $\ref{eq:sta}$.</p>
<p>
Note that $r = 2\zeta$. In <code>sclang</code> $r$ can be set to $0$, so there is a limit in the resonance amplitude. When $f$ is not in the passing band the situation becomes more complicated since $f$ both resonates and is suppressed by filtering. However the resonance is stronger than the suppression if $f$ is sufficiently near $f_c'$, so the suppression can be ignored.</p>
<p>
When $r$ is sufficiently small and $f_c'$ is not near to any driving frequency, an impulse-like attack (approximately) over $f_c'$ can still be heard. The amplitude is given by $\ref{eq:dec}$. The initial amplitude $A_0$ depends on the software implementation.</p>
</div>
</div>
Stochastic Music with Band-Pass Filters, 1: Ideas
https://geistlib.xyz/stochastic-music-with-filter-1/
Sat, 18 Mar 2023 01:12:56 +0100https://geistlib.xyz/stochastic-music-with-filter-1/
<p>
<span class="colored">
Actually the passing probabilities here are non-passing probabilities, but whatever. Nothing really changes. I'll correct those things later.
</span>
</p>
<div id="outline-container-headline-1" class="outline-2">
<h2 id="headline-1">
General Settings
</h2>
<div id="outline-text-headline-1" class="outline-text-2">
<p>
Let $S = [20,22000]\subset \mathbb{R}$. Suppose that there is a linearly ordered sequence of frequencies $X = \{x_i\}_i$ with $i=1,...,n$ and $x_i < x_j$ for $i<j$, and a band-pass filter $F_B$ with allowed band $[b_1, b_2] = B\subseteq S$. For simplicity, assume that $F_B$ as a filter <del>has a high Q</del> is perfect, so that $F_B$ can really be seen as
$$
F_B = (\operatorname{Id} \cdot \chi_B,\chi_B): S \to \mathbb{R}\times \{0,1\} : x \mapsto \begin{cases}
(x,1) & x\in B \\
(x,0) & x\notin B
\end{cases}\quad ,
$$
then $F_B$ (can be regarded as a function that) takes $X$ to $X\cap B$.</p>
<p>
Now suppose that $B$ is <em>randomised</em>. By this we mean for $B=[b_1,b_2]$, the numbers $b_1, b_2$ are now seen as (measurable, but we don't need to be that rigorous) functions $b_1, b_2: S \to \mathcal{F}$ associated to a probability function $P$ on a probability space $(S,\mathcal{F},P)$. The condition $b_1 < b_2$ now translates, in general, to $P(b_2 < b_1|b_1) = 0$. The dependency introduced by this might have interesting applications, but we put it aside for the time being. If we regard $b_1,b_2$ as independent and as random variables in two different probability spaces then upon appropriate modifications we only need to ensure that $\operatorname{max}[\operatorname{dom}b_1] < \operatorname{min}[\operatorname{dom}b_2]$.</p>
</div>
</div>
<div id="outline-container-headline-2" class="outline-2">
<h2 id="headline-2">
Low-Pass Filter
</h2>
<div id="outline-text-headline-2" class="outline-text-2">
<p>A low-pass filter is realized by putting $b_1$ alone as a random variable and keeping $b_2$ fixed.</p>
<p>
Given a low-pass filter $F_B = F_c$ where $c$ (<em>c</em> ut-off) stands for $b_1$ associated to a probability function $P$, and further has a probability density $\rho_c$, the probability for a frequency $f$ to pass is given by,
$$
\mathsf{Pass}_L(f) = \int_S h_f \rho_c
$$
where $h_f$ is the shifted Heaviside function for $f$, i.e.
$$
h_f(x) = \begin{cases} 1 & x>f \\
0 & x\leq f\end{cases}\quad .
$$</p>
<p>
For a linearly ordered sequence of frequencies $\{f_i\}$, if $f_i$ passes, each $f_j$ with $j\geq i$ passes, hence $f_i$ really stands for the subsequence $\{f_j\}$ given by $j \geq i$, the probability for the subsequence $\{f_j\}$ to pass can be characterized by $\mathsf{SPass}_L(f_j) = \mathsf{Pass}_L(f_j) - \mathsf{Pass}_L(f_{j+1})$.</p>
</div>
</div>
<div id="outline-container-headline-3" class="outline-2">
<h2 id="headline-3">
Single-Band Filter
</h2>
<div id="outline-text-headline-3" class="outline-text-2">
<p>
Let the (perfect) filter pass the frequencies $f \in [b_1,b_2]$ and let $S=[20,22000]$. If the random variables $b_1,b_2$ are independent (i.e. with appropriate changes in the probability spaces $\operatorname{max} \operatorname{dom} b_1 \leq \operatorname{min}\operatorname{dom} b_2$), given probability densities $\rho_{b_1}, \rho_{b_2}$,
$$
\mathsf{Pass}(f) = \int_S (1-h_f(y))\rho_{b_2}(y) \int_S h_f(x) \rho_{b_1}(x) dx dy = \mathsf{Pass}_{H}(f)\mathsf{Pass}_{L}(f)
$$
where $h_f: \mathbb{R}\to \{0,1\}$ is the (shifted) Heaviside step function; $\mathsf{Pass}_H(f)$ and $\mathsf{Pass}_L(f)$ are the passing probabilities of $f$ for High- and Low-pass filters with cutoffs $b_2$, $b_1$.</p>
<p>
For a sequence of frequencies $\{f_i\}_i \subset S$ that is strictly ordered by '$<$' inherited from $\mathbb{R}$ s.t. $i< j$ then $f_i < f_j$, let $F_{mn}$ be the subsequence $\{f_m,...,f_n\}$. There is a notion of the passing probability of a subsequence $F_{mn}$:
$$
\mathsf{SPass}(F_{mn}) = \int_S (1-h_{f_n}(y))\rho_{b_2}(y) \int_S h_{f_m}(x)\rho_{b_1}(x)dx dy = \mathsf{Pass}_{H}(f_n) \mathsf{Pass}_{L}(f_m).
$$
This should be regarded as the probability for a certain timbre to appear. The function $\mathsf{SPass}$ can be regarded as an partial order-reversing homomorphism from the space $\mathsf{Sq}$ of subsequences $\{F_{mn}\}$ with the order given by subsequence inclusions to $[0,1]$ with the obvious order. A further characterization of $F_{mn}$, given by
$$
\mathsf{sPass}_L (F_{mn}) = \mathsf{SPass} (F_{m,n}) - \mathsf{SPass}(F_{m+1,n})
$$
and
$$
\mathsf{sPass}_H (F_{mn}) = \mathsf{SPass} (F_{m,n}) - \mathsf{SPass}(F_{m,n-1}),
$$
would be handy, since the pair given by these two functions captures that which is unique to a certain timbre.</p>
</div>
</div>
<div id="outline-container-headline-4" class="outline-2">
<h2 id="headline-4">
Groupoid Structure
</h2>
<div id="outline-text-headline-4" class="outline-text-2">
<p>In fact there is a <em>groupoid</em> structure lurking behind that is worthy of further study. Via the quantities on the RHS of
$$
\mathsf{SPass}(F_{m,n+q}) - \mathsf{SPass}(F_{m,n}) = \mathsf{SPass}(F_{n,n+q}),
$$
the function $\mathsf{SPass}$ endows $\mathsf{Sq}$ with the structure of a groupoid $\mathcal{G}$: the objects are subsequences $F_{mn}$ identified with $\mathsf{SPass}(F_{mn})$, the morphisms are $\mathsf{SPass}(F_{n,n+q})$ which are identities when the value of $\mathsf{SPass}(F_{n,n+q})$ is zero.</p>
<p>
Convoluting $\mathcal{G}$ over a ring $R$, the groupoid $\mathcal{G}$ is made into a groupoid convolution algebra $R(\mathcal{G})$, that characterises, or <em>should</em> characterise,</p>
<ol>
<li>by the representation of elements, the different <em>routes</em> from a timbre to another one.</li>
<li>by the algebra product, the "real distances" between two timbres.</li>
</ol>
<p>but what the ring $R$ corresponds to is unclear, and is subject to further studies.</p>
<p>
To probe $R$, it is instructive to study an example. For the time being what I can think of is modelling the hydrogen spectral series in soundwaves and convolute the groupoid as in <a href="https://geistlib.xyz/old-quantum-theory-rydberg-formula/">Old Quantum Theory, Special: Algebra of observables from convolution</a>. This I'll do next.</p>
</div>
</div>
Supercollider Study: Randomising RLPF
https://geistlib.xyz/supercollider-exercise-rlpf-random/
Fri, 17 Mar 2023 01:41:32 +0100https://geistlib.xyz/supercollider-exercise-rlpf-random/<p>A simple study in generating sound effects by randomizing the cut-off frequency of RLPF. Put input signal to be something similar to</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="ln">1</span><span class="cl">{ Splay.ar(Klang.ar(`[[6000,7000,8000,13000,17000],[0.3,0.2,0.2,0.1,0.3]], 1.1, 50)) }
</span></span></code></pre></div><p>and randomise the cut-off frequency with <code>LFNoise0</code>. In practice the frequencies and their amplitudes in <code>Klang</code> should be the returned value of a list-valued function, so for the <code>x</code> value in <code>LFNoise0.kr(x)</code>, but these are implementation details that aren’t important.</p>
<p>The effect is quite OK. The interesting part is after <code>00:05:30</code>.</p>
<p>
<audio id="player" controls>
<source src="https://geistlib.xyz/playlist/SC_230316_235233.mp3" type="audio/mp3" />
</audio>
</p>
<p>With some decorations and visualizations:
<video class="video-shortcode" preload="auto" controls>
<source src="https://geistlib.xyz/vid/sc_rc.mp4" type="video/mp4">
There should have been a video here but your browser does not seem
to support it.
</video>
</p>
Cheat Sheets
https://geistlib.xyz/cheat_sheets/
Fri, 17 Mar 2023 02:26:23 +0200https://geistlib.xyz/cheat_sheets/<h2 id="pdf-editing">PDF Editing</h2>
<h3 id="extracting-and-rotating-pages">Extracting and rotating pages</h3>
<p>Extract pages:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">qpdf <span class="o">[</span>INPUT<span class="o">]</span> --pages . <span class="o">[</span>start<span class="o">]</span>-<span class="o">[</span>end<span class="o">]</span> -- <span class="o">[</span>OUTPUT<span class="o">]</span>
</span></span></code></pre></div><p>run with the option <code>--replace-input</code> and without <code>[OUTPUT]</code> to substitute the <code>[INPUT]</code> file.</p>
<p>Rotate pages:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">qpdf <span class="o">[</span>INPUT<span class="o">]</span> <span class="o">[</span>OUTPUT<span class="o">]</span> --rotate<span class="o">=[</span>+<span class="p">|</span>-<span class="o">][</span>ANGLE<span class="o">]</span>:<span class="o">[</span>PAGE_RANGE<span class="o">]</span>
</span></span></code></pre></div><h3 id="compression--monochromize">Compression + Monochromize</h3>
<ol>
<li>Split pages with <code>qpdf --split-pages in.pdf out.pdf</code></li>
<li>Compress each page with <code>convert -monochrome -compress lzw -density 300 [INPUT] [OUTPUT]</code> (use <code>parallel</code>, with <code>seq -w [1 801]</code>)</li>
<li>Merge outpus with <code>qpdf --empty --pages *.pdf -- out.pdf</code></li>
</ol>
<p>A better alternative to 2. <code>convert -density 300 out-017.pdf -threshold 90% -type bilevel -compress fax try.pdf</code></p>
<h3 id="ocr">OCR</h3>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">ocrmypdf -l <span class="o">[</span>LANG<span class="o">]</span> --optimize <span class="o">[</span>1,2,3<span class="o">]</span> <span class="o">[</span>INPUT<span class="o">]</span> <span class="o">[</span>OUTPUT<span class="o">]</span>
</span></span></code></pre></div><p>Run <code>tesseract --list-langs</code> to see all available languages</p>
<p>To get rid of additional blank spaces,</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl"><span class="nb">echo</span> preserve_interword_spaces <span class="m">1</span> > config
</span></span><span class="line"><span class="ln">2</span><span class="cl">ocrmypdf --tesseract-config config <span class="o">[</span>...<span class="o">]</span>
</span></span></code></pre></div><h3 id="removing-text">Removing text</h3>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">gs -o no-more-texts.pdf -sDEVICE<span class="o">=</span>pdfwrite -dFILTERTEXT Original.pdf
</span></span></code></pre></div><hr>
<h2 id="ffmpeg">FFmpeg</h2>
<h3 id="querying-available-codecs-and-formats">Querying Available Codecs and Formats</h3>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">ffmpeg -codecs
</span></span><span class="line"><span class="ln">2</span><span class="cl">ffmpeg -formats
</span></span></code></pre></div><h3 id="extracting-streams">Extracting Streams</h3>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">ffmpeg -i <span class="o">[</span>INPUT<span class="o">]</span> <span class="o">[</span>-map 0:1 -map 0:2<span class="o">]</span> -c:a <span class="o">[</span>AUDIO CODEC<span class="o">]</span> -c:v <span class="o">[</span>VIDEO CODEC<span class="o">]</span> 01_1.mkv
</span></span></code></pre></div><h3 id="cutting">Cutting</h3>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">ffmpeg -ss <span class="o">[</span>TIME_START<span class="o">]</span> -i <span class="o">[</span>FILE<span class="o">]</span> -ss <span class="o">[</span>+TIME_START<span class="o">]</span> -t <span class="o">[</span>TIME_DURATION<span class="o">]</span> -c copy <span class="o">[</span>OUTPUT<span class="o">]</span>
</span></span></code></pre></div><p>or</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">ffmpeg -i <span class="o">[</span>FILE<span class="o">]</span> -ss <span class="o">[</span>TIME_START<span class="o">]</span> -to <span class="o">[</span>TIME_END<span class="o">]</span> -c copy <span class="o">[</span>OUTPUT<span class="o">]</span>
</span></span></code></pre></div><h3 id="adding-subtitles">Adding Subtitles</h3>
<p>Add Subtitle with</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">ffmpeg -i <span class="o">[</span>VIDEO_FILE<span class="o">]</span> -vf <span class="nv">subtitles</span><span class="o">=[</span>.ASS_FILE<span class="o">]</span> -c:a copy <span class="o">[</span>OUTPUT<span class="o">]</span>
</span></span></code></pre></div><p><code>.ass</code> format example:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-plaintext" data-lang="plaintext"><span class="line"><span class="ln"> 1</span><span class="cl">[Script Info]
</span></span><span class="line"><span class="ln"> 2</span><span class="cl">Title: [TITLE]
</span></span><span class="line"><span class="ln"> 3</span><span class="cl">Original Script: RoRo
</span></span><span class="line"><span class="ln"> 4</span><span class="cl">Script Updated By: version 2.8.01
</span></span><span class="line"><span class="ln"> 5</span><span class="cl">ScriptType: v4.00+
</span></span><span class="line"><span class="ln"> 6</span><span class="cl">Collisions: Normal
</span></span><span class="line"><span class="ln"> 7</span><span class="cl">PlayResY: 600
</span></span><span class="line"><span class="ln"> 8</span><span class="cl">PlayDepth: 0
</span></span><span class="line"><span class="ln"> 9</span><span class="cl">Timer: 100,0000
</span></span><span class="line"><span class="ln">10</span><span class="cl">Video Aspect Ratio: 0
</span></span><span class="line"><span class="ln">11</span><span class="cl">Video Zoom: 6
</span></span><span class="line"><span class="ln">12</span><span class="cl">Video Position: 0
</span></span><span class="line"><span class="ln">13</span><span class="cl">
</span></span><span class="line"><span class="ln">14</span><span class="cl">[V4+ Styles]
</span></span><span class="line"><span class="ln">15</span><span class="cl">Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
</span></span><span class="line"><span class="ln">16</span><span class="cl">Style: DefaultVCD, Arial,28,&H00B4FCFC,&H00B4FCFC,&H00000008,&H80000008,-1,0,0,0,100,100,0.00,0.00,1,1.00,2.00,2,30,30,30,0
</span></span><span class="line"><span class="ln">17</span><span class="cl">
</span></span><span class="line"><span class="ln">18</span><span class="cl">[Events]
</span></span><span class="line"><span class="ln">19</span><span class="cl">Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
</span></span><span class="line"><span class="ln">20</span><span class="cl">Dialogue: 0,0:00:01.18,0:00:06.85,DefaultVCD, NTP,0000,0000,0000,,{\pos(400,570)}The first line\NThe second line in subtitle
</span></span></code></pre></div><h3 id="downsampling-flac">Downsampling FLAC</h3>
<p>For instance,</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">ffmpeg -i input.flac -af <span class="s2">"aresample=44100:resampler=soxr:precision=33:osf=s16:dither_method=shibata"</span> -acodec flac output.m4a
</span></span></code></pre></div><h3 id="changing-audio-quality-for-mp3">Changing Audio Quality for mp3</h3>
<p>To 320k</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">ffmpeg -i input -c:a libmp3lame -b:a 320k -o output.mp3
</span></span></code></pre></div><h3 id="stripping-metadata">Stripping metadata</h3>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">ffmpeg -i in.mkv -map_metadata -1 -c:v copy -c:a copy out.mkv
</span></span><span class="line"><span class="ln">2</span><span class="cl">ffmpeg -i tagged.mp3 -write_xing <span class="m">0</span> -id3v2_version <span class="m">0</span> untagged.mp3
</span></span></code></pre></div><p>or use</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">id3v2 -D input.mp3
</span></span></code></pre></div><h3 id="generating-visualizations">Generating visualizations</h3>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">ffmpeg -i input.flac -filter_complex <span class="se">\
</span></span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="se"></span><span class="s2">"[0:a]avectorscope=s=640x518,pad=1280:720[vs]; \
</span></span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="s2"> [0:a]showspectrum=mode=separate:color=intensity:scale=cbrt:s=640x518[ss]; \
</span></span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="s2"> [0:a]showwaves=s=1280x202:mode=line[sw]; \
</span></span></span><span class="line"><span class="ln">5</span><span class="cl"><span class="s2"> [vs][ss]overlay=w[bg]; \
</span></span></span><span class="line"><span class="ln">6</span><span class="cl"><span class="s2"> [bg][sw]overlay=0:H-h,drawtext=fontfile=/usr/share/fonts/TTF/Vera.ttf:fontcolor=white:x=10:y=10:text='\"Song Title\" by Artist'[out]"</span> <span class="se">\
</span></span></span><span class="line"><span class="ln">7</span><span class="cl"><span class="se"></span>-map <span class="s2">"[out]"</span> -map 0:a -c:v libx264 -preset fast -crf <span class="m">18</span> -c:a copy output.mkv
</span></span></code></pre></div><p>without text</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">ffmpeg -i input.flac -filter_complex <span class="se">\
</span></span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="se"></span><span class="s2">"[0:a]avectorscope=s=640x518,pad=1280:720[vs]; \
</span></span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="s2"> [0:a]showspectrum=mode=separate:color=intensity:scale=cbrt:s=640x518[ss]; \
</span></span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="s2"> [0:a]showwaves=s=1280x202:mode=line[sw]; \
</span></span></span><span class="line"><span class="ln">5</span><span class="cl"><span class="s2"> [vs][ss]overlay=w[bg]; \
</span></span></span><span class="line"><span class="ln">6</span><span class="cl"><span class="s2"> [bg][sw]overlay=0:H-h"</span> <span class="se">\
</span></span></span><span class="line"><span class="ln">7</span><span class="cl"><span class="se"></span> -map <span class="s2">"[out]"</span> -map 0:a -c:v libx264 -preset fast -crf <span class="m">18</span> -c:a copy output.mkv
</span></span></code></pre></div>The Early Universe
https://geistlib.xyz/the-early-universe/
Mon, 13 Mar 2023 14:09:00 +0100https://geistlib.xyz/the-early-universe/
<p>
<div class="colored" style="text-align: center;"> [Under Construction] </div>
</p>
<p>
This is more a review material than a text from which beginners can learn about the history of the early universe. Complete knowledge of involved mathematics (primarily differential geometry) and fundamental physics (general relativity, particle physics, statistical mechanics and thermodynamics) is assumed.</p>
<div id="outline-container-headline-1" class="outline-2">
<h2 id="headline-1">
Overview
</h2>
<div id="outline-text-headline-1" class="outline-text-2">
<ol>
<li>
<p><a href="#FRW">Construction of the FRW metric</a>.</p>
<ol>
<li>From observational data it can be assumed that the observed universe is spatially homogeneous and isotropic. From this, a primitive version of Freedman-Robertson-Walker metric, that describes a homogeneous and isotropic universe in general relativity, is constructed,</li>
<li>From observational data it can be more or less deduced that the universe is expanding, so that the proper time of the cosmic rest frame - the frame in which the CMBR is at rest - needs to be taken as a parameter that scales the metric, leading to the FRW metric.</li>
</ol>
</li>
<li>
<p><a href="#Standard Cosmology">Standard cosmology</a>. The Einstein equation, with FRW metric and the stress-energy tensor of a perfect fluid, as a tensor equation, has only two independent field equations. The equations usually taken are the so-called Friedmann equation ($0$-$0$ component, "involving only time"), and the first law of thermodynamics (the $\mu=0$ component of the conservation of stress energy).</p>
<ol>
<li>From the first law of thermodynamics it can be inferred that the early universe was radiation dominated, and then matter dominated, etc.</li>
<li>From the Friedman equation may be integrated to give the age of the universe in terms of present cosmological parameters.</li>
</ol>
</li>
<li>
<p>The <a href="#LCDM">$\Lambda$CDM model</a>. A particular model in the Standard cosmology, or the <em>standard model</em> of Big Bang cosmology. Assembled from the observational data, incorporating the accelerating expansion of the Universe, large-scale structure in the galaxy distribution, the existence and structure of the CMB, etc.</p>
<ol>
<li>Using the machinery in the Standard cosmology, calculate various aspects of the expansion history.</li>
<li>Non-thermal aspects, such as the time when the decceleration-acceleration and radiation domination-matter domination transition occured, can be approximated.</li>
</ol>
</li>
<li>
<p>From the $\Lambda$CDM model and the Standard Model of particle physics, the <a href="#Thermal History">Thermal History</a> of the universe can be sketched.</p>
<ol>
<li>Plasma of massless thermal particles.</li>
<li>First spontaneous symmetric breaking (SSB) phase transition: from GUT to standard model ($\sim 10^{16}$GeV), the strong interaction becomes distinct from the electroweak interaction.</li>
<li><a href="#Electroweak Transition">Electroweak symmetry breaking</a>, $\sim 150$GeV, particles acquire mass via Higgs mechanism. Later particles which only interact via massive gauge bosons will decouple from the thermal plasma (but not yet, at around $150$GeV).</li>
<li>Chiral symmetry breaking and color confinement $\sim 150$MeV. Quarks coalse into hadrons. Local inhomogeneities in the baryon number density</li>
<li>Neutrino decoupling. $\sim 1$MeV.</li>
<li>Big Bang nucleosynthesis. $100-1$keV.</li>
<li>Recombination. $\sim 0.4$eV. The origin of CMBR.</li>
</ol>
</li>
</ol>
<span class="colored">
While we say that various SSBs are accompanied by phase transitions, these can be continuous crossovers. Lattice data in the minimal Standard Model show that Electroweak transition and transitions accompanying chiral symmetry breaking (from quark-gluon matter to hadronic matter) are all smooth crossovers. But these are model dependent.
</span>
</div>
</div>
<div id="outline-container-headline-2" class="outline-2">
<h2 id="headline-2">
Preliminary Thermodynamics and Statistical Mechanics
</h2>
<div id="outline-text-headline-2" class="outline-text-2">
<div id="outline-container-headline-3" class="outline-3">
<h3 id="headline-3">
On the meaning of $\text{eV}$ as temperature
</h3>
<div id="outline-text-headline-3" class="outline-text-3">
<p>This is a standard practice when dealing with plasma. Via
$$
E = k_B T
$$
where $k_B$ is the Boltzmann constant, energy is directly linked to temperature. This is because for massless particles (radiations), when $T$ is large, the average energy per particle $E$ is indeed $k_B T$.The probability that a massless particle has energy $E_n = nh\nu$ is given by the Boltzmann factor
$$
P(n) = \frac{\exp(-E_n/k_B T)}{\sum_{n=0}^\infty \exp(-E_n/k_B T)},
$$
the mean energy of a particle with frequency $\nu$ is then
$$
\overline{E_\nu} = \frac{h\nu }{e^{h\nu/k_B T} -1}.
$$
For large $T$, $e^{h\nu/k_B T} -1 = \tfrac{h\nu}{k_B T}$, and so
$$
\overline{E} = k_B T.
$$</p>
<p>
Even if one is not dealing with massless particles, since for relativistic particle gas $\overline{E} = n k_B T$ where $n$ is the number of degrees of freedom, and $\overline{E} = \frac{n}{2} k_B T$ for non-relativistic particle gas, the conversion is legitimate. By this we mean, the word 'temperature' really can be intuited to have the usual meaning of temperature.</p>
<p>
Numerically $1\text{ GeV} = 1.1605\times 10^{13}\text{ K}$.</p>
</div>
</div>
<div id="outline-container-Gases of Free Particles in Expanding Universe" class="outline-3">
<h3 id="Gases of Free Particles in Expanding Universe">
Gases of Free Particles in Expanding Universe
</h3>
<div id="outline-text-Gases of Free Particles in Expanding Universe" class="outline-text-3">
<p>Consider the evolution of the effective temperature for free particles. This is the case when the particles decouple from other particles, e.g. after recombination. The effective temperature of massless bosons and fermions decreases in time according to
$$
T_{\text{eff}}(t) \propto \frac{1}{a(t)}.
$$
Even for massive particles, as long as $T_{\text{eff}} \gg m$ wehere $m$ is the particle mass, the above relation still holds.</p>
<p>
While for nonrelativistic particles,
$$
T_{\text{eff}}(t) \propto \frac{1}{a^2(t)}.
$$</p>
<p>
See <em>Gorbunov & Rubakov</em> for details.</p>
</div>
</div>
</div>
</div>
<div id="outline-container-FRW" class="outline-2">
<h2 id="FRW">
Construction of the FRW metric
</h2>
<div id="outline-text-FRW" class="outline-text-2">
<p>
The materials here are mainly from <em>Wald, General Relativity, 1984</em>.</p>
<p>
The observed universe is spatially homogeneous and isotropic,</p>
<ul>
<li>A spacetime is spatially homogeneous if there is a 1-parameter family of spacelike hypersurfaces $\Sigma_t$ foliating the spacetime, s.t. for each $t$ and any points $p,q\in\Sigma_t$, there is an isometry of the spacetime metric $g_{ab}$ that takes $p$ into $q$.</li>
<li>A spacetime is said to be spatially isotropic at each point if there is a congruence of timelike curves, whose tangents are denoted $u^a$, filing the space time, s.t. for any tangent vectors $s^a_1, s^a_2\in V_p$ that are orthogonal to $u^a$, there is an isometry of $g_{ab}$ that leaves $p$ and $u^a$ at $p$ fixed but rotates $s^a_1$ to $s^a_2$.</li>
</ul>
<p>Isotropy implies that the Riemann tensor takes the form of $R_{abc}^{\quad d} = k \delta^c_{\ [a}\delta^d_{\ b]}$, where $k$ is the eigenvalue of the linear map $L:\Omega^2\to \Omega^2$ given by raising the third index of the Riemann tensor (since distinct eigenvalues will destroy the isotropy), and homogeneity implies that the space is of constant curvature, viz. $k$ is invariant in a leaf $\Sigma_t$ of the foliation. From the Bianchi identity of the 4th-index-lowered Riemann tensor, it can be seen that actually isotropy forces $k$ to be constant, so the assumption of homogeneity can be dispensed with.</p>
<p>
A theorem of Eisenhart says that any two spaces of constant curvature of the same dimension and metric signature which have equal values of $k$ are locally isometric. Thus one needs to classify the possible spatial geometries of $\Sigma_t$ by classifying spaces of constant curvature with different values of $k$. Now $k$ can be positive, negative or zero,</p>
<ul>
<li>Geometries with $k>0$ are attained by the 3-spheres.</li>
<li>Geometries with $k=0$ are attained by ordinary 3-dimensional flat space.</li>
<li>Geometries with $k<0$ are attained by hyperboloids, i.e. surfaces in a 4-dimensional flat Lorentz signature space with global inertial coordinates $t^2 - x^2 - y^2 - z^2 = R^2$.</li>
</ul>
<p>The spacetime metric, from the viewpoint of isotropic observables, should then be
$$
g_{ab} = u_a u_b - h_{ab}(t)
$$
where $h_{ab}(t)$ is the metric of a 3-sphere, 3-Euclidean space, or a hyperboloid and $t$ is the parameter of the foliation. Label each leaf of the foliation by the proper time $\tau$ of the isotropic observers, the spacetime metric should be
$$
ds^2= d\tau^2 - a(\tau)^2\left( \frac{dr^2}{1-kr^2}+r^2d\theta^2 + r^2\sin^2\theta d\phi^2\right),
$$
this is the <em>FLRW metric</em>.</p>
<p>
In the following, the parameter $t$ will be dropped, and the proper time $\tau$ will be denoted by $t$ instead. Take $\eta$ to be the conformal time, i.e. $d\eta = dt/a(t)$, then the FRW metric can be written as
$$
ds^2= a^2(\eta)\left( d\eta ^2 - \frac{dr^2}{1-kr^2}- r^2d\theta^2 - r^2\sin^2\theta d\phi^2\right).
$$
Specifically, when $k=0$, $g_{ab} = a^2(\eta)\eta_{ab}$ where $\eta_{ab}$ is the Minkowski metric.</p>
</div>
</div>
<div id="outline-container-Standard Cosmology" class="outline-2">
<h2 id="Standard Cosmology">
Standard Cosmology
</h2>
<div id="outline-text-Standard Cosmology" class="outline-text-2">
<div id="outline-container-headline-7" class="outline-3">
<h3 id="headline-7">
Equations of Cosmology
</h3>
<div id="outline-text-headline-7" class="outline-text-3">
<p>
To solve the Einsein equation
$$
G_{ab} = R_{ab} -\frac{1}{2}\mathcal{R} g_{ab} = 8\pi T_{ab}
$$
one needs, in addition to a metric, the matter content of the universe that is described in terms of its stress-energy tensor $T_{ab}$. This we will take to be the general perfect fluid,
$$
T_{ab} = \rho u_a u_b + P(g_{ab}+ u_a u_b).
$$</p>
<p>
The Einstein equation has only two independent equations, since by isotropy $G^{ab}u_b$ cannot have a spatial component. The independent components are
$$
G_{ab}u^a u^b = 8\pi T_{ab}u^a u^b = 8\pi \rho,
$$
and
$$
G_{ab} s^a s^b = 8\pi T_{ab}s^a s^b = 8\pi P.
$$
where $s^a$ is any unit vector tangent to the leaves, leading to</p>
\begin{equation}
3\frac{\ddot{a}}{a} = -4\pi (\rho + 3P);\quad 3\frac{\dot{a}^2}{a^2}=8\pi\rho - \frac{3k}{a^2}. \label{eq}
\end{equation}
<p>where the second one is the <em>Friedmann equation</em>. The first equation can also be substituted with the covariant conservation of the stress-energy
$$
\nabla_a T^{ab} = 0
$$
which yields
$$
\dot{\rho} + 3\frac{\dot{a}}{a}(\rho + P) = 0.
$$</p>
<p>
Supplemented with the equation of state of matter
$$
P=P(\rho),
$$
the Friedmann equation and the conservation of the stress-energy completely determine dynamics of the cosmological expansion. Summing up,</p>
\begin{gather}
\label{eq:cosmology}
3\frac{\dot{a}^2}{a^2}=8\pi\rho - \frac{3k}{a^2}\\\
\dot{\rho} + 3\frac{\dot{a}}{a}(\rho + P) = 0.\\\
P=P(\rho)
\end{gather}
<p>are the equations of standard cosmology.</p>
</div>
</div>
<div id="outline-container-headline-8" class="outline-3">
<h3 id="headline-8">
Hubble's law and the Redshift
</h3>
<div id="outline-text-headline-8" class="outline-text-3">
<p>
An observations can be made. Provided that $\rho>0$ and $P\geq 0$, or more precisely $\rho+3P > 0$, the universe cannot be static (from the first equation above in $(\ref{eq})$, $\ddot{a}<0$). Either $\dot{a}>0$ or $\dot{a}<0$ with the possible exception of an instant of time when expansion changes over to contraction.</p>
<p>
Between two isotropic observers in a homogeneous surface, at proper time $t$, if the distance is $D$, the rate of change of $D$ is
$$
\frac{d D}{dt} = \frac{D}{a}\frac{da}{dt} = \frac{\dot{a}}{a} D = DH(t).
$$
This is <em>Hubble's law</em>, and $H(t) = \frac{\dot{a}}{a}$. Here $\frac{dD}{da} = \frac{D}{a}$ since $D$ is linear in $a$. $H_0$ would denote the present observed value of $H(t)$.</p>
<p>
Since the universe is expanding, $\dot{a}>0$, $\ddot{a}<0$, the universe must have been expanding at a faster rate before. This means that, at a time less than $H_0^{-1}$ ago, the universe was in a singular state. The Hubble constant is related to the <em>redshift</em>,
$$
z(t) = \frac{a_0}{a(t)} - 1.
$$
Expanding $a(t)$ around $a_0 = a(t_0)$, to the linear order in $(t_0 -t)$, one has
$$
z(t) = H_0\cdot(t_0-t).
$$
and upp to corrections of second order the distance $r=t_0 -t$, so
$$
z=H_0 r.
$$</p>
</div>
</div>
</div>
</div>
<div id="outline-container-LCDM" class="outline-2">
<h2 id="LCDM">
The $\Lambda$CDM Model, Accelerated Expansion, Age of the Universe
</h2>
<div id="outline-text-LCDM" class="outline-text-2">
<p>
In the Friedmann equation (the first of $\ref{eq:cosmology}$), the curvature term, if any, is small, so we work with spatially flat model, putting$k=0$. Solving the Fiedmann equation requires certain specification of $\rho$, the energy density. As was stated before, the second of the cosmological equations ($\ref{eq:cosmology}$) really needs to be supplemented with the equation of state of the matter, which is the relation between the density and the pressure, $P = P(\rho)$. Now, case by case,</p>
<ul>
<li>For non-relativistic matter (dust), $P = 0$; this leads to $\rho = \operatorname{const}/a^3$. This just says that $\rho$ would be diluted $\propto a^{-3}$. Solving the Friedmann equation, $a(t) \propto (t-t_s)^{2/3}$, non-singularity of $\rho$ forces the arbitrary constant $t_s=0$. By $H(t)=\dot{a}/a = 2/(3t)$ and taking the present Hubble parameter $H_0$, $t_0 = 2/(3H_0)$.</li>
<li>For relativistic matter (radiation), $P = \rho/3$; leading to $\rho = \operatorname{const}/a^4$. The difference between radiation and matter comes, in essense, from the fact that not only the number density is diluted according to $\propto a^{-3}$, but the redshift of the energy is $\propto a^{-1}$. Solving the Friedmann equation, $a(t) \propto t^{1/2}$, and $H = 1/2t$.</li>
<li>For vacuum. The vacuum is the same in all inertial frames, thus Lorentz invariance dictates that the stress-energy is of the form $T_{\mu\nu} = \rho \eta_{ij}$. Now $T_{00}=\rho$ and $T_{ij} = -P\eta_{ij}$, thus $P=-\rho$; the negative sign ensures that the energy density is positive. Thus $\rho = \rho_{vac}$ is constant. Solving the Friedmann equation, $a \propto \exp(\sqrt{8\pi G \rho_{vac}/3}t) := \exp(H_{dS}t)$. $dS$ stands for <em>de Sitter</em> since the de Sitter metric is
$$
ds^2 = dt^2 -\exp(2H_{dS}t) dx^2.
$$</li>
</ul>
<p>For generic equation of state $P = w\rho$ where $\rho> -1$ is a constant, $\rho = a^{-3(1+w)}$, and
$$
a \propto t^{\frac{2}{3}\frac{1}{1+w}} := t^{\alpha}
$$
The second derivative
$$
\ddot{a} \propto \alpha(\alpha-1) t^{\alpha -2}
$$
implies that for $w>-\frac{1}{3}$ the expansion deccelerates, and for $w<-\frac{1}{3}$ (dominated by vacuum) the expansion <em>accelerates</em>.</p>
<div id="outline-container-headline-10" class="outline-3">
<h3 id="headline-10">
The $\Lambda$CDM Model
</h3>
<div id="outline-text-headline-10" class="outline-text-3">
<p>Realistic models should, of course, account for nonvanishing spatial curvatures, and combine $\rho_M$ (matter), $\rho_{rad}$ (radiation), $\rho_\Lambda$ (dark energy) and the effective "density" of spatial curvature $\rho_{k}$ given by $\frac{8\pi}{3}G\rho_{k} = - \frac{k}{a^2}$. It should also be noted that $\rho_i$ changes through time: relativistic particles becoming non-relativistic by cooling, particle creation, etc. In particular, the Universe should have been radiation dominated in its early age, at least in the Hot Big Bang picture, but now it is dark energy dominated.</p>
<p>
In the present one can find the numerical value of $\rho_c = \frac{3}{8\pi G} H_0^2$, the <em>critical density</em>, for spatially flat Universe. Should $\rho_c$ equal $\rho_{M,0} + \rho_{rad,0} + \rho_{\Lambda,0}$, then the Universe is actually spatially flat. The current bound on $|\rho_{k,0}/\rho_c|$ is less than $0.01$, so the Universe is at least approximately flat nowadays. Specifying $\Omega_i := \rho_i / \rho_c$ obtained from observations, one gets the $\Lambda$CDM model.</p>
<p>
The present values of $\Omega_i$ are roughly $\Omega_{rad} \lesssim 10^{-4}$, $|\Omega_{curv}| < 0.01$, $\Omega_\Lambda = 0.685$, $\Omega_M = \Omega_B + \Omega_{DM} = 0.05 + 0.265$. $\Omega_{DM}$ is the contribution of dark matter and $\Omega_B$ the baryonic matters. The present universe is <em>dark energy and dark matter dominated</em>. We see that relativistic matter and curvature can all be neglected for the present time in reasonable calculations.</p>
<p>
We don't know what dark energy is, and in the framework of $\Lambda$CDM one assumes that $\rho_\Lambda$ is independent of time, since $\Lambda$ is really the <em>cosmological constant</em> that is usually thought of as vacuum energy density. The Friedmann equation in the $\Lambda$CDM model is then</p>
\begin{equation}
\label{eq:LCDM}
\big(\frac{\dot{a}}{a}\big)^2 = \frac{8\pi}{3}G\rho_c\big[\Omega_M (\frac{a_0}{a})^3 + \Omega_{rad}(\frac{a_0}{a})^4 + \Omega_\Lambda + \Omega_{curv}(\frac{a_0}{a})^2\big].
\end{equation}
</div>
</div>
<div id="outline-container-headline-11" class="outline-3">
<h3 id="headline-11">
Age of the Universe
</h3>
<div id="outline-text-headline-11" class="outline-text-3">
<p>The age of the Universe is really a problem of solving the Friedmann equation under reasonable assumptions about the composition of the energy density. Since relativistic matter is relevant at early times only and spatial curvature is neglectable, the form of the Friedmann equation one employs when approximating the age of the Universe is
$$
\big( \frac{\dot{a}}{a} \big)^2 = H^2_0 \big[ \Omega_M (\frac{a_0}{a})^3 + \Omega_\Lambda\big]
$$
under the constraint $\Omega_M + \Omega_\Lambda = 1$ with positive $\Omega_\Lambda$. The solution is given by
$$
a(t) = a_0 \big(\frac{\Omega_M}{\Omega_\Lambda})^{1/3}\big) \Big[\sinh\big(\frac{3}{2}\sqrt{\Omega_\Lambda}H_0 t\big)\Big]^{2/3}.
$$
Then for $a(t_0) = a_0$,
$$
t_0 = \frac{2}{3\sqrt{\Omega_\Lambda}}\frac{1}{H_0}\operatorname{Arsh} \sqrt{\frac{\Omega_\Lambda}{\Omega_M}},
$$
and for a redshift $z(t)$ (recall $z(t) = \frac{a_0}{a(t)} -1$)
$$
t(z) = \frac{2}{3\sqrt{\Omega_\Lambda}}\frac{1}{H_0}\operatorname{Arsh} \sqrt{\frac{\Omega_\Lambda}{\Omega_M(1+z)^3}}.
$$</p>
</div>
</div>
<div id="outline-container-headline-12" class="outline-3">
<h3 id="headline-12">
Transitions in the history of Universe
</h3>
<div id="outline-text-headline-12" class="outline-text-3">
<div id="outline-container-headline-13" class="outline-4">
<h4 id="headline-13">
From decceleration to acceleration
</h4>
<div id="outline-text-headline-13" class="outline-text-4">
<p>Computing $\ddot{a}$ in the $\Lambda$CDM model via $\ref{eq:LCDM}$, one immediately sees that in the present universe $\ddot{a}>$, the universe is undergoing accelerated expansion. Since the universe is assumed to be raditation/matter dominated in the past, there must have been a particular moment $t_{ac}$ at which $\ddot{a}=0$ occured. Ignoring relativistic matter and curvature, let $a(t_{ac}) = a_{ac}$, it is easy to see that
$$
\big(\frac{a_0}{a_{ac}}\big)^3 = \frac{2\Omega_\Lambda}{\Omega_M},
$$
corresponding to the redshift $z_{ac} = (2\Omega_\Lambda/\Omega_M)^{1/3}-1$, numerically $z_{ac} \approx 0.63$.</p>
</div>
</div>
<div id="outline-container-headline-14" class="outline-4">
<h4 id="headline-14">
From radiation domination to matter domination
</h4>
<div id="outline-text-headline-14" class="outline-text-4">
<p>A crude estimation can be given by neglecting dark energy and curvature but use the current value for $\Omega_M$ and $\Omega_{rad}$, repeat the above procedure, one gets the redshift $z_{eq}$ of the moment when radiation and matter contributions are equal
$$
z_{eq} = \frac{a_0}{a_{eq}} - 1 \sim 10^4,
$$
the temperature at that time would be approximately $T_{eq} = T_0(1+z_{eq}) \sim 1 eV \sim 10^4 K$. However at $1 eV$ temperature, all three species of neutrinos are relativistic, and thus must be accounted for. The details are unimportant (see <em>Gorbunov, Rubakov</em>, 4.4), but the estimate given is 52 thousand yrs after Big Bang.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="outline-container-Thermal History" class="outline-2">
<h2 id="Thermal History">
Thermal History (First three minutes)
</h2>
<div id="outline-text-Thermal History" class="outline-text-2">
<p>
The reference for this section, until Electron-Positron Annihilation, is Daniel Baumann's lecture notes on Cosmology, <a href="http://cosmology.amsterdam/education/cosmology/">URL</a>.</p>
<div id="outline-container-headline-16" class="outline-3">
<h3 id="headline-16">
Overview: Equilibrium and Freeze-out
</h3>
<div id="outline-text-headline-16" class="outline-text-3">
<p>The early Universe should be filled with field excitations ("primordial plasma") that interact with each other. If the interaction rate, denoted $\Gamma$, is much larger thant the rate of expansion $H$, i.e. $\Gamma \gg H$, then typical time scaale of interaction is much smaller than the typical expansion time, and the particles can be seen as in thermal equilibrium with each other; they are in <em>local</em> thermal equilibrium.</p>
<p>
The interaction rate $\Gamma \equiv n\sigma v$, where $n$ is the number density of particles, $\sigma$ their interaction cross section, and $v$ the average veolicity of the particle (for high temperature, i.e. relativistic particles, $v\sim 1$). For high temperature, dimensional analysis gives $n\sim T^3$, since particle masses can be ignored for ultra-relativistic particles. $\sigma \sim \frac{\alpha^2}{T^2}$, also by dimensional analysis, where $\alpha \equiv g^2_A /2\pi$ for a gauge boson $A$ with coupling $g_A$. Thus for ultra-relativistic particles, $\Gamma \sim \alpha^2 T$.</p>
<p>
By the Friedman equation, $H\sim \sqrt{\rho}$, taking dimensions into account $H\sim\sqrt{\rho}/M_{pl}$. $\rho\sim T^4$, and hence $H\sim T^2/M_{pl}$. Thus
$$
\frac{\Gamma}{H} \sim \frac{10^{16} \text{GeV}}{T},
$$
where $\alpha\sim 0.01$ is used. When $T$ ranges from $100\text{ GeV}$ to $10^{16}\text{ GeV}$, i.e. for all particles in the Standard Model when they are relativistic the local equilibrium condition is satisfied.</p>
<p>
The temperature decreases and relativistic particles become nonrelativistic nevertheless. However, relativistic particles still dominate the density and pressure, and nonrelativistic particles can be ignored from the primordial plasma. The distribution for particles in thermal equilibrium
$$
f(p) = \frac{1}{e^{(E(p)-\mu)/T}\pm 1}
$$
where $p$ is the momentum, implies that when $T\ll m$, the non-relativistic distribution is supressed by $e^{-m/T}$, thus relativistic particles dominate the density and pressure of the primordial plasma. It is sufficient to consider relativistic particles for the approximation of total energy density. Let $g_\ast = g_\ast(T)$ denote the effective number of relativistic degrees of freedom at temperature $T$, then
$$
\rho_r = \sum_i \int d^3 p f_i(p) E_i(p) = \frac{\pi^2}{30}g_\ast(T) T^4.
$$
In high temperature, all the species of partiles are relativistic, and
$$
g_\ast = g_b + \frac{7}{8} g_f = 106.75
$$
the factor $7/8$ comes from integration.</p>
<p>
The presence of massive particle species implies that the equilibrium didn't persist, since otherwize massive particles would have been exponentially suppressed and the universe would be mostly photons (at least for non-baryonic matters, like neutrinos, the suppression would be present). The massive particles that are still abundant today deviated from equilibrium, decoupled from the primordial plasma, and <em>freezed out</em>, leaving <em>relic particles</em>.</p>
</div>
</div>
<div id="outline-container-headline-17" class="outline-3">
<h3 id="headline-17">
From Electroweak Symmetry Breaking to QCD Phase Transition
</h3>
<div id="outline-text-headline-17" class="outline-text-3">
<p>
The suppression of number and mass density of particles when $T \ll m$ can be interpreted as particle anti-particle annihilation; at low temperatures the thermal particle energies aren't sufficient for pair production. Around $80\%$ of the particle anti-particle annihilation takes place in the interval $T = m \to m/6$.</p>
<p>
The heaviest particles annihilates first, reducing $g_\ast$.</p>
<ol>
<li>The top quarks, with mass aroung $160\text{ GeV}$, annihilates, reducing $g_\ast$ to $106.75-\frac{7}{8} \times 12 = 96.25$.</li>
<li>Then the Higgs boson and the gauge boson of weak interaction annihilates, roughly at the same time. At $T\sim 10\text{ GeV}$ we have $g_\ast = 96.25 - (1 + 3\cdot 3) = 86.25$.</li>
<li>Next annihilate the bottom quarks, leaving $g_\ast = 86.25 - \frac{7}{8}\cdot 12 = 75.75$.</li>
<li>Then the charm quarks and the tau leptons, $g_\ast = 75.75 - \frac{7}{8}\times(12+4) = 61.75$.</li>
<li>Next should have been the strange quarks, <em>if</em> there is no QCD phase transition (or crossover) at around $150\text{ MeV}$, during which the quarks combine into baryons and mesons. These hadrons are non-relativistic below the temperature of the QCD phase transition, except the pions. Now left are pions, electrons, muons, neutrinos and photons, leaving $g_\ast = 2 + 3 + \frac{7}{8}\times (4+4+6) = 17.25$.</li>
</ol>
<p>Then should annihilate electrons and positrons, but before that happens, neutrino decouples from the thermal bath.</p>
</div>
</div>
<div id="outline-container-headline-18" class="outline-3">
<h3 id="headline-18">
Neutrino Decoupling
</h3>
<div id="outline-text-headline-18" class="outline-text-3">
<p>After the <a href="#Electroweak Transition">Electroweak Symmetry Breaking</a> which occured at around $160\text{ GeV}$, the gauge bosons of weak interactions acquired mass, and the cross section of weak interactions became $\sigma \sim G^2_F T^2$ where the Fermi constant $G_F \sim \alpha/ M_W^2$. Now
$$
\Gamma/H \sim \frac{\alpha^2 M_{pl} T^3}{M^4_W} \sim (\frac{T}{1\text{ MeV}})^3,
$$
meaning that at around $1\text{ MeV}$, the particles that interact with the primordial plasma only through the weak interaction decouple and freeze out. These are the neutrinos. They are coupled to the primordial plasma via weak interaction processes such as</p>
\begin{gather*}
\nu_e + \bar{\nu}_e \leftrightarrow e^+ + e^-,\\
e^- + \bar{\nu}_e \leftrightarrow e^- + \bar{\nu}_e.
\end{gather*}
</div>
</div>
</div>
</div>
<div id="outline-container-Electroweak Transition" class="outline-2">
<h2 id="Electroweak Transition">
Electroweak Phase Transition: around 160 GeV
</h2>
<div id="outline-text-Electroweak Transition" class="outline-text-2">
<p>
When the temperature is around $160\text{ GeV}$, the electroweak phase transition occurs. This is due to the breaking of the $SU(2)_L \times U(1)_Y$ symmetry by Higgs mechanism to $U(1)_{EM}$ (since the vacuum is not invariant under $SU(2)_L \times U(1)_Y$), from which the Higgs boson acquires vacuum expectation value, the particles, including $W$ and $Z$ bosons, acquire mass, and the electromagnetic $U(1)$ interaction becomes distinct from the weak interaction mediated by $W$ and $Z$ bosons.</p>
<p>
There is no general, well-established theory of <em>finite-temperature</em> Higgs scalar potential, so the precise dynamics of the electroweak symmetry breaking during the phase transition is still unknown.</p>
<p>
Nevertheless, the Higgs field has no vacuum expectation value at high energies since the Higgs potential receives corrections from the thermal bath. When the temperature drops, Higgs field obtains a VEV and the electroweak symmetry breaks.</p>
<p>
There are much to be desired in how the theory of finite temperature QFT is formed. It is not clear to me whether one can really add a thermal bath and do perturbation theory as usual, and some claim that perturbation theory is <em>not</em> applicable.</p>
<div id="outline-container-headline-20" class="outline-3">
<h3 id="headline-20">
Finite temperature: Vacuum expectation value
</h3>
<div id="outline-text-headline-20" class="outline-text-3">
<p>The equilibrium state of the interacting medium corresponds to the minimum of the Landau potential (Grand potential). When the temperature $T$ is high ($\sim 1$ GeV), like so in the early Universe, chemical potentials are small, and one can use Helmholtz free energy $F$ instead.</p>
<p>
At temperature $T$, let the expectation value of a scalar field $\phi$ be $\langle \phi \rangle_T$. In a system where the average value of $\phi$ is $\langle \phi\rangle_T$ everywhere and in thermal equilibrium otherwise, the free energy $F$ of the system would be $F=\Omega V_{eff}(T,\phi)$ where $\Omega$ is the spatial volume. The <em>effective potential</em> $V_{eff}(T,\phi)$ is the free energy density of the medium at temperature $T$ with the average scalar field $\phi$. In equilibrium, $F$ is at minimum, and hence $\langle \phi \rangle_T$ is the absolute minimum of the effective potential $V_{eff}(T,\phi)$, <em>i.e.</em> the <em>vacuum expectation value</em> (VEV).</p>
<p>
At 0 temperature, $F$ is the same as the energy of the system, and $V_{eff}$ coincides with the scalar potential $V(\phi)$ in the Lagrangian of the field theory which $\phi$ takes part in. In the Weinberg-Salam model, the absolute minimum of $V(\phi)$, $v = \langle \phi \rangle_{T=0} = \langle \phi \rangle$, is nonzero. The computation of $v$ is given in the next section. At finite temperature $T$, $V_{eff}(T,\phi)\neq V(\phi)$, and hence the absoluate minimum, $\langle \phi \rangle_{T}$ can take other values.</p>
</div>
</div>
<div id="outline-container-headline-21" class="outline-3">
<h3 id="headline-21">
Electroweak Symmetry Breaking (0 temperature)
</h3>
<div id="outline-text-headline-21" class="outline-text-3">
<p>
The Weinberg-Salam model is an $SU(2)_L \times U(1)_Y$ gauge theory with tree $SU(2)_L$ gauge bosons $W^i_mu$, $(i=1,2,3)$ and one $U(1)_Y$ gauge boson $B_\mu$. The kinetic Lagrangian density is
$$
\mathcal{L}_{K} = -\tfrac{1}{4} W^i_{\mu\nu} W^{\mu\nu i} -\tfrac{1}{4} B_{\mu\nu}B^{\mu\nu},
$$
where
$$
W^i_{\mu\nu} = \partial_{[\nu}W^i_{\mu]} + g\epsilon^{ijk}W^j_\mu W^k_\nu;\quad B_{\mu\nu}=\partial_{[\nu}B_{\mu]}.
$$</p>
<p>
The most general renoramlizable $SU(2)_L$ invariant potential is
$$
V(\Phi) = \mu^2 |\Phi^\dagger \Phi|+\lambda|\Phi^\dagger\Phi|^2,
$$
with the complex scalar $SU(2)$ doublet $\Phi$ coupled to the gauge fields. If $\mu^2<0$, then the state of minimum energy is not at $\Phi=0$, leading to a vacuum expectation value of the scalar field. The direction of the minimum is not determined since the potential $V$ is ignorant of the direction, thus one can take the VEV to be
$$
\langle\Phi\rangle = \frac{1}{\sqrt{2}}\begin{pmatrix} 0 \\\ v\end{pmatrix},
$$
leading to the $U(1)_Y$ charge $Y_\Phi =1$, and the electromagnetic charge $Q=\frac{\tau_3+Y}{2}$ ($\tau_3$ is the third Pauli matrix). Hence $Q\langle \Phi\rangle =0$, and the symmetry is broken from $SU(2)_L\times U(1)_Y$ to $U(1)_{EM}$.</p>
<p>
The scalar doublet has the Lagrangian density of
$$
\mathcal{L}_s = (D^\mu \Phi)^\dagger (D_\mu \Phi) - V(\Phi)
$$
for covariant derivative
$$
D_\mu = \partial_\mu + i \frac{g}{2}\tau\cdot W_\mu + i\frac{g'}{2}B_\mu Y
$$
which gives physical gauge fields,</p>
\begin{gather*}
W^\pm_\mu = \tfrac{1}{\sqrt{2}}(W^1_\mu\mp i W^2_\mu)\\\
Z^\mu = \frac{-g' B_\mu + g W^3_\mu}{\sqrt{g^2+g'^2}}\\\
A^\mu = \frac{gB_\mu + g' W^3_\mu}{\sqrt{g^2+g'^2}}
\end{gather*}
<p>with masses $M^2_W = \tfrac{1}{4}g^2 v^2$, $M^2_Z = \frac{1}{4}(g^2 + g'^2)v^2$ and $M_A = 0$.</p>
<p>
The parameter $v$ is found from the charged current of $\mu$-decay,
$$
\mu \to e\bar{\nu}_e \nu_\mu
$$
and the interaction strength for muon decay is measured to be $G_F = 1.16639\times 10^{-5}\text{ GeV}^{-2}$. The momentum carried by the $W$ boson, of order $m_\mu$, can be neglected in comparison with $M_W$, hence
$$
\frac{G_F}{\sqrt{2}}=\frac{g^2}{8 M^2_W} = \frac{1}{2v^2}
$$
giving $ v = 246\text{ GeV}$, and the vacuum Higgs VEV $174\text{ GeV}$. It was measured that the Higgs mass $\mu = 125\text{ GeV}$.</p>
<p>
<div class="remark">
<div class="remark-style">
<span class="remark-head">Remark.</span>
The VEV can be 246 GeV or 174 GeV, depending on the convention used.
<span style="float:right">◈</span>
</div>
</div>
</p>
</div>
</div>
<div id="outline-container-headline-22" class="outline-3">
<h3 id="headline-22">
The critical temperature
</h3>
<div id="outline-text-headline-22" class="outline-text-3">
<p>
The finite temperature potential, with Higgs field $\phi$, has the form
$$
V(\phi,T) = D(T^2 - T^2_0)\phi^2 - ET\phi^3 + \tfrac{\lambda_T}{4}\phi^4
$$
where $D,E,T^2_0,\lambda_T$ are some factors depending on particle masses, coupling constants, the Higgs VEV in zero temperature, and the temperature. Observe that there is only one minimum of the potential $V(\phi,T)$ sits at $\phi=0$ for large $T$. The critical temperature $T_c$ let $V(\phi,T)$ obtain two minima. Particles obtain masses via the electroweak symmetry breaking mechanism described in the last section. Calculations show that $T_c \approx 178\text{ GeV}$.</p>
<p>
A point that needs to be stressed is that some claims that perturbation theory is actually <em>not</em> applicable. What is given here is only a partial and inaccurate but illlustrative picture. The contemporary value for the critical temperature is $T_c \approx 159.5$ GeV (so the finite-temperature perturbation theory actually gives a result that deviates farther w.r.t. the 'actual' value than 0-temperature theory), see <a href="https://arxiv.org/abs/1508.07161">The Standard Model cross-over on the lattice</a>.</p>
</div>
</div>
</div>
</div>
Entropy, Information, Dynamical System and Non-Standard Analysis
https://geistlib.xyz/entropy-information-dynamical-system-and-nonstandard-analysis/
Mon, 13 Mar 2023 01:28:00 +0100https://geistlib.xyz/entropy-information-dynamical-system-and-nonstandard-analysis/
<p>
I'm just starting to probe the field. For the time being things I'd like to understand are</p>
<ul>
<li>How is the contact geometry of thermodynamics related to the information theory of dynamical systems?</li>
<li>More notions of entropy, e.g. measure-theoretic entropy, topological entropy, and how are various entropies related.</li>
<li>Loosely speaking, on how complex information, such as that underlying chaotic systems, be described compactly. The <em>nature</em> of randomness.</li>
<li>Duistermaat–Heckman, Heisenberg group, all the semiclassical/microlocal analysis related phenomena in symplectic geometry, in particular <em>geometric quantization</em>, through the lense of dynamical system and information theory.</li>
<li>A particularly interesting one: the <em>informational nature of entropy</em> and <em>non-standard analysis</em>, <em>chaos</em> and <em>intuitionistic continuum</em>, etc. in particular, in light of the "correspondence" between higher category and operator algebra, and Dirac geometry.</li>
</ul>
<p>First, a connection table between dynamical systems and algorithmic complexity,</p>
<table>
<thead>
<tr>
<th>Dynamical Systems</th>
<th>Complexity</th>
</tr>
</thead>
<tbody>
<tr>
<td>Incompressibility of the source</td>
<td>Algorithmic complexity of $\mu$-almost all trajectories</td>
</tr>
<tr>
<td>Kolmogorov-Sinai entropy of trajectories</td>
<td>Kolmogorov complexity of trajectories</td>
</tr>
</tbody>
</table>
<ul>
<li>See Lesne, A. (2014). Shannon entropy: A rigorous notion at the crossroads between probability, information theory, dynamical systems and statistical physics. Mathematical Structures in Computer Science, 24(3), E240311. <a href="https://doi.org/10.1017/S0960129512000783">URL</a> for the literature to the above table.</li>
<li>Mikhail Gromov, In a Search for a Structure, Part I: On Entropy. <a href="https://www.ihes.fr/~gromov/wp-content/uploads/2018/08/structre-serch-entropy-july5-2012.pdf">URL</a> For nonstandard analysis and entropy.</li>
</ul>
<div id="outline-container-headline-1" class="outline-2">
<h2 id="headline-1">
Source Coding (Data Compression)
</h2>
<div id="outline-text-headline-1" class="outline-text-2">
<div id="outline-container-headline-2" class="outline-3">
<h3 id="headline-2">
Optimal v.s. Optimal on an finite alphabet
</h3>
<div id="outline-text-headline-2" class="outline-text-3">
<p>Usually, when talking about the <em>limit of lossless compression</em>, the <em>source coding theorem</em> of Shannon is invoked</p>
<p>
<div class="theorem">
<div class="theorem-style">
<span class="theorem-head">Theorem(Source Coding) .</span>
Let $\mathcal{A}$ be a finite alphabet. Let $f:\mathcal{A}\to \{0,1\}^\ast$ be uniquely decodable, and let $f^+:\mathcal{A}^+ \to \{0,1\}^\ast$ be its extension. Let $l(f(X))$ be the bit length of $f(X)\in \{0,1\}^\ast$, then
$$
H(X) \leq \mathbb{E}[l(f(X))] \leq H(X) + 1,
$$
where $\mathbb{E}$ denote the expectation value operator.
</div>
</div>
</p>
<p>
More generally, one can take $f$ to be a uniquely decodable code $f:\mathcal{A}\to \mathcal{B}^\ast$ where $\mathcal{B}$ is also a finite alphabet (the above case is when $\mathcal{B} = \{0,1\}$), then
$$
\frac{H(X)}{\log_2 |\mathcal{B}|}\leq \mathbb{E}[l(f(X))] \leq \frac{H(X)}{\log_2 |\mathcal{B}|} + 1.
$$
This is easily seen by changing the base in the definition of Shannon entropy.</p>
<p>
However, it needs to be stressed that a coding $f$ is <em>not necessarily from a finite alphabet</em>, and that actual optimal coding can have expected code length <em>smaller</em> than Shannon entropy.</p>
<p>
First note that lossless compression is only possible for discrete random variables since the target alphabet is finite, and in particular, $\{0,1\}^\ast$ is countable; the coding $f:\mathcal{X} \to \{0,1\}^\ast$ must be injective for $f$ to be a lossless compression, where $\mathcal{X}$ is the space of random variables. Thus $\mathcal{X}\cong\mathbb{N}$. Now relabel $\mathcal{X}$, that is, let $\mathcal{X}=\{X_1, X_2, ...\}$, s.t. $P_X(i) \geq P_X(i+1)$. An optimal coding of $\mathcal{X}$ is then the coding $f_{op}$ that is</p>
<ol>
<li>maps $X_1$ to $\emptyset$,</li>
<li>maps $X_i$ to the binary sequence that represents $i-1$.</li>
</ol>
<p>The length of the codeword is given by $l(f_{op}(X_n)) = \lfloor \log_2 n \rfloor $ (obvious). The coding $f_{op}$ is <em>optimal</em>, in that for any lossless coding $f$ the length $l(f(X))$ <em>stochastic dominates</em> $l(f_{op})$ for any $X$: the cumulative distribution function of $l(f(X))$ is <em>smaller</em> or equal to $l(f_{op}(X))$ pointwise (i.e. for every $X$), or equivalently
$$
\mathbb{P}[l(f(X)) \leq k] \leq \mathbb{P}[l(f_{op}(X))\leq k]
$$
for any $k\in \mathbb{R}$ and $X\in\mathcal{X}$. The proof is easy. For the coding $f_{op}$, we have
$$
H(X) - \log_2[\exp(H(X)+1)] \leq \mathbb{E}[l(f_{op}(X))]\leq H(X),
$$
so while the bound is again given by $H(X)$, the Shannon entropy $H(X)$ is not really the "limit" of compression of $X$.</p>
<p>
Of course the problem with $f_{op}$ is that one needs to order the probability mass functions first, and the domain of $f_{op}$ is not a finite alphabet. By contrast, a <em>uniquely decodable code</em> $f:\mathcal{A}\to \{0,1\}^*$ that is the subject of the source coding theorem is defined on an finite alphabet $\mathcal{A}$, and then extended to $\mathcal{A}^+$ to implement an actual coding, so that the coding can be defined on a finite alphabet and be implemented on any words on the alphabet. Also, something about $\mathcal{X}$ is hidden in the definition of $f_{op}$, namely, the ordering given by the pmf, whereas in a uniquely decodable code only the ordering on $\mathcal{A}$ can be "hidden". Nevertheless this is still a bound, that can said to be "the limit of compression", while actually one should consider Kolmogorov complexity, and further complications arise due to various non-invariant constructions in computability theory, e.g. the choice of Turing machines.</p>
</div>
</div>
</div>
</div>
Thermodynamics and Information Theory
https://geistlib.xyz/thermodynamics/
Sat, 11 Mar 2023 11:16:32 +0100https://geistlib.xyz/thermodynamics/
<p>
Not strictly a note since I've learned the subject years before. Revised and revising for my rusty memory of thermodynamics.</p>
<div id="outline-container-headline-1" class="outline-2">
<h2 id="headline-1">
Basics in Thermodynamics
</h2>
<div id="outline-text-headline-1" class="outline-text-2">
<div id="outline-container-headline-2" class="outline-3">
<h3 id="headline-2">
Equilibrium states
</h3>
<div id="outline-text-headline-2" class="outline-text-3">
<p>Found some interesting passages in Callen's book. First of all, in Callen's formulation, equilibrium states are those states of simple systems that are (macroscopically) characterized completely by $U,V,N_i$. Now he states that,</p>
<blockquote>
<p>The quasi-static process simply is an ordered succession of equilibrium states, whereas a real process is a temporal succession of equilibrium and nonequilibrium states.</p>
</blockquote>
<p>the reason being that</p>
<blockquote>
<p>For a real process always involves nonequilibrium intermediate states have no <em>representation in the thermodynamic configuration space</em>.</p>
</blockquote>
<p>The emphasis is my own. Now what is a <em>nonequilibrium intermediate state</em>? It is not representable, but does it exist? What does it mean that some nonrepresentable states exist? Why do we need to postulate this sort of entity? From my experience, physicists will tell you that this is because thermodynamic quantities are only defined when in equilibrium (but it seems that in his formulation the <strong>equilibrium</strong> is defined by $U,V,N_i$). Now Callen rightly points out that, during a physical process, the system <em>disappears</em> from the thermodynamic configuration space that it inhabited when in its initial state, and reappears in the configuration space when the final equilibrium state is reached. There is a strange analogy with quantum mechanics: equilibrium states correspond to eigenstates.</p>
<p>
Why not ditch those metaphysical constructs such as time and "intermediate states" and rethink what the thermodynamic quantaties "really" are?</p>
</div>
</div>
<div id="outline-container-headline-3" class="outline-3">
<h3 id="headline-3">
Thermodynamic potentials
</h3>
<div id="outline-text-headline-3" class="outline-text-3">
<p>
I never quite understood when and why choose specific thermodynamic potential over others, or never tried to understand it. It seems that now it is unavoidable.</p>
<p>
The internal energy $U(S,V,N)$ is a function of extensive properties $S,V,N$. The first law of thermodynamics states that for quasi-static processes of closed systems,
$$
d U =\delta Q - dW + \mu \delta N = \delta Q - PdV + \mu d N
$$
whereas the second law assets
$$
\delta Q = T dS
$$
again for quasi-static processes. Hence the fundamental equation $U=U(S,V,N)$ has the following differential,
$$
dU = TdS - PdV + \mu d N.
$$
Keep in mind that for reversible and quasi-static processes, $\delta Q = T dS$ and $dW = PdV$, and usually one is interested in these processes.</p>
<p>
In the following we will say that the non-mechanical work received $\delta W_{ex}$ is measured by $\mu dN$ where $\mu$ is the chemical potential and $N$ is number of particles, and call it <em>intrinsic energy</em>, but $\mu dN$ can be understood to be (the infinitesimal of) any kind of non-mechanical work received.</p>
<ol>
<li>For constant $V$ and $N$, $dU$ measures the heat flow into the system.</li>
<li>For constant $S$ and $N$, whatever that means, $dU$ measures the work done to surrounding system.</li>
<li>For constant $S$ and $V$, $dU$ measures the exchange of internal energies between the system and its surrounding.</li>
</ol>
<p>Here 2. and 3. are not that helpful. Internal energy can be said to measure the <em>heat</em> that can be transferred to the surroundings when there is no intrinsic change and the volume is constant (<em>no work</em> is done). In other words, fixing $S$ and $V$, the system will evolve to a state that minimizes $U(S,V)$.</p>
<p>
One would also like to measure the property of the system when $P$, $T$ and $N$ vary. This is the reason for other thermodynamic potentials to be introduced.</p>
<div id="outline-container-headline-4" class="outline-4">
<h4 id="headline-4">
Enthalpy
</h4>
<div id="outline-text-headline-4" class="outline-text-4">
<p>
The enthalpy $H = H(S,P,N)$ is defined by $H = U + PV$. The differential is
$$
dH = TdS + VdP + \mu dN,
$$
then</p>
<ol>
<li>For constant $N$ and $S$, whatever that means, $H$ measures… something.</li>
<li>For constant $N$ and $P$, $dH$ measures the heat flow into the system (hence the name <em>enthalpy</em>, "internal heat").</li>
<li>For constant $S$ and $P$, $dH$ measures the change of intrinsitc energy.</li>
</ol>
<p>So enthalpy is basically the measure of the heat that can be transfered to the surroundings, when the system is the <em>pressure</em> is constant and no intrinsic change is involved. In other words, leaving $S,P$ fixed, the system evolve to a state minimizing $H(S,P)$.</p>
</div>
</div>
<div id="outline-container-headline-5" class="outline-4">
<h4 id="headline-5">
Helmholtz free energy
</h4>
<div id="outline-text-headline-5" class="outline-text-4">
<p>The Helmholtz free energy $F= F(T,V,N)$ is defined by $F = U-TS$. The differential gives
$$
dF = -SdT - PdV + \mu dN.
$$</p>
<p>
Notice that $T$ is far easier to observe than $S$.</p>
<ol>
<li>For constant $T$ and $V$, $dF$ measures the change of intrinsic energy.</li>
<li>For constant $T$ and $N$, $dF$ measures the work done to outer systems (hence the name of <em>free energy</em>).</li>
<li>For constant $V$ and $N$, unclear.</li>
</ol>
<p>Then $F$ is the measure of the <em>work that can be done</em> to outer systems when the system is in <em>quasi-static equilibrium</em> with the outer system and no intrinsitc change is involved. In other words, leving $T,N$ fixed, the system evolves to a state that minimizes $F(T,V,N)$.</p>
<p>
One can argue that it is also the measure of the exchanges of constituents when the system is in quasi-static equilibrium with the surrounding and has constant volume, but it is rare that interchanges of constituents leaves $V$ invariant.</p>
</div>
</div>
<div id="outline-container-headline-6" class="outline-4">
<h4 id="headline-6">
Gibbs free energy
</h4>
<div id="outline-text-headline-6" class="outline-text-4">
<p>
Also called "free enthalpy" since the Gibbs free energy $G=G(T,P,N)$ is defined by $G = H - TS$. The differential is
$$
dG = -SdT + VdP + \mu dN.
$$</p>
<ol>
<li>For constant $T$ and $P$, the change of intrinsic energy.</li>
<li>For constant $P$ and $N$, unclear.</li>
<li>For constant $T$ and $N$, unclear.</li>
</ol>
<p>Then $G$ is the measure of how much non-mechanical work (that come from some intrinsic change, i.e., not from volume expansion) can be done to outer systems when in equilibrium with the surroundings and with the pressure remaining constant. Fixing $T,P$, the system choose a state that minimizes $G(T,P,N)$.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="outline-container-Information-theoretic interpretation of thermodynamics" class="outline-2">
<h2 id="Information-theoretic interpretation of thermodynamics">
Information-theoretic interpretation of thermodynamics
</h2>
<div id="outline-text-Information-theoretic interpretation of thermodynamics" class="outline-text-2">
<div id="outline-container-headline-8" class="outline-3">
<h3 id="headline-8">
Gibbs equilibrium distributions
</h3>
<div id="outline-text-headline-8" class="outline-text-3">
<p>
Consider a system, whose macroscopic state is cahracterized by a set of $n$ observables $O_a$. These observables are assumed to be the average values of some functions over the microscopic space $\Gamma$, w.r.t. a measure $\mu$ on $\Gamma$:
$$
O_a := \langle F_a \rangle = \frac{\int_\Gamma F_a \mu}{\int_\Gamma \mu}
$$
where $\{F_a\}^n_{i=1}$ is some set of functions $F_a: \Gamma \to \mathbb{R}$.</p>
<p>
<div class="example">
<div class="remark-style">
<span class="example-head">Example(Statistical mechanics) .</span>
In statistical mechanics $\Gamma$ is the phase space of a mechanical system and $\mu$ is given by the probability distribution $\rho:\Gamma\to \mathbb{R}^+$ s.t.
$$
\operatorname{vol}(\Gamma) = \int_\Gamma \mu = \int_\Gamma \rho dx < + \infty
$$
where $x$ are the collective coordinates on $\Gamma$.
<span style="float:right"> ◀ </span>
</div>
</div>
</p>
<p>
A crucial point is that a choice of a measure needs to be carried out. For example:</p>
<p>
<div class="example">
<div class="remark-style">
<span class="example-head">Example(Internal energy) .</span>
In the above example, put $F=H$ the Hamiltonian, choose the distribution as the canonical distribution $\rho=\exp(- H/T)/\mathcal{Z}$ where $\mathcal{Z}$ is the partition function and $T$ is the temperature, $O_a$ will be the internal energy $U$ of the system.
<span style="float:right"> ◀ </span>
</div>
</div>
</p>
<p>
The choice of $\rho$ is done by considering the microscopic entropy of a distribution and extremize the macroscopic, i.e. thermodynamic, entropy, given by considering the distribution as a probability distribution $\rho$, and taking its Shannon entropy.</p>
<p>
Consider, for a generic normalized (i.e. $\int_\Gamma \rho dx = 1$) distribution $\rho$, the <em>microscopic entropy</em> (see <a href="#What is Information Entropy">What is Information Entropy</a> for what $s(\rho) = - \ln \rho$ means)
$$
s(\rho) = -\ln \rho
$$
and impose that its average - or equivalently the Shannon entropy of $\rho$ - coincides at equilibrium with the thermodynamic entropy of the system,
$$
S_\rho = \langle s(\rho)\rangle = -\int_\Gamma \rho\ln \rho dx,
$$
By the Second Law of Thermodynamics, subject to the constraints</p>
\begin{gather*}
O_a = \int_\Gamma F_a \rho dx\\
\int_\Gamma \rho dx = 1
\end{gather*}
<p>the entropy $S_\rho$ should be extremized. Thus the following functional is extremized:
$$
\tilde{S}_\rho = -\int_\Gamma \rho\ln\rho dx - \tilde{w}\Big( \int_\Gamma dx -1\Big) + \tilde{q}^a \Big( \int_\Gamma F_a(x) \rho dx - O_a \Big).
$$
There is a summation <em>a la</em> Einstein over the index $a$.</p>
<p>
The solution is the family of <em>Gibbs' equilibrium distributions</em>
$$
\rho_0(\Gamma;\tilde{w},\tilde{q}) = \exp(-\tilde{w}+ F_a(x) \tilde{q}^a).
$$
From the normalization condition of $\rho$,
$$
\tilde{w} = \ln \int_\Gamma \exp(F_a(x) \tilde{q}^a) dx = \ln\mathcal{Z}
$$
where $\mathcal{Z}$ is the <em>partition function</em>. Thus $\tilde{w} = \tilde{w}(\tilde{q}^a)$ is the <em>thermodynamic potential</em> for the system in the ensemble characterized by the constraints given by $O_a$. The derivatives of $\tilde{w}$ w.r.t. $\tilde{q}^a$ give the <em>equations of state</em>
$$
O_a = \frac{\partial \tilde{w}}{\partial \tilde{q}^a}.
$$
The entropy reads
$$
S_{\rho_0} = \tilde{w} - O_a \tilde{q}^a.
$$</p>
<p>
Hence at equilibrium <em>the thermodynamic potentials are Legendre transforms of the entropy</em>.</p>
<p>
<div class="example">
<div class="remark-style">
<span class="example-head">Example(Microcanonical ensemble) .</span>
If there is no macroscopic observable allowed to fluctuate, the ensembel is called <em>microscopic</em>. There is no constraint for the Lagrange multipliers $\tilde{q}^a$, and thus $\tilde{w} = S(U,V,N)$.
<span style="float:right"> ◀ </span>
</div>
</div>
</p>
<p>
<div class="example">
<div class="remark-style">
<span class="example-head">Example(Canonical ensemble) .</span>
Let $U$ be variable (the system is placed in contact with a thermostat bath), the only constraint for the Lagrange multiplier $-\beta$ is $U = \langle H\rangle_{\rho_0}$. The corresponding ensemble is called <em>canonical</em>. The associated thermodynamic potential is $\tilde{w}(\beta,V,N) = S - \beta U = -\beta F(T,V,N)$
with $F(T,V,N)$ the Helmholtz free energy.
<span style="float:right"> ◀ </span>
</div>
</div>
</p>
</div>
</div>
<div id="outline-container-headline-9" class="outline-3">
<h3 id="headline-9">
The First Law of Thermodynamics: information theoretic derivation
</h3>
<div id="outline-text-headline-9" class="outline-text-3">
<p>
We write $p_a$ for $O_a$ in the following and drop the tilde over $\tilde{w},\tilde{q}^a$. The First Law of Thermodynamic is written as
$$
d w - p_a d q^a = 0
$$
since the First Law is invariant under a Legendre transformation. There is an alternative "derivation" of the First Law. Consider the microscopic entropy $s(\rho) = s(w,q^a)$ and write $\lambda^i = w, q^a$, then its differential is
$$
ds = -\frac{\partial \ln\rho}{\partial \lambda^i} d\lambda^i.
$$
Its expectation value, or the <em>first moment</em> of $ds$ is
$$
\langle ds \rangle = -\int_\Gamma \frac{\partial \ln\rho}{\partial \lambda^i} d\lambda^i \rho dx = - \langle \frac{\partial \ln \rho}{\partial \lambda^i}\rangle d \lambda^i,
$$
now with the Second Law, the distribution $\rho_0$ is given, which yields
$$
\langle ds \rangle = \langle dw - F_a(x) dq^a \rangle = dw - p_a d q^a.
$$
Thus the First Law just says that the first moment of $ds$ vanishes. <em>This is a statement about the quality of the estimators $F_a$</em>. The equations of state, being results of the First Law
$$
p_a = \langle F_a \rangle = \partial w/\partial q^a
$$
can be read as meaning that, if for some $a$, the equation of state holds, then $F_a$ is an <em>unbiased estimator</em> for the value of the variable $\partial w/\partial q$. Thus, whenever the First Law is not satisfied, there is an estimator $F_a$ that is <em>biased</em>.</p>
<p>
[…]</p>
</div>
</div>
</div>
</div>
<div id="outline-container-What is Information Entropy" class="outline-2">
<h2 id="What is Information Entropy">
What is Information Entropy?
</h2>
<div id="outline-text-What is Information Entropy" class="outline-text-2">
<p>
A quantity that was somehow arbitrary introduced in <a href="#Information-theoretic interpretation of thermodynamics">Information-theoretic interpretation of thermodynamics</a> was the microscopic entropy $s(\rho) = -\ln \rho$. Why the logarithm? Since $s$ appears in $S := - \int \rho \ln\rho dx$, what really needs to be explained is the meaning of the Shannon entropy formula
$$
S_I = -\sum_i p_i \log p_i
$$
For simplicity just consider the discrete form. The choice of the base ($\log$ here is base 2) doesn't matter much since changing base just gives a constant. $S_I$ can be seen as an expectation of the function $\log p_i$, if there is a notion of probability.</p>
<div id="outline-container-headline-11" class="outline-3">
<h3 id="headline-11">
Operational Interpretation
</h3>
<div id="outline-text-headline-11" class="outline-text-3">
<p>
Suppose that there are $N$ messages. One wants to pick an arbitrary message from these $N$ messages by asking questions the answer to which are <em>true or false</em> (and would be answered). If one picks an optimal set of questions, one would need, at most, $\log N$ questions: each answer selects half of the messages, solving $2^x = N$ for $x$, $x=\log N$. This gives an intuition of the rough meaning of the logarithm.</p>
<p>
Now if there are classes of messages with sizes $\{N_i\}_i$, let $p_i = N_i / \sum_i N_i$, then $\log p_i = \log N_i - \log N$, and
$$
\sum_i p_i \log p_i = \frac{\sum_i N_i \log N_i}{N} - \log N.
$$
Thus what is important is $\sum_i N_i \log N_i$. This is the <em>weighted sum</em> of specifying one particular message in each class.</p>
<p>
Consider a probability density $\rho$, intuitively, then $\int \rho \log \rho$ is the weighted integral of $\log \rho$. $\log \rho(x)$ is the "bits" needed to describe a specific message over the point $x$. Thus $\rho$ itself "classifies" the points in a space $X$ into neigborhoods, over which are $\rho$ "number" of messages, and in each infinitesimal neighborhood $\log \rho (x)$ bits are needed to <em>specify a particular message</em>.</p>
<p>
Why weighting over the number of the messages? Lets say that we <em>know</em> that there are $N$ messages, and know that these are partitioned into classes $N_1, N_2 ...$ each with $N_i$ messages. The weighted sum is then the expectation of the bits specifying a particular message in these $N$ messages, provided that one knows that $N$ is classified into classes, and in the process of specifying one is really specifying one message in $N_i$ messages, with the particular class represented by $i$ not determined. The explanation can be copy-pasted to the continuous case.</p>
<p>
In the above, $S_I = - \int_\Gamma \rho \log \rho dx $ is extremized, in fact maximized, i.e. $\int_\Gamma \rho \log \rho dx$ is minimized. This means some set of messages are partitioned in such a way - the partition given by $\rho$ - that to specify a particular message, provided that the partition $\rho$ is known, one needs the <em>least</em> bits. In turn, this means that the partition $\rho$ <em>helps</em> much, since the total number of messages are independent of the partition $\rho$.</p>
<p>
Maximal Shannon entropy then means the partition $\rho$ "helps much" in reducing the length of bits needed to specify a particular message: <em>more information is contained in the partition</em> $\rho$. But the meaning of "helps much" should be taken with a grain of salt, since one can also regard $\rho$ to be representing what is <em>unknown</em> about the messages: it is unsure in which class the spcification process will occur.</p>
<p>
A particularly interesting "bijection"
$$
\text{Prefix codes} \leftrightarrow \text{Binary tree (codewords are leaves)} \leftrightarrow \text{Yes/No question strategy}.
$$</p>
</div>
</div>
<div id="outline-container-headline-12" class="outline-3">
<h3 id="headline-12">
Axiomatic framework
</h3>
<div id="outline-text-headline-12" class="outline-text-3">
<p>
Let $P = (p_1,\ldots,p_m)$ be a probability distribution on $m$ letters, consider a functional $H_m(p_1,\ldots,p_m)$ that satisfies the following axioms:</p>
<ol>
<li>Permutation invariance: $H_m(\sigma_m(p_1,\ldots,p_m)) = H_m(p_1,\ldots,p_m))$.</li>
<li>Expansibility: $H_m(p_1,\ldots,p_{m-1},0) = H_{m-1}(p_1,\ldots,p_{m-1})$.</li>
<li>Normalization: $H_2(\frac{1}{2},\frac{1}{2}) = \log 2$.</li>
<li>Continuity: $\lim_{p\to 0} H_2(p,1-p) = 0$.</li>
<li>Subadditivity: $H(X,Y)\leq H(X) + H(Y)$ for vector random variables $X,Y$. This is equivalently $H_{mn}(r_{11},\ldots,r_{mn})\leq H_m(\sum^n_{j=1} r_{1j},\ldots,\sum^n_{j=m}) + H_n(\sum^m_{i=1}r_{i1},\ldots,\sum^m_{i=1}r_{in})$.</li>
<li>Additivity: $H(X,Y) = H(X) + H(Y)$ if $X,Y$ independent; equivalently $H_{mn}(p_1 q_1,\ldots,p_m q_n)\leq H_m(p_1,\ldots,p_m) + H_n(q_1,\ldots,q_n)$.</li>
</ol>
<p>Then
$$
H_m(p_1,\ldots,p_m) = -\sum_{i=1}^m p_i \log p_i
$$
is the only possibility.</p>
</div>
</div>
</div>
</div>
<div id="outline-container-headline-13" class="outline-2">
<h2 id="headline-13">
Thermodynamics and Contact Geometry
</h2>
<div id="outline-text-headline-13" class="outline-text-2">
<p>
Read <a href="https://doi.org/10.1142/S0219887819400036">Alessandro Bravetti, Contact geometry and thermodynamics</a></p>
</div>
</div>
<div id="outline-container-headline-14" class="outline-2">
<h2 id="headline-14">
Misc.
</h2>
<div id="outline-text-headline-14" class="outline-text-2">
<div id="outline-container-headline-15" class="outline-3">
<h3 id="headline-15">
A complaint on Callen's problem 8.1-1
</h3>
<div id="outline-text-headline-15" class="outline-text-3">
<p>
Callen's thermodynamics book, p.207. This is a pointless problem. The reason that
$$
\frac{\partial^2 S}{\partial U^2}\frac{\partial^2 S}{\partial V^2} - \left(\frac{\partial^2 S}{\partial U \partial V}\right)^2 \geq 0
$$
holds, is that for concave 2-dimensional functions, the Hessian needs to be negative semi-definite (i.e. all eigenvalues are negative), and the determinant in 2-dimension is the product of 2 eigenvalues. $\partial^2 S/\partial U^2$ and $\partial^2 S/\partial V^2$ are all negative semi-definite, so if the determinant of the Hessian is positive semi-definite, then the Hessian itself is automatically negative semi-definite.</p>
</div>
</div>
</div>
</div>
D. A. Lavis, the Concept of Probability in Statistical Mechanics
https://geistlib.xyz/d-a-lavis-the-concept-of-probability-in-statistical-mechanics/
Sat, 11 Mar 2023 06:39:41 +0100https://geistlib.xyz/d-a-lavis-the-concept-of-probability-in-statistical-mechanics/
<p>
<a href="https://link.springer.com/chapter/10.1007/978-1-4615-1339-1_28">URL</a>. This is a review article discussing various formulations of the foundations of statistical mechanics but it looks more like an introduction to the idea of Jaynes. There are sacttered personal views about the matter which <em>I do not state explicitly that these are my own thoughts</em>.</p>
<div id="outline-container-headline-1" class="outline-2">
<h2 id="headline-1">
Introduction
</h2>
<div id="outline-text-headline-1" class="outline-text-2">
<div id="outline-container-headline-2" class="outline-3">
<h3 id="headline-2">
Kinetic Theory of Gases
</h3>
<div id="outline-text-headline-2" class="outline-text-3">
<p>Recall the formula called <em>Maxwell law</em> for a gas of $N$ small, hard, perfectly elastic spheres: the number of spheres whose speed lies between $v$ and $v+dv$ is
$$
f_1(v) dv = \frac{4N}{\alpha^2 \sqrt{\pi}}v^2 \exp\big(-\frac{v^2}{\alpha^2}\big).
$$
The quantity is used to establish the $H$-function in the $H$-theorem:
$$
H(t) = \int d^3 v f_1(v,t)\ln [f_1(v,t)].
$$
Dividing out the factor $N$, it is easy to see that $H(t)$ is nothing but the negative "entropy" in the velocity space, and the function $f_1(v,t)$ is equal to $N\rho_1(v,t)$ where $\rho_1(v,t)$ is the probability distribution of velocity over the velocity space.</p>
<p>
Originally the quantity $f_1(v,t)$ was considered as the <em>actual distribution of</em> the $N$ particles of the gas. To see this, recall how it was derived. It was assumed that the $x,y,z$ velocities are independent from each other, thus
$$
f(v_x,v_y,v_z) dv_x dv_y dv_z = f(v_x)dv_x f(v_y) dv_y f(v_z) dv_z
$$
at the same time the distribution of velocities should be isotropic,
$$
f(v_x,v_y,v_z) = f(v^2) = f(v_x^2 + v_y^2 +v_z^2) = f(v_x)f(v_y)f(v_z),
$$
so that
$$
\ln f(v_x^2 + v_y^2 + v_z^2) = \ln f(v_x) + \ln f(v_y) + \ln f(v_z).
$$
A possible solution will be
$$
f(v_i) = C e^{-B v_i^2}.
$$
the constants are then determined by</p>
<ol>
<li>the normalization of the velocity distribution,</li>
<li>the formula for the everage energy $\overline{\epsilon} = 3kT/2 = m\overline{v}^2/2$, where $\overline{v}^2$ is computed by</li>
</ol>
<p>$$
\overline{v}^2 = \int_{-\infty}^{+\infty} v^2 \cdot f(v)d^3 v = 4\pi \int_0^\infty v^2 \cdot f(v) v^2 dv.
$$</p>
<p>
A technical problem for the kinetic theory of gases was reconciling the</p>
<ol>
<li>reversibility of mechanical laws and the irreversibility of natural proceses as described by the second law of thermodynamics,</li>
<li>incompatibility of the second law of thermodynamics and the mechanical theory heat which is absed on a usually recurrent dynamical system (Poincare's <em>recuurence theorem</em>).</li>
</ol>
<p>Since there was no probability involved and the kinetic theory was thought to be trying to describe what thermodynamic phenomena actually are, these two were actual problems.</p>
</div>
</div>
<div id="outline-container-headline-3" class="outline-3">
<h3 id="headline-3">
Interpretation of Probability
</h3>
<div id="outline-text-headline-3" class="outline-text-3">
<p>The defence given by Boltzmann were some points that have become standard arguments in textbook nowadays:</p>
<ol>
<li>The number of moclues is large for macro physical systems, so the recurrence time would be extremely large.</li>
<li>In practice a finite system is never completely isolated, so the recurrence doesn't apply.</li>
<li>One needs a clear definition, for the dynamical system, of what is meant by a macrostate.</li>
<li>The second law is a <em>statistical law</em> from the molecular point of view.</li>
</ol>
<p>The immediate effect of the last point is the change of perception of the meaning of the quantity $f_1(v,t)$. From $\rho_1(v,t) = f_1(v,t)/N$ to $\rho_(v,p,t)$, the <em>probability</em> density function on the phase space $\Gamma$ is relatively a small step. Now <em>probability</em> is always accompanied by debates around its interpretations. In statistical mechanics, the presence of statistics is considered, usually, in three light: Ensemble, Ergodic, Probablistic.</p>
<div id="outline-container-headline-4" class="outline-4">
<h4 id="headline-4">
Ensemble
</h4>
<div id="outline-text-headline-4" class="outline-text-4">
<p>The <em>ensemble</em> point of view. Regard the subject as a procedure for arriving at answers. Abandoning the attempt to follow the precise change in state which take place in a particular system and study the behaviour of a collection or ensemble of systems. This point of view doesn't really say anything about the interpretation of "probability" and doesn't explain why considering the ensemble is useful in making reasonable predictions. Since the subject of study is the ensemble and not a particular system, one can avoid philosphical speculations. It is really the <em>shut up and calculate</em> stance, similar to many worlds interpretation in QM.</p>
</div>
</div>
<div id="outline-container-headline-5" class="outline-4">
<h4 id="headline-5">
Ergodicity
</h4>
<div id="outline-text-headline-5" class="outline-text-4">
<p>This regard probabilistic ideas in the light of <em>ergodic theory</em>. Briefly speaking this says that the system travels through a path, starting from $(x_0,p_0)$, on the phase space $\Gamma$, over a period of time $\tau$, and the thermodynamics quantities $Q_T$ are the average $\overline{Q}$ of the corresponding mechanical phase functions $Q$ over the limit $\tau \to \infty$.
Birkhoff showed that almost everywhere in $\gamma\subseteq\Gamma$ (a subset that is of finite volume, and is invariant under the Hamiltonian flow) the limit $\lim_{\tau\to\infty}\tilde{Q}(x_0,p_0) = \hat{Q}(x_0,p_0)$ exists, so <em>if</em> $\hat{Q}$ is a constant of motioon almost everywhre in $\gamma$, $\hat{Q} = \overline{Q}$.
A system is said to be <em>ergodic</em> if for all phase functions $Q$ integrable over $\gamma$ we have $\hat{Q} = \overline{Q}$. The problem becomes whether the set of $\mu$-measure zero (excluded by "almost everywhere") can really be neglected: a measurement is never made starting at one of its points.
This makes the meaning of the measure $\mu$ important, and one needs to assume some sort of interpretation for $\mu$, which is a subject of statistics and probability, <em>unless</em> one argues that the orgodic hypothesis which assumes that the path of the system passed through every point of $\gamma$ which cannot be true. The alternative hypothesis, <em>quasi-ergodic</em> hypothesis has not proved sufficient to establish ergodicity. There is another approach called <em>metric transitivity</em>.</p>
</div>
</div>
<div id="outline-container-headline-6" class="outline-4">
<h4 id="headline-6">
Probabilistic
</h4>
<div id="outline-text-headline-6" class="outline-text-4">
<p>Interpreting the probabilistic ideas as really probabilistic in essence, and take part in the real debates taking place inside the theory of probability. Frenquentist, Bayesian, etc.</p>
<p>
A point I want to make is that, it should not be considered that "probabilities do not describe reality - only our information about reality - […]" as E. T. Jaynes puts it, since our information about reality <em>is</em> the only reality.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="outline-container-headline-7" class="outline-2">
<h2 id="headline-7">
Equilibrium Statistical Mechanics
</h2>
<div id="outline-text-headline-7" class="outline-text-2">
<p>
Despite the debates about the foundations, eqilibrium statistical mechanics works well. This is because the superstructure is based on a few agreed propositions:</p>
<ol>
<li>The fact that equilibrium corresponds to having a probability density function $\rho$ that is not an explicit function of time.</li>
<li>The form for $\rho$ which should be used in given sets of physical circumstances.</li>
</ol>
<p>An integral of the equation of motion is called an <em>isolating</em> constant of motion if it can be used to reduce the dimension of a set invariant under the flow, i.e. define a surface in $\Gamma$. If the energy given by the value of the Hamiltonian is the only isolating constant of motion, then the appropriate probability denstiy function is agreed to be obtained by applying equal probabilities to the points of an accessible region of phase space. The invariant set $\gamma$ is usually taken to be the shell $E < H(x,p) < E+\Delta E$ and induce the <em>microcanonical</em> distribution in the limit $\Delta E \to 0$. The <em>canonical</em> distribution is obtained using either the central limit theorem or the method of steepest descents. The procedures are asymptotically valid for systems with a large number of microsystems (subjectivists do not need this large number limit).</p>
<p>
Hence the foundational problem for equilibrium statistical mechanics is to justify the use of the <em>uniform</em> distribution over an energy shell.</p>
<ol>
<li>Ergodic theory: If the Hamiltonian is the only isolating constant of motion, then the ergodic theory will almost give a justification (expect the nergy surface to be metrically transitive), but the problem of proving the non-existence of additional isolating constant of motion is difficult, and the existence of these will result in the form of thermodynamics significantly different from the standard one.</li>
<li>Ensemble: the ensemble systems with all values of the other unknown isolating constants of motion are all included in consideration, so there is no problem with additional isolating constant of motion, but no justification for the use of the uniform distribution is given.</li>
<li>Justifying the uniform distribution by showing that equilibrium arises in the long-time limit from non-equilibrium situations. A subdivision is given by 1. Brussels-Austin School (objectivist/Prigogine) 2. Maximum entropy method (subjectivist/information theoretic/Bayesian/Jaynes, etc.).</li>
</ol>
<div id="outline-container-headline-8" class="outline-3">
<h3 id="headline-8">
The Maximum Entropy Method
</h3>
<div id="outline-text-headline-8" class="outline-text-3">
<p>While the maximum entropy method is primarily that of non-equilibrium statistical mechanics, it has a form specifically for equilibrium.</p>
<p>
The motto is that probability distribution should model the <em>best prediction one can make</em> of observable phenomena, absed on the information available. The fact that there are <em>unknown</em> constants of motion is irrelevant since making predictions is based on available information.</p>
<p>
Conssider a system with discrete energy levels $\{E_i\}_i$. Then one asks the following question</p>
<div class="center-block" style="text-align: center; margin-left: auto; margin-right: auto;">
<p>What is <em>the best</em> probability distribution for the random variable $E$ based on the information available to us?</p>
</div>
<p>while the standard objectivist formulation would be</p>
<div class="center-block" style="text-align: center; margin-left: auto; margin-right: auto;">
<p>Given the physical environment of the system, what is <em>the</em> probability distribution for $E$?</p>
</div>
<p>Now, given an appropriate measure of uncertainty, if one choose the probability distribution that <em>maximizes the uncertainty</em> relative to the available information, then this will be the <em>best</em> probability distribution, since it <em>assumes as little as possible</em>. He shows that the unique measure of uncertainty satisfying some reasonable mathematical properties is Shannon's entropy
$$
S_I(p_i) = -\sum_i p_i \ln (p_i).
$$
Subject to the condition $\sum_i p_i = 1$, maximizing $S_I(p_i)$ would give the same result as that hypothesized by the objectivists the uniform distribution. The objectivist, on the other hand, suppose that there <em>is</em> a probability associated with an experiment to determine its state. Popperian will hypothesize that $p_i=1/n$; sequence of experiments will be used to see if the hypothesis is falsified. Frequentists will <em>define</em> the probability being $p_i=1/n$.</p>
<p>
For general cases, the maximum entropy method for equilibrium is identical to what is described <a href="https://geistlib.xyz/thermodynamics/#Information-theoretic interpretation of thermodynamics ">here</a> (Information-theoretic interpretation of thermodynamics).</p>
<div id="outline-container-headline-9" class="outline-4">
<h4 id="headline-9">
Conceptual Problem: What is it that has entropy?
</h4>
<div id="outline-text-headline-9" class="outline-text-4">
<p>One might reject that in the information theretic interpretation the entropy $S$ of the physical system itself doesn't exist, but what is <em>the physical system itself</em>? One can say that the entropy computed is the entropy $S_M$ of a model $M$ of the system, and, just like all other theoretical and physical quantities, the fact that one is computing $S_M$ doesn't mean that $S$ doesn't exist, but I can go on to ask <em>do "actual" physical quantities</em> exists, independent of one's knowledge?
The problem with this (seemingly) subjectivist view is that one needs to clarify what's the object of the knowledge, i.e. in "independent of one's knowledge", knowledge of what? This should be a subject of the theory of meaning and logic.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="outline-container-headline-10" class="outline-2">
<h2 id="headline-10">
Non-Equilibrium Statistical Mechanics
</h2>
<div id="outline-text-headline-10" class="outline-text-2">
<p>For the maximun entropy approach the treatment is nearly identical to the equilibrium one. The observable is time-dependent now, constraints should be updated after each maximization, and the rest is identical to what is described <a href="https://geistlib.xyz/thermodynamics/#Information-theoretic interpretation of thermodynamics ">here</a> (Information-theoretic interpretation of thermodynamics). A point to be made is that entropy has <em>not</em> been shown to be monotonically increasing, while $S(\rho(t_0)) \leq S(\rho(t))$ for a state starting in $\rho(t_0)$ always holds, since $S(\rho(t_0))$ is maximized by $S(\rho(t))$, but if a <em>measurement</em> is made in $t_1 > t_0$, then for every $t_2 > t_1$, $S(\rho(t_2))> S(\rho(t_1))$, since now the available information is updated.</p>
<p>
The <strong>objectivists</strong>, on the otherhand, criticizes the approach taken by Boltzmann and considers chaotic dynamics as necessary condition for irreversible behaviours. The appearance of <em>chaos</em> here is interesting since classical chaos itself is not well-understood, and might itself be related to foundations of mathematics, in particular, the intuitionistic approach to reals.</p>
</div>
</div>
Short Notes on Various Papers, 2023
https://geistlib.xyz/short-notes-on-various-papers-2023/
Sat, 11 Mar 2023 04:53:00 +0100https://geistlib.xyz/short-notes-on-various-papers-2023/<h2 id="logictheoretical-cs">Logic/Theoretical CS</h2>
<h3 id="weihrauch-zhong-is-wave-propagation-computable-or-can-wave-computers-beat-the-turing-machine-2002">Weihrauch, Zhong, Is wave propagation computable or can wave computers beat the turing machine (2002)</h3>
<p><strong>2023-02-10</strong></p>
<p>Weihrauch, K., & Zhong, N., Is wave propagation computable or can wave computers beat the turing machine? (2002) <a href="https://doi.org/10.1112/S0024611502013643">https://doi.org/10.1112/S0024611502013643</a>) .</p>
<p>A cited paper showed that there exists some computable initial conditions for the 3d dimensional wave equation s.t. the unique solutions are not computable. The notion of computability here is that of Type-1 computability, the traditional one involving primitive recursive sets.</p>
<p>There is an extended notion of computability, called <em>Type-2 computability</em>, of which the details can be found in the <a href="https://ncatlab.org/nlab/show/computability">nLab entry</a>. The main result of the paper is that the wave propagation doesn’t seem to be able to beat the type-2 Turing machine, while it can beat the type-1 universal Turing machine. This notion of computability is worth to be noted. The partial combinatory algebra of Type-2 computability formalizes Brouwer’s notion of choice sequences. This more or less means that only with Type-2 computability, analysis and topology are possible. In</p>
<blockquote>
<p>Andrej Bauer, Realizability as connection between constructive and computable mathematics, in T. Grubba, P. Hertling, H. Tsuiki, and Klaus Weihrauch, (eds.) CCA 2005 - Second International Conference on Computability and Complexity in Analysis, August 25-29,2005, Kyoto, Japan, ser. Informatik Berichte, , vol. 326-7/2005. FernUniversität Hagen, Germany, 2005, pp. 378–379.</p>
</blockquote>
<p>Bauer argues that (Type-2) computable mathematics is the realizability interpretation of constructive mathematics. However since I know basically nothing about recursion theory and realizability, it would be wise that I stop here, at least for the time being.</p>
<p>An important questions that I wasn’t able to find the answer:</p>
<blockquote>
<p>Is type-2 Turing machine implementable?</p>
</blockquote>
<h2 id="cyberneticsinformationadaptation-and-self-organizing-systems">Cybernetics/Information/Adaptation and Self-Organizing Systems</h2>
<h3 id="d-a-lavis-the-concept-of-probability-in-statistical-mechanics">D. A. Lavis, The Concept of Probability in Statistical Mechanics</h3>
<p><strong>2023-03-11</strong></p>
<p>See <a href="https://geistlib.xyz/d-a-lavis-the-concept-of-probability-in-statistical-mechanics/">the separate post</a>.</p>
<h3 id="ryabko-reznikova-the-use-of-ideas-of-information-theory-for-studying-language-and-intelligence-in-ants-2009">Ryabko, Reznikova, The Use of Ideas of Information Theory for Studying “Language” and Intelligence in Ants (2009)</h3>
<p><strong>2023-03-04</strong></p>
<p>See <a href="https://geistlib.xyz/ryabko-reznikova/">the separate post</a>.</p>
<h2 id="mindcognition">Mind/Cognition</h2>
<h3 id="andre-roch-lecours-yves-joanette-linguistic-and-other-psychological-aspects-of-paroxysmal-aphasia-1980">Andre Roch Lecours, Yves Joanette, Linguistic and other psychological aspects of paroxysmal aphasia (1980)</h3>
<p><strong>2023-02-13</strong></p>
<p>Andre Roch Lecours, Yves Joanette, Linguistic and other psychological aspects of paroxysmal aphasia (1980) <a href="https://doi.org/10.1016/0093-934X(80)90034-6">https://doi.org/10.1016/0093-934X(80)90034-6</a> . This is the famous paper, a clinical case report on the case of Brother John. It was claimed that for Brother John, Aphasic spells occurred without modification in consciousness and without involvement of behaviors other than those related to oral and written speech and language. He uses tricks deliberately to hide the fact of a spell. He is capable of adequate manipulation of relatively complex tools, and of adequate recognition of things and events on the basis of nonlinguistic auditory, visual or tactile information. He has also proven capable of carrying on with previously given - via language - instructions. During the episodes he knows in advance that linguistic incapacitation shall progressively come to an end, since he will keep a transistor radio with himself in deliberate assessment of his oral comprehension capacities.</p>
<p>In his <em>Origins of the Modern Mind</em>, Merlin Donald will use this as a proof case for the thesis that without language one is still capable of thinking, but it should be noted that for philosophers of language, the notion of ’language’ is not merely that of written, oral language, and not even that of internal language, ‘speech occuring inside one’s mind’.</p>
<p>It is unclear what is the precise notion of consciousness appearing here. It was claimed that Brother John remains <em>aware</em> of severe language perturbation, but judging others to be aware of something involves the working of theory of mind in the observer. Furthermore, how can it be legitimate to equate Brother John’s behavior during his aphasia spell with what is narrated, with spoken or written language, afterwards: of course he didn’t ’think’ he should find a hotel when he was unable even to think in terms of language. However, these are philosophical problems that can be seen as rather sophistic, so it is admissible to ignore them. It seems that <em>remains conscious</em> here simply means</p>
<ol>
<li>One is not sleeping or in a coma.</li>
<li>One is seen to be somehow normal, in the sense that the behaviour would not seem too strange,</li>
</ol>
<p>A rather suprising fact is that Brother John has proven capable of carrying on with previously given, sometimes several weeks before, instructions. This naturally leads to the conclusion that an instruction given via language, when comprehended and stored in memory, doesn’t need to be decoded and presented in language to affect the mind and to lead to an action of the agent.</p>
<p>While Brother John knows that the spell has occured during the episodes, he doesn’t know right off if a given attempted utterance or written production of his is adequate or not.</p>
<blockquote>
<p>“I know that certain words I say are not correct, but I do not know which ones and I do not know how I pronounce them. Sometimes, instead of talking nonsense, I prefer not to talk at all.”</p>
</blockquote>
<p>It also seems that, some utterances are given, without any conscious awareness.</p>
<blockquote>
<p>It occasionally occurs, in the course of a long spell, he utters a short hackneyed segment in <em>English, a language of which he has very rudimentary knowledge at best</em>: he remains unaware of this and does not remember about it once the spell is over.</p>
</blockquote>
<p>The crucial thing here is that <em>what is it that Brother John is unaware of during episodes</em>. Brother John claims that</p>
<ol>
<li>Inner and overt expression are proportionally affected throughout his dysphasic spells.</li>
<li>Coherent thought remains possible in the presence of dysphasia affecting inner as well as overt expression, in spite of partial or complete incapcacity to <em>evoke particular lexical words</em> specifically embodying this thought.</li>
</ol>
<p>The problem for Brother John was that, he experienced difficulty in <em>finding his words</em>. If one read through the paper, he will find that the problem is always that of <em>lexical</em> ability, but not that of syntactic or even grammatic ability. Brother John can even do rudimentary arithmetic computations presented conventionally with symbols, while he cannot <em>read</em> the numbers.</p>
Cleaning up confusions in logic and formal theories
https://geistlib.xyz/cleaning-up-confusions-in-logic/
Fri, 10 Mar 2023 00:03:04 +0100https://geistlib.xyz/cleaning-up-confusions-in-logic/
<p>
There are tons of technicalities in Logic. This leads, occasionally, to confusions. Thus it is instructive to briefly summarize all the basic notions.</p>
<div id="outline-container-headline-1" class="outline-2">
<h2 id="headline-1">
Formal language
</h2>
<div id="outline-text-headline-1" class="outline-text-2">
<p>
In logic one creates, first, a <em>formal language</em>,
<div class="theorem-style">
<span class="definition-head">Definition(Formal language) .</span>
A <em>formal language</em> $\mathfrak{L}$ over an alphabet $\Sigma$ is a collection $\Sigma^\ast$ of words (finite sequence of alphabets) over the alphabet $\Sigma$.
</div>
</p>
<p>
Thus to define a formal language, one specifies an alphabet $\Sigma$, then describes the collection $\Sigma^\ast$. The description is often given inductively via a <em>grammar</em>.</p>
<p>
The simplest example is that of propositional logic.</p>
<p>
<div class="example">
<div class="remark-style">
<span class="example-head">Example(Propositional language) .</span>
The propositional language, or zeroth-order language, $\mathfrak{L}_0$. The alphabet $\Sigma_0$ consists of 1. $\neg,\vee,\wedge,\to$, 2. countable set of variables $v_1,v_2,...$, 3. parentheses $( , )$. The collection of words $\Sigma_0^\ast$, called <em>formulae</em>, is given by the following Backus-Naur form
$$
M = v_i | \neg A | (A\vee B)| (A\wedge B) | A\to B
$$
where $v_i$ is any variable and $A,B$ are all formulae. In particular a formula consisting of just a variable is called an <em>atomic formula</em>.
<span style="float:right"> ◀ </span>
</div>
</div>
</p>
<p>
First order language becomes much more complicated.
<div class="example">
<div class="remark-style">
<span class="example-head">Example(First-order language) .</span>
The first order language $\mathfrak{L}_1$. The alphabet $\Sigma_1$ consists of all the letters in $\Sigma_0$, together with
<ol>
<li> (countable set of) constants $c_1, c_2, ...$, </li>
<li> predicate symbols of arity $n$, $P^n_1, P^n_2, ...$ for all $n\in\mathbb{N}$, </li>
<li> function symbols of arity $n$, $f^n_1, f^n_2, ...$ for all $n\in\mathbb{N}$</li>
<li> quantifiers $\forall,\exists$.
</ol>
In first order language the words of the language are also defined inductively, but via some intermediate definitions. First one has a <em>term</em> $t$:
$$
t = c_i | v_i | f_i^n(t_1,...,t_n),
$$
then from terms <em>formulae</em> a word $A$ in the language is defined:
$$
A = P_i^n(t_1,...,t_n) | \neg A | A\vee B | A\wedge B | A\to B| \forall v\ A | \exists v\ A
$$
where $P_i^n(t_1,...,t_n)$ are atomic formulae.
<span style="float:right"> ◀ </span>
</div>
</div>
</p>
<p>
Remember that a function takes a term to another term, and a predicate takes a term and yields an atomic formula. When a formula $A$ has no free variable, it can then be seen as a <em>sentence</em>.</p>
<p>
<div class="remark">
<div class="remark-style">
<span class="remark-head">Remark(Terminology: letter vs symbol, word vs formula) .</span>
A finite sequence of letters in an alphabet is called a word. Alternatively, one says that an alphabet is a collection of <em>symbols</em>, and a word is called a <em>formula</em>, mainly when one is doing logic rather than formal language and grammar per-se. These are just terminological differences.
<span style="float:right">◈</span>
</div>
</div>
</p>
<p>
<div class="remark">
<div class="remark-style">
<span class="remark-head">Remark(Terminology: formula vs proposition) .</span>
Again, when working in mathematical logic, the word <em>formula</em> is the same as the word <em>proposition</em>. A formula is also called well-formed expression, or well-formed formula when one stipluates a formula to be any sequence of symbols. The differences are purely in conventions used. In type theory one distincts between propositions and general types, but in type theory the notions of formal system and formal language become radically different from those presenting logic.
<span style="float:right">◈</span>
</div>
</div>
</p>
</div>
</div>
<div id="outline-container-headline-2" class="outline-2">
<h2 id="headline-2">
Model theory
</h2>
<div id="outline-text-headline-2" class="outline-text-2">
<p>
In model theory one speaks of signatures and structures. Here one exclusively works with functions and sets.</p>
<p>
A <em>signature</em> of a formal language $\mathfrak{L}$ is just the collection of <em>non-logical symbols</em> (letters) in an alphabet $\Sigma$. What constitutes non-logical symbols is subject to stipulation. One can also speak of a signature without mentioning any formal language. In this case it is just a set of $n$-ary function symbols and predicate symbols.</p>
<p>
The notion of signature is closely related to that of <em>structure</em>, and the definitions are various. The essense here is that a structure is just a set $S$ called <em>domain</em> or <em>universe</em> together with a signature that is interpreted on $S$.</p>
<p>
<div class="theorem-style">
<span class="definition-head">Definition(Structure) .</span>
A <em>structure</em> is a triple $\mathcal{S} = (S,\sigma, \iota)$ where $S$ is a set called <em>domain</em>, $\sigma$ is a signature, and $\iota$ is a function called <em>interpretation</em>:
<ol>
<li> an $n$-ary function symbol $f^n$ is mapped to $\iota(f): S^n \to S$,</li>
<li> an $n$-ary relation symbol $R^n$ is mapped to $\iota(R) \subseteq S^n$,</li>
<li> for a constant c, $\iota(c)\in S$ is just an element of the domain.</li>
</ol>
</div>
</p>
<p>
Given a formal language $\mathfrak{L}$, one speaks of a <em>theory</em>. These are just sets $T$ of <em>sentences</em> in the formal language $\mathfrak{L}$ (with free variables and notion of formulae). A structure $\Gamma$ is a <em>model</em> of a theory $T$ if it satisfies all the sentences (confusingly called axioms but these are not, in general, axioms in a deduction system for a logic) of $T$, namely $\Gamma \vDash \sigma$ for every $\sigma \in T$. Some important theorems then can be formulated in this choice of terminology:</p>
<ol>
<li>The <em>model existence theorem</em> says that a consistent theory $T$ always has a model. Meaning that there is always a structure $\Gamma$, s.t. $\Gamma \vDash t$ for all $t\in T$.</li>
<li>The <em>soundness theorem</em> says that what can be proved from a theory $T$ ($\sigma$ s.t. $T\vdash \sigma$) is also valid in any model of $T$ ($T\vDash \sigma$). Here $T\vDash \sigma$ is really an abuse of notation, meaning really given any structure $\mathcal{M}$ s.t. $\mathcal{M}\vDash t$ ($\forall t\in T$), one has $\mathcal{M}\vDash \sigma$.</li>
<li>The <em>completeness theorem</em> says that $T\vDash \sigma$ then $T\vdash \sigma$.</li>
</ol>
</div>
</div>
<div id="outline-container-headline-3" class="outline-2">
<h2 id="headline-3">
Deductive/inference systems (Proof theory)
</h2>
<div id="outline-text-headline-3" class="outline-text-2">
<p>
Stipulating a formal language is not enough, since one really wants to achive is to stipulate a system in which rigourous deductions - going from a hypothesis to a conclusion according to some given rules - can be carried out. This is done by introducing the notion of <em>deductive system</em>.</p>
<p>
There is no general notion that is widely agreed-upon, but we adopt what is given in <a href="https://ncatlab.org/nlab/show/deductive+system#definition">nLab</a> for some intuition. This is also used in Martin-Lof style dependent type theory.</p>
<p>
<div class="theorem-style">
<span class="definition-head">Definition.</span>
A <em>deductive system</em> is a collection of <em>judgements</em> and a collection of <em>steps</em> which has as a sequence of judgements as "hypotheses" and a single judgement as "conclusion". A step is usually written as
$$
\frac{ J_1 \quad \cdots \quad J_n }{J}
$$
</div>
</p>
<p>
What a judgement means depends on the context. The steps here are usually rules of inference. When $n=0$ in a step, the step is often called an <em>axiom</em>. A good practice is <em>not</em> to call a step with no hypothesis an axiom, or call it explicitly <em>logical</em> axiom, since it is a custom to call sentences in a theory an axiom. The confusion inflates when one works in deductive systems that are not notationally-heavy, e.g. in Hilbert system; these are systems with many logical axiom schemata and few inference rules.</p>
<p>
<div class="remark">
<div class="remark-style">
<span class="remark-head">Remark(Freedom in formalization) .</span>
Even inside a given logic and a kind of deductive systems (say, Hilbert systems), there can be various ways to formalize a logic, since there is freedom for a logic in choosing rules of inferences. This can be seen as a deficiency of syntax, since one really wants to focus on is, for example, first-order logic <em>per se</em>, its <em>meaning</em> (<b>Sinn</b>) that is invariant, rather than one or many of its formalizations. In Girard's word:
<blockquote>
[the syntactic tradition] is always in search of its fundamental concepts, which is to say, an operational distinction between sense and syntax. Or to put tese things more concretely, it aims to find deep geometrical <em>invariants</em> of syntax: therin is to be found the sense.
</blockquote>
Category theory might shed some light on the issue.
<span style="float:right">◈</span>
</div>
</div>
</p>
<p>
<div class="example">
<div class="remark-style">
<span class="example-head">Example(Logic) .</span>
The propositional logic is the propositional language $\mathfrak{L}_0$ together with a deductive system. There are many formulations of deductive systems for propositional logic: Hilbert system, natural deduction, sequent calculus, etc.
<br>
In general, a judgement in propositional logic is a <em>formula</em>. The same goes for first order logic. Traditionally, what is called a <em>logical system</em> is a language with a deductive system that looks like propositional and first order logic, in particular, the judgements are formulae.
<span style="float:right"> ◀ </span>
</div>
</div>
</p>
<p>
Hilbert system is a mess, but their conservative extensions are managable.</p>
<p>
<div class="example">
<div class="remark-style">
<span class="example-head">Example(Gentzen sequent) .</span>
In a Gentzen sequent the <em>judgements</em> are <em>sequents</em> $\Gamma\vdash \Delta$ where $\Gamma,\Delta$ are finite sequences of formulae ("words") $A_1, A_2,...$. One of the typical steps is the <em>cut rule</em>
$$
\frac{\Gamma\vdash A,\Delta\quad \Gamma',A\vdash \Delta'}{\Gamma,\Gamma' \vdash \Delta,\Delta'} \mathsf{Cut}.
$$
<span style="float:right"> ◀ </span>
</div>
</div>
</p>
<p>
<div class="example">
<div class="remark-style">
<span class="example-head">Example(Natural deduction) .</span>
In natural deduction systems the judgements are just formulae. A typical step is
$$
\frac{A\quad B}{A\wedge B}\wedge
$$
<span style="float:right"> ◀ </span>
</div>
</div>
</p>
<p>
<div class="example">
<div class="remark-style">
<span class="example-head">Example(Martin-Lof type theory) .</span>
A judgement in Martin-Lof type theory is one the following
$$
\Gamma \vdash A:\operatorname{Type},\quad \Gamma\vdash A\doteq B:\operatorname{Type},\quad \Gamma\vdash a:A,\quad \Gamma\vdash a\doteq b:A
$$
where $A$ are types and $a$ are elements of type $A$. The types $A$ are formed by <em>type formation rules</em>. It is hard to see how type theory can be formulated in a manner similar to "ordinary" logic.
<span style="float:right"> ◀ </span>
</div>
</div>
</p>
</div>
</div>
<div id="outline-container-headline-4" class="outline-2">
<h2 id="headline-4">
Remark: typesetting proofs
</h2>
<div id="outline-text-headline-4" class="outline-text-2">
<p>
While I use <code>\frac</code> to write formal proofs, mathjax utilizes <a href="https://docs.mathjax.org/en/latest/input/tex/extensions/bussproofs.html">Bussproof</a> for sequent and natural deductions. When the proof becomes complicated, this is needed. When using $\LaTeX$ proper <a href="https://www.ctan.org/pkg/mathpartir">mathpartir</a> is a better choice.</p>
</div>
</div>
PLFA: Equality
https://geistlib.xyz/plfa_equality.lagda/
Thu, 09 Mar 2023 21:10:36 +0100https://geistlib.xyz/plfa_equality.lagda/
<p>
There is no interesting exercise in this chapter.</p>
<div id="outline-container-headline-1" class="outline-2">
<h2 id="headline-1">
Equality <code>≡</code>
</h2>
<div id="outline-text-headline-1" class="outline-text-2">
<p>
The built-in equality <code>≡</code> is the <em>identity type</em> in Martin-Lof dependent type theory.
<div class="theorem-style">
<span class="definition-head">Definition.</span>
Given a type $A$ and let $x:A$, then the <em>identity type</em> of $A$ at $x$ is an inductive family of types $\operatorname{Id}_A(x,a)$ indexed by $x:A$, of which the constructor is $\mathsf{refl}_x : \operatorname{Id}_A(x,a)F$.
</div>
</p>
<p>
In particular, the type formation rule reads
$$
\frac{\Gamma\vdash x:A}{\Gamma, a:A \vdash \operatorname{Id}_A(a,x): \text{Type}}.
$$
and the constructor is given by the introduction rule
$$
\frac{\Gamma\vdash x:A}{\Gamma\vdash \mathsf{refl}_A: \operatorname{Id}_A(x,x)}.
$$</p>
<p>
First some words about the type <code>Set</code> in Agda. This is the type of all small types, not just a set or the type of sets. <code>A : Set</code> means <code>A</code> is a small type. A function <code>(x : A) → Set</code> takes <code>x : A</code> and gives a type, these kind of entities are called <em>predicates</em>.</p>
<p>
In the Agda standard library, the implementation is given by</p>
<div class="src src-text">
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="ln">1</span><span class="cl">data _≡_ {a} {A : Set a} (x : A) : A → Set a where
</span></span><span class="line"><span class="ln">2</span><span class="cl"> refl : x ≡ x</span></span></code></pre></div>
</div>
<p>
but in PLFA the implicit argument <code>a</code>, related to sort system introduced in a version later relative to the writing, is not present, and the implementation is really</p>
<div class="src src-agda2">
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="ln">1</span><span class="cl">infix 4 _≡_
</span></span><span class="line"><span class="ln">2</span><span class="cl">data _≡_ {A : Set} (x : A) : A → Set where
</span></span><span class="line"><span class="ln">3</span><span class="cl"> refl : x ≡ x</span></span></code></pre></div>
</div>
<p>
The syntax here is confusingly not explained in PLFA. <code>(x:A) : A → Set</code> here should be read as <code>(x : A) : (A → Set)</code>. Given <code>y : A</code>, one gets a function <code>(y ≡ · ): A → Set</code>, evaluating on <code>z : A</code> yields a <em>type</em> <code>y ≡ z : Set</code> meaning that <code>y ≡ z</code> is a small type. In other words, The first argument for the operator <code>≡</code> should be an element $y:A$, and the second should be another element <code>z</code> that serve as a function argument for <code>A → Set</code>. Some explanations are given in the <a href="https://agda.readthedocs.io/en/v2.6.3/language/data-types.html#indexed-datatypes">Agda language reference</a>.</p>
<p>
Carrying out an interactive development of transivity for the operator, the result can be</p>
<div class="src src-agda">
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="ln">1</span><span class="cl">trans : ∀ {A : Set} {x y z : A} → x ≡ y → y ≡ z → x ≡ z
</span></span><span class="line"><span class="ln">2</span><span class="cl">trans refl refl = refl</span></span></code></pre></div>
</div>
<p>or can equivalently be</p>
<div class="src src-agda2">
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="ln">1</span><span class="cl">trans : ∀ {A : Set} {x y z : A} → x ≡ y → y ≡ z → x ≡ z
</span></span><span class="line"><span class="ln">2</span><span class="cl">trans refl = λ z → z</span></span></code></pre></div>
</div>
<p>when one just press <code>C-c C-a</code> in the hole: <code>trans refl</code> is of the type <code>x ≡ z → x ≡ z</code>. Since <code>refl</code> is nothing but <code>x ≡ x</code>, the argument <code>y</code> is pattern matched to <code>x</code>.</p>
</div>
</div>
<div id="outline-container-headline-2" class="outline-2">
<h2 id="headline-2">
Rewriting
</h2>
<div id="outline-text-headline-2" class="outline-text-2">
<p>
<code>rewrite</code> is relatively easier to understand, it just rewrites the is to the left, via a given rule, to a new expression. Nothing worthy of saying in detail.</p>
</div>
</div>
<div id="outline-container-headline-3" class="outline-2">
<h2 id="headline-3">
Leibniz equality
</h2>
<div id="outline-text-headline-3" class="outline-text-2">
<p>The implementation is</p>
<div class="src src-agda2">
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="ln">1</span><span class="cl">_≐_ : ∀ {A : Set} (x y : A) → Set₁
</span></span><span class="line"><span class="ln">2</span><span class="cl">_≐_ {A} x y = ∀ (P : A → Set) → P x → P y</span></span></code></pre></div>
</div>
<p>meaning that if for all predicates <code>P</code> with variables in <code>A</code>, <code>P x</code> implies <code>P y</code>, then <code>x ≐ y</code>. The type <code>x ≐ y</code> itself is not small: <code>P x</code> and <code>P y</code> are both of type <code>Set</code>.</p>
</div>
</div>
《都柏林人》
https://geistlib.xyz/dubliner-review/
Tue, 07 Mar 2023 19:58:18 +0100https://geistlib.xyz/dubliner-review/<p>
我在高中时代虽然也算是相当沉迷文学，读过一定数量的文学，却从未对历史和社会有过多少关注。虽然日后在了解世界各地各时代的历史和社会面貌时会回忆起约翰·克利斯朵夫在巴黎遇上的理直气壮声称“我才是布尔乔亚”的工人乡民，想起阿德里安·莱韦屈恩父亲的化学实验和传家的精装圣经。当时从文学作品中获取的往往是破碎、模糊的印象，难以捉摸的感受，对弥漫在人间的普遍的情绪和精神状态的某种直觉把握。文学，诗歌、小说，首先是光影、色泽，有金属质感或者粗糙而具有泥土的气味，首先是色彩、感受，令人激动、令人忧郁、令人感叹，等等。 有人会说这种感受本身才是永恒、普遍而珍贵的，我自己也时常会怀疑自己带在身上的那些历史知识，那些瓦解着曾经生活过的世界并不断瓦解着语言和教育所构造的牢笼的嘲讽和几乎犬儒的不信任，是否在使自己日渐迟钝，越加适宜分为自己曾将他人判入其中的类别。</p>
<p>
第一次读乔伊斯的这篇短篇集就是在高中。可能是高一，可能是高二，无论如何都至少十年了。当时它所留下的印象也自然是潮湿、昏暗、阴郁但又莫名地感伤，即使在已成为社交场合的宗教活动的庸俗中也闪烁着莫名的微光；同样自然的也是当时对他人那些学院气质的典型文学评论的不屑，他们动辄“精神史”“中下层人民生活”，总会让感受精细的人有被冒犯之感。但如果当下让我对这篇短篇集做出短小的评价，我想我也会首先强调这些所谓“学院”的视角。</p>
<p>
乔伊斯写过史诗，《尤利西斯》和《芬尼根的守灵夜》是货真价实、无可争议的史诗。《都柏林人》虽然并不好说算是史诗，却展现着，或者说暗示着不亚于史诗的浩荡；如果《细雪》是史诗，那么《都柏林人》也无法不被归为史诗。《细雪》和《都柏林人》有细微但深刻的相似之处：有寂静的一夜过后从窗外传来的扫雪声，有二月末倒挂着的冰锥吐出的第一滴水珠在地表破碎时的晶光，有淅淅沥沥的雨声中在枝头树叶轻轻的颤抖。它们都试图通过捕捉空气中几乎不可感知的波纹和浪花的痕迹去把握过去和未来相遇的此刻那作为种子、作为潜能，在凋谢、败落中仍然微弱地震颤着的心脏的跳动。把握它的跳动，被它激起、搅扰的空气的悸动。《细雪》这样讲述着死亡，描绘着江流如何典雅、无声地汇入大海，描绘这颗心脏的跳动如何在通往彼岸的火车里沉入雨帘后的梦境。而《都柏林人》在试图去把握，在寻找它搏动的生机之所在，躲开鬼火去把握黑暗中闪烁的火光的本质，再怎么微弱的火都在至纯地燃烧，试图把握、抓住、牢牢握住，直至令整个大地都在这颗虚弱、微小的心脏的跳动下震荡。</p>
<p>
是的，爱尔兰的宗教正在沉闷中窒息，社会的运作日渐僵硬。中世纪的、地方性的、渴望着独立的天主教爱尔兰不仅在新教英国的殖民扩张下丧失着语言和神话，还在自身的漩涡中窒息着，困在自己的精神世界里麻木着。虚伪的礼仪、虚假的情感、滑稽的演讲、狂欢作乐、令人丧失灵性的讲道，从出生伴随到死亡。生活本身和天主教会已经被衣冠楚楚、礼貌有序的绅士们和好天主教徒们埋葬。 可空气中、海浪声中、圣礼的奥秘中、都柏林的音乐声中，仍然能听到那颗心脏跳动的声音，因为绅士们和好天主教徒们虽然麻木却又和善。要把握它，首先需要理解它、看到它，需要理智之光照耀，需要顿悟。而达成顿悟所需的是时间的凝聚。于是时间就这样在文字中凝聚起来，在当下碰撞。这就是《都柏林人》所做的：使一层时间覆盖另一层时间，直到形式本身透亮地展现在眼前。 自童年到成熟，从家庭生活的琐碎到滑稽又凄凉的公共活动中若隐若现的沉重和忠诚，遵循托马斯阿奎那的美学、如同托马斯阿奎那冷静而超然的写作般展开的文字对爱尔兰土地上的人和建立、维持了这个国度的罗马天主教的若隐若现的嘲讽在暗处被光亮打湿，直到同情的微光漫溢出彩窗映出一丝没有温度的温和，疏离的、经院式几无生气的叙事最终在不够真实、不能称作彻底的存在褪去，生和死以其真实的样貌回归的雪夜消散。</p>
<p>
那些所谓精细、细腻的、难以觉察的情绪和微小的波澜，至少对于二十世纪初的人来说绝非普遍情感和体验。它们是昏暗中暧昧的，不知暗示着什么的暗淡、粘稠的霞光，等待着什么。可能在等待日出，可能在等待死亡。 帕涅罗佩在纺织机前正等待尤利西斯归来，凯尔特的薄暮中霞光也挂在树梢、附着在潮湿的墙壁上，纺织着厚雾，等待彻底的夜和夜过后的日出。</p>
<p>
《都柏林人》是《尤利西斯》的先声和预兆，是未来的英雄在启程前的迷途。这里没有烈火、硫磺、毒气的试炼，没有炼金的黑烟和熏臭也没有诡异的仪式，但世代如落雪，浩大而绵延，呼唤着——</p>
<p>
尤利西斯啊，凯尔特的精灵们醉卧在街头、躺在酒馆吧台上，在车夫和水手的肩头跌跌撞撞、恋爱的年轻人的呼吸中昏昏沉沉。凯尔特的精灵们在布尔乔亚家庭的钢琴声中化作死者的面容，以雪的姿态落在墓碑上，生者和死者都在时间中降落，所有精灵都在时间中降落，叹息着、等待着。你什么时候才会启航？从你的梦中醒来吧，你的父国正在窒息中瘫痪。</p>
<p>
尤利西斯，是时候启航了，待你漂游十年回乡，去毁灭、去破坏，这漫无边际、浩浩荡荡的雪，这连接这所有生者和死者的雪，也将化作春天，在帕涅罗佩拉开的雾的灰色窗帘后闪耀柔光。</p>
Ryabko, Reznikova, the Use of Ideas of Information Theory for Studying 'Language' and Intelligence in Ants
https://geistlib.xyz/ryabko-reznikova/
Tue, 07 Mar 2023 00:54:04 +0100https://geistlib.xyz/ryabko-reznikova/
<p>
The actual reading of the paper and the writing of this note took place in March 4th of 2023. It became too long for being an entry of <a href="https://geistlib.xyz/short-notes-on-various-papers-2023/">Short Notes on Various Papers, 2023</a>.</p>
<p>
<a href="https://arxiv.org/abs/0912.4649">URL</a>. The paper was read so that I can see how ideas in information theory can be utilized in a practical manner outside the field of coding and communication. A remarkable phenomenon, ubiquitous in Nature, is the emergence of "seemingly" intelligent systems out of "mindless" individuals. The behavior of insect societies, in particular that of bees and ants, is an example of significance. In the abstract, it was claim that, via information theoretic tools, one can show that</p>
<ol>
<li>Ants are able to <em>grasp</em> regularities and to use them for "compression" of information,</li>
<li>Ants are able to transfer to each other <em>the information about the number</em> of objects,</li>
<li>Ants <em>can</em> add and subtract small numbers.</li>
</ol>
<p>Emphases are my own, since their meaning are ambiguous, for</p>
<ul>
<li>In what sense can ants grasp regularities?</li>
<li>What is the information about the number of objects?</li>
<li>What is really doing the addition and subtraction of small numbers?</li>
</ul>
<div id="outline-container-headline-1" class="outline-2">
<h2 id="headline-1">
1st experiment, number as information
</h2>
<div id="outline-text-headline-1" class="outline-text-2">
<p>
The approach taken is to investigate the process of information transmission by measuring time duration which the animals spend on transmitting messages of definite lengths and complexities, not that of signal deciphering (trying to map certain behavior to a linguistic entity that bears meaning). "The messages of definite lengths and complexities" here is abstractly just finite binary sequences $0100100111$ etc., implmented by binary tree mazes: each fork corresponds to a $0$(left) or an $1$(right), a path from the root to a leaf is then coded uniquely by a finite sequence of $0,1$s. All except for one leaf are empty, and the one nonempty leaf has food in it. All paths are designed to be of equal length. Every fork corresponds to a binary choice, which in turn corresponds to one bit of information to be transmitted. Example: in a $Y$-shaped maze, one bit of information should be transmitted by a scout to other individuals.</p>
<p>
Highly motivated (by starvation and such) ants are placed in an arena which was divided into two sections, one containing the nest (with colonies each of about 2000 individuals), and the other with an experimental system (a binary tree maze). The colonies were found to include teams of constant membership, consisting of one scout and 3-8 foragers; the scout mobilized only members of its team to the food.</p>
<p>
In trials, one of the scouts that were moving on the experimental arena was placed on a leaf of the binary tree that contained the food, and the scout returned to the nest by itself. Other possibilities that could help the ants to find the food except for information contact with the scout is eliminated, including the use of an odor track (the maze was replaced by an identical one when the scout returned and was contacting its team). Briefly speaking, the scouts needed to really remember the path they traversed in the maze.</p>
<p>
It was found that, when the scout touched the forager ants after returning, some foragers will leave the nest for the maze, and the duration of this kind of contact is far longer than other contacts (made for the exchange of food); more than 30s vs 5s. Statistically the hypothesis that forager ants, upon contact with a scount that returned, find the leaf containing the food by chance is rejected by comparing the time used to find the food when the individuals are informed or not. Surprizingly, the mean time for uninformed ants to find the food after following the sequence of turns <code>LRRL</code> is far shorter than <code>RLLR</code> (<code>RRRR</code> shorter than <code>LLLL</code> but not that radical), and it seems that informed ants are more likely to find the food faster when the required sequence is <code>RLLR</code> or <code>LRRL</code> instead of <code>LLLL</code> and <code>RRRR</code>. However since the amounts of sampling is small these can be by chances.</p>
<p>
Under the assumption that for length $i$ informations, the duration of the contacts between the scouts and foragers $t=ai+b$, the rate of infformation transmission, $a$, is found to be approx. 1 bit per minute. The contact was considered to begin when the scout touched the first forager ant and to end when the first two foragers left the nest for the maze, so even if the ants are starved and highly motivated, the rate is an effective one (but whats the difference anyhow, when you don't do anything upon hearing a bad message, it amounts to the fact that no information was transmitted to you).</p>
</div>
</div>
<div id="outline-container-headline-2" class="outline-2">
<h2 id="headline-2">
2nd experiment, Regularities
</h2>
<div id="outline-text-headline-2" class="outline-text-2">
<p>
Of interest is that for sequences "of low Kolmogorov complexities", it took less time for the information to be transmitted. The simpler the text the less time for information transmission. But here the notion of Kolmogorov complexities is dubitable (or I simply don't understand Kolmogorov complexity that well): which universal Turing machine is computing the sequences? Kolmogorov complexities for different universal Turing machines for an equivalence class defined by equivalent iff
$$
C_{T_1}(s) - C_{T_2}(s) < C_{T_1,T_2}
$$
so there is an integer shift that makes some sequences simpler for $T_1$ and some simpler for $T_2$, in particular for simple sequences, and Kolmogorov complexities work well only for complex sequences (it works asymptotically). In addition to assuming that ants can be seen as possessing abilities approximating to universal Turing machines, one needs to assume that the same universal Turing machine is computing really simple sequences like <code>010100</code>. Human intuition <em>might</em> suggest that <code>010101</code> is more regular than <code>011010</code>, but this corresponds to a class of specific implementation of universal Turing machines. Which one should be the specific implementation class is unclear, and the notion of intuitive regularity that classifies <code>011010</code> to be less regular than <code>010101</code> might not exist at all. The comparison data of mean durations also don't look that significant so that one can suggest that ants can "use simple forms of rule extraction in order to optimize their messages".</p>
</div>
</div>
<div id="outline-container-headline-3" class="outline-2">
<h2 id="headline-3">
3rd experiment, number per se
</h2>
<div id="outline-text-headline-3" class="outline-text-2">
<div id="outline-container-headline-4" class="outline-3">
<h3 id="headline-4">
Information about the number of objects
</h3>
<div id="outline-text-headline-4" class="outline-text-3">
<p>
New experiments. Given a comb-like trunk with 25+ branches. Each branch ending with an empty trough except for one filled with food. Ants come to the initial point of the trunk over a bridge, and hence might need to count the number of branches that need to be passed in order to reach the correct trunk. The trunk can be circular. The spacing between branches in a trunk are equal, and different trunks with different spacings are used. Again, when the scout returned to the nest, the trunks are replaced by an identical one, so that odor tracking methods cannot be utilized.</p>
<p>
Assuming the duration of the contact is $t = ai+b$ where $i$ is the numbering of the branch with food, it turned out that $a$ and $b$ are close for different shapes, distances between the branches and lengths of the branches and the choice of the branches. In modern human languages the code word of a number $i$ is approximately proportional to $\log i$, while here the code word is simply identified with the number. Again the statistics are not that well, but it is somehow convincing.</p>
</div>
</div>
<div id="outline-container-headline-5" class="outline-3">
<h3 id="headline-5">
"Arithmetic" skills
</h3>
<div id="outline-text-headline-5" class="outline-text-3">
<p>
First, recall that <em>Zipf's law of abbreviation</em> states that the more frequently a word is used, the shorter that word tends to be, and vice versa; the less frequently a word is used, the longer it tends to be. Keeping the same setup as above (the trunk setup), a similar experiment testing whether regularity makes the representation of a number shorter is carried out, and it was found that contact duration for familiarized numbers are lowered. The experiment is divided into three stages,</p>
<ol>
<li>Equal probabilities for all branches</li>
<li>High and equal probability for branches $k,l$, low for others.</li>
<li>Equal probabilities for all branches.</li>
</ol>
<p>In the third stage when the food is found to be in the $k,l$ and <em>nearby branches</em>, the contact duration is reduced more significantly. There is an overall reduction, and the reduction is significant especially for large numbering branches, while not to the level of $k,l$.</p>
<p>
The fact that there are reductions for nearby branches is interesting. This can mean that for numbers closer to $k$ and $l$, their description became also shorter. This reduction in the length of description is similar to the fact that the Roman numeral X is shorter than IIIIIIIIII, and subsequently XII is shorter than IIIIIIIIIIII. The authors claim that this means ants have arithmetic skills. This is debatable, but what is clear is that the <em>notion of regularity in ants' "minds" is changed</em>, somehow contradicting the conclusion given by considering the Kolmogorov complexity of binary sequences.</p>
</div>
</div>
</div>
</div>
Leisure Readings
https://geistlib.xyz/leisure-readings/
Mon, 06 Mar 2023 06:34:00 +0100https://geistlib.xyz/leisure-readings/
<p>
Idle thoughts, problems, notes, among others.</p>
<div id="outline-container-headline-1" class="outline-2">
<h2 id="headline-1">
Biochemistry
</h2>
<div id="outline-text-headline-1" class="outline-text-2">
<ul>
<li>Berg, Jeremy M., John L. Tymoczko, Gregory J. Gatto, and Lubert Stryer. <em>Biochemistry</em>. 8th ed. W. H. Freeman & Co., 2015. ISBN: 9781464126109.</li>
<li>Shriver, Atkins. <em>Inorganic chemistry</em>. 5th ed. 2010.</li>
</ul>
<p>following the <a href="https://ocw.mit.edu/courses/7-05-general-biochemistry-spring-2020/pages/readings/">MIT undergraduate general biochemistry</a> course. The long-term goal is to understand endosymbiosis in detail. Possibly need some organic chemistry for molecular biology of the gene.</p>
<p>
I'd like to know whether there is a book that explicates the differences between euryotes and prokaryotes from the perspective of (endo-)symbiogenesis.</p>
<div id="outline-container-headline-2" class="outline-3">
<h3 id="headline-2">
Quick facts about pH
</h3>
<div id="outline-text-headline-2" class="outline-text-3">
<p>Tip: <code>\ce{H3O+}</code> for $\ce{H3O+}$ and so on; <a href="https://mhchem.github.io/MathJax-mhchem/">More</a>.</p>
<p>
I have nearly forgotten all the high school chemistry stuff.</p>
<p>
The pH value is defined as the negative of the 10-base log of the concentration of $\ce{H3O+}$, equivalently regarded as $\ce{H+}$, in water,
$$
pH := - \log_{10}([\ce{H+}])
$$
Of course this depends on the unit. The unit is that of molar concertration $\operatorname{M} = \operatorname{mol}\cdot \operatorname{L}^{-1}$. In most cases $[\ce{H+}][\ce{OH-}]\propto [\ce{H2O}]$ is constant, approx $1.0\times 10^{-14}$. Since the case when $[\ce{H+}]$ exceeds $1\operatorname{M}$ or is lower than $10^{-14}\operatorname{M}$ is rare, the pH is <strong>said to</strong> range from 0 to 14, but this is not always the case. In particular, when $[\ce{H+}] = [\ce{OH-}]$, the pH is 7.</p>
</div>
</div>
</div>
</div>
<div id="outline-container-headline-3" class="outline-2">
<h2 id="headline-3">
Cryptography
</h2>
<div id="outline-text-headline-3" class="outline-text-2">
<ul>
<li><del>Katz, Lindell - Introduction to Modern Cryptography</del></li>
<li>Bellare, Rogaway - Introduction to Modern Cryptography</li>
<li>Silverman, Tate - Rational Points on Elliptic Curves</li>
<li>Washington - Elliptic Curves, Number Theory and Cryptography</li>
</ul>
<p>Elliptic curve cryptography for fun, and, why not, at this mignificent dawn of the cyber-surveillence dystopia. The subculture is also worth attention,</p>
<p>
Best served with some autism:</p>
<ul>
<li><a href="https://wiki.installgentoo.com/wiki/Cyberpunk">Cyberpunk in installgentoo</a></li>
<li><a href="https://anonymousplanet.org/">The Hitchhiker’s Guide to Online Anonymity</a></li>
</ul>
</div>
</div>
<div id="outline-container-headline-4" class="outline-2">
<h2 id="headline-4">
Thermodynamics and Contact Geometry
</h2>
<div id="outline-text-headline-4" class="outline-text-2">
<p>
Reading biochemistry really made me get into thermodynamics, a subject that I wasn't interested in at all in my undergraduate years. I know some little facts - without knowing how - about the contact geometry of thermodynamics. The 1-form
$$
\alpha= dU - TdS + PdV
$$
vanishes on a Legendrian submanifold, and Legendre transform is a simple example of contact transformation. Regarding the expressions such as $dU$ as differentials, then the Maxwell relations are just saying that $d^2=0$.</p>
<p>
Need to find some helpful sources. Also I've been planning to learn about how optimization problems are turned into index theory and Morse theory, Floer homology etc. for some time, this seems to be a good point of departure. John Baez wrote some <a href="https://johncarlosbaez.wordpress.com/2012/01/19/classical-mechanics-versus-thermodynamics-part-1/">elementary stuff</a>, but that's too simple. He also has a <a href="https://math.ucr.edu/home/baez/information/">project called information geometry</a> but again superficial to my taste.</p>
<ul>
<li>Maybe <a href="https://www.mdpi.com/1099-4300/16/3/1652">Contact Geometry of Mesoscopic Thermodynamics and Dynamics</a> ?</li>
</ul>
<p>Some idle thoughts. What's the relation between optimization problems and index theory? All indices are just $K$-theory pushforwards, of something (a groupoid, a groupoid action, etc.), and we know that $K$-theory pushforward of some Lie group $G$-action on a manifold $M$ gives the quantization of $G$ (roughly, its representation, and if the action is given by a moment map, then this gives the quantization of the observable - its momentum). This is done through Atiyah-Segal <em>fixed point</em> decomposition. Morse theory is also some sort of index theory. It utilizes the informations of <em>critical points</em> to probe the topology of a manifold. The problem with $K$-theory is that it is too abstract and doesn't give a good intuition on what's going on "on the physics side". I can't help to speculate that contact topology will give some insight into the nature of $K$-theory and its index, and even quantization.</p>
<p>
An important question that needs to be contemplated on over and over again:</p>
<div class="center-block" style="text-align: center; margin-left: auto; margin-right: auto;">
<p>What is the <em>real</em> difference between quantum and classical?</p>
</div>
<p>
Some notes are moved to <a href="https://geistlib.xyz/thermodynamics/">a separate post</a>.</p>
</div>
</div>
<div id="outline-container-headline-5" class="outline-2">
<h2 id="headline-5">
Information theory
</h2>
<div id="outline-text-headline-5" class="outline-text-2">
<ul>
<li>Li, Vitanyi - An Introduction to Kolmogorov Complexity and its Applications. 1997 ed. (now switched to 2019 ed.)</li>
<li>Yury Polyanskiy, Yihong Wu - Lecture Notes on Information Theory,</li>
<li>Neri Merhav - Information Theory and Statistical Physics - Lecture Notes <a href="https://arxiv.org/abs/1006.1565">URL</a></li>
</ul>
<p>for information theory proper following <a href="https://ocw.mit.edu/courses/6-441-information-theory-spring-2016/pages/lecture-notes/">MIT graduate information theory</a>. Occasionally consulting <a href="https://people.cs.uchicago.edu/~razborov/teaching/winter12.html">Computability and Complexity Theory</a>. By the way, Polyanskiy's lecture note is fantastic.</p>
<p>
For better insights in emergence and complex systems. The nature of logical inference, information, etc.</p>
<div id="outline-container-headline-6" class="outline-4">
<h4 id="headline-6">
2023-02-28 (semi-problem)
</h4>
<div id="outline-text-headline-6" class="outline-text-4">
<p>
Not sure whether I understand it correctly but it seems that in p.99-100 <em>Li and Vitan, 97</em>, it is claimed that the part of the Kolmogorov complexity of an object $x$ that corresponding to the encoding of a Turing machine $T$ in a universal turing machine $T_U$ is the regular, "valuable" one, and what is really intrinsic to the object $x$ is the random or "useless" information, since the ordering of the Kolmogorov complexities is indenpendent of the choice of the encoding of Turing machines by a universal Turing machine. Hence, in
$$
C(x) = \operatorname{min}\big\{l(T) + C(x|T): T\in\{T_0,T_1,...\}\big\} + O(1),
$$
the regular part corresponds to the description of the Turing machine, $l(T)$, which is dependent on how it is represented, and $C(x|T)$ is the "random" part.</p>
<p>
Given a universal computable function $\psi_U:\mathbb{N}^2\to\mathbb{N}$, this amounts to saying that what is really important and "regular" is the function $s(x)$ in
$$
\psi_U(x,n) = \phi_{s(x)}(n)
$$
where $\phi_k(n)$ is the Turing machine with Godel number $k$, an the Godel numbering that is in use. Occasionally $s$ is chosen as the identity function. Hence if the numbering is chosen s.t. for a particular Turing machine, its Godel number $k$ has a very small description length, then the complexity of regular part can be regarded as $0$, the choice corresponds to a shift of the constant.</p>
</div>
</div>
<div id="outline-container-headline-7" class="outline-4">
<h4 id="headline-7">
2023-03-04 Dovetailing; Inductive Reasoning
</h4>
<div id="outline-text-headline-7" class="outline-text-4">
<p>
In <em>Li,Vitanyi, 97</em>, p.192 really badly explained. Dovetailing here is simply "In $i$-th stage there are $i$ number of machines running (computing $\phi(pq_1),\phi(pq_2),...,\phi(pq_i)$ respectively), each step in the stage corresponding to a step of computation of each of the machines." In the text the binary sequences $\\{0,1\\}^\ast$ is given an arbitrary order (meaning $q_0,q_1,q_2,...$ can be any sequences, not necessarily $0,1,10,...$), so the algorithm given might seem suspiciously inefficient.</p>
<p>
In the fifth chapter <em>ibid.</em> the Occam's Rzaor Principle seems similar to the principle of sufficient reason. The latter can be used to stipulate postulates such as Hamilton's principle (Leibniz used it to justify or rather explain Fermat's principle, see van Fraassen, Laws and Symmetry, <del>possibly the first two chapters</del> 1999, p.12) and the principle of maximal entropy. There are certainly some deep connections underlying complexity, informational and thermodynamic entropy, path integral formulation of QM and such.</p>
</div>
</div>
</div>
</div>
Resources on Agda
https://geistlib.xyz/resources-on-agda/
Thu, 02 Mar 2023 00:00:00 +0000https://geistlib.xyz/resources-on-agda/<p>Agda is to Coq as Arch is to Ubuntu.</p>
<h2 id="quick-links">Quick Links</h2>
<ul>
<li>List of unicode symbols <a href="https://people.inf.elte.hu/divip/AgdaTutorial/Symbols.html">URL</a>
<ul>
<li><code>M-x</code> and <code>agda-input-show-translations</code> to see the full list,</li>
<li><code>M-x</code> and <code>quail-show-key</code> to query the character under the cursor.</li>
</ul>
</li>
<li>Agda Reference <a href="https://agda.readthedocs.io/en/v2.6.3/overview.html">URL</a></li>
<li>GNU Emacs Reference Card (keyboard shortcut cheat sheet) <a href="https://www.gnu.org/software/emacs/refcards/pdf/refcard.pdf">URL</a>
<ul>
<li><code>Ctrl-,</code> and <code>Ctrl-.</code> do not work in terminal Emacs.</li>
<li>Using evil-mode is a good idea, though there are some conflicts with agda-mode in keyboard shortcut.</li>
</ul>
</li>
</ul>
<h2 id="keyboard-shortcut-cheat-sheet">Keyboard Shortcut Cheat sheet</h2>
<p>General,</p>
<ul>
<li><code>C-c C-d</code>: query the type of an expression</li>
<li><code>C-c C-n</code>: evaluate an expression (normalize)</li>
<li><code>C-c C-l</code>: type check (load)</li>
</ul>
<p>Jumping between holes,</p>
<ul>
<li><code>C-c C-f</code>: next hole</li>
<li><code>C-c C-b</code>: previous hole</li>
</ul>
<p>Inside a hole,</p>
<ul>
<li><code>C-c C-c</code>: case split a hole</li>
<li><code>C-c C-r</code>: refine a hole</li>
<li><code>C-c C-a</code>: try to find the solution automatically</li>
<li><code>C-c C-,</code>: query the information type about the hole</li>
<li><code>C-c C-.</code>: deduce the type of an expression when filled in the hole</li>
<li><code>C-c C-Space</code>: check the type inside the hole and replace if compatible</li>
</ul>
<h2 id="tutorials-and-lectures-that-i-found-most-useful">Tutorials and lectures (that I found most useful)</h2>
<ol>
<li>(Notes) Introductory level: course for master students at ELTE Eötvös Collegium in Budapest by Péter Diviánszky and Ambrus Kaposi <a href="https://people.inf.elte.hu/divip/AgdaTutorial/Index.html">URL</a>
<ul>
<li>Some errors in, to say the least, the ‘Emacs Usage’ section, e.g. <code>\bN</code> for $\mathbb{N}$ instead of <code>\bn</code>.</li>
</ul>
</li>
<li>(Videos, fast-paced, HoTT-oriented) HoTTEST Summer School 2022, online lectures by assorted instructors. <a href="https://www.youtube.com/watch?v=HvYYCHMeM-8&list=PLtIZ5qxwSNnzpNqfXzJjlHI9yCAzRzKtx">URL</a></li>
<li>(Videos, slow-paced, mathematics-oriented) Peter Silinger’s lectures <a href="https://www.mathstat.dal.ca/~selinger/agda-lectures/">URL</a></li>
<li>Programming Language Foundations in Agda, namely <a href="https://plfa.github.io/Induction/">PLFA</a>. Note that the leading codeblocks in each chapters should be ignored.</li>
</ol>
<h2 id="plfa-solutions-selected">PLFA Solutions (selected)</h2>
<p>Solutions are encryped, in accordance to what is written <a href="https://plfa.github.io/Preface/#a-word-on-the-exercises">here</a></p>
<ol>
<li><a href="https://geistlib.xyz/plfa_natural/">Naturals</a></li>
<li><a href="https://geistlib.xyz/plfa_induction/">Induction</a></li>
<li><a href="https://geistlib.xyz/plfa_relations/">Relations</a></li>
<li><a href="https://geistlib.xyz/plfa_equality.lagda/">Equalities</a></li>
</ol>
Hamming-Type Code for Base-n Systems
https://geistlib.xyz/hamming-type-code-for-base-n-systems/
Sat, 25 Feb 2023 03:29:49 +0100https://geistlib.xyz/hamming-type-code-for-base-n-systems/<p>In <em>Feynmann lectures on computation</em>, there is a problem,</p>
<blockquote>
<p><strong>Problem 4.1</strong>: Devise a Hamming-type code for a message alphabet with a number $(a)$ of elements. Show that, if the number of code symbols if $r$, and the total message length is $N$, then
$$
1+(a-1)N = a^r
$$</p>
</blockquote>
<p>Here’s the solution.</p>
<p>Let $A=\{0,1,…,a\}$. Let $n \in N$ be the $n$-th symbol of the message, and $C(n) \in A$ be the content of the symbol.</p>
<p>Given a base-$a$ system, a number $n$ is represented by a sequence
$$
n \equiv … n_2 n_1 n_0
$$
with each $n_i$ being one of the digit $\alpha\in A$, namely $i$th-position $n_i$ can be occupied by an element of $A$. So in particular the $n$-th symbol is represented by the sequence.</p>
<p>Suppose that one needs $R$ symbols to represent all the numbers, that is, $R$ is the smallest number that makes the representation
$$
N \equiv n_{R-1} … n_0
$$
possible.</p>
<p>For each $s \leq R-1$, provide $(a-1)$ code symbols $s_1,s_2,..,s_{(a-1)}$, and let the symbol $s_k$ have the content
$$
C(s_k) = (\sum_{n: n_s = k} C(n))\operatorname{ mod }k,
$$
so that if there is an error in the $n$-th position with $n_s = k$, $C(s_k)$ would change. This completely determines the position of the error, since each $n_i$ and each possible value for $n_i$ is taken into account. Also from the definition of $C(s_k)$ the positioning of the code symbols should be clear, they occupy the first of the positions of which the contents are summed over.</p>
<p>Now let’s compute $r$. To <em>represent</em> all the numbers one needs $R$ symbols, hence
$$
N = a^{R} -1,
$$
where the subtracted $1$ corresponds to $10…000$ ($R$-number of 0s). But for each $i \leq R$, one needs $(a-1)$ symbols, this means if the total number of symbols needed is $r$, then
$$
N = \frac{a^r-1}{a-1}
$$
which is precisely
$$
1 + (a-1) N = a^r.
$$</p>
Misconceptions about the Word 'Computation'
https://geistlib.xyz/misconceptions-about-computation/
Fri, 24 Feb 2023 23:26:21 +0100https://geistlib.xyz/misconceptions-about-computation/<p>There are various misconceptions about the word ‘computation’, which I suspect comes from some folk rendition of the Church-Turing thesis . In the statement given in wikipedia, the Church-Turing thesis is of the following form</p>
<blockquote>
<p>It states that a function on the natural numbers can be calculated by an effective method if and only if it is computable by a Turing machine.</p>
</blockquote>
<p>A point that needs to be stressed is that the thesis is an <em>article of faith</em>, rather than a theorem, albeit a popular and standard one. It is <em>not</em> a theorem. The thesis leads one to arrive at one or more of the following conclusions</p>
<ol>
<li>a Turing machine - or the universal Turing machine (UTM) - set down a criteria for what can be computed, once and for all,</li>
<li>by 1., computational models that are not equivalent to Turing machine, are necessarily less expressive,</li>
<li>there is a unique, hence <em>the</em>, notion of computation and computability, for functions on the natural numbers.</li>
</ol>
<p>Which are in some sense true, and in some sense false. True, in that they follow from the Church-Turing thesis. False, in that the Church-Turing thesis is an article of faith. In terms of logical or conceptual order, It is not the case that a precise notion of effective methods and computability is given, then one came up with various models of computations. Some models of computations are given first, then these models are proved to be equivalent, then comes Church-Turing thesis, again when the ordering is given in terms of conceptual organization.</p>
<p>When one learns computability theory (also called recursion theory), if the textbook used is not too computer science oriented and so slightly mathematics oriented, e.g. Cutland’s book, the starting model of computation would be the <em>unlimited register machines</em> (URM), or straight-forwardly the <em>partial recursive functions</em> (PRF). URM is even in presentation nearly identical to that of PRF. There is nothing special about Turing machine, and it is an easy exercise to prove that Turing machines, pushdown automata, PRFs, URMs are equivalent in their computational power. By this it is meant that, given for example a Turing machine, there is a way to associate a unique PRF to it, and vice versa, so that for identical inputs, the PRF and the Turing machine gives identical outputs.</p>
<p>In particular, one doesn’t need any specific knowledge of the computational power of the UTM, to show that various models of computation are equivalent to Turing machines.</p>
<p>The notion of what <em>count as computation</em> in its usual sense is defined in terms of these equivalent models. When one speaks about computation in a computability-theoretic context, what is meant is something like ’the act of giving an output when given an input of a PRF’. It has no direct relation to - or logically can only be regarded as a subnotion of - the informal notion of <em>effective method</em>, which is a rather philosophical one. We stipulate that this notion of computation is called <em>R-computantion</em>, R- for “recursive”. R-computability is only defined for discrete sets, or more precisely, PRFs are (a subclass of) those functions of the form $f:\mathbb{N}^n \to \mathbb{N}$.</p>
<p>Since there are various equivalent models of R-computation, when what is considered is the class of PRFs, it can be said that what is of concern is that of Turing machines. Historically, Turing machine is the earlist model of R-computation, and arguably the most popular one, so when one speaks about R-computation there is a tendency to talk about Turing machines so that it can be guarenteed that others will understand, and possibly regard what is being told serious enough to have their attention drawn. However, in the statement of Church-Turing thesis, the clause’a Turing machine’ can be freely replaced by ‘a partial recursive function’ or ‘a unlimited register machine’ or ‘a pushdown automaton’, etc.</p>
<p>The notion of <em>effective method</em> is a philosophical one, in that it captures, or should capture, what counts as a “mechanical procedure”, what <em>machine</em> - as opposed to human beings that are said to have insight and intuition that machines do not possess - can do. In some philosophical thesis, the world and the human mind are all mechanized, so every procedure is essentially mechanical and can be simulated by an effective method. However it is ultimately unclear what is the limit of machines. In particular, if the Church-Turing thesis is accepted, and one accepts 3-dimensional wave equations as directly and objectively describing the dynamics of some actually existing entities, then one <em>cannot</em> hold that the world can be simulated by a human-made machine, since it was proved that there are R-computable initial conditions of Schrodinger’s equation, whose unique solutions are not R-computable, see for instance <a href="https://doi.org/10.1002/malq.19970430406">Pour-El, Zhong, 1997</a>. Also since R-computable functions are all $\mathbb{N}$-valued, real numbers should be nonexistent, but this is possibly less controversial.</p>
Short Reviews
https://geistlib.xyz/short_reviews/
Fri, 24 Feb 2023 00:00:00 +0000https://geistlib.xyz/short_reviews/<h2 id="out-of-time-a-philosophical-study-of-timelessness-baron-miller-tallant"><em>Out of Time, A Philosophical Study of Timelessness</em>, Baron, Miller, Tallant</h2>
<p>The second chapter is worth reading, in that a detailed and sophisticated distinction of various folk conceptions of time is given, from which one can realize that grasping what counts as time is a rather complicated matter. The 6th to 8th chapters should have been the essense of the book, but in sum what is done is the replacement of the notion of time by the notion of causasion. The arguments for the replacement ultimately depend on the inherent ambiguity and ‘gauge freedom’ exhibited by the C-theoretic time rather than on any particular theory of quantum gravity, though quantum gravity can serve as a vehicle of thought, so the overall program became some sort of reverse-Humeanism regarding time. The strategy for defending agency is similar. However no in-depth analysis of tensed phrases is given, hence metaphysical and logical problems that follow the denial of time, which are essentially problems of how the meaning of tensed sentences should be theorized and described, are simply ignored. Overall, while given a fancy name, this is a rather shallow read, and more than half of the contents are unnecessary cliches on the methodology and cliched apologetics for the methodology used. (2023.02.24)</p>
<h2 id="a-natural-history-of-natural-theology-helen-de-cruz--johan-de-smedt"><em>A Natural History of Natural Theology</em>, Helen de Cruz & Johan de Smedt</h2>
<p>‘A complete disaster’ would be the proper term for characterizing this work and the discipline of cognitive science of religion, at least as presented in the form appearing in this work. Typically, evidently the notion of “intuitive”, core, knowledge is itself heavily cultrally constructed, so if the thesis forwarded by cognitive scientists is correct, then somehow a person lived before Christ would have had innate abilities corresponding to those that are described further by the modern discipline of biology, physics, mathematics and psychology. It seems that for cognitive scientists and these so-called philosophers of religion there are obviously, without doubt, metaphysical categories that distinct between animate and inanimate objects that correspond directly to certain brain regions, from which a logical consequence drawable would be something like, that, there is some sort of pre-established harmony between world and mind, without the problem of interpretation disturbing its pristine tranquility, making the arguments pushed forward fashionably non-cartesian. Briefly, a true waste of time.</p>
<h2 id="the-logic-in-philosophy-of-science-hans-halvorson"><em>The Logic in Philosophy of Science</em>, Hans Halvorson</h2>
<p>The book is <a href="https://doi.org/10.1017/9781316275603">https://doi.org/10.1017/9781316275603</a> .</p>
<p>It needs to be said that the book is written in an unnecessarily elaborate manner that complicates the process of comprehension. Summarizing, it merely saids that the meaning of “equivalence” between two theories $A$ and $B$ should be that $A$ and $B$ have “equivalent” models, that is, they have “equivalent” theories, or that their syntactic categories are Morita equivalent. The tools that was utilized were set theory and first order logic that logicians and philosophers more or less have some familiarity, so in order to define Morita equivalence between theories a whole two hundred of pages are used to develop the theory, along with some rather ugly definitions. I estimate that if a fully category-theoretic language is utilized 20-40 pages would be enough.</p>
<p>For someone who knows what Morita equivalence is in this sense what is important is the last chapter. Halvorson’s point is, roughly speaking, pragmatic in the sense of American pragmatism and moderate anti-realist, saying that the opposition between realists and anti-realists is merely that of difference between the criteria for two theories to be equivalent. Some need stronger one, while others need weaker, depending on what’s one’s purpose and what’s in the range of one’s accpeptance. Morita equivalence is the middle point that is neither too conservative in the sense of metaphysical realist, nor too liberal in the sense of extreme anti-realist. However it doesn’t really make sense since Morita equivalence is really just an equivalence between 2-categories, and the categories that are <em>chosen</em> are nearly arbitrary. For instance, here Halvorson simply used classical first-order language, from which the theories built would definitely have syntactic categories that are different from those built from intuitionistic first-order language. The controversy between realists and anti-realists after 90s is about what language (e.g. classical or intuitionistic or even linear) science should utilize, or what mathematics (classical or intuitionistic, a mathematics with God-given real numbers or with reals continuously being constructed) science should choose, not on in what sense a scientific theory is equivalent to another.</p>
<p>While it is evident that anyone with some passing knowledge of Curry-Howard-Lambek correspondence and philosophy of science, together with some knowledge of 2-category, should have had a similar idea for sorting out the relations between language-theory, it is Halvorson et al. who have done the actual work and pointed out a good direction. It is possible that various string dualities and even quantum mechanics, when viewed from the point of <em>quantization</em> or <em>asymptotic Bohrification</em>, is a consequence of realizing that the classical theories are logically redundant (have “gauge symmetry”) in their description and their language, that is, “laws of Nature” that one discovers when probing the so-called Nature are in essence that of logic - put it in a catchword, the mind, or the unconsciouss, “knows” quantum mechanics, while the consciousness doesn’t, and the conscioussness creates the Nature in its unfolding in the second cosmogony of universe. (2023.01.26)</p>
<h2 id="_culture-in-action-symbols-and-strategies_-by-ann-swidler-1986"><em>Culture in Action: Symbols and Strategies</em>, by Ann Swidler (1986)</h2>
<p>Swidler, A. (1986). <a href="https://sci-hub.se/10.2307/2095521">Culture in Action: Symbols and Strategies. American Sociological Review, 51(2), 273. doi:10.2307/2095521</a>. 「Culture influences action not by providing the ultimate values toward which action is oriented, but by shaping a repertoire or “tool kit” of habits, skills, and styles from which people construct “strategies of action”.」 The problem is what is ’the ultimate value’, how is it expressed and how does it manifest itself. Lower-class people certainly want secure friendships, stable marriages, etc. However, do these words ‘secure friendships’, ‘stable marriages’ really correspond to the same things when they are uttered by middle-class people? Can ‘stable marriages’ be separated from its context and be conceived abstractly? To comprehend an expression that expresses some kind of ‘ultimate value’, one must be equipped with ‘a shaped repertoire of habits, skills and styles’, etc. out of which ‘strategies of action’ can be constructed. This is a problem of philosophy, not that of sociology. Here Swidler, like all sociologists and maybe more broadly speaking all leftists, is obscuring the notion of voluntaristic theory of action or simply human will, with that of the ability to achive a properly directed goal. One can always will <em>something</em>, but this does not mean that one can will something that he does not know what willing it even means, and the meaning of willing something is precisely the proper strategies of action that, when put into practice, set the agent closer to the end that the willed object corresponds to. Without proper repertoire of habits and skills equipped to really appreciate a value and orient oneself towards the pursuit of it, one does not even know what this particular value really is. Swidler holds that voluntarism does <em>not</em> dominate most of our institutional life, but what is ‘institutional life’? It is almost by definition the facet of life which is not voluntaristic. There are too many circular arguments presented in the article. Nowadays the purpose of these arguments boils down to the support of a political stance: there are structural and institutional injustice and oppression deeply planted in the society, and the obstacles for the ‘oppressed’ to get what they want is not their lack of determination but the presence of these injustice and oppression. Now <em>why do those people who believe that they are oppresed even want to revolt</em>? (2022.01.16)</p>
<h2 id="_rene-girard-the-last-nietzschean_-by-grant-kaplan"><em>Rene Girard, the Last Nietzschean</em> by Grant Kaplan</h2>
<p><a href="https://churchlifejournal.nd.edu/articles/rene-girard-the-last-nietzschean/">Rene Girard, the Last Nietzschean</a> by Grant Kaplan. I have also read Girard’s essay <em>Dionysus versus the Crucified</em> which was rather ridiculous and far too polemical. Girard didn’t realize where Nietzsche’s point was on up until the publishing of <em>I See Satan Fall Like Lightning</em> where he wrote 「The majestic inauguration of the “post-Christian era” is a joke. We are living through a caricatural “ultra-Christianity” that tries to escape from the Judeo-Christian orbit by “radicalizing” the concern for victims in an anti-Christian manner.」, and Kaplan correctly pointed out that 「Nietzsche detested with his entire being the emergence of such trends」. I’ll say that this was the main point of Nietzsche: the <em>corruption</em> of Christian love and heroism in a world where the Christian religion is becoming increasingly conformist. Scheler in his essay on resentments gave a detailed and accurate analysis and refutation of Nietzsche, much better than Girard. Girard’s theory for the ‘martyrdom’ of Dionysus is interesting but dubious. I say that like all pagan gods Dionysus - and his other manifestations like Bacchus - is just an internal function or force, constituing and working inside a pagan cosmic order, that can be put into abstraction as ‘<em>the</em> liberating force’. No matter what kind of ’liberation’ he brings, he just ’liberates’, and that is his sole function and purpose. It is totally natural that the archetype of which Dionysus is a manifestation was seen as a facet of Christ by romantic writers, since Christ also liberates human beings from the long continuous imprisonment of individual consciousness in a pagan cosmic order, where everything is arranged ‘harmoniously’ and ‘according to law’, without any place left for individual soul and will to eager and yearn and struggle and confront, to love and practice heroism, and finally to be saved. (2021.12.27)</p>
<h2 id="_freedom-on-holiday-the-genealogy-of-a-cultural-revolution_-by-john-betz"><em>Freedom on Holiday: The Genealogy of a Cultural Revolution</em> by John Betz</h2>
<p><a href="https://churchlifejournal.nd.edu/articles/freedom-on-holiday-the-genealogy-of-a-cultural-revolution/">Here</a> John Betz criticizes the <em>divine command theory</em> or <em>theological voluntarism</em> alongside his narrations on the background logic of reformation. The historical analysis is wonderful, though really a common knowledge. However there’s a big problem, of metaethics and semantics, in the sentence “God could do anything - even what is objectively <em>evil</em>”, since without God <em>nothing</em> is objectively evil or good: <em>There’s no further foundation or criteria for an act to be good or bad apart from God’s command</em> (and maybe laws of logic; this is disputable). Also in the sentence “the classical understanding of freedom as the freedom to become virtuous and wise”, the notion of <em>virtuous</em> and <em>wise</em> is vague to the extent that it is nearly meaningless, unless one lives in a genuine <em>classical</em>, i.e. <em>pagan</em>, cosmic order, where the notions of virtuousness and wiseness, etc., are well-defined and are associated to the order of the cosmos, which is another word for ‘imperial order’ or ‘rational order’ or ’natural order’. Of course freedom should be the freedom to become virtuous and wise but it should just be a point which is derivative, and we need a proper theory of <em>human nature</em> for this, which leads us to another problem: do human beings really have a <em>nature</em> in the classical sense? How was and is the concept <em>nature</em> formed, historically and cognitively? John Betz is missing all the points here. (2021.12.26)</p>
<ul>
<li>Moreover, what does ‘objectively good’ even mean? Can there be an act <em>objectively</em> good?</li>
</ul>
Messin' around Monad
https://geistlib.xyz/messing-around-monad/
Wed, 22 Feb 2023 00:00:00 +0000https://geistlib.xyz/messing-around-monad/<p>Let $\mathbb{T}=(T,\eta,\mu)$ be a monad, where $\mu:TT\to T$ is the composition natural transformation and $\eta:1_\mathcal{C}\to T$, on a category $\mathcal{C}$.</p>
<h2 id="adjunction">Adjunction</h2>
<p>An adjunction $(L \dashv R,\eta,\epsilon)$ with $L:\mathcal{C}\to\mathcal{D}$ induces a monad: Put</p>
<ol>
<li>$T=RL$</li>
<li>$\eta:1_{\mathcal{C}}\to T$, the unit of the adjunction, to be the unit of the monad.</li>
<li>$\mu= R\epsilon_{L}$, i.e. $TT=RLRL \xrightarrow{R\epsilon_{L}} RL = T$ where $\epsilon:LR\to 1_{\mathcal{C}}$ is the counit of the adjunction.</li>
</ol>
<p>Given a monad $\mathbb{T}$ on $\mathcal{C}$, let $\operatorname{Adj}(\mathbb{T})$ be the category whose objects are adjunctions $L\dashv R$ inducing $\mathbb{T}$, and whose morphisms are those functors $F:\mathcal{D}\to\mathcal{D}’$ that that satisfy $FL=L’$ and $R’F=R$. $\operatorname{Adj}(\mathbb{T})$ can thus be seen as a subcategory of the slice category $\operatorname{Cat}/\mathcal{C}$ with objects being adjunctions over $\mathcal{C}$ and with evident morphisms.</p>
<h3 id="kleisli-category">Kleisli category</h3>
<p>Suppose that $\mathbb{T}$ is induced by the adjunction $L\dashv R$, then some data in $\mathcal{D}$ is not needed to really describe $\mathbb{T}$, i.e. $\mathcal{D}$ might be replaced by its full subcategory $\mathcal{D}’$ on objects of the form $LA$ where $A\in\mathcal{C}$. The category thus formed is enought to induce the monad $\mathbb{T}$.</p>
<div class="theorem-style">
<span class="definition-head">Definition.</span>
The <em>Kleisli category</em> $\mathcal{C}_\mathbb{T}$ of $C$ is the category with the objects $\mathcal{C}_0$, and morphisms $A\to TB$, with the composite being $A\to TB \to TTC \xrightarrow{\mu_C} TC$.
</div>
<p>This amounts to saying that every morphism in $\mathcal{C}_M$ is of the form $\eta_{\operatorname{cod}(f)}f$ where $f\in\operatorname{Mor}(\mathcal{C})$. Verifying that this is indeed a category is trivial, note that $1_{A}=\eta_{A}$. It would be better understandable to put $1_{A}$ to be $A\xrightarrow{\eta_{A}}TA\xrightarrow{\eta_{A}}TTA\xrightarrow{\mu_A} A$ but this is forbidden since morphisms must be of the form $A\to TB$, and since there is essentially no difference except fot this since $A\to TA$ canonically identify $A$ and $TA$, putting $1_{A}$ to be $\eta_A$ is justified.</p>
<p>Now let’s see that $\mathbb{T}$ is actually induced by the Kleisli category $\mathcal{C}_{\mathbb{T}}$. Let</p>
<ol>
<li>$R_{\mathbb{T}}:\mathcal{C}_{\mathbb{T}}\to\mathcal{C}$ be the functor that sends $A\xrightarrow{f} TB$ in $\mathcal{C}_{\mathbb{T}}$ to $TA \xrightarrow{Tf} TTB \xrightarrow{\mu_B} TB$ in $\mathcal{C}$,</li>
<li>$L_{\mathbb{T}}:\mathcal{C}\to\mathcal{C}_{\mathbb{T}}$ send $A\xrightarrow{f}B$ in $\mathcal{C}$ to $A\xrightarrow{f} B\xrightarrow{\eta_{B}} TB$.</li>
</ol>
<p>Verifying that this two maps preserve identities and are functorial is again trivial. Since $R_{\mathbb{T}}L_{\mathbb{T}}=T$, the unit $\eta:1_{\mathcal{C}}\to RL$ of the monad is also the unit of this adjunction $\eta:1_{\mathcal{C}}\to R_{\mathbb{T}}L_{\mathbb{T}}$. The counit $L_\mathbb{T}R_\mathbb{T}\to 1_{\mathcal{C}_{\mathbb{T}}}$ is $1_{TA}:TA\to TA$ in component and hence is obviously natural. One needs to verify two triangular identities, which is again trivial. The adjunction induces the monad $\mathbb{T}$.</p>
<p>The Kleisli adjunction $L_{\mathbb{T}}\dashv R_{\mathbb{T}}$ is <em>initial</em> in $\operatorname{Adj}(\mathbb{T})$.</p>
<h3 id="eilenberg-moore-category">Eilenberg-Moore category</h3>
<p>Given a monad $\mathbb{T}$ and $A\in\mathcal{C}$, one always has $TA\in\mathcal{C}$ where $TA= \eta_A(A)$, and a map $\mu_A:TTA\to TA$. This makes $A$ to be similar to a algebraic theory over $\mathbb{T}$, in particular, one has
$$
\ldots TTTA \to TTA \to TA,
$$
this is in fact a simplicial object
$$
\left( \cdots \stackrel{\longrightarrow}{\longrightarrow} T T A \stackrel{\mu \cdot 1_A}{\longrightarrow} T A \right),
$$
and the data can be packed into thee free $\mathbb{T}$-algebra associated to $A$:
<div class="theorem-style">
<span class="definition-head">Definition.</span>
The <em>free $\mathbb{T}$-algebra</em> associated to $A\in\mathcal{C}$ is the pair $(TA,\mu_A:TTA\to TA)$.
</div>
</p>
<p>It would be helpful to make the above sequence $\ldots \to TTA \to TA$ some kind of (left) “<em>resolution</em>”,
$$
\ldots TTTA \to TTA \to TA \xrightarrow{\alpha} A
$$
this is in fact an augmented simplicial object
$$
\left( \cdots \stackrel{\longrightarrow}{\stackrel{\longrightarrow}{\longrightarrow}} T T A \stackrel{\stackrel{\mu \cdot 1_A}{\longrightarrow}}{\stackrel{T \cdot \alpha}{\longrightarrow}} T A \stackrel{\alpha}{\longrightarrow} A \right).
$$</p>
<p>Suppose that there is a morphism $\alpha:TA\to A$ that is compatible with $\eta_{A}$ and $T$, that is</p>
<ol>
<li>$\alpha\circ\eta_A = 1_A:A\to A$;</li>
<li>$\alpha \circ T \alpha = \alpha\mu_{A}:TTA\to A$.</li>
</ol>
<p>The pair $(A,\alpha)$ that packs the data of the “resolution” then is said to be a <em>$\mathbb{T}$-algebra</em>. A homomorphism of $\mathbb{T}$-algebras $(A,\alpha)\to (B,\beta)$ then intertwines between $\beta T$ and $\alpha$: Given $f:A\to B$
$$
(\beta T)f = f \alpha : TA \to B.
$$
so in particular $(TA,\mu_A)$ is a $\mathbb{T}$-algebra. The “resolution”
$$
\left( \cdots \stackrel{\longrightarrow}{\stackrel{\longrightarrow}{\longrightarrow}} T T A \stackrel{\stackrel{\mu \cdot 1_A}{\longrightarrow}}{\stackrel{T \cdot \alpha}{\longrightarrow}} T A \stackrel{\alpha}{\longrightarrow} A \right)
$$
is called the <em>bar construction</em> of the monad $\mathbb{T}$ over $A$.</p>
<div class="theorem-style">
<span class="definition-head">Definition.</span>
Let $\mathcal{C}^\mathbb{T}$ be the category of $\mathbb{T}$-algebras over $\mathcal{C}$, with homomorphisms as morphisms. This is the <em>Eilenberg-Moore category</em> of $\mathbb{T}$.
</div>
<p>Since every $A\in\mathcal{C}$ has an associated free $\mathbb{T}$-algebra, the category of free $\mathbb{T}$-algebras of $\mathcal{C}$ should is a subcategory of $\mathcal{C}^\mathbb{T}$. The Eilenberg-Moore category $\mathcal{C}^\mathbb{T}$ is the “largest” category that give rise an adjunction with $\mathcal{C}$ on the left.</p>
<p>Let $R^\mathbb{T}:\mathcal{C}^\mathbb{T}\to\mathcal{C}$ be the forgetful functor, and let $L^\mathbb{T}:\mathcal{C}\to\mathcal{C}^\mathbb{T}$ send $A\in\mathcal{C}$ to its free $\mathbb{T}$-algebra $(TA,\mu_A)$ and $A\to B$ to $T(A\to B)$, the free $\mathbb{T}$-algebra homomorphism. It is easy to see that $L^\mathbb{T}\dashv R^\mathbb{T}$. The adjunction induces the monad $\mathbb{T}$.</p>
<p>The Eilenberg-Moore adjunction $L^{\mathbb{T}}\dashv R^{\mathbb{T}}$ is <em>terminal</em> in $\operatorname{Adj}(\mathbb{T})$.</p>
<h3 id="between-eilenberg-moore-and-kleisli">Between Eilenberg-Moore and Kleisli</h3>
<p>Since $\mathcal{C}^\mathbb{T}$ is terminal and $\mathcal{C}_\mathbb{T}$ is initial, there must be a canonical functor $K:\mathcal{C}_\mathbb{T}\to\mathcal{C}^\mathbb{T}$. In fact $K$ is fully faithful, with its image consisting of the free $\mathbb{T}$-algebras: $K$ is just the functor that takes an object $A\in \mathcal{C}_\mathbb{T}$ to its free $\mathbb{T}$-algebra, and since
$$
\operatorname{Hom}_\mathcal{C}(A,TB)\cong\operatorname{Hom}_{\mathcal{C}_\mathbb{T}}(A,B) \xrightarrow{K} \operatorname{Hom}_{\mathcal{C}^\mathbb{T}}(KA,KB)=\operatorname{Hom}_{\mathcal{C}^\mathbb{T}}((TA,\mu_A),(TB,\mu_B))\cong \operatorname{Hom}_{\mathcal{C}}(A,TB)
$$
where the isomorphisms are given by the adjunction between $\mathcal{C}$ and $\mathcal{C}_\mathbb{T}$ or $\mathcal{C}^\mathbb{T}$ it is fully faithful.</p>
<h2 id="algebraic-theory">Algebraic Theory</h2>
<h3 id="lawvere-theory-of-a-monad">Lawvere theory of a monad</h3>
<p>Let $\mathbb{T}=(T,\eta,\mu)$ be a monad on the slice category $\operatorname{Set}/S$.
<div class="theorem-style">
<span class="definition-head">Definition.</span>
The <em>large Lawvere theory</em> $\operatorname{LTh}(\mathbb{T})$ of $\mathbb{T}$ is the category $\operatorname{Kl}(\mathbb{T})^{op}=[(\operatorname{Set}/S)_\mathbb{T}]^{op}$, i.e. the opposite of the Kleisli category of $\mathbb{T}$.
</div>
</p>
<p>The left adjoint $\operatorname{Set}/S\to \operatorname{Kl}(\mathbb{T})$ preserves coproduct, so, taking opposite categories there is a product-preserving functor
$$
(\operatorname{Set}/S)^{op}\to \operatorname{Kl}(\mathbb{T})^{op},
$$
which defines a Lawvere theory - the functor is a bijection on the classes of objects.</p>
<p>The monad associated to $\operatorname{Kl}(\mathbb{T})$ is isomorphic to $\mathbb{T}$, and so is the monad associated to $\operatorname{LTh}(\mathbb{T})$.</p>
<h3 id="unraveling">Unraveling</h3>
<p>The large Lawvere theory $\operatorname{LTh}(\mathbb{T})$ should be seen as the syntactic category of what is encoded in the product-preserving functor
$$
F:(\operatorname{Set}/S)^{op}\to \operatorname{LTh}(\mathbb{T}).
$$</p>
<ul>
<li>Given another product-preserving functor $\operatorname{LTh}(\mathbb{T}) \to \mathcal{C}$, an object (<em>the</em> generic object) $X\in\operatorname{LTh}(\mathbb{T})$ is sent to a model of the theory internal to $\mathcal{C}$ (e.g. $\mathcal{C} =\operatorname{Set}$).</li>
<li>Taking the slice category $(\operatorname{Set}/S)$ to be $\mathbb{F}$, the category of natural numbers and functions between them, then $F$ is an identity-on-objects strictly power-preserving functor.</li>
<li>$S$ makes the theory multi-sorted. Note that $S$ is a set, and $\operatorname{Set}/S$ is equivalent to $\operatorname{Set}^S$ (this is not the exponential, but the product). The equivalence is exhibited by sending $A = \prod_{i\in S}A_i \in \operatorname{Set}^S$ to $\prod_{i\in S} A_i \xrightarrow{p} S: A_i \mapsto i \in \operatorname{Set}/S$.</li>
</ul>
<p>The monad $\mathbb{T}$ with endofunctor $T:\operatorname{Set}/S \to \operatorname{Set}/S$ should be seen as encoding the algebra multiplication laws. When the Kleisli category of $\mathbb{T}$ is small, sometimes it is possible to identify $\mathbb{T}$ with an adjunction $\operatorname{Set}/S \dashv \operatorname{Mod}(\operatorname{LTh}(\mathbb{T}),\operatorname{Set})$, where $\operatorname{Mod}(\operatorname{LTh}(\mathbb{T}),\operatorname{Set})$ is the category of set models of $\operatorname{LTh}(\mathbb{T})$ (product-preserving functors to $\operatorname{Set}$) and natural transformations between them.</p>
<p>Thus, the monad $\mathbb{T}$ determines the structure of the large Lawvere theory, on the level of $\operatorname{Set}/S$. $\operatorname{Set}/S$ should be seen as the “free category” of a multisorted Lawvere theory, and $\mathbb{T}$ encodes the unfree-structure in an algebra. By passing to the Kleisli category, all the information unrelated to $\mathbb{T}$, that is, to the algebra multiplication, is destroyed.</p>
<h3 id="mathbbt-algebras-and-models">$\mathbb{T}$-algebras and models</h3>
<p>It was shown before that there is a functor $K$, fully faithful, with image consisting of the free $\mathbb{T}$-algebras, from the Kleisli category to the Eilenberg-Moore category $\operatorname{Alg}(\mathbb{T})$ of $\mathbb{T}$. So there is a functor
$$
\operatorname{Kl}(\mathbb{T})^{op}\to \operatorname{Alg}(\mathbb{T})^{op}
$$
that takes an object $A\in \operatorname{Kl}(\mathbb{T})^{op}$ to its free $\mathbb{T}$-algebra $(TA,\mu_A:TTA\to TA)$ (residing in the opposite category, though).</p>
<p>Given an $\mathbb{T}$-algebra $(A,\alpha)$, its Yoneda embedding $\operatorname{Hom}_{Alg(\mathbb{T})}(\cdot,A)$ is a presheaf, which takes a $\mathbb{T}$-algebra as an input, and outputs a set. The composition
$$
\operatorname{Kl}(\mathbb{T})^{op}\to \operatorname{Alg}(\mathbb{T})^{op}\xrightarrow{\operatorname{Hom}(\cdot,A)} \operatorname{Set}
$$
then gives a model $M_A$ of the Lawvere theory. A morphism of algebras $f:A\to B$ is sent to a homomorphism $M_A \to M_B$ (via Yoneda embedding, $\operatorname{Hom}(\cdot,A)\to \operatorname{Hom}(\cdot,B)$). This defines a functor
$$
M:\operatorname{Alg}(\mathbb{T})\to \operatorname{Mod}(\operatorname{LTh}(\mathbb{T}),\operatorname{Set})
$$
from the Eilenberg-Moore category of $\mathbb{T}$ to the category of set models of the Lawvere theory. This is in fact an equivalence of categories.</p>
<p>Summing up, the Eilenberg-Moore category of a monad $\mathbb{T}$ on $\operatorname{Set}/S$ is equivalent to the category of models of the large Lawvere theory defined by $\mathbb{T}$.</p>
<p>It is interesting to notice that a $\mathbb{T}$-algebra, say $(A,\alpha:TA\to A)$ encodes the bar construction of $\mathbb{T}$ over $A$. So there are two equivalent in spirit, but distinct in method, ways of studying an algebraic theory with monad $\operatorname{T}$,</p>
<ol>
<li>Studying the Eilenberg-Moore category $\operatorname{Alg}(\mathbb{T})$ - or the category of the bar constructions - of its monad.</li>
<li>Studying the category of its models $\operatorname{Mod}(\operatorname{LTh}(\mathbb{T}),\operatorname{Set})$.</li>
</ol>
<h3 id="similarities-between-other-classifying-objects">Similarities between other ‘classifying’ objects</h3>
<p>The Lawvere theory $\operatorname{LTh}(\mathbb{M})$ should be seen as the syntactic acategory of a theory $T$, so the models of $T$ in $\operatorname{Set}$ are product-preserving functors
$$
\operatorname{LTh}(\mathbb{M}) \to \operatorname{Set},
$$
which should be seen as an analogue of geometric functor. It would be good that one finds a ‘universal model’ $S[T]$ or better $U:\operatorname{LTh}\to S[T]$ that is product-preserving (‘geometric’), so every model in $\operatorname{Set}$ factors through it
$$
\operatorname{LTh}(\mathbb{M}) \xrightarrow{U} S[T] \to \operatorname{Set}.
$$</p>
<p>But $S[T]$ is precisely $\operatorname{Alg}(\mathbb{M})^{op}$, since we have,
$$
\operatorname{LTh}(\mathbb{M}) = \operatorname{Kl}(\mathbb{M})^{op} \to \operatorname{Alg}(\mathbb{M})^{op} \xrightarrow{\operatorname{Hom}(\cdot,A)} \operatorname{Set}.
$$</p>
<p>This says that $\operatorname{Alg}(\mathbb{M})^{op}$ is some sort of ‘classifying category’ in the sense of ‘classifying topos’. By analogy there should be a ‘geometric morphism’, where $\operatorname{Hom}(\cdot,A):\operatorname{Alg}(\mathbb{M})^{op} \to \operatorname{Set}$ is the left-adjoint part of a geometric morphism $f: \operatorname{Set}\to \operatorname{Alg}(\mathbb{M})^{op}$.</p>
<h2 id="as-modalities">As Modalities</h2>
<h2 id="relation-to-haskell-monad">Relation to Haskell <code>Monad</code></h2>
<p>While I’m not <em>really</em> familiar with Haskell programming, this I can explain.</p>
<p>Since in Haskell the endofunctor $T$ in a monad $(T,\mu,\eta)$ needs to be separately implemented, there might be confusions. The <code>Monad</code> class is defined as</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-Haskell" data-lang="Haskell"><span class="line"><span class="ln">1</span><span class="cl"><span class="kr">class</span> <span class="kt">Monad</span> <span class="n">m</span> <span class="kr">where</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl"> <span class="p">(</span><span class="o">>>=</span><span class="p">)</span> <span class="ow">::</span> <span class="n">m</span> <span class="n">a</span> <span class="ow">-></span> <span class="p">(</span> <span class="n">a</span> <span class="ow">-></span> <span class="n">m</span> <span class="n">b</span><span class="p">)</span> <span class="ow">-></span> <span class="n">m</span> <span class="n">b</span>
</span></span><span class="line"><span class="ln">3</span><span class="cl"> <span class="p">(</span><span class="o">>></span><span class="p">)</span> <span class="ow">::</span> <span class="n">m</span> <span class="n">a</span> <span class="ow">-></span> <span class="n">m</span> <span class="n">b</span> <span class="ow">-></span> <span class="n">m</span> <span class="n">b</span>
</span></span><span class="line"><span class="ln">4</span><span class="cl"> <span class="n">return</span> <span class="ow">::</span> <span class="n">a</span> <span class="ow">-></span> <span class="n">m</span> <span class="n">a</span>
</span></span></code></pre></div><p>Upon identifying a type, say <code>a</code>, with an object $A$, one can actually straightforwardly regard <code>m</code> as a functor $T$ on the category. Then</p>
<ol>
<li><code>return</code> is, on $A$, simply $\eta_A: A\to TA$.</li>
<li>Given a morphism $f:A\to TB$ corresponding to <code>a-> m b</code>, $Tf: TA\to TTB$, and $\mu Tf : TA \to TB$; that is $\mu T$ sends $f: A\to TB$ to $\mu Tf: TA\to TB$, which is precisely <code>(>>=)</code>.</li>
<li>For $g: A\to B$, $Tg: TA \to TB$. The evaluation map on $TA$, $\operatorname{ev}_{TA} Tg =Tg(TA) = T(g(A))$ then gives $TB$. This is <code>(>>)</code>.</li>
</ol>
<p>There is nothing mysterious about the so called fundamental laws,</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-Haskell" data-lang="Haskell"><span class="line"><span class="ln">1</span><span class="cl"><span class="p">(</span><span class="n">return</span> <span class="n">a</span><span class="p">)</span> <span class="o">>>=</span> <span class="n">f</span> <span class="o">====</span> <span class="n">f</span> <span class="n">a</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="nf">a</span> <span class="o">>>=</span> <span class="n">return</span> <span class="o">====</span> <span class="n">a</span>
</span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="p">(</span><span class="n">a</span> <span class="o">>>=</span> <span class="n">f</span><span class="p">)</span> <span class="o">>>=</span> <span class="n">g</span> <span class="o">====</span> <span class="n">a</span> <span class="o">>>=</span> <span class="p">(</span><span class="nf">\</span><span class="n">b</span> <span class="ow">-></span> <span class="n">f</span> <span class="n">b</span> <span class="o">>>=</span> <span class="n">g</span><span class="p">)</span>
</span></span></code></pre></div><ol>
<li>We have seen that <code>(>>=)</code> takes $f:A\to TB$ to $\mu Tf: TA\to TB$, now <code>return a</code> gives $TA$, so $\mu Tf(TA) = TB = f(A)$.</li>
<li><code>a>>= return</code> should be seen as $\mu T\eta$ being fed some $A$, yielding $\mu T\eta_{A}A = \mu TTA = A$.</li>
<li><code>(a >>= f) >>= g</code>. Here <code>a</code> is some $TA$, <code>(a >>= f)</code> gives $TB$ for $f:A\to TB$, and for $g:B \to TC$ <code>(a >>= f) >>= g</code> yields $TC$. The RHS first feeds $g: B \to TC$ into $\mu T$ and yield $\mu Tg: TB\to TC$, precompose with $f: A\to TB$ to get $(\mu Tg)\circ f: A\to TB$. Routinely this again becomes $\mu T ((\mu Tg)\circ f ) = \mu( T \mu T (g) \circ T (f)): TA\to TB$.</li>
</ol>
<p>A more interesting exercise would be to show that Haskell <code>Monad</code> together with the fundamental laws indeed defines a monad and locate how the axioms for monad arises. It is tedious but again there is nothing mysterious.</p>
<p>In practice, a Haskell monad should be seen as a modality. Let’s call it $M$-modality. A map like <code>a -> m b</code>, <code>return</code> being an example, lifts <code>a</code> to the $M$-mondality, and <code>(>>=)</code> lifts the RHS modal-lifting maps to maps fully in $M$-modality, i.e. a map that takes a $M$-entity to another $M$-entity. The three fundamental laws just make sure that <code>return</code> is the simplest lifting, and the lifted maps can be composed.</p>
Useful TeX Diagrams
https://geistlib.xyz/useful-tex-diagrams/
Mon, 20 Feb 2023 10:44:49 +0100https://geistlib.xyz/useful-tex-diagrams/<p>Diagrams are mainly generated with <a href="https://q.uiver.app/">Quiver</a>, maybe accompanied by some comments on the concepts.</p>
<h2 id="fibered-category-theory">Fibered category theory</h2>
<p>Strong cartesianness
<div class="theorem-style">
<span class="definition-head">Definition(Strong cartesianness) .</span>
For categories $\mathcal{E},\mathcal{B}$ and a functor $p:\mathcal{E}\to\mathcal{B}$, a morphism $f\in\operatorname{Mor}(\mathcal{E})$ is called $p$-<em>strongly cartesian</em>, if for any $f'\in\operatorname{Mor}(\mathcal{E})$ s.t. $\operatorname{cod}(f)=\operatorname{cod}(f')$ and any morphism $\psi:p(\operatorname{dom}(f')) \to p(\operatorname{dom}(f))$ s.t. $p(f)\circ \psi = p(f')$, there is a unique $g:\operatorname{dom}(f')\to\operatorname{dom}(f)$ with $f \circ g = f'$ and $p(g)=\psi$.
</div>
</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-tex" data-lang="tex"><span class="line"><span class="ln"> 1</span><span class="cl"><span class="k">\begin</span><span class="nb">{</span>tikzcd<span class="nb">}</span>
</span></span><span class="line"><span class="ln"> 2</span><span class="cl"> e <span class="nb">&&</span> <span class="nb">{</span>e'<span class="nb">}</span> <span class="nb">&</span> <span class="nb">{</span><span class="k">\mathcal</span><span class="nb">{</span>E<span class="nb">}}</span> <span class="k">\\</span>
</span></span><span class="line"><span class="ln"> 3</span><span class="cl"> <span class="nb">&</span> a <span class="k">\\</span>
</span></span><span class="line"><span class="ln"> 4</span><span class="cl"> <span class="nb">{</span>p(e)<span class="nb">}</span> <span class="nb">&&</span> <span class="nb">{</span>p(e')<span class="nb">}</span> <span class="nb">&</span> <span class="nb">{</span><span class="k">\mathcal</span><span class="nb">{</span>B<span class="nb">}}</span> <span class="k">\\</span>
</span></span><span class="line"><span class="ln"> 5</span><span class="cl"> <span class="nb">&</span> <span class="nb">{</span>p(a)<span class="nb">}</span>
</span></span><span class="line"><span class="ln"> 6</span><span class="cl"> <span class="k">\arrow</span><span class="na">["{p(f)}"', color={rgb,255:red,217;green,104;blue,104}, from=3-1, to=4-2]</span>
</span></span><span class="line"><span class="ln"> 7</span><span class="cl"> <span class="k">\arrow</span><span class="na">["{p(f')}", color={rgb,255:red,117;green,117;blue,117}, from=3-3, to=4-2]</span>
</span></span><span class="line"><span class="ln"> 8</span><span class="cl"> <span class="k">\arrow</span><span class="na">["{\forall \psi}"{description}, color={rgb,255:red,107;green,107;blue,107}, curve={height=-6pt}, tail reversed, no head, from=3-1, to=3-3]</span>
</span></span><span class="line"><span class="ln"> 9</span><span class="cl"> <span class="k">\arrow</span><span class="na">["f"', color={rgb,255:red,163;green,41;blue,41}, from=1-1, to=2-2]</span>
</span></span><span class="line"><span class="ln">10</span><span class="cl"> <span class="k">\arrow</span><span class="na">["{\forall f'}"', tail reversed, no head, from=2-2, to=1-3]</span>
</span></span><span class="line"><span class="ln">11</span><span class="cl"> <span class="k">\arrow</span><span class="na">["{\exists ! g }", curve={height=-6pt}, dotted, tail reversed, no head, from=1-1, to=1-3]</span>
</span></span><span class="line"><span class="ln">12</span><span class="cl"> <span class="k">\arrow</span><span class="na">["p"{description}, from=1-4, to=3-4]</span>
</span></span><span class="line"><span class="ln">13</span><span class="cl"><span class="k">\end</span><span class="nb">{</span>tikzcd<span class="nb">}</span>
</span></span></code></pre></div><center>
<iframe class="quiver-embed" src="https://q.uiver.app/?q=WzAsOCxbMCwyLCJwKGUpIl0sWzEsMywicChhKSJdLFsyLDIsInAoZScpIl0sWzAsMCwiZSJdLFsxLDEsImEiXSxbMiwwLCJlJyJdLFszLDAsIlxcbWF0aGNhbHtFfSJdLFszLDIsIlxcbWF0aGNhbHtCfSJdLFswLDEsInAoZikiLDIseyJjb2xvdXIiOlswLDYwLDYzXX0sWzAsNjAsNjMsMV1dLFsyLDEsInAoZicpIiwwLHsiY29sb3VyIjpbMCwwLDQ2XX0sWzAsMCw0NiwxXV0sWzAsMiwiXFxmb3JhbGwgXFxwc2kiLDEseyJjdXJ2ZSI6LTEsImNvbG91ciI6WzAsMCw0Ml0sInN0eWxlIjp7InRhaWwiOnsibmFtZSI6ImFycm93aGVhZCJ9LCJoZWFkIjp7Im5hbWUiOiJub25lIn19fSxbMCwwLDQyLDFdXSxbMyw0LCJmIiwyLHsiY29sb3VyIjpbMCw2MCw0MF19LFswLDYwLDQwLDFdXSxbNCw1LCJcXGZvcmFsbCBmJyIsMix7InN0eWxlIjp7InRhaWwiOnsibmFtZSI6ImFycm93aGVhZCJ9LCJoZWFkIjp7Im5hbWUiOiJub25lIn19fV0sWzMsNSwiXFxleGlzdHMgISBnICIsMCx7ImN1cnZlIjotMSwic3R5bGUiOnsidGFpbCI6eyJuYW1lIjoiYXJyb3doZWFkIn0sImJvZHkiOnsibmFtZSI6ImRvdHRlZCJ9LCJoZWFkIjp7Im5hbWUiOiJub25lIn19fV0sWzYsNywicCIsMV1d&embed" width="300" height="300" style="border-radius: 8px; border: none;"></iframe>
</center>
<p>When $\psi$ is restricted to be an identity, $f$ is called $p$-weakly cartesian. For a Grothendieck fibration (that is, $p$ s.t. composition of cartesian arrows are cartesian, and for all $a\in\mathcal{E}$ and all morphisms $\phi$ with codomain $p(a)$, there is a cartesian lifting of $\phi$), strong cartesianness can be replaced by weak cartesianness. A (contravariant) pseudofunctor sending $b\in\mathcal{B}$ and $1_b$ to their inverse images (which form a category) is the Grothendieck construction.</p>
External Links
https://geistlib.xyz/external/
Mon, 20 Feb 2023 00:00:00 +0000https://geistlib.xyz/external/<h2 id="resources">Resources</h2>
<ul>
<li><del>CATLIB图书馆: <a href="http://www.catlib.work/">http://www.catlib.work/</a></del> Unfortunately defunct.</li>
<li>Corpus Corporum: <a href="https://www.mlat.uzh.ch/">https://www.mlat.uzh.ch/</a></li>
<li>The Modern Hermeticist: <a href="https://themodernhermeticist.com/">https://themodernhermeticist.com/</a></li>
<li>Warburg Institute 数字图书馆: <a href="https://wdl.warburg.sas.ac.uk/browse/subject">https://wdl.warburg.sas.ac.uk/browse/subject</a></li>
<li>Warburg Institute 图像数据库: <a href="https://iconographic.warburg.sas.ac.uk/vpc/VPC_search/main_page.php">https://iconographic.warburg.sas.ac.uk/vpc/VPC_search/main_page.php</a></li>
<li>Atlas Mnemosyne: <a href="https://warburg.sas.ac.uk/library-collections/warburg-institute-archive/online-bilderatlas-mnemosyne">https://warburg.sas.ac.uk/library-collections/warburg-institute-archive/online-bilderatlas-mnemosyne</a></li>
<li>Open Library of Humanities: <a href="https://www.openlibhums.org/">https://www.openlibhums.org/</a></li>
<li>OAPEN: <a href="http://www.oapen.org/home">http://www.oapen.org/home</a></li>
<li>11到16世纪英国手稿: <a href="https://www.manuscriptsonline.org/">https://www.manuscriptsonline.org/</a></li>
<li>Getty Virtual Library: <a href="https://www.getty.edu/publications/virtuallibrary/index.html">https://www.getty.edu/publications/virtuallibrary/index.html</a></li>
<li>数字梵蒂冈图书馆: <a href="https://digi.vatlib.it/mss/?ling=en">https://digi.vatlib.it/mss/?ling=en</a></li>
<li>数字 Cicognara 图书馆: <a href="https://cicognara.org/catalogo">https://cicognara.org/catalogo</a></li>
<li>Gallica: <a href="https://gallica.bnf.fr/accueil/en/content/accueil-en?mode=desktop">https://gallica.bnf.fr/accueil/en/content/accueil-en?mode=desktop</a></li>
<li>Persee: <a href="https://www.persee.fr/collections">https://www.persee.fr/collections</a></li>
<li>Drawings of the Florentine Painters: <a href="http://florentinedrawings.itatti.harvard.edu/">http://florentinedrawings.itatti.harvard.edu/</a></li>
<li>E-Periodica 数字瑞士期刊: <a href="https://www.e-periodica.ch/">https://www.e-periodica.ch/</a></li>
<li>Pharos 数字图像档案: <a href="http://images.pharosartresearch.org/search">http://images.pharosartresearch.org/search</a></li>
<li>Usuarium: <a href="https://usuarium.elte.hu/">https://usuarium.elte.hu/</a></li>
<li>WDL: <a href="https://www.wdl.org/">https://www.wdl.org/</a></li>
<li>Ancient World Digital Library: <a href="http://dlib.nyu.edu/ancientworld/">http://dlib.nyu.edu/ancientworld/</a></li>
<li>Internet History Sourcebooks Project <a href="https://sourcebooks.fordham.edu/index.asp">https://sourcebooks.fordham.edu/index.asp</a></li>
<li>The Logic Museum <a href="https://www.logicmuseum.com/wiki/Main_Page">https://www.logicmuseum.com/wiki/Main_Page</a></li>
<li>Online Library of Liberty <a href="https://oll.libertyfund.org/">https://oll.libertyfund.org/</a></li>
<li>The Sanskrit Heritage Site <a href="https://sanskrit.inria.fr/">https://sanskrit.inria.fr/</a></li>
<li>Anna’s Archive <a href="https://annas-archive.org/">https://annas-archive.org/</a></li>
</ul>
<h2 id="mathematics--logic">Mathematics & Logic</h2>
<ul>
<li>The collected works of Per Martin-Loef <a href="https://github.com/michaelt/martin-lof">https://github.com/michaelt/martin-lof</a></li>
<li>The collected works of F. W. Lawvere <a href="https://github.com/mattearnshaw/lawvere">https://github.com/mattearnshaw/lawvere</a></li>
<li>Selected Papers of Dana S. Scott <a href="https://github.com/CMU-HoTT/scott">https://github.com/CMU-HoTT/scott</a></li>
</ul>
<h2 id="blogs-and-amateur-projects">Blogs and amateur projects</h2>
<ul>
<li>Roger Pearse’s Pages <a href="https://www.tertullian.org/">https://www.tertullian.org/</a></li>
<li>With Both Hands <a href="https://www.benespen.com/">https://www.benespen.com/</a> and The Long View <a href="https://www.benespen.com/the-long-view">https://www.benespen.com/the-long-view</a></li>
<li>Laetus in Praesens <a href="https://www.laetusinpraesens.org">https://www.laetusinpraesens.org</a></li>
<li>Less Wrong <a href="https://www.lesswrong.com/">https://www.lesswrong.com/</a></li>
<li>Bactra Notebook <a href="http://bactra.org/notebooks/">http://bactra.org/notebooks/</a> , Review <a href="http://bactra.org/reviews/">http://bactra.org/reviews/</a></li>
</ul>
<h2 id="music-labels-music">Music Labels, Music</h2>
<ul>
<li>Dust-to-Digital <a href="https://dusttodigital.bandcamp.com/">https://dusttodigital.bandcamp.com/</a></li>
<li>Cabin Floor Esoterica <a href="https://cabinflooresoterica.bandcamp.com/">https://cabinflooresoterica.bandcamp.com/</a></li>
<li>Ored Recordings <a href="https://oredrecordings.bandcamp.com/">https://oredrecordings.bandcamp.com/</a></li>
<li>LINE <a href="https://lineimprint.bandcamp.com/">https://lineimprint.bandcamp.com/</a></li>
<li>NOTON <a href="https://noton.info/">https://noton.info/</a></li>
<li>Kvitnu <a href="https://kvitnu.bandcamp.com/">https://kvitnu.bandcamp.com/</a></li>
<li>12K <a href="https://12kmusic.bandcamp.com/">https://12kmusic.bandcamp.com/</a></li>
<li>Umor Rex <a href="https://umorrex.bandcamp.com/">https://umorrex.bandcamp.com/</a></li>
<li>Raster <a href="https://raster-raster.bandcamp.com/">https://raster-raster.bandcamp.com/</a></li>
<li>Dream Catalogue <a href="https://dreamcatalogue.bandcamp.com/">https://dreamcatalogue.bandcamp.com/</a></li>
<li>Tzadik <a href="https://www.tzadik.com/">https://www.tzadik.com/</a></li>
<li>ECM <a href="https://www.ecmrecords.com/">https://www.ecmrecords.com/</a></li>
<li>Alpha <a href="https://outhere-music.com/en/labels/alpha-classics">https://outhere-music.com/en/labels/alpha-classics</a></li>
<li>Kairos <a href="https://www.kairos-music.com/">https://www.kairos-music.com/</a></li>
<li>Neos <a href="https://neos-music.com/">https://neos-music.com/</a></li>
<li>Aeon <a href="https://outhere-music.com/en/labels/aeon">https://outhere-music.com/en/labels/aeon</a></li>
<li>OCORA <a href="http://editions.radiofrance.fr/category/collections/ocora/">http://editions.radiofrance.fr/category/collections/ocora/</a></li>
<li>Smithsonian Folkways <a href="https://smithsonianfolkways.bandcamp.com/">https://smithsonianfolkways.bandcamp.com/</a></li>
<li>Harmonia Mundi <a href="http://www.harmoniamundi.com/">http://www.harmoniamundi.com/</a></li>
<li>Naxos <a href="https://www.naxos.com/">https://www.naxos.com/</a></li>
<li>Karlrecords <a href="https://karlrecords.bandcamp.com/">https://karlrecords.bandcamp.com/</a></li>
<li>Mille Plateaux <a href="https://forceincmilleplateaux.bandcamp.com/">https://forceincmilleplateaux.bandcamp.com/</a></li>
<li>Tresor <a href="https://tresorberlin.com/">https://tresorberlin.com/</a></li>
<li>Auvidis-Naïve-Montaigne <a href="https://naiverecords.com/classique">https://naiverecords.com/classique</a></li>
<li>Cafe Songbook (on the Great American Songbook) <a href="http://greatamericansongbook.net/index.html">http://greatamericansongbook.net/index.html</a></li>
<li>MusicWeb International (music reviews) <a href="https://www.musicwebinternational.com/">https://www.musicwebinternational.com/</a></li>
<li>Dolmetsch <a href="https://www.dolmetsch.com/index.htm">https://www.dolmetsch.com/index.htm</a></li>
<li>LiederNet Archive <a href="https://www.lieder.net/">https://www.lieder.net/</a></li>
<li>IMSLP <a href="https://imslp.org/">https://imslp.org/</a></li>
<li>CPDL (Choral Music) <a href="https://www.cpdl.org/wiki/index.php/Main_Page">https://www.cpdl.org/wiki/index.php/Main_Page</a></li>
<li>Analogion (resources on the Psaltic Art also known as Psaltiki, Byzantine Chant or Byzantine Music) <a href="https://analogion.com/site/html/index.html">https://analogion.com/site/html/index.html</a></li>
<li>The Divine Music Project (contains more than 6000 pages of Byzantine music in Western and Byzantine notation in the style of chanting used on the Holy Mountain) <a href="https://stanthonysmonastery.org/pages/the-divine-music-project">https://stanthonysmonastery.org/pages/the-divine-music-project</a></li>
<li>Gamelan (collections of themed recordings curated by John Noise Manis) <a href="https://gamelan.gs/">https://gamelan.gs/</a></li>
</ul>
<h2 id="journals">Journals</h2>
<ul>
<li>SIGMA (Symmetry, Integrability and Geometry: Methods and Applications) <a href="https://www.emis.de/journals/SIGMA/">https://www.emis.de/journals/SIGMA/</a></li>
<li>Noncommutative Geometry <a href="https://ems.press/journals/jncg">https://ems.press/journals/jncg</a></li>
<li>Higher Structures <a href="https://higher-structures.math.cas.cz/">https://higher-structures.math.cas.cz/</a></li>
<li>Theory and Applications of Categories <a href="http://www.tac.mta.ca/tac/">http://www.tac.mta.ca/tac/</a></li>
<li>Cosmos and History <a href="https://www.cosmosandhistory.org/index.php/journal">https://www.cosmosandhistory.org/index.php/journal</a></li>
<li>Origins of Life and Evolution of Biospheres <a href="https://www.springer.com/journal/11084">https://www.springer.com/journal/11084</a></li>
<li>Numen <a href="https://brill.com/view/journals/nu/nu-overview.xml">https://brill.com/view/journals/nu/nu-overview.xml</a></li>
<li>Church Life Journal <a href="https://churchlifejournal.nd.edu/">https://churchlifejournal.nd.edu/</a></li>
<li>The Journal of CESNUR <a href="https://cesnur.net/">https://cesnur.net/</a></li>
<li>Reality Journal <a href="https://realityjournal.org/">https://realityjournal.org/</a></li>
<li>The Los Angeles Review <a href="https://losangelesreview.org/">https://losangelesreview.org/</a></li>
<li>The Paris Review <a href="https://www.theparisreview.org/">https://www.theparisreview.org/</a></li>
<li>CERN Document Server <a href="https://cds.cern.ch/?ln=en">https://cds.cern.ch/?ln=en</a></li>
<li>CERN Courier <a href="https://cerncourier.com/">https://cerncourier.com/</a></li>
<li>Behavioral and Brain Sciences <a href="https://www.cambridge.org/core/journals/behavioral-and-brain-sciences/latest-issue">https://www.cambridge.org/core/journals/behavioral-and-brain-sciences/latest-issue</a></li>
<li>Cybernetics & Human Knowing <a href="https://chkjournal.com/">https://chkjournal.com/</a></li>
<li>Principia Cybernetica Project (not really a journal) <a href="http://pespmc1.vub.ac.be/DEFAULT.html">http://pespmc1.vub.ac.be/DEFAULT.html</a></li>
<li>The Jugaad Project <a href="https://www.thejugaadproject.pub/">https://www.thejugaadproject.pub/</a></li>
</ul>
<h2 id="misc">Misc.</h2>
<ul>
<li>Based.Cooking <a href="https://based.cooking/">https://based.cooking/</a></li>
<li>LandChad.net <a href="https://landchad.net/">https://landchad.net/</a></li>
<li>InstallGentoo <a href="https://wiki.installgentoo.com/">https://wiki.installgentoo.com/</a></li>
</ul>
About
https://geistlib.xyz/about/
Mon, 20 Feb 2023 00:00:00 +0000https://geistlib.xyz/about/<h2 id="about">About</h2>
<p>I was more of a Dionysian in the Nietzchean sense before, and was born like that. Not that of an intellect and rationality, obssessed with art, music in particular, and literature. Now I quest after that which is Appolonian: crystalline, serene and celestial, either scintilating or shimmering, but above all pristine.</p>
<p>Telegram Group <a href="https://t.me/+-bOXXR5jjrRmYTI1">Link</a>. I might not accept if no email is sent to the <em>main</em> e-mail address given in the <a href="https://geistlib.xyz/contact/">contact</a> page. I talk freely on various topics, mainly about those related to the <a href="https://geistlib.xyz/categories/projects/">projects</a>. No chit-chat. You’d better not from twitter, not that I hate Musk but that I hate twitter users in general. Oh, Mastodon is the peak soyance. <strong>Accepting you doesn’t mean I want you to talk or I want to befriend you</strong>.</p>
<p>Some notes on the site. <del>I don’t bother to CSS the TOCs in a fancy way so they can be floating on the left/right of the page, for that functionality</del> it would be good to use a browser extension such as <a href="https://addons.mozilla.org/en-US/firefox/addon/skipto/?utm_source=addons.mozilla.org&utm_medium=referral&utm_content=search">Skip To Landmarks & Headings</a>. Check/uncheck the little sun floating on the upper right for the day/night theme. It is there because I found most of the available extensions horrible. While I do not hold that I have any qualification on the subjects I write about, I got some real training in mathematics/physics/logic/theoretical computer science, so the stuff will <em>not</em> be for casual readers, and I wish casual readers won’t inflate those seemingly mysterious abstract nonsenses into some actual gibberish, like Lacan did.</p>
<p>Interests:</p>
<ul>
<li>Mathematics and mathematical physics (Connes - Mackey - Weinstein - Segal - Hopkins - Moerdijk - Landsman)
<ul>
<li>Geometric representation theory, Poisson geometry, geometric and deformation quantization, abstract harmonic analysis</li>
<li>Noncommutative geometry, foliation and groupoid, Baum-Connes conjecture</li>
<li>Stacks and gerbes, elliptic cohomology and tmf</li>
<li>Logic of quantum mechanics, and its possible semantics</li>
</ul>
</li>
<li>Philosophy/Logic/Theoretical computer science (Lawvere - Dummett - Frege - Girard - Martin-Lof)
<ul>
<li>Categorical logic and practical foundations of mathematics</li>
<li>Intuitionistic logic and philosophy of time</li>
<li>Proof theory and categorical semantics of linear logic</li>
</ul>
</li>
<li>Philosophy/Religion/Anthropology/etc. (Jung - Teilhard de Chardin - Julian Jaynes - Merlin Donald - Eliade)
<ul>
<li>Heresies in the middle ages and modern Hermeticism/Gnostics, etc.</li>
<li>Evolution and emergence of human mind, problem of consciousness</li>
<li>Teilhard de Chardin- and Jung-style speculations in general</li>
</ul>
</li>
</ul>
<p>Languages:</p>
<ul>
<li>Natural:
<ul>
<li>English, Chinese, Korean, German, Spanish.</li>
<li>I can read Latin, French and Japanese, but only to some degree.</li>
</ul>
</li>
<li>Programming; not a programmer and do not want to be one. I do not code unless absolutely necessary and prefer dirty solutions for practical problems.
<ul>
<li>Gotos; meaning that I can read and write without problem, so communication is possible: <code>Lisp</code>, <code>Haskell</code>, <code>Julia</code>, <code>Wolfram</code>, <code>Shell</code>.</li>
<li>Nearly Forgot and never <em>really</em> used: <code>C</code>, <code>C++</code>, <code>Python</code>, <code>OCaml</code></li>
<li>Learning: <code>Agda</code></li>
</ul>
</li>
</ul>
<p>Life-long music lover. Focusing on Contemporary classical, free improvisation, glitch, data sonification, microsound, ethnic and old times music, but literally I listen to anything, maybe except for doujin and weeb techno and such. An indication of taste: Mozart, Beethoven, Ryoji Ikeda, Surgeon, Keith Jarrett (not Koln), Charles Lloyd, Giacinto Scelsi, Iannis Xenakis, Olivier Messiaen, Cesaria Evora. I was a metalhead in my teens and was a prog-fag fascinated by Indian classical and avan-garde jazz in my undergraduate years. <a href="https://files.geistlib.xyz/misc/improv/">Improvising</a> on piano.</p>
<p>Learning <code>Blender</code> and <code>Supercollider</code>.</p>
<h2 id="this-site">This Site</h2>
<p>The site is generated by <a href="https://gohugo.io/">Hugo</a>. Originally I used markdown but switched to <a href="https://orgmode.org/">Org-mode</a> for various reasons (e.g. conflict between markdown italics and TeX subscript, I started to use Agda). Some contents are encrypted with (a modified version of) <a href="https://github.com/Izumiko/hugo-encrypt">Hugo-Encrypt</a>, careful since the project has an awful doc, if you don’t check the source it can easily break your site.</p>
<p>Some javascripts are used. Changing theme utilizes javascript and is always loaded. When there is a TOC there’s a script for unfolding and folding. <code>mathjax</code> is javascript heavy, which, when loaded, will always be accompanied with scripts for enumerating definitions, theorems, etc. When there are encrypted contents present additional scripts will be loaded. Searching is done by a script (this is at least better than by done by the server).</p>
<p>No CDN or such is used. All the contents are self-served, but <code>nginx</code> <em>logging is enabled</em> since I don’t want some bots lurking around. You might trust me and believe that I won’t do anything suspicious with your IP and your user agent, but, really, use the onion service if you don’t want to leave any trace.</p>
<p>The theme is purely my own. It seems that accidently it became somehow New Yorker-like, but what I really cared about was (and will be) pure readability and functionality. Types used are <em>Perpetua</em> and <em>Gill Sans</em>, all by Eric Gill, together with <code>Iosevka</code>; for CJK scripts <code>Noto Serif CJK TC Light</code>, should the font be installed.</p>
<p>For the site structure, see the <a href="https://geistlib.xyz/archive/">archive</a>.</p>
Lawvere, Adjointness in Foundations
https://geistlib.xyz/lawvere-adjointness-in-foundations/
Fri, 17 Feb 2023 17:46:15 +0100https://geistlib.xyz/lawvere-adjointness-in-foundations/<h2 id="introduction">Introduction</h2>
<p>In this article Lawvere introduced cartesian closed category and hyperdoctrines fully in terms of adjoint functors, indicating that logical connectives and quantifiers are examples of the categorical notion of adjointness, but basically no proof on the precise relationship between formal logic and the introduced categories is given.</p>
<p>We now know that</p>
<ul>
<li>Locally cartesian closed category have as its internal language (extensional) Martin-Lof dependent type theory.</li>
<li>Locally cartesian closed $(\infty,1)$-category, corresponds to intentsional Martin-Lof dependent type theory.</li>
<li>Cartesian closed category, correspond to simply-typed lambda calculus.</li>
<li>Hyperdoctrine, corresponds to first order theory.</li>
</ul>
<p>For precise proofs, one should look at</p>
<ul>
<li>R. A. G. Seely, Hyperdoctrines, natural deduction, and the Beck condition, Zeitschrift für math. Logik und Grundlagen der Math., Band 29, 505-542 (1983)</li>
<li>Lambek, J. (1986). Cartesian closed categories and typed λ-calculi. In: Cousineau, G., Curien, PL., Robinet, B. (eds) Combinators and Functional Programming Languages. LITP 1985. Lecture Notes in Computer Science, vol 242. Springer, Berlin, Heidelberg. <a href="https://doi.org/10.1007/3-540-17184-3_44">https://doi.org/10.1007/3-540-17184-3_44</a></li>
<li>And the book <em>Practical Foundations of Mathematics</em> by Paul Taylor.</li>
</ul>
<p>The convention used by Lawvere that denote $A\xrightarrow{f} B \xrightarrow{g} C$ as $f\circ g$ will <em>not</em> be used. We stick to the usual $g\circ f$.</p>
<h2 id="adjunction">Adjunction</h2>
<h3 id="natural-transformations">Natural Transformations</h3>
<p>The <em>Godement multiplication</em> for natural transformations, is actually the <em>horizontal composition</em> of 2-morphisms. Given morphisms $\phi\in \mathcal{B}^\mathcal{A}$ and $\psi \in \mathcal{C}^\mathcal{B}$, the horizontal composition will be denoted by
$$
\psi \phi \in \mathcal{C}^\mathcal{A}.
$$
and vertical composition of $\phi,\phi’\in\mathcal{B}^\mathcal{A}$ will be denoted by
$$
\phi’\circ \phi \in \mathcal{B}^\mathcal{A}.
$$</p>
<p>Dealing with natural transformations can be really confusing. For <em>vertical compositions</em>, writing down the commutative squares of a composition $\psi,\phi \in \mathcal{B}^\mathcal{A}$,</p>
<p><svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="150.000000pt" height="75.000000pt" viewBox="0 0 1392.000000 471.000000"
preserveAspectRatio="xMidYMid meet">
<g transform="translate(0.000000,471.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M4321 4518 c-4 -13 -14 -46 -20 -75 -12 -48 -15 -52 -49 -58 -51 -10
-84 -29 -121 -70 -59 -68 -35 -161 50 -186 28 -9 38 -17 34 -27 -13 -35 -17
-92 -6 -92 13 0 15 5 30 65 10 37 15 42 53 53 122 33 179 126 128 209 -13 22
-32 36 -60 44 -22 7 -40 15 -40 18 0 3 7 31 15 61 8 30 15 61 15 68 0 20 -20
13 -29 -10z m50 -184 c41 -44 9 -129 -64 -169 -20 -11 -39 -17 -42 -14 -3 4 6
54 21 112 28 114 37 122 85 71z m-96 4 c-3 -13 -16 -62 -28 -110 l-22 -86 -32
13 c-61 26 -57 111 7 169 47 42 84 49 75 14z"/>
<path d="M9265 4528 c-2 -7 -24 -93 -49 -191 -24 -98 -46 -181 -49 -184 -11
-10 -49 10 -58 31 -8 17 -5 37 10 81 25 71 26 89 5 109 -35 35 -90 12 -123
-51 -14 -28 -14 -33 2 -33 6 0 20 14 29 30 17 30 44 48 55 37 3 -3 -4 -34 -16
-68 -12 -35 -21 -72 -21 -84 0 -34 28 -64 71 -75 37 -10 40 -14 34 -37 -17
-69 -18 -83 -3 -83 10 0 19 18 27 53 11 52 13 53 58 65 59 16 126 81 142 137
21 76 11 130 -24 123 -30 -5 -42 -34 -22 -56 32 -36 14 -97 -43 -146 -30 -24
-76 -43 -85 -34 -2 2 16 82 40 178 25 96 45 183 45 193 0 20 -18 23 -25 5z"/>
<path d="M4642 4215 c-65 -95 -100 -137 -118 -141 -43 -11 -26 -24 31 -24 50
0 73 12 43 23 -10 3 -9 11 4 33 15 27 22 29 81 32 62 3 65 2 71 -23 8 -30 1
-45 -20 -45 -8 0 -14 -4 -14 -10 0 -6 28 -10 65 -10 36 0 65 4 65 9 0 5 -8 11
-17 13 -15 3 -23 30 -43 138 -18 96 -30 136 -40 138 -9 1 -51 -50 -108 -133z
m88 36 c0 -10 3 -33 6 -50 l7 -31 -47 0 c-25 0 -46 2 -46 5 0 10 64 95 72 95
4 0 8 -8 8 -19z"/>
<path d="M9592 4215 c-65 -95 -100 -137 -118 -141 -43 -11 -26 -24 31 -24 50
0 73 12 43 23 -10 3 -9 11 4 33 15 27 22 29 81 32 62 3 65 2 71 -23 8 -30 1
-45 -20 -45 -8 0 -14 -4 -14 -10 0 -6 28 -10 65 -10 36 0 65 4 65 9 0 5 -8 11
-17 13 -15 3 -23 30 -43 138 -18 96 -30 136 -40 138 -9 1 -51 -50 -108 -133z
m88 36 c0 -10 3 -33 6 -50 l7 -31 -47 0 c-25 0 -46 2 -46 5 0 10 64 95 72 95
4 0 8 -8 8 -19z"/>
<path d="M2068 4209 c-98 -100 -143 -237 -135 -414 7 -156 41 -245 131 -342
21 -24 45 -43 52 -43 20 0 18 4 -23 57 -75 98 -106 207 -106 368 1 152 39 275
114 360 23 25 29 39 21 47 -7 7 -23 -3 -54 -33z"/>
<path d="M2837 4244 c-3 -3 14 -33 38 -65 53 -72 79 -139 95 -244 27 -179 -17
-373 -110 -478 -33 -38 -36 -47 -16 -47 21 0 101 91 129 147 39 77 57 161 57
270 0 108 -17 189 -55 268 -38 78 -120 167 -138 149z"/>
<path d="M6998 4209 c-98 -100 -143 -237 -135 -414 7 -156 41 -245 131 -342
21 -24 45 -43 52 -43 20 0 18 4 -23 57 -75 98 -106 207 -106 368 1 152 39 275
114 360 23 25 29 39 21 47 -7 7 -23 -3 -54 -33z"/>
<path d="M7767 4244 c-3 -3 14 -33 38 -65 53 -72 79 -139 95 -244 27 -179 -17
-373 -110 -478 -33 -38 -36 -47 -16 -47 21 0 101 91 129 147 39 77 57 161 57
270 0 108 -17 189 -55 268 -38 78 -120 167 -138 149z"/>
<path d="M11928 4209 c-98 -100 -143 -237 -135 -414 7 -156 41 -245 131 -342
21 -24 45 -43 52 -43 20 0 18 4 -23 57 -75 98 -106 207 -106 368 1 152 39 275
114 360 23 25 29 39 21 47 -7 7 -23 -3 -54 -33z"/>
<path d="M12697 4244 c-3 -3 14 -33 38 -65 53 -72 79 -139 95 -244 27 -179
-17 -373 -110 -478 -33 -38 -36 -47 -16 -47 21 0 101 91 129 147 39 77 57 161
57 270 0 108 -17 189 -55 268 -38 78 -120 167 -138 149z"/>
<path d="M2456 3956 c-86 -145 -165 -271 -175 -280 -9 -9 -32 -19 -49 -22 -18
-4 -32 -13 -32 -20 0 -11 20 -14 90 -14 73 0 90 3 90 15 0 8 -6 15 -14 15 -7
0 -19 6 -25 14 -9 10 -3 28 26 80 l38 66 101 0 101 0 7 -71 c8 -79 3 -89 -46
-89 -18 0 -28 -5 -28 -15 0 -12 19 -15 115 -15 96 0 115 3 115 15 0 10 -10 15
-30 15 -17 0 -33 6 -35 13 -5 12 -55 505 -55 538 0 12 -7 19 -18 19 -13 0 -63
-75 -176 -264z m139 -23 l7 -93 -87 0 c-48 0 -85 4 -83 8 2 5 35 61 73 126 69
115 70 116 77 84 3 -18 10 -75 13 -125z"/>
<path d="M7386 3956 c-86 -145 -165 -271 -175 -280 -9 -9 -32 -19 -49 -22 -18
-4 -32 -13 -32 -20 0 -11 20 -14 90 -14 73 0 90 3 90 15 0 8 -6 15 -14 15 -7
0 -19 6 -25 14 -9 10 -3 28 26 80 l38 66 101 0 101 0 7 -71 c8 -79 3 -89 -46
-89 -18 0 -28 -5 -28 -15 0 -12 19 -15 115 -15 96 0 115 3 115 15 0 10 -10 15
-30 15 -17 0 -33 6 -35 13 -5 12 -55 505 -55 538 0 12 -7 19 -18 19 -13 0 -63
-75 -176 -264z m139 -23 l7 -93 -87 0 c-48 0 -85 4 -83 8 2 5 35 61 73 126 69
115 70 116 77 84 3 -18 10 -75 13 -125z"/>
<path d="M12316 3956 c-86 -145 -165 -271 -175 -280 -9 -9 -32 -19 -49 -22
-18 -4 -32 -13 -32 -20 0 -11 20 -14 90 -14 73 0 90 3 90 15 0 8 -6 15 -14 15
-7 0 -19 6 -25 14 -9 10 -3 28 26 80 l38 66 101 0 101 0 7 -71 c8 -79 3 -89
-46 -89 -18 0 -28 -5 -28 -15 0 -12 19 -15 115 -15 96 0 115 3 115 15 0 10
-10 15 -30 15 -17 0 -33 6 -35 13 -5 12 -55 505 -55 538 0 12 -7 19 -18 19
-13 0 -63 -75 -176 -264z m139 -23 l7 -93 -87 0 c-48 0 -85 4 -83 8 2 5 35 61
73 126 69 115 70 116 77 84 3 -18 10 -75 13 -125z"/>
<path d="M1105 4180 c-11 -18 5 -30 41 -30 19 0 34 -2 34 -5 0 -14 -111 -453
-120 -472 -8 -19 -18 -23 -50 -23 -29 0 -40 -4 -40 -15 0 -13 22 -15 135 -15
113 0 135 2 135 15 0 11 -12 15 -44 15 -25 0 -47 4 -50 8 -2 4 8 57 23 117
l27 110 36 3 c20 2 51 -1 70 -6 31 -8 33 -11 30 -50 -2 -30 2 -42 11 -42 9 0
22 36 38 103 28 118 28 119 12 124 -6 2 -14 -10 -18 -26 -10 -47 -48 -71 -111
-71 -31 0 -54 5 -54 10 0 6 12 58 26 115 l26 105 107 0 c140 0 151 -7 151 -96
0 -48 3 -65 13 -62 12 4 39 175 30 191 -7 11 -451 9 -458 -3z"/>
<path d="M6035 4180 c-11 -18 5 -30 41 -30 19 0 34 -2 34 -5 0 -14 -111 -453
-120 -472 -8 -19 -18 -23 -50 -23 -29 0 -40 -4 -40 -15 0 -13 22 -15 135 -15
113 0 135 2 135 15 0 11 -12 15 -44 15 -25 0 -47 4 -50 8 -2 4 8 57 23 117
l27 110 36 3 c20 2 51 -1 70 -6 31 -8 33 -11 30 -50 -2 -30 2 -42 11 -42 9 0
22 36 38 103 28 118 28 119 12 124 -6 2 -14 -10 -18 -26 -10 -47 -48 -71 -111
-71 -31 0 -54 5 -54 10 0 6 12 58 26 115 l26 105 107 0 c140 0 151 -7 151 -96
0 -48 3 -65 13 -62 12 4 39 175 30 191 -7 11 -451 9 -458 -3z"/>
<path d="M10965 4180 c-11 -18 5 -30 41 -30 19 0 34 -2 34 -5 0 -14 -111 -453
-120 -472 -8 -19 -18 -23 -50 -23 -29 0 -40 -4 -40 -15 0 -13 22 -15 135 -15
113 0 135 2 135 15 0 11 -12 15 -44 15 -25 0 -47 4 -50 8 -2 4 8 57 23 117
l27 110 36 3 c20 2 51 -1 70 -6 31 -8 33 -11 30 -50 -2 -30 2 -42 11 -42 9 0
22 36 38 103 28 118 28 119 12 124 -6 2 -14 -10 -18 -26 -10 -47 -48 -71 -111
-71 -31 0 -54 5 -54 10 0 6 12 58 26 115 l26 105 107 0 c140 0 151 -7 151 -96
0 -48 3 -65 13 -62 12 4 39 175 30 191 -7 11 -451 9 -458 -3z"/>
<path d="M5290 4015 c0 -33 31 -95 71 -140 l31 -35 -956 0 c-949 0 -956 0
-956 -20 0 -20 7 -20 954 -20 l954 0 -30 -32 c-37 -39 -67 -103 -68 -140 0
-44 27 -34 50 19 30 67 64 109 115 139 53 31 57 49 13 68 -58 25 -118 97 -133
159 -10 36 -45 38 -45 2z"/>
<path d="M10220 4018 c1 -34 33 -99 70 -141 l32 -37 -956 0 c-949 0 -956 0
-956 -20 0 -20 7 -20 954 -20 l954 0 -28 -30 c-34 -36 -70 -111 -70 -145 0
-41 27 -29 50 22 30 67 64 109 115 139 53 31 57 49 12 67 -43 19 -110 95 -127
146 -15 46 -50 59 -50 19z"/>
<path d="M1573 3864 c-21 -10 -40 -32 -54 -61 -18 -38 -21 -57 -17 -142 4
-105 16 -136 64 -168 36 -23 108 -21 142 4 47 34 62 78 62 178 0 112 -20 163
-73 188 -44 21 -83 21 -124 1z m117 -42 c17 -21 20 -40 20 -139 0 -126 -13
-168 -54 -179 -71 -18 -96 27 -96 173 0 116 10 150 49 169 30 15 57 7 81 -24z"/>
<path d="M6557 3865 c-11 -7 -36 -17 -58 -20 -25 -4 -39 -12 -39 -22 0 -12 8
-13 40 -8 l40 7 0 -150 0 -150 -40 -7 c-75 -13 -40 -25 70 -25 110 0 145 12
70 25 l-40 7 0 179 c0 188 -2 196 -43 164z"/>
<path d="M11430 3862 c-22 -12 -40 -32 -49 -55 -18 -48 -9 -69 26 -65 33 4 44
35 19 54 -15 11 -14 14 10 33 59 46 134 9 134 -67 0 -47 -28 -88 -129 -187
-39 -38 -71 -73 -71 -77 0 -5 56 -8 125 -8 l124 0 6 38 c4 20 9 45 12 55 8 30
-22 19 -34 -13 -11 -30 -12 -30 -85 -29 l-73 0 50 42 c135 114 164 161 133
223 -32 65 -130 93 -198 56z"/>
<path d="M2010 2409 l0 -681 -44 39 c-43 38 -130 78 -147 67 -22 -13 -4 -34
55 -63 62 -30 102 -70 127 -125 17 -36 35 -32 58 13 26 50 94 108 144 123 41
12 57 32 39 50 -15 15 -91 -15 -148 -58 l-44 -34 0 675 c0 668 0 675 -20 675
-20 0 -20 -7 -20 -681z"/>
<path d="M6940 2960 c0 -123 1 -130 20 -130 19 0 20 7 20 130 0 123 -1 130
-20 130 -19 0 -20 -7 -20 -130z"/>
<path d="M11870 2409 l0 -681 -30 30 c-33 34 -102 70 -140 74 -43 5 -32 -31
15 -50 59 -23 109 -65 136 -117 13 -25 30 -45 36 -45 7 0 22 18 32 39 26 50
94 108 144 123 41 12 57 32 39 50 -15 15 -88 -14 -146 -58 l-46 -35 0 676 c0
668 0 675 -20 675 -20 0 -20 -7 -20 -681z"/>
<path d="M1080 2611 c-130 -136 -129 -382 2 -513 63 -63 82 -44 24 24 -103
120 -98 368 8 480 14 15 26 32 26 38 0 20 -24 9 -60 -29z"/>
<path d="M1610 2639 c0 -6 16 -29 35 -51 49 -58 69 -125 69 -233 0 -108 -20
-175 -69 -233 -57 -66 -41 -88 20 -27 132 133 132 387 0 520 -36 35 -55 44
-55 24z"/>
<path d="M12990 2611 c-130 -136 -129 -382 2 -513 63 -63 82 -44 24 24 -103
120 -98 368 8 480 14 15 26 32 26 38 0 20 -24 9 -60 -29z"/>
<path d="M13520 2639 c0 -6 16 -29 35 -51 49 -58 69 -125 69 -233 0 -108 -20
-175 -69 -233 -57 -66 -41 -88 20 -27 132 133 132 387 0 520 -36 35 -55 44
-55 24z"/>
<path d="M7035 2599 c-64 -71 -79 -118 -79 -244 0 -91 3 -118 21 -157 25 -54
89 -128 110 -128 10 0 4 12 -17 37 -62 70 -75 114 -75 248 0 134 13 178 75
248 21 25 27 37 17 37 -8 0 -31 -18 -52 -41z"/>
<path d="M7590 2604 c51 -58 72 -118 77 -220 7 -116 -18 -208 -72 -272 -24
-27 -31 -42 -22 -42 22 0 76 66 106 130 23 48 26 68 26 155 0 87 -3 107 -26
155 -30 64 -84 130 -106 130 -10 0 -5 -12 17 -36z"/>
<path d="M1416 2596 c-15 -14 -29 -45 -36 -80 -11 -53 -13 -56 -41 -56 -16 0
-29 -4 -29 -10 0 -5 13 -10 28 -10 l29 0 -27 -142 c-25 -136 -41 -188 -59
-188 -4 0 -6 14 -3 31 4 29 3 30 -24 27 -21 -2 -30 -9 -32 -26 -5 -33 15 -52
53 -52 41 0 77 35 94 89 9 31 51 242 51 258 0 2 18 3 40 3 22 0 40 5 40 10 0
6 -16 10 -36 10 l-36 0 7 47 c10 65 22 93 41 93 13 0 14 -3 4 -15 -16 -20 -6
-45 19 -45 35 0 47 52 17 72 -24 16 -77 8 -100 -16z"/>
<path d="M7380 2591 c-21 -21 -31 -42 -36 -80 -6 -50 -7 -51 -40 -51 -19 0
-34 -4 -34 -10 0 -5 14 -10 30 -10 17 0 30 -2 30 -3 0 -23 -53 -284 -62 -302
-6 -14 -20 -25 -30 -25 -16 0 -16 3 -6 20 17 27 -4 50 -30 34 -45 -29 11 -89
62 -66 37 17 63 76 87 204 11 62 23 119 25 126 2 6 19 12 39 12 19 0 35 5 35
10 0 6 -16 10 -36 10 -29 0 -34 3 -31 18 3 9 8 35 12 57 8 48 21 65 47 65 17
0 18 -2 4 -15 -16 -17 -11 -45 8 -45 35 0 48 53 17 70 -33 17 -61 11 -91 -19z"/>
<path d="M13326 2596 c-15 -14 -29 -45 -36 -80 -11 -53 -13 -56 -41 -56 -16 0
-29 -4 -29 -10 0 -5 13 -10 28 -10 l29 0 -27 -142 c-25 -136 -41 -188 -59
-188 -4 0 -6 14 -3 31 4 29 3 30 -24 27 -21 -2 -30 -9 -32 -26 -5 -33 15 -52
53 -52 41 0 77 35 94 89 9 31 51 242 51 258 0 2 18 3 40 3 22 0 40 5 40 10 0
6 -16 10 -36 10 l-36 0 7 47 c10 65 22 93 41 93 13 0 14 -3 4 -15 -16 -20 -6
-45 19 -45 35 0 47 52 17 72 -24 16 -77 8 -100 -16z"/>
<path d="M310 2595 c0 -9 9 -15 25 -15 14 0 25 -5 25 -11 0 -5 -14 -65 -31
-132 -52 -209 -46 -195 -79 -202 -59 -13 -28 -25 65 -25 93 0 124 12 65 25
-35 8 -35 7 -14 91 l17 65 51 -3 c49 -3 51 -4 49 -30 -3 -45 25 -34 37 15 6
23 15 56 20 74 4 17 5 34 2 37 -11 11 -21 6 -27 -14 -11 -36 -35 -50 -81 -50
-41 0 -45 2 -40 20 3 11 8 28 10 38 3 9 10 36 16 60 l11 42 79 0 c94 0 120
-16 120 -75 0 -19 4 -35 9 -35 12 0 21 37 21 93 l0 47 -175 0 c-149 0 -175 -2
-175 -15z"/>
<path d="M6272 2603 c-19 -8 -4 -23 24 -23 22 0 24 -3 17 -27 -3 -16 -23 -93
-43 -173 l-36 -145 -32 -3 c-18 -2 -32 -7 -32 -13 0 -5 43 -9 95 -9 57 0 95 4
95 10 0 6 -13 10 -29 10 -37 0 -42 8 -31 51 5 19 14 53 20 77 10 38 13 42 43
42 59 0 77 -10 77 -41 0 -47 16 -33 29 24 6 28 14 62 17 75 9 32 -8 27 -28 -8
-15 -27 -22 -30 -68 -30 -58 0 -58 1 -32 95 l17 60 86 3 c102 3 119 -7 119
-69 0 -21 4 -39 9 -39 11 0 25 115 16 129 -6 11 -307 15 -333 4z"/>
<path d="M12210 2595 c0 -9 9 -15 25 -15 14 0 25 -5 25 -11 0 -5 -14 -65 -31
-132 -52 -209 -46 -195 -79 -202 -59 -13 -28 -25 65 -25 93 0 124 12 65 25
-35 8 -35 7 -14 91 l17 65 51 -3 c49 -3 51 -4 49 -30 -3 -45 25 -34 37 15 6
23 15 56 20 74 4 17 5 34 2 37 -11 11 -21 6 -27 -14 -11 -36 -35 -50 -81 -50
-41 0 -45 2 -40 20 3 11 8 28 10 38 3 9 10 36 16 60 l11 42 79 0 c94 0 120
-16 120 -75 0 -19 4 -35 9 -35 12 0 21 37 21 93 l0 47 -175 0 c-149 0 -175 -2
-175 -15z"/>
<path d="M682 2394 c-34 -24 -52 -68 -52 -129 0 -64 20 -119 48 -134 26 -14
97 -14 123 -1 36 20 51 67 47 148 -3 69 -6 76 -36 103 -37 33 -93 39 -130 13z
m98 -24 c17 -17 20 -33 20 -103 0 -93 -15 -127 -56 -127 -48 0 -64 31 -64 125
0 72 3 88 20 105 11 11 29 20 40 20 11 0 29 -9 40 -20z"/>
<path d="M6680 2394 c-14 -7 -35 -13 -47 -14 -13 0 -23 -5 -23 -11 0 -8 12
-10 35 -6 l36 6 -3 -107 -3 -107 -32 -3 c-67 -7 -30 -22 52 -22 50 0 85 4 85
10 0 6 -13 10 -30 10 l-30 0 0 124 c0 69 -3 127 -8 130 -4 2 -18 -2 -32 -10z"/>
<path d="M12590 2397 c-13 -7 -31 -24 -40 -39 -13 -25 -13 -29 1 -43 24 -25
51 -9 47 29 -3 26 1 32 21 34 65 10 104 -34 77 -87 -8 -15 -46 -54 -85 -86
-39 -33 -71 -63 -71 -67 0 -4 47 -8 105 -8 104 0 105 0 105 24 0 13 3 31 6 40
4 10 1 16 -9 16 -8 0 -17 -9 -20 -20 -4 -17 -14 -20 -57 -20 -28 0 -49 3 -46
8 2 4 29 25 60 47 60 43 82 80 72 120 -13 52 -107 82 -166 52z"/>
<path d="M6940 1804 l0 -76 -30 30 c-55 56 -161 94 -168 61 -2 -11 17 -26 63
-48 64 -32 115 -83 130 -132 10 -31 33 -22 54 20 26 50 94 108 144 123 41 12
57 32 39 50 -15 15 -91 -15 -148 -58 l-44 -34 0 70 c0 63 -2 70 -20 70 -18 0
-20 -7 -20 -76z"/>
<path d="M2038 1269 c-98 -100 -143 -237 -135 -414 7 -156 41 -245 131 -342
21 -24 45 -43 52 -43 20 0 18 4 -23 57 -75 98 -106 207 -106 368 1 152 39 275
114 360 23 25 29 39 21 47 -7 7 -23 -3 -54 -33z"/>
<path d="M2867 1304 c-3 -3 14 -33 38 -65 53 -72 79 -139 95 -244 27 -179 -17
-373 -110 -478 -33 -38 -36 -47 -16 -47 21 0 101 91 129 147 39 77 57 161 57
270 0 108 -17 189 -55 268 -38 78 -120 167 -138 149z"/>
<path d="M6968 1269 c-98 -100 -143 -237 -135 -414 7 -156 41 -245 131 -342
21 -24 45 -43 52 -43 20 0 18 4 -23 57 -75 98 -106 207 -106 368 1 152 39 275
114 360 23 25 29 39 21 47 -7 7 -23 -3 -54 -33z"/>
<path d="M7797 1304 c-3 -3 14 -33 38 -65 53 -72 79 -139 95 -244 27 -179 -17
-373 -110 -478 -33 -38 -36 -47 -16 -47 21 0 101 91 129 147 39 77 57 161 57
270 0 108 -17 189 -55 268 -38 78 -120 167 -138 149z"/>
<path d="M11898 1269 c-98 -100 -143 -237 -135 -414 7 -156 41 -245 131 -342
21 -24 45 -43 52 -43 20 0 18 4 -23 57 -75 98 -106 207 -106 368 1 152 39 275
114 360 23 25 29 39 21 47 -7 7 -23 -3 -54 -33z"/>
<path d="M12727 1304 c-3 -3 14 -33 38 -65 53 -72 79 -139 95 -244 27 -179
-17 -373 -110 -478 -33 -38 -36 -47 -16 -47 21 0 101 91 129 147 39 77 57 161
57 270 0 108 -17 189 -55 268 -38 78 -120 167 -138 149z"/>
<path d="M1085 1240 c-11 -18 5 -30 41 -30 19 0 34 -2 34 -5 0 -14 -111 -453
-120 -472 -8 -19 -18 -23 -50 -23 -29 0 -40 -4 -40 -15 0 -13 22 -15 135 -15
113 0 135 2 135 15 0 11 -12 15 -44 15 -25 0 -47 4 -50 8 -2 4 8 57 23 117
l27 110 36 3 c20 2 51 -1 70 -6 31 -8 33 -11 30 -50 -2 -30 2 -42 11 -42 9 0
22 36 38 103 28 118 28 119 12 124 -6 2 -14 -10 -18 -26 -10 -47 -48 -71 -111
-71 -31 0 -54 5 -54 10 0 6 12 58 26 115 l26 105 107 0 c140 0 151 -7 151 -96
0 -48 3 -65 13 -62 12 4 39 175 30 191 -7 11 -451 9 -458 -3z"/>
<path d="M2310 1235 c0 -10 10 -15 29 -15 17 0 33 -5 36 -11 8 -12 -103 -467
-118 -486 -5 -7 -27 -13 -48 -13 -28 0 -39 -4 -39 -15 0 -13 27 -15 186 -15
221 0 251 7 315 70 76 76 74 167 -7 208 l-37 19 47 23 c87 42 122 134 74 195
-38 48 -71 55 -263 55 -149 0 -175 -2 -175 -15z m357 -49 c30 -35 27 -78 -7
-126 -35 -49 -88 -70 -175 -70 -47 0 -75 4 -75 11 0 17 39 172 50 198 10 22
14 23 96 20 80 -4 87 -6 111 -33z m-50 -252 c22 -22 25 -32 21 -73 -10 -102
-79 -150 -215 -151 -53 0 -83 4 -83 11 0 10 47 202 55 227 3 8 32 12 100 12
90 0 98 -2 122 -26z"/>
<path d="M6015 1240 c-11 -18 5 -30 41 -30 19 0 34 -2 34 -5 0 -14 -111 -453
-120 -472 -8 -19 -18 -23 -50 -23 -29 0 -40 -4 -40 -15 0 -13 22 -15 135 -15
113 0 135 2 135 15 0 11 -12 15 -44 15 -25 0 -47 4 -50 8 -2 4 8 57 23 117
l27 110 36 3 c20 2 51 -1 70 -6 31 -8 33 -11 30 -50 -2 -30 2 -42 11 -42 9 0
22 36 38 103 28 118 28 119 12 124 -6 2 -14 -10 -18 -26 -10 -47 -48 -71 -111
-71 -31 0 -54 5 -54 10 0 6 12 58 26 115 l26 105 107 0 c140 0 151 -7 151 -96
0 -48 3 -65 13 -62 12 4 39 175 30 191 -7 11 -451 9 -458 -3z"/>
<path d="M7250 1235 c0 -10 10 -15 29 -15 17 0 33 -5 36 -11 8 -12 -103 -467
-118 -486 -5 -7 -27 -13 -48 -13 -28 0 -39 -4 -39 -15 0 -13 27 -15 186 -15
221 0 251 7 315 70 76 76 74 167 -7 208 l-37 19 47 23 c87 42 122 134 74 195
-38 48 -71 55 -263 55 -149 0 -175 -2 -175 -15z m357 -49 c30 -35 27 -78 -7
-126 -35 -49 -88 -70 -175 -70 -47 0 -75 4 -75 11 0 17 39 172 50 198 10 22
14 23 96 20 80 -4 87 -6 111 -33z m-50 -252 c22 -22 25 -32 21 -73 -10 -102
-79 -150 -215 -151 -53 0 -83 4 -83 11 0 10 47 202 55 227 3 8 32 12 100 12
90 0 98 -2 122 -26z"/>
<path d="M10945 1240 c-11 -18 5 -30 41 -30 19 0 34 -2 34 -5 0 -14 -111 -453
-120 -472 -8 -19 -18 -23 -50 -23 -29 0 -40 -4 -40 -15 0 -13 22 -15 135 -15
113 0 135 2 135 15 0 11 -12 15 -44 15 -25 0 -47 4 -50 8 -2 4 8 57 23 117
l27 110 36 3 c20 2 51 -1 70 -6 31 -8 33 -11 30 -50 -2 -30 2 -42 11 -42 9 0
22 36 38 103 28 118 28 119 12 124 -6 2 -14 -10 -18 -26 -10 -47 -48 -71 -111
-71 -31 0 -54 5 -54 10 0 6 12 58 26 115 l26 105 107 0 c140 0 151 -7 151 -96
0 -48 3 -65 13 -62 12 4 39 175 30 191 -7 11 -451 9 -458 -3z"/>
<path d="M12180 1235 c0 -10 10 -15 29 -15 17 0 33 -5 36 -11 8 -12 -103 -467
-118 -486 -5 -7 -27 -13 -48 -13 -28 0 -39 -4 -39 -15 0 -13 27 -15 186 -15
221 0 251 7 315 70 76 76 74 167 -7 208 l-37 19 47 23 c87 42 122 134 74 195
-38 48 -71 55 -263 55 -149 0 -175 -2 -175 -15z m357 -49 c30 -35 27 -78 -7
-126 -35 -49 -88 -70 -175 -70 -47 0 -75 4 -75 11 0 17 39 172 50 198 10 22
14 23 96 20 80 -4 87 -6 111 -33z m-50 -252 c22 -22 25 -32 21 -73 -10 -102
-79 -150 -215 -151 -53 0 -83 4 -83 11 0 10 47 202 55 227 3 8 32 12 100 12
90 0 98 -2 122 -26z"/>
<path d="M5263 1095 c-8 -22 52 -140 84 -165 l26 -20 -932 0 c-924 0 -931 0
-931 -20 0 -20 7 -20 925 -20 l926 0 -30 -37 c-37 -47 -74 -129 -67 -149 10
-27 33 -14 50 29 22 57 78 123 127 148 21 10 39 23 39 28 0 5 -20 21 -44 35
-55 32 -93 77 -119 139 -20 47 -42 61 -54 32z"/>
<path d="M10194 1096 c-8 -21 36 -114 73 -153 l31 -33 -929 0 c-922 0 -929 0
-929 -20 0 -20 7 -20 925 -20 l925 0 -34 -44 c-43 -57 -73 -133 -58 -148 18
-18 38 -2 50 39 15 50 73 118 123 144 21 10 39 24 39 30 0 5 -15 18 -32 27
-52 27 -114 96 -130 143 -15 45 -43 63 -54 35z"/>
<path d="M1553 934 c-21 -10 -40 -32 -54 -61 -18 -38 -21 -57 -17 -142 4 -105
16 -136 64 -168 36 -23 108 -21 142 4 47 34 62 78 62 178 0 112 -20 163 -73
188 -44 21 -83 21 -124 1z m117 -42 c17 -21 20 -40 20 -139 0 -126 -13 -168
-54 -179 -71 -18 -96 27 -96 173 0 116 10 150 49 169 30 15 57 7 81 -24z"/>
<path d="M6537 935 c-11 -7 -36 -17 -58 -20 -25 -4 -39 -12 -39 -22 0 -12 8
-13 40 -8 l40 7 0 -150 0 -150 -40 -7 c-75 -13 -40 -25 70 -25 110 0 145 12
70 25 l-40 7 0 179 c0 188 -2 196 -43 164z"/>
<path d="M11400 932 c-22 -12 -40 -32 -49 -55 -18 -48 -9 -69 26 -65 33 4 44
35 19 54 -15 11 -14 14 10 33 59 46 134 9 134 -67 0 -47 -28 -88 -129 -187
-39 -38 -71 -73 -71 -77 0 -5 56 -8 125 -8 l124 0 6 38 c4 20 9 45 12 55 8 30
-22 19 -34 -13 -11 -30 -12 -30 -85 -29 l-73 0 50 42 c135 114 164 161 133
223 -32 65 -130 93 -198 56z"/>
<path d="M4311 678 c-4 -13 -14 -46 -20 -75 -12 -48 -15 -52 -49 -58 -51 -10
-84 -29 -121 -70 -59 -68 -35 -161 50 -186 28 -9 38 -17 34 -27 -13 -35 -17
-92 -6 -92 13 0 15 5 30 65 10 37 15 42 53 53 122 33 179 126 128 209 -13 22
-32 36 -60 44 -22 7 -40 15 -40 18 0 3 7 31 15 61 8 30 15 61 15 68 0 20 -20
13 -29 -10z m50 -184 c41 -44 9 -129 -64 -169 -20 -11 -39 -17 -42 -14 -3 4 6
54 21 112 28 114 37 122 85 71z m-96 4 c-3 -13 -16 -62 -28 -110 l-22 -86 -32
13 c-61 26 -57 111 7 169 47 42 84 49 75 14z"/>
<path d="M9255 688 c-2 -7 -24 -93 -49 -191 -24 -98 -46 -181 -49 -184 -11
-10 -49 10 -58 31 -8 17 -5 37 10 81 25 71 26 89 5 109 -35 35 -90 12 -123
-51 -14 -28 -14 -33 2 -33 6 0 20 14 29 30 17 30 44 48 55 37 3 -3 -4 -34 -16
-68 -12 -35 -21 -72 -21 -84 0 -34 28 -64 71 -75 37 -10 40 -14 34 -37 -17
-69 -18 -83 -3 -83 10 0 19 18 27 53 11 52 13 53 58 65 59 16 126 81 142 137
21 76 11 130 -24 123 -30 -5 -42 -34 -22 -56 32 -36 14 -97 -43 -146 -30 -24
-76 -43 -85 -34 -2 2 16 82 40 178 25 96 45 183 45 193 0 20 -18 23 -25 5z"/>
<path d="M4567 493 c-13 -12 -7 -23 13 -23 25 0 25 -11 -8 -135 -23 -86 -30
-100 -49 -103 -13 -2 -23 -8 -23 -13 0 -5 53 -9 121 -9 129 0 179 13 200 52
16 30 7 71 -19 84 -23 11 -23 11 13 33 31 18 36 25 33 54 -5 50 -49 67 -174
67 -55 0 -104 -3 -107 -7z m214 -33 c25 -14 24 -42 -2 -66 -28 -25 -155 -35
-146 -11 3 9 9 32 13 51 l6 36 55 0 c30 0 63 -5 74 -10z m-31 -123 c34 -17 36
-48 5 -77 -20 -19 -39 -25 -90 -28 -72 -5 -70 -7 -53 67 l11 51 51 0 c28 0 62
-6 76 -13z"/>
<path d="M9517 493 c-13 -12 -7 -23 13 -23 25 0 25 -11 -8 -135 -23 -86 -30
-100 -49 -103 -13 -2 -23 -8 -23 -13 0 -5 53 -9 121 -9 129 0 179 13 200 52
16 30 7 71 -19 84 -23 11 -23 11 13 33 31 18 36 25 33 54 -5 50 -49 67 -174
67 -55 0 -104 -3 -107 -7z m214 -33 c25 -14 24 -42 -2 -66 -28 -25 -155 -35
-146 -11 3 9 9 32 13 51 l6 36 55 0 c30 0 63 -5 74 -10z m-31 -123 c34 -17 36
-48 5 -77 -20 -19 -39 -25 -90 -28 -72 -5 -70 -7 -53 67 l11 51 51 0 c28 0 62
-6 76 -13z"/>
</g>
</svg></p>
<p>One can readily see that
$$
(\psi\circ\phi)_A = \psi_A \circ \phi_A.
$$</p>
<p>For <em>horizontal compositions</em>, the square
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="100.000000pt" height="80.000000pt" viewBox="0 0 1110.000000 484.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.16, written by Peter Selinger 2001-2019
</metadata>
<g transform="translate(0.000000,484.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M5820 4631 c-130 -136 -129 -382 2 -513 63 -63 82 -44 24 24 -103
120 -98 368 8 480 14 15 26 32 26 38 0 20 -24 9 -60 -29z"/>
<path d="M6460 4659 c0 -6 16 -29 35 -51 49 -58 69 -125 69 -233 0 -108 -20
-175 -69 -233 -57 -66 -41 -88 20 -27 132 133 132 387 0 520 -36 35 -55 44
-55 24z"/>
<path d="M6187 4538 c-147 -229 -171 -263 -204 -277 -18 -8 -33 -18 -33 -23 0
-4 32 -8 70 -8 40 0 70 4 70 10 0 6 -3 10 -7 10 -5 0 -14 4 -21 9 -10 6 -7 18
15 54 l28 47 82 0 83 0 0 -27 c0 -16 3 -38 6 -50 5 -17 0 -22 -25 -28 -58 -13
-31 -25 54 -25 82 0 112 13 62 26 -22 5 -25 14 -41 127 -36 259 -38 267 -52
267 -8 0 -47 -51 -87 -112z m69 -145 c-2 -2 -31 -3 -64 -1 l-61 3 52 83 52 82
13 -81 c7 -45 11 -84 8 -86z"/>
<path d="M4643 4623 c-55 -19 -141 -97 -164 -148 -24 -52 -24 -130 -1 -175 41
-77 184 -110 266 -62 28 17 35 18 40 6 13 -33 34 -12 46 48 12 52 17 62 42 72
49 18 30 26 -67 26 -57 0 -95 -4 -95 -10 0 -5 10 -10 23 -10 37 0 48 -13 41
-48 -18 -88 -170 -107 -228 -29 -41 55 -18 177 47 245 60 63 153 91 208 62 25
-14 49 -62 49 -100 0 -18 5 -30 13 -30 15 0 55 155 44 167 -4 3 -18 -4 -31
-16 l-24 -22 -33 20 c-41 25 -114 27 -176 4z"/>
<path d="M5521 4618 c-4 -13 -14 -46 -20 -75 -12 -48 -15 -52 -49 -58 -51 -10
-84 -29 -121 -70 -59 -68 -35 -161 50 -186 28 -9 38 -17 34 -27 -13 -35 -17
-92 -6 -92 13 0 15 5 30 65 10 37 15 42 53 53 122 33 179 126 128 209 -13 22
-32 36 -60 44 -22 7 -40 15 -40 18 0 3 7 31 15 61 8 30 15 61 15 68 0 20 -20
13 -29 -10z m50 -184 c41 -44 9 -129 -64 -169 -20 -11 -39 -17 -42 -14 -3 4 6
54 21 112 28 114 37 122 85 71z m-96 4 c-3 -13 -16 -62 -28 -110 l-22 -86 -32
13 c-61 26 -57 111 7 169 47 42 84 49 75 14z"/>
<path d="M5022 4414 c-34 -24 -52 -68 -52 -129 0 -64 20 -119 48 -134 26 -14
97 -14 123 -1 36 20 51 67 47 148 -3 69 -6 76 -36 103 -37 33 -93 39 -130 13z
m98 -24 c17 -17 20 -33 20 -103 0 -93 -15 -127 -56 -127 -48 0 -64 31 -64 125
0 72 3 88 20 105 11 11 29 20 40 20 11 0 29 -9 40 -20z"/>
<path d="M3148 4269 c-98 -100 -143 -237 -135 -414 7 -156 41 -245 131 -342
21 -24 45 -43 52 -43 20 0 18 4 -23 57 -75 98 -106 207 -106 368 1 152 39 275
114 360 23 25 29 39 21 47 -7 7 -23 -3 -54 -33z"/>
<path d="M3917 4304 c-3 -3 14 -33 38 -65 53 -72 79 -139 95 -244 27 -179 -17
-373 -110 -478 -33 -38 -36 -47 -16 -47 21 0 101 91 129 147 39 77 57 161 57
270 0 108 -17 189 -55 268 -38 78 -120 167 -138 149z"/>
<path d="M9058 4269 c-98 -100 -143 -237 -135 -414 7 -156 41 -245 131 -342
21 -24 45 -43 52 -43 20 0 18 4 -23 57 -75 98 -106 207 -106 368 1 152 39 275
114 360 23 25 29 39 21 47 -7 7 -23 -3 -54 -33z"/>
<path d="M9827 4304 c-3 -3 14 -33 38 -65 53 -72 79 -139 95 -244 27 -179 -17
-373 -110 -478 -33 -38 -36 -47 -16 -47 21 0 101 91 129 147 39 77 57 161 57
270 0 108 -17 189 -55 268 -38 78 -120 167 -138 149z"/>
<path d="M3536 4016 c-86 -145 -165 -271 -175 -280 -9 -9 -32 -19 -49 -22 -18
-4 -32 -13 -32 -20 0 -11 20 -14 90 -14 73 0 90 3 90 15 0 8 -6 15 -14 15 -7
0 -19 6 -25 14 -9 10 -3 28 26 80 l38 66 101 0 101 0 7 -71 c8 -79 3 -89 -46
-89 -18 0 -28 -5 -28 -15 0 -12 19 -15 115 -15 96 0 115 3 115 15 0 10 -10 15
-30 15 -17 0 -33 6 -35 13 -5 12 -55 505 -55 538 0 12 -7 19 -18 19 -13 0 -63
-75 -176 -264z m139 -23 l7 -93 -87 0 c-48 0 -85 4 -83 8 2 5 35 61 73 126 69
115 70 116 77 84 3 -18 10 -75 13 -125z"/>
<path d="M9446 4016 c-86 -145 -165 -271 -175 -280 -9 -9 -32 -19 -49 -22 -18
-4 -32 -13 -32 -20 0 -11 20 -14 90 -14 73 0 90 3 90 15 0 8 -6 15 -14 15 -7
0 -19 6 -25 14 -9 10 -3 28 26 80 l38 66 101 0 101 0 7 -71 c8 -79 3 -89 -46
-89 -18 0 -28 -5 -28 -15 0 -12 19 -15 115 -15 96 0 115 3 115 15 0 10 -10 15
-30 15 -17 0 -33 6 -35 13 -5 12 -55 505 -55 538 0 12 -7 19 -18 19 -13 0 -63
-75 -176 -264z m139 -23 l7 -93 -87 0 c-48 0 -85 4 -83 8 2 5 35 61 73 126 69
115 70 116 77 84 3 -18 10 -75 13 -125z"/>
<path d="M1329 4256 c-103 -28 -209 -120 -257 -224 -34 -74 -41 -174 -18 -237
20 -52 79 -108 131 -125 58 -19 164 -8 217 23 44 25 44 25 57 6 21 -34 34 -16
57 76 22 87 33 105 67 105 9 0 17 7 17 15 0 13 -17 15 -117 13 -82 -2 -118 -7
-121 -15 -2 -9 9 -13 35 -13 58 0 63 -7 50 -64 -13 -59 -50 -100 -103 -115
-57 -16 -85 -14 -134 12 -64 32 -93 90 -86 173 10 119 77 248 156 300 142 94
270 41 270 -111 0 -44 12 -65 26 -44 4 7 19 61 34 120 31 123 25 144 -25 85
l-31 -37 -24 26 c-41 43 -114 55 -201 31z"/>
<path d="M7229 4256 c-103 -28 -209 -120 -257 -224 -34 -74 -41 -174 -18 -237
20 -52 79 -108 131 -125 58 -19 164 -8 217 23 44 25 44 25 57 6 21 -34 34 -16
57 76 22 87 33 105 67 105 9 0 17 7 17 15 0 13 -17 15 -117 13 -82 -2 -118 -7
-121 -15 -2 -9 9 -13 35 -13 58 0 63 -7 50 -64 -13 -59 -50 -100 -103 -115
-57 -16 -85 -14 -134 12 -64 32 -93 90 -86 173 10 119 77 248 156 300 142 94
270 41 270 -111 0 -44 12 -65 26 -44 4 7 19 61 34 120 31 123 25 144 -25 85
l-31 -37 -24 26 c-41 43 -114 55 -201 31z"/>
<path d="M2185 4240 c-11 -18 5 -30 41 -30 19 0 34 -2 34 -5 0 -14 -111 -453
-120 -472 -8 -19 -18 -23 -50 -23 -29 0 -40 -4 -40 -15 0 -13 22 -15 135 -15
113 0 135 2 135 15 0 11 -12 15 -44 15 -25 0 -47 4 -50 8 -2 4 8 57 23 117
l27 110 36 3 c20 2 51 -1 70 -6 31 -8 33 -11 30 -50 -2 -30 2 -42 11 -42 9 0
22 36 38 103 28 118 28 119 12 124 -6 2 -14 -10 -18 -26 -10 -47 -48 -71 -111
-71 -31 0 -54 5 -54 10 0 6 12 58 26 115 l26 105 107 0 c140 0 151 -7 151 -96
0 -48 3 -65 13 -62 12 4 39 175 30 191 -7 11 -451 9 -458 -3z"/>
<path d="M8095 4240 c-11 -18 5 -30 41 -30 19 0 34 -2 34 -5 0 -14 -111 -453
-120 -472 -8 -19 -18 -23 -50 -23 -29 0 -40 -4 -40 -15 0 -13 22 -15 135 -15
113 0 135 2 135 15 0 11 -12 15 -44 15 -25 0 -47 4 -50 8 -2 4 8 57 23 117
l27 110 36 3 c20 2 51 -1 70 -6 31 -8 33 -11 30 -50 -2 -30 2 -42 11 -42 9 0
22 36 38 103 28 118 28 119 12 124 -6 2 -14 -10 -18 -26 -10 -47 -48 -71 -111
-71 -31 0 -54 5 -54 10 0 6 12 58 26 115 l26 105 107 0 c140 0 151 -7 151 -96
0 -48 3 -65 13 -62 12 4 39 175 30 191 -7 11 -451 9 -458 -3z"/>
<path d="M6324 4095 c-9 -23 25 -100 63 -145 l35 -40 -926 0 c-919 0 -926 0
-926 -20 0 -20 7 -20 931 -20 l932 0 -26 -20 c-28 -22 -87 -132 -87 -162 0
-11 7 -18 19 -18 13 0 24 14 36 46 19 51 82 119 132 146 38 20 36 40 -7 58
-46 19 -96 74 -121 134 -22 55 -44 71 -55 41z"/>
<path d="M1753 3934 c-21 -10 -40 -32 -54 -61 -18 -38 -21 -57 -17 -142 4
-105 16 -136 64 -168 36 -23 108 -21 142 4 47 34 62 78 62 178 0 112 -20 163
-73 188 -44 21 -83 21 -124 1z m117 -42 c17 -21 20 -40 20 -139 0 -126 -13
-168 -54 -179 -71 -18 -96 27 -96 173 0 116 10 150 49 169 30 15 57 7 81 -24z"/>
<path d="M2663 3934 c-21 -10 -40 -32 -54 -61 -18 -38 -21 -57 -17 -142 4
-105 16 -136 64 -168 36 -23 108 -21 142 4 47 34 62 78 62 178 0 112 -20 163
-73 188 -44 21 -83 21 -124 1z m117 -42 c17 -21 20 -40 20 -139 0 -126 -13
-168 -54 -179 -71 -18 -96 27 -96 173 0 116 10 150 49 169 30 15 57 7 81 -24z"/>
<path d="M7663 3934 c-21 -10 -40 -32 -54 -61 -18 -38 -21 -57 -17 -142 4
-105 16 -136 64 -168 36 -23 108 -21 142 4 47 34 62 78 62 178 0 112 -20 163
-73 188 -44 21 -83 21 -124 1z m117 -42 c17 -21 20 -40 20 -139 0 -126 -13
-168 -54 -179 -71 -18 -96 27 -96 173 0 116 10 150 49 169 30 15 57 7 81 -24z"/>
<path d="M8617 3935 c-11 -7 -36 -17 -58 -20 -25 -4 -39 -12 -39 -22 0 -12 8
-13 40 -8 l40 7 0 -150 0 -150 -40 -7 c-75 -13 -40 -25 70 -25 110 0 145 12
70 25 l-40 7 0 179 c0 188 -2 196 -43 164z"/>
<path d="M2580 2479 l0 -680 -42 34 c-74 60 -158 86 -158 48 0 -12 14 -23 43
-35 57 -21 113 -69 137 -117 27 -52 49 -50 79 6 27 51 65 83 134 113 48 21 58
44 23 50 -23 5 -117 -42 -150 -74 l-26 -27 0 682 c0 674 0 681 -20 681 -20 0
-20 -7 -20 -681z"/>
<path d="M8480 2480 l0 -679 -27 26 c-38 34 -120 75 -146 71 -38 -6 -30 -28
20 -49 67 -29 108 -62 139 -114 14 -25 32 -45 39 -45 7 0 25 20 39 45 31 52
72 85 139 114 50 21 58 43 20 49 -26 4 -108 -37 -145 -71 l-28 -26 0 679 0
680 -25 0 -25 0 0 -680z"/>
<path d="M1540 2681 c-130 -136 -129 -382 2 -513 63 -63 82 -44 24 24 -103
120 -98 368 8 480 14 15 26 32 26 38 0 20 -24 9 -60 -29z"/>
<path d="M2180 2709 c0 -6 16 -29 35 -51 49 -58 69 -125 69 -233 0 -108 -20
-175 -69 -233 -57 -66 -41 -88 20 -27 132 133 132 387 0 520 -36 35 -55 44
-55 24z"/>
<path d="M10070 2681 c-130 -136 -129 -382 2 -513 63 -63 82 -44 24 24 -103
120 -98 368 8 480 14 15 26 32 26 38 0 20 -24 9 -60 -29z"/>
<path d="M10700 2709 c0 -6 16 -29 35 -51 49 -58 69 -125 69 -233 0 -108 -20
-175 -69 -233 -57 -66 -41 -88 20 -27 132 133 132 387 0 520 -36 35 -55 44
-55 24z"/>
<path d="M1907 2588 c-147 -229 -171 -263 -204 -277 -18 -8 -33 -18 -33 -23 0
-4 32 -8 70 -8 40 0 70 4 70 10 0 6 -3 10 -7 10 -5 0 -14 4 -21 9 -10 6 -7 18
15 54 l28 47 82 0 83 0 0 -27 c0 -16 3 -38 6 -50 5 -17 0 -22 -25 -28 -58 -13
-31 -25 54 -25 82 0 112 13 62 26 -22 5 -25 14 -41 127 -36 259 -38 267 -52
267 -8 0 -47 -51 -87 -112z m69 -145 c-2 -2 -31 -3 -64 -1 l-61 3 52 83 52 82
13 -81 c7 -45 11 -84 8 -86z"/>
<path d="M10427 2588 c-147 -229 -171 -263 -204 -277 -18 -8 -33 -18 -33 -23
0 -4 32 -8 70 -8 40 0 70 4 70 10 0 6 -3 10 -7 10 -5 0 -14 4 -21 9 -10 6 -7
18 15 54 l28 47 82 0 83 0 0 -27 c0 -16 3 -38 6 -50 5 -17 0 -22 -25 -28 -58
-13 -31 -25 54 -25 82 0 112 13 62 26 -22 5 -25 14 -41 127 -36 259 -38 267
-52 267 -8 0 -47 -51 -87 -112z m69 -145 c-2 -2 -31 -3 -64 -1 l-61 3 52 83
52 82 13 -81 c7 -45 11 -84 8 -86z"/>
<path d="M475 2678 c-2 -7 -24 -93 -49 -191 -24 -98 -46 -181 -49 -184 -11
-10 -49 10 -58 31 -8 17 -5 37 10 81 25 71 26 89 5 109 -35 35 -90 12 -123
-51 -14 -28 -14 -33 2 -33 6 0 20 14 29 30 17 30 44 48 55 37 3 -3 -4 -34 -16
-68 -12 -35 -21 -72 -21 -84 0 -34 28 -64 71 -75 37 -10 40 -14 34 -37 -17
-69 -18 -83 -3 -83 10 0 19 18 27 53 11 52 13 53 58 65 59 16 126 81 142 137
21 76 11 130 -24 123 -30 -5 -42 -34 -22 -56 32 -36 14 -97 -43 -146 -30 -24
-76 -43 -85 -34 -2 2 16 82 40 178 25 96 45 183 45 193 0 20 -18 23 -25 5z"/>
<path d="M8995 2678 c-2 -7 -24 -93 -49 -191 -24 -98 -46 -181 -49 -184 -11
-10 -49 10 -58 31 -8 17 -5 37 10 81 25 71 26 89 5 109 -35 35 -90 12 -123
-51 -14 -28 -14 -33 2 -33 6 0 20 14 29 30 17 30 44 48 55 37 3 -3 -4 -34 -16
-68 -12 -35 -21 -72 -21 -84 0 -34 28 -64 71 -75 37 -10 40 -14 34 -37 -17
-69 -18 -83 -3 -83 10 0 19 18 27 53 11 52 13 53 58 65 59 16 126 81 142 137
21 76 11 130 -24 123 -30 -5 -42 -34 -22 -56 32 -36 14 -97 -43 -146 -30 -24
-76 -43 -85 -34 -2 2 16 82 40 178 25 96 45 183 45 193 0 20 -18 23 -25 5z"/>
<path d="M770 2665 c0 -9 9 -15 25 -15 14 0 25 -5 25 -11 0 -5 -14 -65 -31
-132 -52 -209 -46 -195 -79 -202 -59 -13 -28 -25 65 -25 93 0 124 12 65 25
-35 8 -35 7 -14 91 l17 65 51 -3 c49 -3 51 -4 49 -30 -3 -45 25 -34 37 15 6
23 15 56 20 74 4 17 5 34 2 37 -11 11 -21 6 -27 -14 -11 -36 -35 -50 -81 -50
-41 0 -45 2 -40 20 3 11 8 28 10 38 3 9 10 36 16 60 l11 42 79 0 c94 0 120
-16 120 -75 0 -19 4 -35 9 -35 12 0 21 37 21 93 l0 47 -175 0 c-149 0 -175 -2
-175 -15z"/>
<path d="M9290 2665 c0 -9 9 -15 25 -15 14 0 25 -5 25 -11 0 -5 -14 -65 -31
-132 -52 -209 -46 -195 -79 -202 -59 -13 -28 -25 65 -25 93 0 124 12 65 25
-35 8 -35 7 -14 91 l17 65 51 -3 c49 -3 51 -4 49 -30 -3 -45 25 -34 37 15 6
23 15 56 20 74 4 17 5 34 2 37 -11 11 -21 6 -27 -14 -11 -36 -35 -50 -81 -50
-41 0 -45 2 -40 20 3 11 8 28 10 38 3 9 10 36 16 60 l11 42 79 0 c94 0 120
-16 120 -75 0 -19 4 -35 9 -35 12 0 21 37 21 93 l0 47 -175 0 c-149 0 -175 -2
-175 -15z"/>
<path d="M1142 2454 c-34 -24 -52 -68 -52 -129 0 -64 20 -119 48 -134 26 -14
97 -14 123 -1 36 20 51 67 47 148 -3 69 -6 76 -36 103 -37 33 -93 39 -130 13z
m98 -24 c17 -17 20 -33 20 -103 0 -93 -15 -127 -56 -127 -48 0 -64 31 -64 125
0 72 3 88 20 105 11 11 29 20 40 20 11 0 29 -9 40 -20z"/>
<path d="M9683 2452 c-50 -19 -55 -32 -13 -32 l30 0 0 -105 0 -105 -30 0 c-16
0 -30 -4 -30 -10 0 -6 35 -10 85 -10 47 0 85 4 85 9 0 5 -12 11 -27 13 l-28 3
-3 128 c-3 140 0 135 -69 109z"/>
<path d="M3148 1339 c-98 -100 -143 -237 -135 -414 7 -156 41 -245 131 -342
21 -24 45 -43 52 -43 20 0 18 4 -23 57 -75 98 -106 207 -106 368 1 152 39 275
114 360 23 25 29 39 21 47 -7 7 -23 -3 -54 -33z"/>
<path d="M3917 1374 c-3 -3 14 -33 38 -65 53 -72 79 -139 95 -244 27 -179 -17
-373 -110 -478 -33 -38 -36 -47 -16 -47 21 0 101 91 129 147 39 77 57 161 57
270 0 108 -17 189 -55 268 -38 78 -120 167 -138 149z"/>
<path d="M9058 1339 c-98 -100 -143 -237 -135 -414 7 -156 41 -245 131 -342
21 -24 45 -43 52 -43 20 0 18 4 -23 57 -75 98 -106 207 -106 368 1 152 39 275
114 360 23 25 29 39 21 47 -7 7 -23 -3 -54 -33z"/>
<path d="M9827 1374 c-3 -3 14 -33 38 -65 53 -72 79 -139 95 -244 27 -179 -17
-373 -110 -478 -33 -38 -36 -47 -16 -47 21 0 101 91 129 147 39 77 57 161 57
270 0 108 -17 189 -55 268 -38 78 -120 167 -138 149z"/>
<path d="M3536 1086 c-86 -145 -165 -271 -175 -280 -9 -9 -32 -19 -49 -22 -18
-4 -32 -13 -32 -20 0 -11 20 -14 90 -14 73 0 90 3 90 15 0 8 -6 15 -14 15 -7
0 -19 6 -25 14 -9 10 -3 28 26 80 l38 66 101 0 101 0 7 -71 c8 -79 3 -89 -46
-89 -18 0 -28 -5 -28 -15 0 -12 19 -15 115 -15 96 0 115 3 115 15 0 10 -10 15
-30 15 -17 0 -33 6 -35 13 -5 12 -55 505 -55 538 0 12 -7 19 -18 19 -13 0 -63
-75 -176 -264z m139 -23 l7 -93 -87 0 c-48 0 -85 4 -83 8 2 5 35 61 73 126 69
115 70 116 77 84 3 -18 10 -75 13 -125z"/>
<path d="M9446 1086 c-86 -145 -165 -271 -175 -280 -9 -9 -32 -19 -49 -22 -18
-4 -32 -13 -32 -20 0 -11 20 -14 90 -14 73 0 90 3 90 15 0 8 -6 15 -14 15 -7
0 -19 6 -25 14 -9 10 -3 28 26 80 l38 66 101 0 101 0 7 -71 c8 -79 3 -89 -46
-89 -18 0 -28 -5 -28 -15 0 -12 19 -15 115 -15 96 0 115 3 115 15 0 10 -10 15
-30 15 -17 0 -33 6 -35 13 -5 12 -55 505 -55 538 0 12 -7 19 -18 19 -13 0 -63
-75 -176 -264z m139 -23 l7 -93 -87 0 c-48 0 -85 4 -83 8 2 5 35 61 73 126 69
115 70 116 77 84 3 -18 10 -75 13 -125z"/>
<path d="M1329 1326 c-103 -28 -209 -120 -257 -224 -34 -74 -41 -174 -18 -237
20 -52 79 -108 131 -125 58 -19 164 -8 217 23 44 25 44 25 57 6 21 -34 34 -16
57 76 22 87 33 105 67 105 9 0 17 7 17 15 0 13 -17 15 -117 13 -82 -2 -118 -7
-121 -15 -2 -9 9 -13 35 -13 58 0 63 -7 50 -64 -13 -59 -50 -100 -103 -115
-57 -16 -85 -14 -134 12 -64 32 -93 90 -86 173 10 119 77 248 156 300 142 94
270 41 270 -111 0 -44 12 -65 26 -44 4 7 19 61 34 120 31 123 25 144 -25 85
l-31 -37 -24 26 c-41 43 -114 55 -201 31z"/>
<path d="M7229 1326 c-103 -28 -209 -120 -257 -224 -34 -74 -41 -174 -18 -237
20 -52 79 -108 131 -125 58 -19 164 -8 217 23 44 25 44 25 57 6 21 -34 34 -16
57 76 22 87 33 105 67 105 9 0 17 7 17 15 0 13 -17 15 -117 13 -82 -2 -118 -7
-121 -15 -2 -9 9 -13 35 -13 58 0 63 -7 50 -64 -13 -59 -50 -100 -103 -115
-57 -16 -85 -14 -134 12 -64 32 -93 90 -86 173 10 119 77 248 156 300 142 94
270 41 270 -111 0 -44 12 -65 26 -44 4 7 19 61 34 120 31 123 25 144 -25 85
l-31 -37 -24 26 c-41 43 -114 55 -201 31z"/>
<path d="M2185 1310 c-11 -18 5 -30 41 -30 19 0 34 -2 34 -5 0 -14 -111 -453
-120 -472 -8 -19 -18 -23 -50 -23 -29 0 -40 -4 -40 -15 0 -13 22 -15 135 -15
113 0 135 2 135 15 0 11 -12 15 -44 15 -25 0 -47 4 -50 8 -2 4 8 57 23 117
l27 110 36 3 c20 2 51 -1 70 -6 31 -8 33 -11 30 -50 -2 -30 2 -42 11 -42 9 0
22 36 38 103 28 118 28 119 12 124 -6 2 -14 -10 -18 -26 -10 -47 -48 -71 -111
-71 -31 0 -54 5 -54 10 0 6 12 58 26 115 l26 105 107 0 c140 0 151 -7 151 -96
0 -48 3 -65 13 -62 12 4 39 175 30 191 -7 11 -451 9 -458 -3z"/>
<path d="M8095 1310 c-11 -18 5 -30 41 -30 19 0 34 -2 34 -5 0 -14 -111 -453
-120 -472 -8 -19 -18 -23 -50 -23 -29 0 -40 -4 -40 -15 0 -13 22 -15 135 -15
113 0 135 2 135 15 0 11 -12 15 -44 15 -25 0 -47 4 -50 8 -2 4 8 57 23 117
l27 110 36 3 c20 2 51 -1 70 -6 31 -8 33 -11 30 -50 -2 -30 2 -42 11 -42 9 0
22 36 38 103 28 118 28 119 12 124 -6 2 -14 -10 -18 -26 -10 -47 -48 -71 -111
-71 -31 0 -54 5 -54 10 0 6 12 58 26 115 l26 105 107 0 c140 0 151 -7 151 -96
0 -48 3 -65 13 -62 12 4 39 175 30 191 -7 11 -451 9 -458 -3z"/>
<path d="M6325 1169 c-15 -23 31 -125 76 -170 19 -19 2 -19 -906 -19 l-925 0
0 -25 0 -25 925 0 924 0 -26 -27 c-31 -34 -76 -127 -71 -150 6 -34 29 -24 50
24 29 66 70 116 115 139 21 10 41 23 45 28 10 15 -2 34 -26 40 -37 9 -104 82
-131 141 -23 54 -37 66 -50 44z"/>
<path d="M1807 995 c-11 -7 -36 -17 -58 -20 -25 -4 -39 -12 -39 -22 0 -12 8
-13 40 -8 l40 7 0 -150 0 -150 -40 -7 c-75 -13 -40 -25 70 -25 110 0 145 12
70 25 l-40 7 0 179 c0 188 -2 196 -43 164z"/>
<path d="M2663 994 c-21 -10 -40 -32 -54 -61 -18 -38 -21 -57 -17 -142 4 -105
16 -136 64 -168 36 -23 108 -21 142 4 47 34 62 78 62 178 0 112 -20 163 -73
188 -44 21 -83 21 -124 1z m117 -42 c17 -21 20 -40 20 -139 0 -126 -13 -168
-54 -179 -71 -18 -96 27 -96 173 0 116 10 150 49 169 30 15 57 7 81 -24z"/>
<path d="M7717 995 c-11 -7 -36 -17 -58 -20 -25 -4 -39 -12 -39 -22 0 -12 8
-13 40 -8 l40 7 0 -150 0 -150 -40 -7 c-75 -13 -40 -25 70 -25 110 0 145 12
70 25 l-40 7 0 179 c0 188 -2 196 -43 164z"/>
<path d="M8617 995 c-11 -7 -36 -17 -58 -20 -25 -4 -39 -12 -39 -22 0 -12 8
-13 40 -8 l40 7 0 -150 0 -150 -40 -7 c-75 -13 -40 -25 70 -25 110 0 145 12
70 25 l-40 7 0 179 c0 188 -2 196 -43 164z"/>
<path d="M5820 721 c-130 -136 -129 -382 2 -513 63 -63 82 -44 24 24 -103 120
-98 368 8 480 14 15 26 32 26 38 0 20 -24 9 -60 -29z"/>
<path d="M6460 749 c0 -6 16 -29 35 -51 49 -58 69 -125 69 -233 0 -108 -20
-175 -69 -233 -57 -66 -41 -88 20 -27 132 133 132 387 0 520 -36 35 -55 44
-55 24z"/>
<path d="M6187 628 c-147 -229 -171 -263 -204 -277 -18 -8 -33 -18 -33 -23 0
-4 32 -8 70 -8 40 0 70 4 70 10 0 6 -3 10 -7 10 -5 0 -14 4 -21 9 -10 6 -7 18
15 54 l28 47 82 0 83 0 0 -27 c0 -16 3 -38 6 -50 5 -17 0 -22 -25 -28 -58 -13
-31 -25 54 -25 82 0 112 13 62 26 -22 5 -25 14 -41 127 -36 259 -38 267 -52
267 -8 0 -47 -51 -87 -112z m69 -145 c-2 -2 -31 -3 -64 -1 l-61 3 52 83 52 82
13 -81 c7 -45 11 -84 8 -86z"/>
<path d="M4643 713 c-55 -19 -141 -97 -164 -148 -24 -52 -24 -130 -1 -175 41
-77 184 -110 266 -62 28 17 35 18 40 6 13 -33 34 -12 46 48 12 52 17 62 42 72
49 18 30 26 -67 26 -57 0 -95 -4 -95 -10 0 -5 10 -10 23 -10 37 0 48 -13 41
-48 -18 -88 -170 -107 -228 -29 -41 55 -18 177 47 245 60 63 153 91 208 62 25
-14 49 -62 49 -100 0 -18 5 -30 13 -30 15 0 55 155 44 167 -4 3 -18 -4 -31
-16 l-24 -22 -33 20 c-41 25 -114 27 -176 4z"/>
<path d="M5521 708 c-4 -13 -14 -46 -20 -75 -12 -48 -15 -52 -49 -58 -51 -10
-84 -29 -121 -70 -59 -68 -35 -161 50 -186 28 -9 38 -17 34 -27 -13 -35 -17
-92 -6 -92 13 0 15 5 30 65 10 37 15 42 53 53 122 33 179 126 128 209 -13 22
-32 36 -60 44 -22 7 -40 15 -40 18 0 3 7 31 15 61 8 30 15 61 15 68 0 20 -20
13 -29 -10z m50 -184 c41 -44 9 -129 -64 -169 -20 -11 -39 -17 -42 -14 -3 4 6
54 21 112 28 114 37 122 85 71z m-96 4 c-3 -13 -16 -62 -28 -110 l-22 -86 -32
13 c-61 26 -57 111 7 169 47 42 84 49 75 14z"/>
<path d="M5043 502 c-50 -19 -55 -32 -13 -32 l30 0 0 -105 0 -105 -30 0 c-16
0 -30 -4 -30 -10 0 -6 35 -10 85 -10 47 0 85 4 85 9 0 5 -12 11 -27 13 l-28 3
-3 128 c-3 140 0 135 -69 109z"/>
</g>
</svg>
automatically commute for $\phi\in\mathcal{B}^\mathcal{A}$ and $\psi\in\mathcal{C}^\mathcal{B}$. So the composition $\psi\phi \in \mathcal{C}^\mathcal{A}$ is more a “juxtaposition” when the attention is more on a single functor category, say $\mathcal{B}^\mathcal{A}$. In particular, two vertical compositions can be horizontally composited and vice versa,
$$
(\psi’ \circ \psi)(\phi’ \circ \phi) = (\psi’\phi’) \circ (\psi\phi).
$$
It is easy to see that horizontal compositions are associative. If two identity natural transformations $1_F \in \mathcal{B}^\mathcal{A}$ and $1_G \in \mathcal{C}^\mathcal{B}$ are composed, one gets the functor composition,
$$
1_G 1_F = 1_{GF}.
$$</p>
<p>Though Lawvere writes $F$ for $1_F$ sometimes, it can sometimes become extremely confusing. $1_F$ is the identity isomorphism on $F$ that takes $F$ to $F$, and when taking $F$ to be the associated identity natural isomorphism, we will always write $1_F$. $1_\mathcal{C}$ when $\mathcal{C}$ is a category is the identity functor. These can all be seen as identity isomorphisms on object $1_A$ in different categories.</p>
<p>Precomposition by a functor $F\in \mathcal{B}^{\mathcal{A}}$ takes a functor in $\mathcal{C}^\mathcal{B}$ to a functor in $\mathcal{C}^\mathcal{A}$. That is, there is a induced functor $\mathcal{C}^F:\mathcal{C}^\mathcal{B}\to\mathcal{C}^\mathcal{A}$. Similarly, postcomposition by $G\in\mathcal{C}^\mathcal{B}$ induces a functor $G^\mathcal{A}: \mathcal{B}^\mathcal{A}\to \mathcal{C}^\mathcal{A}$.</p>
<h3 id="adjoint">Adjoint</h3>
<p>While this is a familiar concept, it is still worth reviewing. Given two categories $\mathcal{C},\mathcal{D}$ that are an adjoint pair
$$
\mathcal{C}\dashv \mathcal{D}
$$
where the adjunction is realized by the functors
$$
F:\mathcal{C}\to \mathcal{D};\quad G:\mathcal{D}\to \mathcal{C},
$$
the unit and counits are the natural transformations (morphisms in $\mathcal{C}^\mathcal{C}$ and $\mathcal{D}^\mathcal{D}$)
$$
\eta: 1_{\mathcal{C}} \to GF;\quad \epsilon: FG \to 1_{\mathcal{D}}.
$$
The unit $\eta$ and counit $\epsilon$ satisfies the equations,
$$
1_F = (\epsilon 1_F) \circ (1_F \eta);\quad 1_G = (1_G \epsilon) \circ (\eta 1_G)
$$
which in diagrams are
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="150.000000pt" height="75.000000pt" viewBox="0 0 1103.000000 436.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.16, written by Peter Selinger 2001-2019
</metadata>
<g transform="translate(0.000000,436.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M6817 4185 c-11 -7 -36 -17 -58 -20 -25 -4 -39 -12 -39 -22 0 -12 8
-13 40 -8 l40 7 0 -150 0 -150 -40 -7 c-75 -13 -40 -25 70 -25 110 0 145 12
70 25 l-40 7 0 179 c0 188 -2 196 -43 164z"/>
<path d="M7511 4044 c-12 -15 -21 -30 -21 -35 0 -4 -3 -14 -6 -23 -4 -11 -1
-16 10 -16 8 0 18 11 22 24 3 14 14 32 25 42 31 28 33 -3 4 -116 -19 -74 -23
-106 -15 -114 21 -21 43 10 65 93 24 89 59 138 104 143 47 6 48 -20 7 -186
-21 -85 -35 -160 -31 -165 11 -18 35 -12 45 12 18 42 70 266 70 301 0 27 -6
40 -25 52 -30 19 -97 14 -123 -9 -15 -14 -19 -13 -41 4 -32 27 -66 24 -90 -7z"/>
<path d="M7100 4000 c0 -5 9 -10 20 -10 25 0 25 7 -8 -125 -23 -89 -32 -111
-48 -113 -10 -2 -23 -8 -28 -13 -6 -5 23 -9 72 -9 48 0 82 4 82 10 0 6 -11 10
-25 10 -28 0 -29 4 -14 66 10 40 14 44 43 44 40 0 58 -12 50 -33 -4 -11 -1
-17 9 -17 11 0 19 18 28 55 7 30 10 58 7 61 -3 3 -17 -6 -31 -20 -17 -17 -37
-26 -57 -26 -30 0 -31 1 -25 33 17 74 20 77 80 77 72 0 95 -12 95 -50 0 -20 5
-30 15 -30 10 0 15 10 15 34 0 19 3 41 6 50 5 14 -11 16 -140 16 -91 0 -146
-4 -146 -10z"/>
<path d="M1549 3866 c-103 -28 -209 -120 -257 -224 -34 -74 -41 -174 -18 -237
20 -52 79 -108 131 -125 58 -19 164 -8 217 23 44 25 44 25 57 6 21 -34 34 -16
57 76 22 87 33 105 67 105 9 0 17 7 17 15 0 13 -17 15 -117 13 -82 -2 -118 -7
-121 -15 -2 -9 9 -13 35 -13 58 0 63 -7 50 -64 -13 -59 -50 -100 -103 -115
-57 -16 -85 -14 -134 12 -64 32 -93 90 -86 173 10 119 77 248 156 300 142 94
270 41 270 -111 0 -44 12 -65 26 -44 4 7 19 61 34 120 31 123 25 144 -25 85
l-31 -37 -24 26 c-41 43 -114 55 -201 31z"/>
<path d="M9579 3866 c-103 -28 -209 -120 -257 -224 -34 -74 -41 -174 -18 -237
20 -52 79 -108 131 -125 58 -19 164 -8 217 23 44 25 44 25 57 6 21 -34 34 -16
57 76 22 87 33 105 67 105 9 0 17 7 17 15 0 13 -17 15 -117 13 -82 -2 -118 -7
-121 -15 -2 -9 9 -13 35 -13 58 0 63 -7 50 -64 -13 -59 -50 -100 -103 -115
-57 -16 -85 -14 -134 12 -64 32 -93 90 -86 173 10 119 77 248 156 300 142 94
270 41 270 -111 0 -44 12 -65 26 -44 4 7 19 61 34 120 31 123 25 144 -25 85
l-31 -37 -24 26 c-41 43 -114 55 -201 31z"/>
<path d="M5405 3850 c-11 -18 5 -30 41 -30 19 0 34 -2 34 -5 0 -14 -111 -453
-120 -472 -8 -19 -18 -23 -50 -23 -29 0 -40 -4 -40 -15 0 -13 22 -15 135 -15
113 0 135 2 135 15 0 11 -12 15 -44 15 -25 0 -47 4 -50 8 -2 4 8 57 23 117
l27 110 36 3 c20 2 51 -1 70 -6 31 -8 33 -11 30 -50 -2 -30 2 -42 11 -42 9 0
22 36 38 103 28 118 28 119 12 124 -6 2 -14 -10 -18 -26 -10 -47 -48 -71 -111
-71 -31 0 -54 5 -54 10 0 6 12 58 26 115 l26 105 107 0 c140 0 151 -7 151 -96
0 -48 3 -65 13 -62 12 4 39 175 30 191 -7 11 -451 9 -458 -3z"/>
<path d="M8765 3850 c-11 -18 5 -30 41 -30 19 0 34 -2 34 -5 0 -14 -111 -453
-120 -472 -8 -19 -18 -23 -50 -23 -29 0 -40 -4 -40 -15 0 -13 22 -15 135 -15
113 0 135 2 135 15 0 11 -12 15 -44 15 -25 0 -47 4 -50 8 -2 4 8 57 23 117
l27 110 36 3 c20 2 51 -1 70 -6 31 -8 33 -11 30 -50 -2 -30 2 -42 11 -42 9 0
22 36 38 103 28 118 28 119 12 124 -6 2 -14 -10 -18 -26 -10 -47 -48 -71 -111
-71 -31 0 -54 5 -54 10 0 6 12 58 26 115 l26 105 107 0 c140 0 151 -7 151 -96
0 -48 3 -65 13 -62 12 4 39 175 30 191 -7 11 -451 9 -458 -3z"/>
<path d="M10065 3850 c-11 -18 5 -30 41 -30 19 0 34 -2 34 -5 0 -14 -111 -453
-120 -472 -8 -19 -18 -23 -50 -23 -29 0 -40 -4 -40 -15 0 -13 22 -15 135 -15
113 0 135 2 135 15 0 11 -12 15 -44 15 -25 0 -47 4 -50 8 -2 4 8 57 23 117
l27 110 36 3 c20 2 51 -1 70 -6 31 -8 33 -11 30 -50 -2 -30 2 -42 11 -42 9 0
22 36 38 103 28 118 28 119 12 124 -6 2 -14 -10 -18 -26 -10 -47 -48 -71 -111
-71 -31 0 -54 5 -54 10 0 6 12 58 26 115 l26 105 107 0 c140 0 151 -7 151 -96
0 -48 3 -65 13 -62 12 4 39 175 30 191 -7 11 -451 9 -458 -3z"/>
<path d="M8010 3703 c0 -29 44 -115 78 -150 l30 -33 -929 0 c-922 0 -929 0
-929 -20 0 -20 7 -20 926 -20 l925 0 -34 -42 c-38 -47 -73 -130 -62 -147 13
-23 33 -10 49 32 22 57 78 123 127 148 21 10 39 24 39 30 0 5 -15 18 -32 27
-52 27 -114 96 -130 143 -10 32 -21 45 -36 47 -16 2 -22 -2 -22 -15z"/>
<path d="M6255 3039 c-4 -12 -3 -24 3 -28 5 -3 573 -381 1261 -840 l1252 -835
-51 -13 c-50 -13 -140 -66 -140 -82 0 -5 6 -13 13 -19 9 -8 28 0 71 26 53 33
68 37 138 41 43 2 78 7 78 11 0 4 -12 33 -26 65 -23 49 -26 66 -20 114 12 108
12 106 -8 106 -26 0 -38 -49 -34 -137 2 -37 2 -68 0 -68 -1 0 -569 378 -1262
840 -693 462 -1262 840 -1264 840 -3 0 -8 -10 -11 -21z"/>
<path d="M2243 3034 c-3 -8 -2 -19 3 -23 5 -4 573 -383 1263 -842 1195 -795
1252 -834 1220 -840 -71 -13 -159 -65 -159 -95 0 -22 37 -17 73 10 45 33 91
46 163 46 35 0 64 4 64 9 0 5 -12 34 -26 66 -26 57 -28 87 -12 200 2 12 -4 21
-14 23 -26 5 -40 -40 -39 -130 l1 -77 -1254 834 c-689 459 -1258 835 -1265
835 -6 0 -14 -7 -18 -16z"/>
<path d="M1530 2299 l0 -682 -27 28 c-35 34 -115 75 -148 75 -41 0 -30 -29 20
-50 67 -29 109 -65 136 -115 28 -52 51 -57 69 -15 18 42 71 94 124 118 25 12
50 22 56 22 5 0 10 9 10 20 0 40 -93 12 -163 -50 l-37 -32 0 681 c0 674 0 681
-20 681 -20 0 -20 -7 -20 -681z"/>
<path d="M9550 2299 l0 -682 -27 28 c-35 34 -115 75 -148 75 -41 0 -30 -29 20
-50 67 -29 109 -65 136 -115 28 -52 51 -58 68 -17 18 42 75 97 126 121 25 12
49 21 55 21 5 0 10 9 10 20 0 40 -93 12 -163 -50 l-37 -32 0 681 c0 674 0 681
-20 681 -20 0 -20 -7 -20 -681z"/>
<path d="M3907 2825 c-11 -7 -36 -17 -58 -20 -25 -4 -39 -12 -39 -22 0 -12 8
-13 40 -8 l40 7 0 -150 0 -150 -40 -7 c-75 -13 -40 -25 70 -25 110 0 145 12
70 25 l-40 7 0 179 c0 188 -2 196 -43 164z"/>
<path d="M4288 2646 c-95 -26 -160 -94 -162 -169 -2 -89 60 -133 173 -123 36
3 78 6 92 6 23 1 28 7 38 45 9 34 16 45 31 45 11 0 20 7 20 15 0 12 -15 15
-75 15 -60 0 -75 -3 -75 -15 0 -10 10 -15 29 -15 27 0 29 -2 22 -27 -15 -56
-129 -66 -178 -17 -73 73 31 224 153 224 33 0 76 -40 77 -73 3 -41 25 -32 37
16 6 23 13 49 16 59 7 25 -11 30 -31 8 -15 -17 -20 -17 -39 -5 -33 21 -77 25
-128 11z"/>
<path d="M697 2485 c-11 -7 -36 -17 -58 -20 -25 -4 -39 -12 -39 -22 0 -12 8
-13 40 -8 l40 7 0 -150 0 -150 -40 -7 c-75 -13 -40 -25 70 -25 110 0 145 12
70 25 l-40 7 0 179 c0 188 -2 196 -43 164z"/>
<path d="M10197 2475 c-11 -7 -36 -17 -58 -20 -25 -4 -39 -12 -39 -22 0 -12 8
-13 40 -8 l40 7 0 -150 0 -150 -40 -7 c-75 -13 -40 -25 70 -25 110 0 145 12
70 25 l-40 7 0 179 c0 188 -2 196 -43 164z"/>
<path d="M231 2344 c-12 -15 -21 -30 -21 -35 0 -4 -3 -14 -6 -23 -4 -11 -1
-16 10 -16 8 0 18 11 22 24 3 14 14 32 25 42 31 28 33 -3 4 -116 -19 -74 -23
-106 -15 -114 21 -21 43 10 65 93 24 89 59 138 104 143 47 6 48 -20 7 -186
-21 -85 -35 -160 -31 -165 11 -18 35 -12 45 12 18 42 70 266 70 301 0 27 -6
40 -25 52 -30 19 -97 14 -123 -9 -15 -14 -19 -13 -41 4 -32 27 -66 24 -90 -7z"/>
<path d="M9895 2336 c-85 -37 -114 -143 -57 -207 35 -39 102 -50 150 -25 18 9
32 21 32 26 0 14 -12 13 -53 -5 -63 -26 -118 19 -102 82 5 21 11 23 70 23 37
0 65 4 65 10 0 6 -27 10 -60 10 -35 0 -60 4 -60 10 0 25 49 59 94 65 25 4 46
11 46 16 0 14 -91 10 -125 -5z"/>
<path d="M1078 2316 c-95 -26 -160 -94 -162 -169 -2 -89 60 -133 173 -123 36
3 78 6 92 6 23 1 28 7 38 45 9 34 16 45 31 45 11 0 20 7 20 15 0 12 -15 15
-75 15 -60 0 -75 -3 -75 -15 0 -10 10 -15 29 -15 27 0 29 -2 22 -27 -15 -56
-129 -66 -178 -17 -73 73 31 224 153 224 33 0 76 -40 77 -73 3 -41 25 -32 37
16 6 23 13 49 16 59 7 25 -11 30 -31 8 -15 -17 -20 -17 -39 -5 -33 21 -77 25
-128 11z"/>
<path d="M10480 2280 c0 -5 9 -10 20 -10 25 0 25 7 -8 -125 -23 -89 -32 -111
-48 -113 -10 -2 -23 -8 -28 -13 -6 -5 23 -9 72 -9 48 0 82 4 82 10 0 6 -11 10
-25 10 -28 0 -29 4 -14 66 10 40 14 44 43 44 40 0 58 -12 50 -33 -4 -11 -1
-17 9 -17 11 0 19 18 28 55 7 30 10 58 7 61 -3 3 -17 -6 -31 -20 -17 -17 -37
-26 -57 -26 -30 0 -31 1 -25 33 17 74 20 77 80 77 72 0 95 -12 95 -50 0 -20 5
-30 15 -30 10 0 15 10 15 34 0 19 3 41 6 50 5 14 -11 16 -140 16 -91 0 -146
-4 -146 -10z"/>
<path d="M6727 1975 c-11 -7 -36 -17 -58 -20 -25 -4 -39 -12 -39 -22 0 -12 8
-13 40 -8 l40 7 0 -150 0 -150 -40 -7 c-75 -13 -40 -25 70 -25 110 0 145 12
70 25 l-40 7 0 179 c0 188 -2 196 -43 164z"/>
<path d="M7010 1780 c0 -5 9 -10 20 -10 25 0 25 7 -8 -125 -23 -89 -32 -111
-48 -113 -10 -2 -23 -8 -28 -13 -6 -5 23 -9 72 -9 48 0 82 4 82 10 0 6 -11 10
-25 10 -28 0 -29 4 -14 66 10 40 14 44 43 44 40 0 58 -12 50 -33 -4 -11 -1
-17 9 -17 11 0 19 18 28 55 7 30 10 58 7 61 -3 3 -17 -6 -31 -20 -17 -17 -37
-26 -57 -26 -30 0 -31 1 -25 33 17 74 20 77 80 77 72 0 95 -12 95 -50 0 -20 5
-30 15 -30 10 0 15 10 15 34 0 19 3 41 6 50 5 14 -11 16 -140 16 -91 0 -146
-4 -146 -10z"/>
<path d="M899 1196 c-103 -28 -209 -120 -257 -224 -34 -74 -41 -174 -18 -237
20 -52 79 -108 131 -125 58 -19 164 -8 217 23 44 25 44 25 57 6 21 -34 34 -16
57 76 22 87 33 105 67 105 9 0 17 7 17 15 0 13 -17 15 -117 13 -82 -2 -118 -7
-121 -15 -2 -9 9 -13 35 -13 58 0 63 -7 50 -64 -13 -59 -50 -100 -103 -115
-57 -16 -85 -14 -134 12 -64 32 -93 90 -86 173 10 119 77 248 156 300 142 94
270 41 270 -111 0 -44 12 -65 26 -44 4 7 19 61 34 120 31 123 25 144 -25 85
l-31 -37 -24 26 c-41 43 -114 55 -201 31z"/>
<path d="M2209 1196 c-103 -28 -209 -120 -257 -224 -34 -74 -41 -174 -18 -237
20 -52 79 -108 131 -125 58 -19 164 -8 217 23 44 25 44 25 57 6 21 -34 34 -16
57 76 22 87 33 105 67 105 9 0 17 7 17 15 0 13 -17 15 -117 13 -82 -2 -118 -7
-121 -15 -2 -9 9 -13 35 -13 58 0 63 -7 50 -64 -13 -59 -50 -100 -103 -115
-57 -16 -85 -14 -134 12 -64 32 -93 90 -86 173 10 119 77 248 156 300 142 94
270 41 270 -111 0 -44 12 -65 26 -44 4 7 19 61 34 120 31 123 25 144 -25 85
l-31 -37 -24 26 c-41 43 -114 55 -201 31z"/>
<path d="M5569 1196 c-103 -28 -209 -120 -257 -224 -34 -74 -41 -174 -18 -237
20 -52 79 -108 131 -125 58 -19 164 -8 217 23 44 25 44 25 57 6 21 -34 34 -16
57 76 22 87 33 105 67 105 9 0 17 7 17 15 0 13 -17 15 -117 13 -82 -2 -118 -7
-121 -15 -2 -9 9 -13 35 -13 58 0 63 -7 50 -64 -13 -59 -50 -100 -103 -115
-57 -16 -85 -14 -134 12 -64 32 -93 90 -86 173 10 119 77 248 156 300 142 94
270 41 270 -111 0 -44 12 -65 26 -44 4 7 19 61 34 120 31 123 25 144 -25 85
l-31 -37 -24 26 c-41 43 -114 55 -201 31z"/>
<path d="M1395 1180 c-11 -18 5 -30 41 -30 19 0 34 -2 34 -5 0 -14 -111 -453
-120 -472 -8 -19 -18 -23 -50 -23 -29 0 -40 -4 -40 -15 0 -13 22 -15 135 -15
113 0 135 2 135 15 0 11 -12 15 -44 15 -25 0 -47 4 -50 8 -2 4 8 57 23 117
l27 110 36 3 c20 2 51 -1 70 -6 31 -8 33 -11 30 -50 -2 -30 2 -42 11 -42 9 0
22 36 38 103 28 118 28 119 12 124 -6 2 -14 -10 -18 -26 -10 -47 -48 -71 -111
-71 -31 0 -54 5 -54 10 0 6 12 58 26 115 l26 105 107 0 c140 0 151 -7 151 -96
0 -48 3 -65 13 -62 12 4 39 175 30 191 -7 11 -451 9 -458 -3z"/>
<path d="M9415 1180 c-11 -18 5 -30 41 -30 19 0 34 -2 34 -5 0 -14 -111 -453
-120 -472 -8 -19 -18 -23 -50 -23 -29 0 -40 -4 -40 -15 0 -13 22 -15 135 -15
113 0 135 2 135 15 0 11 -12 15 -44 15 -25 0 -47 4 -50 8 -2 4 8 57 23 117
l27 110 36 3 c20 2 51 -1 70 -6 31 -8 33 -11 30 -50 -2 -30 2 -42 11 -42 9 0
22 36 38 103 28 118 28 119 12 124 -6 2 -14 -10 -18 -26 -10 -47 -48 -71 -111
-71 -31 0 -54 5 -54 10 0 6 12 58 26 115 l26 105 107 0 c140 0 151 -7 151 -96
0 -48 3 -65 13 -62 12 4 39 175 30 191 -7 11 -451 9 -458 -3z"/>
<path d="M4650 1033 c0 -29 44 -115 78 -150 l30 -33 -929 0 c-922 0 -929 0
-929 -20 0 -20 7 -20 926 -20 l925 0 -33 -42 c-41 -52 -73 -121 -65 -142 12
-30 34 -16 52 31 22 56 76 118 127 144 21 11 38 24 38 30 0 5 -15 18 -32 27
-52 27 -114 96 -130 143 -10 32 -21 45 -36 47 -16 2 -22 -2 -22 -15z"/>
<path d="M3497 635 c-11 -7 -36 -17 -58 -20 -25 -4 -39 -12 -39 -22 0 -12 8
-13 40 -8 l40 7 0 -150 0 -150 -40 -7 c-75 -13 -40 -25 70 -25 110 0 145 12
70 25 l-40 7 0 179 c0 188 -2 196 -43 164z"/>
<path d="M4275 496 c-85 -37 -114 -143 -57 -207 35 -39 102 -50 150 -25 18 9
32 21 32 26 0 14 -12 13 -53 -5 -63 -26 -118 19 -102 82 5 21 11 23 70 23 37
0 65 4 65 10 0 6 -27 10 -60 10 -35 0 -60 4 -60 10 0 25 49 59 94 65 25 4 46
11 46 16 0 14 -91 10 -125 -5z"/>
<path d="M3878 466 c-95 -26 -160 -94 -162 -169 -2 -89 60 -133 173 -123 36 3
78 6 92 6 23 1 28 7 38 45 9 34 16 45 31 45 11 0 20 7 20 15 0 12 -15 15 -75
15 -60 0 -75 -3 -75 -15 0 -10 10 -15 29 -15 27 0 29 -2 22 -27 -15 -56 -129
-66 -178 -17 -73 73 31 224 153 224 33 0 76 -40 77 -73 3 -41 25 -32 37 16 6
23 13 49 16 59 7 25 -11 30 -31 8 -15 -17 -20 -17 -39 -5 -33 21 -77 25 -128
11z"/>
</g>
</svg></p>
<p>The functors $F$ and $G$ are adjoint to each other iff there is a bijection natural in objects $C,D$,
$$
\phi: \operatorname{Hom}_\mathcal{D}(FC,D)\cong \operatorname{Hom}_\mathcal{C}(C,GD).
$$
The component of the unit $\eta_{C}$ is the image of $\phi$ on the morphism $1_{FC}: FC\to FC$ (take $D$ to be $FC$ and choose $1_{FC}$ in the domain set). The counit $\epsilon$ can be identified by considering
$$
\phi^{-1}: \operatorname{Hom}_\mathcal{C}(C,GD) \cong \operatorname{Hom}_\mathcal{D}(FC,D),
$$
taking $C=GD$, choosing $1_{GD}$ in the domain set; $\phi^{-1}(1_{GD}) = \epsilon_D$. By naturality these component morphisms assemble into natural transformations that satisfies the conditions for adjunctions.</p>
<p>There is another characterization of adjunction, which is by means of universal morphisms. For the functor $F:\mathcal{C}\to \mathcal{D}$ to be a left adjoint, for each $C\in\mathcal{C}$, there needs to be an object $G(D)$ in $\mathcal{D}$ and a morphism $\epsilon_D:FG(D)\to D$ s.t. for every $C\in\mathcal{C}$ and every $f:F(C)\to D$, there is a unique $g:C\to G(D)$ s.t. $\epsilon_D\circ F(g)=f$. $G$ can be shown to be a functor.</p>
<p>From the bijection we can see that this unique $g$ is determined by
$$
\begin{equation}\label{adj}
\phi^{-1}(g) = \epsilon_D\circ F(g) = f; \quad \phi(f) = G(f)\circ\eta_C = g
\end{equation}
$$</p>
<h2 id="categorical-logic">Categorical Logic</h2>
<h3 id="cartesian-closed-category">Cartesian closed category</h3>
<div class="theorem-style">
<span class="definition-head">Definition.</span>
A <em>cartesian closed category</em> is a category $\mathcal{C}$ equipped with the three adjoints:
<ol>
<li>Terminal object: $(\mathcal{C}\to \ast )\dashv (\ast \to \mathcal{C})$; note that $\ast$ is the terminal <em>category</em></li>
<li>Diagonal-product: $(\mathcal{C}\xrightarrow{\Delta}\mathcal{C}\times\mathcal{C})\dashv(\mathcal{C}\times\mathcal{C}\xrightarrow{\times}\mathcal{C})$</li>
<li>Product-exponentiation: $A\times(\cdot)\dashv (\cdot)^A$ for each object $A$.</li>
</ol>
</div>
<p>Since the adjoints are unique (if exist), adjointness fully determines a cartesian closed category.</p>
<p>Let’s unravel the definition. The terminal category $\ast$ is the category with one object, also denoted by $\ast$, and one single morphism ($1_\ast$). Lets say there is an adjunction $L\dashv R$ between $R:\ast \to \mathcal{C}$ and $L:\mathcal{C}\to\ast$, then there is a bijection
$$
\operatorname{Hom}_{\mathcal{C}}(X,R(\ast)) \cong \operatorname{Hom}_\ast (L(X),\ast) = \{ 1_\ast \},
$$
which says there is one and only one morphism from $X$ to $R(\ast)$, so $R(\ast)$ is the terminal object. The unique morphism $X\to\ast$ can only be the unit on $X$, $\eta_X$.</p>
<p>The diagonal functor is left adjoint to the product functor, i.e.
$$
\operatorname{Hom}_{\mathcal{C}\times\mathcal{C}}(\Delta X,(A,B)) = \operatorname{Hom}_{\mathcal{C}\times\mathcal{C}}((X,X),(A,B)) \cong \operatorname{Hom}_{\mathcal{C}}(X,A\times B),
$$
since a morphism $(X,X)\to(A,B)$ is exactly a pair of arrows $X\to A, X\to B$, and all such pairs are in bijective correspondence with morphisms $X\to A\times B$, the bijection holds. The adjunction holds in $\mathcal{C}$ means $\mathcal{C}$ has finite products. Here we see that the unit $\eta_X$ takes $X$ to $X\times X$ (it is the <em>diagonal morphism</em>) and the counit $\epsilon_{A\times B}$, upon taking $X = A\times B$ can be seen to be the projection pair $(\pi_0,\pi_1): (A\times B,A\times B)\to (A,B)$.</p>
<p>The <em>exponentiation</em> is defined to be the right adjoint to the $A\times(\cdot)$ functor, for each $A\in\mathcal{C}$, thus
$$
\operatorname{Hom}_{\mathcal{C}}(A\times X, Y)\cong\operatorname{Hom}_{\mathcal{C}}(X,Y^A).
$$
To find the unit $\eta$, put $Y=A\times X$, then $\eta_X:X\to (A\times X)^A$. For the counit $\epsilon$, put $X=Y^A$, then $\epsilon_Y :A\times Y^A \to Y$, this is the <em>evaluation morphism</em>.</p>
<p>Recall that given a left adjoint functor $F$ with right adjoint $G$, for every $f:FX\to Y$, there is a unique $g:X\to G(Y)$ s.t. $\epsilon_D F(g)=f$, and we know that $g = G(f)\circ \eta_X$ (recall $(\ref{adj})$). Now put $F=A\times (\cdot)$ and $G = (\cdot)^A$. Then for any $h:A\times X\to Y$, the unique morphism $g$ is
$$
h^A \circ \eta_X: X \to Y^A
$$</p>
<h3 id="hyperdoctrine">Hyperdoctrine</h3>
<div class="theorem-style">
<span class="definition-head">Definition.</span>
A <em>hyperdoctrine</em> is a cartesian closed category $\mathcal{T}$ together with an assignment $P$, such that
<ul>
<li>for each contexts (object) $X$, $P(X)$ is a cartesian closed category, called <em>the category of context $X$</em>.</li>
<li>for each term (morphism) $X\xrightarrow{f} Y$, a functor $P(Y)\xrightarrow{f/\cdot} P(X)$ called <em>substitution</em>.</li>
<li>two further functors assocaited to $X\xrightarrow{f} Y$,
$$
P(X)\xrightarrow{\Sigma_f} P(Y),\quad P(X)\xrightarrow{\Pi_f} P(Y),
$$
that are left and right adjoint to the substitution $f/\cdot$, called existential and universal quantification along $f$.
</li>
</ul>
</div>
<p>The adjointness here can be compactly written as
$$
\Sigma_f \dashv (f/\cdot) \dashv \Pi_f.
$$</p>
<p>Since the category of context $P(X)$ is a cartesian closed category, it comes with a terminal object $\mathsf{1}_X$, a product $\wedge_X$, and an exponential $\alpha_X\Rightarrow(\cdot)$ (for $(\cdot)^{\alpha}$). The evaluation morphism in $P(X)$ then takes the form of
$$
\alpha\wedge_X(\alpha\Rightarrow \beta)\to \beta,
$$
which is the modus ponens. Morphisms in $P(X)$ should be called <em>deductions</em>.</p>
<h2 id="comments">Comments</h2>
<h3 id="locally-cartesian-closed-category-as-an-instance-of-hyperdoctrine">Locally cartesian closed category as an instance of hyperdoctrine</h3>
<p>It is obvious that a locally cartesian closed category is a hyperdoctrine if we drop the cartesian closedness requirement for the latter. $P$ sends $X$ to its slice category. The substitution functor is the base change functor. In fact a hyperdoctrine should be regarded as an axiomatization, or abstraction, of what is essential in a locally cartesian closed category. For LCCC, the right adjoint to the base change $f/\cdot : \mathcal{C}/Y\to \mathcal{C}/X$ assocaited with $f:X\to Y$, the universal quantifier in the direction of $f$, is called the <em>dependent product</em>. Given dependent product, the existential quantifier $\Sigma_f$, called <em>dependent sum</em> here, being left adjoint to $f/\cdot$, exists automatically.</p>
<p>The base change functor $f/\cdot :\mathcal{C}/Y\to\mathcal{C}/X$ pulls a morphism $p:E\to Y$ along $f$ and yields $f/p: X\times_Y E \to X$. On morphisms $E\to E’$ the universal property of pullback makes it clear that $f/(E\to E’)$ gives $X\times_Y E \to X\times_Y E’$.</p>
<h3 id="equivalent-definition-of-adjoint-pairs">Equivalent definition of adjoint pairs</h3>
<p>In the article, Lawvere gave a curious construction for the adjoint pair.</p>
<p>Given a functor $F:\mathcal{C}\to \mathcal{D}$, consider the comma category $F\downarrow 1_{\mathcal{D}}$ defined via $\mathcal{C}\xrightarrow{F}\mathcal{D}\xleftarrow{1_\mathcal{D}}\mathcal{D}$, so</p>
<ul>
<li>the objects are triples $(C,D,h)$ s.t. $h: FC\to 1_{\mathcal{D}}D$, or equivalently the data of a morphism $h:FC\to D$ is enough.</li>
<li>the morphisms are pairs of arrows $(f\in \mathcal{C}_1,g\in\mathcal{D}_1)$ that defines commutative diagrams.</li>
<li>the composition of morphisms $(f,g)$ and $(f’,g’)$ is then simply given by $(f’,g’)\circ (f,g) = (f’\circ f, g’\circ g)$.</li>
</ul>
<p>Then forgetting $h$ in the object defines a functor $F\downarrow 1_{\mathcal{D}} \to \mathcal{C}\times\mathcal{D}$, as claimed by Lawvere.</p>
<p>This is prcisely the construction of category $(F,\mathbf{B})$ given by Lawvere. As such, Lawvere actually considers two comma categories
$$
F\downarrow 1_{\mathcal{D}} \quad 1_{\mathcal{C}}\downarrow G
$$
defined via
$$
\mathcal{C}\xrightarrow{1_\mathcal{C}}\mathcal{C}\stackrel{\overset{F}{\rightarrow}}{\underset{G}{\leftarrow}}\mathcal{D}\xleftarrow{1_\mathcal{D}}\mathcal{D}.
$$</p>
<p>A functor $Q: F\downarrow 1_\mathcal{D} \to 1_\mathcal{C}\downarrow G$ can be defined given $\eta: 1_\mathcal{C} \to GF$. For an object $h:FC\to D$, let
$$
Q(h) = (Gh) \circ \eta
$$
then since $G$ is a functor, $Q$ is a functor,
$$
Q(h’ h) = ((Gh’)(Gh))\circ \eta = ((Gh’) \circ \eta)((Gh)\circ \eta)
$$
where $(Gh’)(Gh)$ is the horizontal composition of $1_{\mathcal{G}}$ applied to $h$ and $h’$, and $((Gh’)\circ \eta)((Gh)\circ \eta)$ is the composition of morphisms.
Similarly, given $\epsilon: FG\to 1_\mathcal{D}$, $P: 1_\mathcal{D}\downarrow G\to F\downarrow 1_\mathcal{D}$ is defined as
$$
P(g) = \epsilon\circ F(g)
$$
which is again a functor by a similar argument. The commutative triangle suggests that $P$ and $Q$ are inverse to each other.</p>
Language, Logic and Theories of Meaning
https://geistlib.xyz/language-logic-and-theories-of-meaning/
Wed, 15 Feb 2023 00:00:00 +0000https://geistlib.xyz/language-logic-and-theories-of-meaning/<p>More or less a branch of <a href="https://geistlib.xyz/against_realism/">Against Realism</a>, or maybe vice versa.</p>
<h2 id="writings">Writings</h2>
<ul>
<li><a href="https://geistlib.xyz/notes-on-martin-lofs-siena-lectures/">Notes on Martin Lof’s Siena Lectures</a>. An outline for the rationale behind the constructions of intuitionistic logical inference systems, starting from Frege’s theory of meaning and culminating in Martin-Lof style dependent type theory.</li>
<li><a href="https://geistlib.xyz/remarks-on-categorical-logic/">Remarks on Categorical Logic</a> Some thoughts and sketches on presenting a non ad-hoc construction of internal logic to a category.</li>
<li><a href="https://geistlib.xyz/the-law-of-excluded-middle/">The Law of Excluded Middle</a>. Arguments for ditching the law of excluded middle.</li>
<li><a href="https://geistlib.xyz/further-comments-on-dummetts-comments-on-frege/">Further comments on Dummett’s comments on Frege</a>. Dummett’s prose is notoriously difficult. Here I organize the main ideas and scrape off some nonessential details that are not relevant to the overall understanding of Frege’s philosophy.</li>
<li><a href="https://geistlib.xyz/equalities-in-type-theories/">Equalities in Type Theory</a>. While it appears that this is an article on the various notions of equalities in type theory, it actually clarifies some confusions arising in metaphysics, such as the distinction between claiming $P$ to be true, and uttering $P$, and so on.</li>
</ul>
<h2 id="reading-list">Reading List</h2>
<p>Backgrounds on first-order logic (to the compactness theorem) and natural deduction, lambda calculus and basic type theory, Zermelo-Frankel set theory (ordinal, cardinal), and category theory (Yoneda lemma, adjunction, monad, Kan extensions) are assumed.</p>
<p>Philosophy of logic and mathematics, and foundations,</p>
<ul>
<li>Andrei Rodin - Axiomatic Method and Category Theory</li>
<li>Joel David Hamkins - Lectures on the Philosophy of Mathematics</li>
<li>Gottlob Frege - Complete Works</li>
<li>Jean-Yves Girard - The Blind Spot</li>
</ul>
<p>Theories of meaning and proof-theoretic semantics</p>
<ul>
<li>Michael Dummett - The Logical Basis of Metaphysics</li>
<li>Michael Dummett - The Seas of Language</li>
<li>Michael Dummett - Truth and Other Enigmas</li>
<li>Christopher Gauker - Words without Meaning</li>
<li>Martin Loef - Intuitionistic Type Theory (Bibliopolis book)</li>
<li>Martin Loef - Siena Lectures</li>
<li>Johan Georg Granstrom - Treatise on Intuitionistic Type Theory</li>
<li>Sara Negri, Jan von Plato - Structural Proof Theory</li>
<li>Nissim Francez - Proof-theoretic Semantics</li>
</ul>
<p>Categorical Logic. While similar in spirit, there are roughly speaking two types of categorical logic: categorical algebra, Curry-Howard-Lambek correspondence. The former is more about universal algebra (algebraic, cartesian, coherent and geometric theories), the latter is more about topoi, cartesian closed categories and their internal logic. Their methods are relevant to foundations of mathematics.</p>
<ul>
<li>Colin MacLarty - Elementary Categories, Elementary Toposes</li>
<li>Bart Jacobs - Categorical Logic and Type Theory</li>
<li>Paul Taylor - Practical Foundations of Mathematics</li>
<li>Egbert Rijke - Introduction to Homotopy Type Theory</li>
<li>William Lawvere’s works</li>
</ul>
Grand Cosmic and Natural History
https://geistlib.xyz/grand-history/
Wed, 15 Feb 2023 00:00:00 +0000https://geistlib.xyz/grand-history/<div class="colored" style="text-align: center;"> [Under Construction] </div>
<h2 id="cosmic-history">Cosmic History</h2>
<ol>
<li>Big Bang
<ul>
<li>Planck epoch ($< 10^{43}s$)</li>
<li>GUT ($10^{-43} \sim 10^{-36}s$)</li>
</ul>
</li>
<li>Radiation dominated
<ul>
<li>Electroweak ($10^{-36}\sim 10^{-12}s$), during which, inflation ($\sim 10^{-32}s$) ends</li>
<li>Quark ($10^{-12}\sim 10^{-5}s$), during which, Baryongenesis ($10^{-11}s$).</li>
<li>Hadron ($10^{-5}\sim 1s$), ending with Neutrino decoupling.</li>
<li>Lepton ($1\sim 10s$)</li>
<li>Photon ($10s \sim 370 ka$), during which, Big Bang nucleosynthesis ($180 \sim 10^3 s$) and Recombination ($10\sim 370 ka$)</li>
</ul>
</li>
<li>Matter-dominated ($47ka\sim 9.8Ga$)
<ul>
<li>Dark ages ($370ka \sim 150 Ma$)</li>
<li>Star, Galaxy formation and evolution (earliest circa $300\sim 400 Ma$, modern $1 \sim 10 Ga$); during which, Reionization ($200 Ma\sim 1 Ga$)</li>
</ul>
</li>
<li>Dark-energy-dominated ($>9.8 Ga$), acceleration.
<ul>
<li>Present time is $13.8 Ga$.</li>
</ul>
</li>
</ol>
<p>From Big Bang to Recombination, see <a href="https://geistlib.xyz/the-early-universe/">The Early Universe</a></p>
<h3 id="reference-used">Reference Used</h3>
<p>We are not doing theory or practicing exact science here, so standard textbooks will be sufficient,</p>
<ul>
<li>Kolb, Turner - The Early Universe. Containing most of the materials for early universe, the book is somehow out-dated, and needs to be supplemented by a recent one.</li>
<li>Rubakov, Gorbunov - Introduction to the Theory of the Early Universe, Hot Big Bang Theory. The recent one.</li>
<li>Baumann, Daniel - <a href="http://cosmology.amsterdam/education/cosmology/">Cosmology Lecture Notes</a>.</li>
<li>Carroll, Ostlie - An Introduction to Modern Astrophysics. For star and galaxy formation and evolution and the solar system.</li>
<li>Domagal-Goldman, Wright ed. - The Astrobiology Primer v2.0. For the solar system and Earth formation.</li>
</ul>
<h2 id="geological-history-and-paleontology">Geological History and Paleontology</h2>
<h3 id="preliminary-remarks">Preliminary remarks.</h3>
<p>An interactive version of chronostratigraphic chart is maintain by <a href="https://stratigraphy.org/chart#interactive-versions">ICS</a>. Here the point will be on the major events together with associated theories and their reference, with time scale refined to stage/age, similar to what is <a href="https://en.wikipedia.org/wiki/Geologic_time_scale#Table_of_geologic_time">provided in wikipedia</a>.</p>
<p>Chronostratigraphic/geographic units are classified, from largest to smallest, by</p>
<ol>
<li>Eonothem-Eon: Spanning several hundred milions ($\gtrsim 10^8$) of years.</li>
<li>Erathem-Era: Tens to hundreds hundred milions ($10^7 \sim 10^8$) of years.</li>
<li>System-Period: Millions of or tens of millions ($10^6\sim 10^7$) of years.</li>
<li>Series-Epoch: Hundred of thousands of years to tens of millions ($10^4\sim 10^7$) of years.</li>
<li>Subseries-subepoch: Thousands of years to millions ($10^3\sim 10^6$) of years.</li>
<li>Stage-age: Thousands of years to millions ($10^3\sim 10^6$) of years.</li>
</ol>
<p>Meaning of affixes:</p>
<ul>
<li>-proteoro-: Earlier.</li>
<li>-zoic: Life.</li>
<li>Paleo-/Meso-/Neo-: old-middle-young</li>
</ul>
<h3 id="roughly-charted-geological-history-to-periods">Roughly charted geological history (to Periods)</h3>
<ol>
<li>Hadean Eon (4.6-4 Ga) Planet and moon formation; bombardment; ocean formation and carbon dioxide atmosphere.</li>
<li>Archean Eon (4-2.5 Ga) Earlist uncontroversial living organisms (protocells, prokayotes). Age of plate tectonics (formation stabilization of most modern cratons).
<ol>
<li>Eoarchean Era (4-3.6 Ga)</li>
<li>Paleoarchean Era (3.6-3.2 Ga)</li>
<li>Mesoarchean Era (3.2-2.8 Ga)</li>
<li>Neoarchean Era (2.8-2.5 Ga)</li>
</ol>
</li>
<li>Proterozoic Eon (2.5 Ga - 539 Ma) Increased oxidation. Eukaryotes. Algae. First animals.
<ol>
<li>Paleoproterozoic Era (2.5-1.6 Ga)</li>
<li>Mesoproterozoic Era (1.6-1 Ga)</li>
<li>Neoproterozoic Era (1 Ga - 539 Ma)</li>
</ol>
</li>
<li>Phanerozoic Eon (539 Ma - Present) Starting with Major diversification of life and appearance of most of the animal phyla.
<ol>
<li>Paleozoic Era (539-252 Ma)
<ol>
<li>Cambrian Period (539-485 Ma)</li>
<li>Ordovician Period (485-419 Ma)</li>
<li>Silurian Period (444-419 Ma)</li>
<li>Devonian Period (419-359 Ma)</li>
<li>Carboniferous Period (359-299 Ma)</li>
<li>Permian Period (299-252 Ma)</li>
</ol>
</li>
<li>Mesozoic Era (252-66.0 Ma)
<ol>
<li>Triassic Period (252-201 Ma)</li>
<li>Jurassic Period (201-145)</li>
<li>Cretaceous Period (145-66.0 Ma)</li>
</ol>
</li>
<li>Cenozoic Era (66.Ma -Present)
<ol>
<li>Paleogene Period (66.0-23.0 Ma)</li>
<li>Neogene Period (23.0-2.58 Ma)</li>
<li>Quaternary Period (2.59 Ma - Present)</li>
</ol>
</li>
</ol>
</li>
</ol>
<h2 id="history-of-human-evolution-anthropology">History of Human Evolution, Anthropology</h2>
<h2 id="pre--and-early-civilization-archaeology">Pre- and Early Civilization, Archaeology</h2>
<h2 id="modern-and-contemporary-cultral--intellectual-history-technic-cybernetics">Modern and Contemporary, Cultral & Intellectual History, Technic, Cybernetics</h2>
Equalities in Type Theory
https://geistlib.xyz/equalities-in-type-theories/
Tue, 14 Feb 2023 19:13:55 +0100https://geistlib.xyz/equalities-in-type-theories/<p>Prerequisites: Elementary knowledge of type theory.</p>
<p>There are various notions of equality in type theory, which can be organized into two groups.</p>
<ol>
<li>In terms of what is implementing the equality
<ul>
<li>Judgmental equality, where an equality is a judgement.</li>
<li>Propositional equality, where an equality is a proposition.</li>
<li>Typal equality, where an equality is a type.</li>
</ul>
</li>
<li>In terms of how equality is to be conceived
<ul>
<li>Definitional equality, where the equality is metatheoretical - equivalence on syntactic expressions.</li>
<li>Computational/conversional equality, an equality that follows from term introduction and elimination.</li>
</ul>
</li>
</ol>
<h2 id="definitional-equality">Definitional equality</h2>
<p>This should be taken as an equality in metalanguage. Two expressions $S$ and $S’$ are definitionally equal if they have the same Fregean Sinn. Consider the sentences
$$
S = \text{“there is a largest prime”}
$$
and
$$
S’ = \text{“there is a prime that is larger than any other primes”.}
$$
In mathematical practice one usually simply equates these two sentences as having the same meaning, so in practical mathematics, $S$ and $S’$ are definitionally equal. This is not the case for e.g. subjects that focus on syntactic analysis, that analyses sentences, etc. Another example would be the two expressions,
$$
\forall x, p(x); \forall y, p(y).
$$
The difference between the symbols $x,y$ should not be regarded as anything essential, or anything related to the meaning of the expressions. The two expressions have, in this formal system, a same Sinn. This would, again, not be the case when there is no notion of alpha equivalence. Hence, definitional equality should be seen as the most ‘primitive’ notion of equality, and what counts as definitionally equal depends on the type theory one is working in.</p>
<ul>
<li>In Martin-Lof type theory, judgemental equality is the definitional equality.</li>
<li>In Set-thoretic foundations, e.g. ZFC or ETCS, propositional equality is the definitional equality.</li>
</ul>
<h2 id="judgemental-propositional-and-typal-equality">Judgemental, Propositional and Typal equality</h2>
<p>The contrast between judgemental and propositinal equality is roughly the contrast between anti-realists and realists, and the contrast between taking logical inferences to be from judgements to judgements or from propositions to propositions. For those that take judgemental equality as the definitional equality, two propositions are equal if they are judged to be equal, while for others the judgement that two propositions are equal can be made when two propositions are equal in an ‘objective’ sense. If a proposition is identified with a type, then propositional equality becomes typal equality. So in e.g. Martin-Lof there is no notion of propositional equality, or, the notion of propositional equality is simply that of typal equality.</p>
<p>There are, or can be, various judgements for an entity appearing in a type theory, e.g., in the context $\Gamma$.</p>
<ul>
<li>$\Gamma \vdash A:\operatorname{type}$. This is the judgement that $A$ is a type.</li>
<li>$\Gamma \vdash a:A$. This is the judgement that $a$ is an entity (a term) of type $A$.</li>
</ul>
<p>For those type theories that are not intuitionistic, entities such as propositions and truth value can be introduced. For propositions it is advisable to use some symbols other than Latin alphabets,</p>
<ul>
<li>$\Gamma \vdash \alpha:\operatorname{prop}$. This is the judgement that $\alpha$ is a proposition.</li>
<li>$\Gamma \vdash \alpha:\operatorname{true}$. This is the judgement that proposition $\alpha$ is true.</li>
</ul>
<h3 id="propositional-equality">Propositional equality</h3>
<p>Given $A,B$ types, the propositional equality between $A$ and $B$ is:
$$
\frac{\Gamma \vdash A:\operatorname{type} \quad \Gamma\vdash B:\operatorname{type}}{\Gamma\vdash A\equiv B:\operatorname{prop}}.
$$
If one uses $\alpha$ to denote the proposition $A\equiv B$, one has either</p>
<ul>
<li>a judgemental equality $\vdash \alpha = (A\equiv B):\operatorname{prop}$, or</li>
<li>another proposition that is judged to be true, $\vdash (\alpha = (A\equiv B)): \operatorname{true}$.
It is plain that while in principle all kinds of equality can be defined in a type theory, this would lead to a rather convoluted formal system that is philosophically confused.</li>
</ul>
<p>Note that
$$
\Gamma \vdash A\equiv B:\operatorname{prop}
$$
is <em>not</em> the same as
$$
\Gamma \vdash A\equiv B:\operatorname{true},
$$
the former simply says that $A\equiv B$ is a proposition in the context $\Gamma$, while the latter judges $A\equiv B$ to be true when $\Gamma$. It can be argued that the notion of truth is redundant: why not simply say that $\Gamma \vdash A\equiv B$, and drop the notion of proposition to make life easier?</p>
<h3 id="typal-equality">Typal equality</h3>
<p>This is the equality that appears as itself a distinct type. For types, the type
$$
\operatorname{Eq}_{A,B}
$$
is the equivalence type, and for terms,
$$
\operatorname{Id}_A(a,a’)
$$
can be the identity type or the path type. If it can be judged that $\operatorname{Eq}_{A,B}$ is indeed a type, i.e. if there is a judgement
$$
\Gamma \vdash \operatorname{Eq}_{A,B}\operatorname{:type},
$$
then the equivalence type becomes a typal equality in the context $\Gamma$. Typal equalities should be thought of as propositions that are to be proved by giving a witness, e.g.
$$
\Gamma\vdash p:\operatorname{Eq}_{A,B},
$$
under Curry-Howard.</p>
<div class="remark">
<div class="remark-style">
<span class="remark-head">Remark.</span>
In particular, in <code>Agda</code> standard library, the $\equiv$ operator in <code>Relation.Binary.PropositionalEquality</code>, i.e. <code>≡</code> in
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="ln">1</span><span class="cl">import Relation.Binary.PropositionalEquality as Eq
</span></span><span class="line"><span class="ln">2</span><span class="cl">open Eq using (_≡_)</span></span></code></pre></div>
is the typal equality constructor. If <code>A</code>,<code>B</code> are types, then <code>A ≡ B</code> is a type, identical to $\operatorname{Eq}_{A,B}$ in dependent type.
<span style="float:right">◈</span>
</div>
</div>
<h3 id="judgemental-equality">Judgemental equality</h3>
<p>This is the equality that appears as a judgement,</p>
<ul>
<li>$\Gamma\vdash A\equiv A’:\operatorname{type}$ means $A,A’$ are equivalent <em>as types</em> in the context $\Gamma$.
<ul>
<li>Note that $\vdash A\equiv A’\operatorname{:type}$ does <em>not</em> mean that the $A\equiv A’$ is a type.</li>
<li>$A = A’$, or $\operatorname{Eq}_{A,A’}$ is a type and hence a typal equivalence, and the judgement $\vdash \operatorname{Eq}_{A,A’}\operatorname{:type}$ is the judgement that $\operatorname{Eq}_{A,A’}$ is a type.</li>
</ul>
</li>
<li>$\Gamma\vdash a\equiv a’:A$. This says $a,a’$ are equal as <em>terms</em> of type $A$ in the context $\Gamma$.
<ul>
<li>$a =_A a’:A$ is a type $\operatorname{Id}_{a,a’}$, but judgementatl equality $a \equiv a’:A$ doesn’t construct a type, it merely says that, evidently, $a$ and $a’$ are the same, which needs no proof and can have no proof.</li>
</ul>
</li>
</ul>
<h2 id="comments">Comments</h2>
<h3 id="intuitionistic-type-theories-and-justificationist-thesis">Intuitionistic type theories and justificationist thesis</h3>
<p>If a type $A$ is thought of as a proposition, and there are two types $A,B$, then one can ask the following question:
$$
Q:\text{Are }A\text{ and }B\text{ the same propositions?}
$$
associated to $Q$ is another proposition, <em>or type</em>,
$$
\operatorname{Eq}_{A,B}:A\text{ and }B\text{ are the same propositions.}
$$</p>
<p>If $A$ and $B$ are <em>evidently</em> the same in a context $\Gamma$, e.g. $\alpha$-equivalent, meaning that in this formal system it doesn’t need to be shown to be same, then one has the <em>judgemental equality</em>,
$$
\Gamma\vdash A\equiv B\operatorname{:type}.
$$
without refering to the proposition $\operatorname{Eq}_{A,B}$, or better, the proposition $\operatorname{Eq}_{A,B}$ <em>won’t even be able to be formed</em>, since, e.g. the formal system is built on the $\alpha$-equivalence class of symbols.</p>
<p>If the question $Q$ can be meaningfully be asked in the formal system, one can form the type $\operatorname{Eq}_{A,B}$, the formation ends with the judgement that $\operatorname{Eq}_{A,B}$ is indeed a type:
$$
\Gamma\vdash \operatorname{Eq}_{A,B}\operatorname{:type}.
$$
The typal equality needs to be proved, by a witness $x:\operatorname{Eq}_{A,B}$.</p>
<p>Thus, for Martin-Lof style (intuitionistic) type theories, $\Gamma\vdash \operatorname{Eq}_{A,B}:\operatorname{type}$ subsumes $\Gamma\vdash A\equiv B:\operatorname{prop}$, and constructing a proof $\Gamma\vdash x:\operatorname{Eq}_{A,B}$ does what $\Gamma\vdash A\equiv B:\operatorname{true}$ does.</p>
<p>The same goes for terms $a\equiv a’:A$. If the two proofs $a,a’$ of $A$ are e.g. only different in symbols used, of which the difference cannot be reflected in the formal system but only in the metalanguage, then one has the judgemental equality $\Gamma\vdash a\equiv a’:A$. For general proofs of $A$, to prove that the the two proofs $a,a’$ are identical, one needs to form the type (proposition)
$$
\operatorname{Id}_A(a,a’):a\text{ and }a’\text{ are identical proofs of }A.
$$
and exhibit another proof of the proposition, $p:\operatorname{Id}_A(a,a’)$. Of course, if there are two proofs $p,p’:\operatorname{Id}_A(a,a’)$, one can form another proposition $\operatorname{Id}_{\operatorname{Id}_A(a,a’)}(p,p’)$, and so on.</p>
Notes on Martin Lof's Siena Lectures
https://geistlib.xyz/notes-on-martin-lofs-siena-lectures/
Tue, 14 Feb 2023 00:00:00 +0000https://geistlib.xyz/notes-on-martin-lofs-siena-lectures/<p>Notes on the lecture notes <a href="http://archive-pml.github.io/martin-lof/pdfs/Meanings-of-the-Logical-Constants-1983.pdf">On the Meanings of the Logical Constants and the Justification of Logical Laws</a>.</p>
<p>It would become clear that intuitionistic type theory is, in fact, nearly completely built with Frege’s philosophy of language as its foundation.</p>
<p>Prerequisites: Elementary knowledge of Martin-Lof’s dependent type theory and the meaning of the notations for Gentzen systems (natural deduction or sequent). Elementary category theory (for the last part).</p>
<h2 id="lecture-1">Lecture 1</h2>
<p>In the proceeding <em>judgement</em> and <em>assertion</em> will be seen as synonymous.</p>
<p>When considering logical laws, one must first ask a question: what are the things that the logical inferences operate on? Intuitively, a proposition $P$ is distinct from its assertion $\vdash P$:</p>
<ol>
<li>The proposition $P$ is a state of affair in an ’external’ world.</li>
<li>The assertion $\vdash P$ is an attitude toward the proposition $P$, that is, $\vdash P$ means $P: \operatorname{true}$.</li>
</ol>
<p>While the notation $P:\operatorname{true}$ is the notation used by Martin-Lof, I’ll avoid it since I’d rather avoid the notion of truth value when talking about logical inference. Another way to put it is that whether the logical inferences operate on the act of making judgements or assertions about propositions (or the act of proposing or forming $P$ itself), or on the propositons themselves (or the proposed proposition $P$). The problem of the objects of the logical operations, is then, for example, which one of the following is happening when an inference is made
$$
\frac{A\quad B}{A\wedge B},\quad \frac{\vdash A\quad \vdash B}{\vdash A\wedge B}.
$$</p>
<p>Here it can be seen that, while the logical operator such as $\wedge$ operates on propositions such as $A,B$, it is unclear whether the inference takes one from $A,B$ to the proposition $A\wedge B$, or from the assertions $\vdash A,\vdash B$ to the assertion $\vdash A\wedge B$. The position taken by Martin-Lof is the latter, that is, inferences are made on <em>assertions</em> rather than propositions. Hence, rather than what is implicit in e.g. Hilbert system
$$
A\to (B\to A\wedge B),
$$
one has, for example, the $\operatorname{R}\wedge$-rule in the sequent calculus $\mathsf{LK}$,
$$
\frac{\Gamma\vdash \Delta_1,A\quad \Gamma\vdash\Delta_2,B}{\Gamma\vdash \Delta_1,\Delta_2, A\wedge B}.
$$
take $\Gamma,\Delta_1,\Delta_2$ to be empty.</p>
<p>The thing $P$, isolated from the act of asserting it and where the logical <em>operations</em> operate on, that is called a proposition here, is a new concept which simply didn’t exist before 19th century, while the act of asserting $P$, $\vdash P$, is called a proposition traditionally. The concept was introduced first by Bolzano and later on by Frege, etc.</p>
<p>However there are further problems. Consider the sentence,
$$
S=\text{“there is a largest prime”},
$$
one can ask the question that what is its relation to
$$
S’=\text{“there is a prime that is larger than any other primes”}.
$$
As sentences, $S,S’$ are different, but intuitively the propositions behind $S,S’$ are the same one.</p>
<p>In <em>Begriffsschrift</em>, Frege called the propositions <em>beurteilbarer Inhalt</em>, judgeable content. Later in the threefold division (expression, sense, reference), for this kind of entities,</p>
<ul>
<li>the expressions corresponds to <em>Satz</em>, called sentence;</li>
<li>the sense to <em>Gedanke</em>, called thought;</li>
<li>the reference to <em>Wahrheitswert</em>, called truth value.</li>
</ul>
<p>For Martin-Lof, a proposition $P$ should correspond to the <em>sense</em>, that is to the thought expressed by a class of sentences $S(P)$. This leads to the problem of in what sense do $S$ and $S’$ correspond to a same $P$. A possible, dirty explanation is that, one can show in a formal language $\mathcal{L}$ that $S$ and $S’$ are equivalent, and the equivalence class is $P$, and the logical operations operate on the equivalence classes of $\mathcal{L}$.</p>
<p>Now as soon as the variables $A,B$ are propositions, the $\operatorname{R}\vee$ rule in a sequent, written compactly as
$$
\frac{\vdash A}{\vdash A\vee B}.
$$
should be valid. Hence, making all the implicit premises explicit, writing $A:\text{prop}$ for $A\text{ is a proposition}$, the inference should really be
$$
\frac{A:\text{prop}\quad B:\text{prop} \quad \vdash A}{\vdash A\vee B},
$$
namely the premises are $A,B$ being propositions and the assertion of $A$. Then the variables $A,B$ can be seen as the expressions or sentences in the terminology of Frege.</p>
<p>Summarizing, take $A,B$ to be sentences, an inference is really of the form
$$
\frac{A:\text{prop}\quad B:\text{prop}\quad \vdash A\quad \vdash B}{\vdash A\wedge B}.
$$
For a sequent, $A,B$ are always propositions, expressed by any sentences (complete expressions in Martin-Lof’s terminology), then the above inference, corresponding to the $\operatorname{R}\wedge$-rule in a sequent, is written as
$$
\frac{\vdash A\quad\vdash B}{\vdash A\wedge B}.
$$
For the sequent system $\mathsf{LK}$, The $\operatorname{R}\vee_1$-rule and the explicit form of it should be
$$
\frac{\vdash A}{\vdash A\vee B},\frac{A:\text{prop}\quad B:\text{prop} \quad \vdash A}{\vdash A\vee B}.
$$
For the left introduction rules (omitting the symmetrical case for $\operatorname{L}\wedge_1$)
$$
\frac{A,C\vdash D}{A\wedge B,C\vdash D},\frac{A:\text{prop}, B:\text{prop}, C:\text{prop}, D:\text{prop}\quad A,C\vdash D}{A\wedge B,C\vdash D};
$$
$$
\frac{A,C\vdash D\quad B,C’\vdash D’}{C,C’,A\vee B\vdash D,D’}, \frac{A,C,D:\text{prop} \quad A,C\vdash D\quad B,C’,D’:\text{prop}\quad B,C’\vdash D’}{C,C’,A\vee B\vdash D,D’}.
$$</p>
<p><div class="remark">
<div class="remark-style">
<span class="remark-head">Remark.</span>
The rules $\operatorname{R}\vee_1$ and $\operatorname{R}\vee_2$ for $\mathsf{LK}$ can be reduced to the $\operatorname{R}\vee$ rule
$$
\frac{\vdash A,B}{\vdash A\vee B}
$$
in the multiplicative system $m\mathsf{LK}$. The simulation of $m\mathsf{LK}$ from $\mathsf{LK}$ and vice verca needs weakening and contraction rules. From the above explicitly written rules for $\mathsf{LK}$, it can be seen that the simulation by contraction and weakening consists of contracting two judgements in the form of $A,A:\operatorname{prop}$ to that of $A:\operatorname{prop}$ and making a further judgement $B:\operatorname{prop}$ when right weakening from $\vdash A$ to $\vdash A,B$.<br>
This means that the weakening rules in the sequents corresponds to making judgements that the introduced sentence $P$ is a proposition, viz. $P:\operatorname{prop}$. The structural rules are not logical but extra-logical judgements, distinct from assertions implicit in $\vdash$.<br>
<span style="float:right">◈</span>
</div>
</div>
<div class="remark">
<div class="remark-style">
<span class="remark-head">Remark.</span>
The perspective that the intuitive sequent system can be seen as $\mathsf{LK}$ with the right hand side allowing only one formula should be seen as the fact that before doing the right weakening (introducing a new proposition $P$ that is asserted, i.e. $\vdash P$), $P$ must first be asserted as a proposition $P:\operatorname{prop}$.
<span style="float:right">◈</span>
</div>
</div>
</p>
<div class="remark">
<div class="remark-style">
<span class="remark-head">Remark.</span>
<span id="remark_modus_ponens"></span>
It doesn't look like modus ponens (actually the cut elimination in sequent and modus ponens in natural deduction), written compactly
$$
\frac{A\vdash B\quad B\vdash C}{A\vdash C}
$$
has a good meaning explanation: the <em>assertion of</em> $B$ and the <em>bare proposition </em> $B$ is cut when cutting. Moreover, the very expression
$$
A\vdash B
$$
meaning "the proposition $A$ asserts $B$" looks strange, since it is the act of asserting $A$ that asserts $B$, rather than the bare proposition.
<span style="float:right">◈</span>
</div>
</div>
<h2 id="lecture-2">Lecture 2</h2>
<p>The reason for choosing
$$
\frac{\vdash A\quad \vdash B}{\vdash A\wedge B}.
$$
instead of
$$
\frac{A\quad B}{A\wedge B}
$$
is that logic is about <em>making correct inference</em>, not about <em>making true statements</em>. When one affirms a proposition $A$, one says that he <em>knows</em> $A$ is true. From $\vdash A$ and $\vdash B$, $\vdash A\wedge B$ follows, because the inference itself is valid, not because $A$ and $B$ is true in an external sense. When one answers a question that do not know the answer but give the right answer by chance, the inference one made should not be seen as valid. Taking $A$ to be true means that someone <em>knows</em> that $A$ is true or someone thus asserts $A$. This is the tenet hold by intuitionists and in particular Brouwer. Brouwer does not speak about propositions and truth, he speaks about judgements/assertions and evidence.</p>
<p>To prove the proposition $A$, is then to make the assertion $\vdash A$ evident.</p>
<p>Previously a distinction was made between the following two kinds of assertion:</p>
<ol>
<li>categorical judgement on type $ A:\text{prop} \quad (A\text{ is a proposition}) $</li>
<li>categorical judgement on assertability $ \vdash A\quad (\text{ I know that }A\text{ is assertable}). $</li>
</ol>
<p>When one makes the first kind of judgement one knows what the act of asserting $A$ will bring about, <em>i.e.</em> it is a knowledge of a problem, expectation or intention, of what counts as an assertion of $A$. For the second kind of judgement, one knows how to assert $A$, or <em>what to do</em> to assert $A$, <em>i.e.</em> it is a knowledge of the precise process of making an assertion of $A$.</p>
<h2 id="lecture-3">Lecture 3</h2>
<p>The difference between justificationist and verificationists is that justificationists do not equate meaningfulness with truth.</p>
<ul>
<li>Truth of a proposition = verifiability of the propositon
<ul>
<li>A method of verification = a proof that a proposition is true.</li>
</ul>
</li>
<li>Meaning of a proposition = what it is to verify the propositon / what <em>counts</em> as a verification of the proposition.</li>
</ul>
<div class="remark">
<div class="remark-style">
<span class="remark-head">Remark.</span>
This leads to, or better, as an observation/position comes from considering, the fundamental problem of the theory of meaning/truth:
$$
\text{Are there propositions which are true but cannot be proved to be true?}
$$
The problem naturally leads one to ask what does it mean when a proposition $P$ is said to be true. To comprehend the meaning of a proposition without a method of verification is possible, so the meaningfulness of a proposition cannot be its verifiability (and truth). The meaning of a proposition is the thing that determines what counts as a verification of the proposition, i.e. the <em>Sinn</em>. This is plausible but counter-intuitive when one thinks about the truth of a mathematical proposition, and when time is considered. For instance, the proposition
$$
P: \text{Ramses II died of tuberclosis in some year before Christ}
$$
is generally considered to be true, but was it true in AD 1800, when the disease tuberclosis hadn't been defined? $P$ didn't possess any sense in 1800. In other words, it possessed no meaning in 1800, and should not have been seen as a proposition. The meaning of $P$ 'came into being', so to speak, when the disease was defined. If the world is seen as an accumulation of facts, then the fact behind $P$, a proposition concerning approx. 13th century BC, emerged in 19th century, which can be seen as an instance of backward causation if one is liberal about the meaning of the word 'causation'. The case for mathematical statements is similar in spirit, since these are commenly held to be true 'eternally'.
<span style="float:right">◈</span>
</div>
</div>
<p>In HoTT, a <em>context</em> is defined as follows
<div class="theorem-style">
<span class="definition-head">Definition.</span>
A <em>context</em> is a finite list of variable declarations
$$
x_1: A_1, x_2: A_2(x_1),...,x_n :A_n(x_1,...,x_{n-1})
$$
satisfying the condition that for each $1\leq k \leq n$ it is possible to derive the judgement
$$
x_1: A_1, \ldots ,x_{k-1}: A_{k-1}(x_1,\ldots x_{k-1})\vdash A_k(x_1,\ldots,x_{k-1})\operatorname{type}.
$$
</div>
</p>
<p>This means that for $A_{k}(x_{k-1})$ to be a type, $x_{x-1}$ should be judged to be a of type $A_{k-1}(x_{k-2})$, and so on recursively. The rationale is given here by Martin-Lof, and it is explicitly stated that the ordering of in the context (i.e. the assumption) matters, <em>unlike Gentzen’s sequent calculus</em>.</p>
<p>The actual justification of the logical constants are, suprisingly enough, not really relevant to the modern form of Martin-Lof type theory, at least its incarnation in HoTT. The constants $\forall,\exists,\vee,\wedge$ are all <em>inductive types</em>, only the constant $\supset$ or $\to$ is really in the inference and context rules of dependent type theory. Category-theoretically speaking, the constant $\to$ is primitive in the sense that in the definition of a category $\to$ is essential, while the definability of the constants such as $\vee,\wedge,\forall,\exists$ are dependent on the structure of the category. Note that in dependent type theory the constant $\to$ is <em>not</em> the same as the constant $\to$ in sequent or logic. In dependent type a proof of $\Pi_{x:A}B(x)$ <em>is</em> a morphism when $B(x)$ is a single type $B$ (at least in some localization of the category), while in (intuitionistic, at least) sequent/logic $A\to B$ is the exponential object $B^A$. One should always carefully distinguish between different systems.</p>
<p>As illustrations, some examples should be helpful. The first example is the $\supset$-formation rule,
$$
\frac{\vdash A:\operatorname{ prop}\quad A:\operatorname{ true}\vdash B:\operatorname{ prop}}{\vdash A\to B:\operatorname{ prop}}
$$
in modern notation for HoTT, this is actually the $\Pi$-formation rule
$$
\frac{\Gamma, x:A\vdash B(x):\operatorname{ type}}{\Gamma \vdash \Pi_{(x:A)}B(x):\operatorname{ type}}
$$
since in modern notation,</p>
<ol>
<li>$x:A$ presupposes that $A$ is a type;</li>
<li>$x:A\vdash B(x):\operatorname{ type}$ means, given a proof $x$ of $A$, the judgement that $B(x)$ is a type can be made;</li>
<li>$\Pi_{(x:A)} B(x)$ is the dependent function type that converts a proof of $A$ to a proof of $B(x)$, i.e., it is the type of the assignments $x\mapsto b(x)$.</li>
</ol>
<p>Second example, corresponding to the $\supset$-elimination rule of Martin-Lof,
$$
\frac{\vdash A\to B:\operatorname{ true}\quad \vdash A:\operatorname{ true}}{\vdash B:\operatorname{ true}}
$$
is the $\Pi$-elimination rule
$$
\frac{\Gamma\vdash f:\Pi_{(x:A)} B(x)}{\Gamma,x:A\vdash f(x):B(x)}
$$
since what amounts to $B(x)$ being true is a proof $f(x)$ of it that is converted from a proof $x$ of $A$ by $f$ (that should be seen as something similar to $A\to B(x)$). If here one restricts to function types rather than dependent product types, then this is straightly an interpretation of morphism.</p>
<div class="remark">
<div class="remark-style">
<span class="remark-head">Remark.</span>
Upon identifying a proposition with a type $A$ and a proof of a proposition with a generalized element $x:A$, the problem mentioned in <a href="#remark_modus_ponens">the above remark</a> disappears, since now modus ponens takes a <em>proof</em> of $A$ and a method of converting a proof of $A$ to $B$, to a <em>proof</em> of $B$. There is no bare proposition involved.
<span style="float:right">◈</span>
</div>
</div>
Remarks on Categorical Logic
https://geistlib.xyz/remarks-on-categorical-logic/
Sun, 12 Feb 2023 20:28:00 +0000https://geistlib.xyz/remarks-on-categorical-logic/<p>These are <em>personal notes</em> and records of attempts that contain possibly tons of errors.</p>
<h2 id="general-philosophical-remarks-on-the-construction-of-the-category-of-contexts">General (Philosophical) Remarks on the construction of the category of contexts</h2>
<p>Since I don’t want to mess with higher categories, here the terminology of type theory will be avoided.</p>
<h3 id="proposition-vs-assertion">Proposition vs Assertion</h3>
<p>First recall the first (Lecture 1) section of <a href="https://geistlib.xyz/notes-on-martin-lofs-siena-lectures/">Notes on Martin Lof’s Siena Lectures</a>, where a proposition $P$ is distinguished from its assertion, or the very act of asserting it, $\vdash P$. Namely,</p>
<ol>
<li>The proposition $P$ is a state of affair in an ’external’, ‘objectified’ world.</li>
<li>The assertion $\vdash P$ is an attitude toward the proposition $P$, e.g. the act of proposing the proposition $P$, or the act of proving the proposition $P$.</li>
</ol>
<p>Now in a category $\mathcal{C}$ of context for its language $\mathsf{L}$, a proposition $P_{X}$ corresponds to an object $X\in\pi_0(\mathcal{C})$ in the category of isomorphism classes of $\mathcal{C}$. The $\pi_0$ functor is needed, since in a language multiple sentences can correspond to one proposition. We leave the details for what count as isomorphisms (equivalence between sentences) in $\mathcal{C}$ aside since it is a problem of the language itself.</p>
<p>The assertion of $P_{X}$, namely $\vdash P_{X}$, is defined as the Yoneda embedding $\mathcal{Y}_X$ of $X$. Recall that
$$
\mathcal{Y}:\mathcal{C}\to \operatorname{Set}^{\mathcal{C}^{op}}: X\mapsto \mathcal{Y}_X
$$
and $\mathcal{Y}_X:\mathcal{C}^{op}\to \operatorname{Set}$.</p>
<p>A slogan proposed by Michael Dummett is that the meaning of $P_X$ is determined by what count as a proof of $P_X$. In this context this means that the meaning of $P_X$ is determined by the structure of $\mathcal{Y}_X$, or more precisely, what are the morphisms onto $\mathcal{Y}_X$. Thus there are two possible ways to formulate $P_A \vdash P_B$,</p>
<ol>
<li>$\vdash$ is interpreted as the functor $\operatorname{Hom}_{\operatorname{Set}^{\mathcal{C}^{op}}}(\cdot,\cdot):{\operatorname{Set}^{\mathcal{C}^{op}}}^{op}\times \operatorname{Set}^{\mathcal{C}^{op}} \to \operatorname{Set}$.</li>
<li>$\vdash$ is interpreted as the evaluation $\operatorname{ev}:\operatorname{Set}^{\mathcal{C}^{op}}\to \operatorname{Set}$.</li>
</ol>
<p>In principle choosing which one doesnt matter, since by Yoneda lemma,
$$
\operatorname{Hom}_{\operatorname{Set}^{\mathcal{C}^{op}}}(\mathcal{Y}_A,\mathcal{Y}_B) \cong \mathcal{Y}_B(A).
$$
So up to a canonical isomorphism, these two yield the same result. However in order to make sense of the cut rule
$$
\frac{\Gamma,\vdash \Delta,P_Z\quad \Lambda,P_Z\vdash \Pi}{\Gamma,\Lambda \vdash \Delta,\Pi},
$$
which should be translated to the composition of morphisms, the first one should be the choice.</p>
<h3 id="logical-group-and-structural-group">Logical group and structural group</h3>
<ol>
<li>the logical group of the sequent rules for a particular logic controls the structure of the category of context $\mathcal{C}$.</li>
<li>the structural group of the sequent rules for a particular controls the structure of the presheaf category $\operatorname{Set}^{\mathcal{C}^{op}}$.</li>
</ol>
<p>The $\operatorname{R}\to$ rule in sequent for some system, written compactly
$$
\frac{P_A\vdash P_B}{\vdash P_A\to P_B},
$$
can be semi-interpreted in the following way. For a <em>cartesian closed category</em> there is a hom-tensor adjunction
$$
\operatorname{Hom}_{\mathcal{C}}(\cdot,B^A)\cong \operatorname{Hom}_{\mathcal{C}}(\cdot\times A,B),
$$
and we have
$$
\operatorname{Hom}_{\operatorname{Set}^{\mathcal{C}^{op}}}(\mathcal{Y}_{A\times(\cdot)},\mathcal{Y}_B) \cong \mathcal{Y}_B(A\times\cdot) = \operatorname{Hom}_{\mathcal{C}}(A\times \cdot,B)
$$
Interpreting the conjunction $\wedge$ as $\times$, and let the exponential object $B^A$ interprete $P_A\to P_B$ , this means
$$
\frac{P\wedge P_{A} \vdash P_B}{P\vdash P_A\to P_B},
$$</p>
<p>This is a <em>semi</em>-interpretation. Since there are no elimination rules for logical constants in sequent calculus the above formula cannot be valid at least in sequent calculus. This reflects the differences between the presheaf category of $\mathcal{C}$ and the category $\mathcal{C}$ itself. This can become an interprtation when one defines a tensor unit $I$ for the product $\times$, s.t. $I\times A\cong A$; for cartesian closed category the terminal object $\ast$ can be the one.</p>
<h2 id="rationales-for-the-construction-of-topos-logic">Rationales for the construction of topos logic</h2>
<p>Recall that for Hilbert, the sole evident rule for logical inference was <em>modus ponens</em>,
$$
\frac{A \vdash B\quad B\vdash C}{A\vdash C}
$$
which looks just like morphism composition in a category
$$
f:A\to B, g: B\to C, g\circ f: A\to C.
$$</p>
<p>The general idea is to identify</p>
<ol>
<li>A proposition with an object $A$ in the category.</li>
<li><em>A</em> proof of a proposition $A$ as a arrow $x$ with codomain $A$.</li>
</ol>
<p>As before, we distinguish between the proposition $A$ itself, or better, the act of asserting that $A$ is a proposition,
$$
\vdash A:\operatorname{prop}
$$
with the act of asserting $A$, i.e. giving a proof of $A$,
$$
\vdash x:A.
$$
Note that here the notation is identical with that used in type theory. However, for the time being, it would be better to leave all type-theoretic notions alone.</p>
<div class="remark">
<div class="remark-style">
<span class="remark-head">Remark.</span>
Since $x:A$ is just an arrow with codomain $A$, it might be useful, as before, to think of the act of asserting $A$, "$\vdash A$", as all possible ways of proving $A$, which can be $\operatorname{Hom}(\cdot,A)=\mathcal{Y}_A$, as before.
<span style="float:right">◈</span>
</div>
</div>
<h3 id="the-principle-of-subobjects">The Principle of Subobjects</h3>
<p>Two proofs $x:A$, $y:A$ are equal if the morphisms $x=y$. Now, suppose that $x:A$ is a morphism $x:B\to A$, and there are two proofs $f:B, g:B$ of $B$ s.t. $x\circ f = x\circ g:C\to A$. It is natural to require that $f=g:C\to B$ since identical two-step verifications with an identical second step should have identical first step. This forces $x:B\to A$ to be a monomorphism. This, namely the requirement that a proof $x:A$ of $A$ to be a monomorphism, or more topos-theoretically, passing to the equivalence class given by isomorphisms, a <em>subobject</em> of $A$, will be called the <em>principle of subobjects</em>.</p>
<p>Hence the proofs of $A$, or equivalently the act “$\vdash A$” of asserting $A$, should be $\operatorname{Sub}(A)$ rather thant $\mathcal{Y}_A$. However, notice that by Yoneda lamma, for locally small categories,
$$
\operatorname{Hom}(\mathcal{Y}_{A},\operatorname{Sub}) \cong \operatorname{Sub}(A),
$$
and the isomorphism is, in particular, natural in $A$.</p>
<div class="remark">
<div class="remark-style">
<span class="remark-head">Remark.</span>
For $\mathcal{C}$ a topos, $X\in\mathcal{C}$, $\operatorname{Sub}(X)$ is a Heyting algebra, so we have intuitionistic propositional calculus on the proofs.
<span style="float:right">◈</span>
</div>
</div>
<p>Subobjects are stable under precomposition by subobjects, so no problem arises with regard to “proof compositions”. If it is supposed that the category has finite limits and is well-powered ($\operatorname{Sub}(A)$ for all objects $A$ are all small sets). Furthermore, $\operatorname{Sub}:\mathcal{C}^{\mathsf{op}}\to \operatorname{Sets}$ is a presheaf, it is always possible to pull a proof of $B$ back by a general morphism $f:A\to B$ and yield a proof of $A$.</p>
<p>Next what needs to be clarified is the conversion of a proof $x:A$ to a proof $y:B$. First some remarks should be made. There are some notions that needs to be distinguished from each other</p>
<ol>
<li>the conversion processes, the rules of which should be given by logical and structural rules, should, unfortunately, not be called proofs (need a good name).</li>
<li>a particular <em>proof</em> of a <em>proposition</em> $A$ is a monic arrow (or its equivalence class) $x:A$ to the object $A$.</li>
<li>the act of <em>asserting</em> a proposition $A$, “$\vdash A$”, for locally small categories $\mathcal{C}$ is just the set of subobjects $\operatorname{Sub} A$. There are many ways to assert $A$, that is, to give proofs of $A$, while different proofs are all just the assertion of $A$.</li>
<li>Using slice categories instead of subobjects/hom-sets would be much better.</li>
</ol>
Rendering $E_8$-Root Polytope
https://geistlib.xyz/e8-root-system-polytope/
Sat, 11 Feb 2023 12:05:56 +0100https://geistlib.xyz/e8-root-system-polytope/<p>Generate the 3D-graph of the $E_8$-root system using the code, provided <a href="https://mathematica.stackexchange.com/questions/271108/3d-graphing-the-e-8-root-system-4-21-polytope">here</a>, with <code>Mathematica</code>, and export to <code>.x3d</code>:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-mma" data-lang="mma"><span class="line"><span class="ln">1</span><span class="cl"><span class="n">refl</span><span class="p">[</span><span class="nv">n_</span><span class="p">]</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="n">Flatten</span><span class="p">[</span><span class="n">Outer</span><span class="p">[</span><span class="n">List</span><span class="p">,</span><span class="w"> </span><span class="n">Sequence</span><span class="w"> </span><span class="o">@@</span><span class="w"> </span><span class="n">Table</span><span class="p">[{</span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="n">n</span><span class="p">}]],</span><span class="w"> </span><span class="n">n</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">];</span><span class="w">
</span></span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="w"></span><span class="n">perm</span><span class="p">[{</span><span class="nv">a_</span><span class="p">,</span><span class="w"> </span><span class="nv">b_</span><span class="p">,</span><span class="w"> </span><span class="nv">c_</span><span class="p">,</span><span class="w"> </span><span class="nv">d_</span><span class="p">,</span><span class="w"> </span><span class="nv">e_</span><span class="p">,</span><span class="w"> </span><span class="nv">f_</span><span class="p">,</span><span class="w"> </span><span class="nv">g_</span><span class="p">,</span><span class="w"> </span><span class="nv">h_</span><span class="p">}]</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="n">Flatten</span><span class="p">[</span><span class="n">Function</span><span class="p">[</span><span class="w"> </span><span class="n">Permutations</span><span class="o">@</span><span class="p">{</span><span class="n">a</span><span class="w"> </span><span class="nv">#1</span><span class="p">,</span><span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="nv">#2</span><span class="p">,</span><span class="w"> </span><span class="n">c</span><span class="w"> </span><span class="nv">#3</span><span class="p">,</span><span class="w"> </span><span class="n">d</span><span class="w"> </span><span class="nv">#4</span><span class="p">,</span><span class="w"> </span><span class="n">e</span><span class="w"> </span><span class="nv">#5</span><span class="p">,</span><span class="w"> </span><span class="n">f</span><span class="w"> </span><span class="nv">#6</span><span class="p">,</span><span class="w"> </span><span class="n">g</span><span class="w"> </span><span class="nv">#7</span><span class="p">,</span><span class="w"> </span><span class="n">h</span><span class="w"> </span><span class="nv">#8</span><span class="p">}]</span><span class="w"> </span><span class="o">@@@</span><span class="w"> </span><span class="n">refl</span><span class="p">[</span><span class="mi">8</span><span class="p">],</span><span class="w"> </span><span class="mi">1</span><span class="p">];</span><span class="w">
</span></span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="w"></span><span class="n">eperms</span><span class="p">[</span><span class="nv">n_</span><span class="p">]</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="n">Select</span><span class="p">[</span><span class="n">perm</span><span class="p">[</span><span class="n">n</span><span class="p">],</span><span class="w"> </span><span class="n">EvenQ</span><span class="o">@</span><span class="n">Count</span><span class="p">[</span><span class="n">Sign</span><span class="o">@</span><span class="nv">#</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">]</span><span class="w"> </span><span class="o">&</span><span class="p">];</span><span class="w">
</span></span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="ln">5</span><span class="cl"><span class="w"></span><span class="n">vertices</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Union</span><span class="o">@</span><span class="n">Join</span><span class="p">[</span><span class="n">eperms</span><span class="o">@</span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln">6</span><span class="cl"><span class="w"> </span><span class="n">perm</span><span class="o">@</span><span class="p">{</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">}];</span><span class="w">
</span></span></span><span class="line"><span class="ln">7</span><span class="cl"><span class="w"></span><span class="n">edges</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Select</span><span class="p">[</span><span class="n">Position</span><span class="p">[</span><span class="n">DistanceMatrix</span><span class="p">[</span><span class="n">vertices</span><span class="p">]</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">Sqrt</span><span class="p">[</span><span class="mi">8</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">],</span><span class="w"> </span><span class="n">Apply</span><span class="p">[</span><span class="n">Less</span><span class="p">]];</span><span class="w">
</span></span></span><span class="line"><span class="ln">8</span><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="ln">9</span><span class="cl"><span class="w"></span><span class="n">graph</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Show</span><span class="p">[</span><span class="n">Graph3D</span><span class="p">[</span><span class="n">edges</span><span class="p">,</span><span class="w"> </span><span class="n">EdgeShapeFunction</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">(</span><span class="n">Tube</span><span class="p">[</span><span class="nv">#</span><span class="p">,</span><span class="w"> </span><span class="mf">.001</span><span class="p">]</span><span class="w"> </span><span class="o">&</span><span class="p">),</span><span class="w"> </span><span class="n">VertexSize</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">Small</span><span class="p">]];</span><span class="w">
</span></span></span></code></pre></div><ol>
<li>The function <code>refl</code> generates the list of all possible ways for filling $n$ slots with $-1$ and $1$, corresponding to a group that we will call $H$.</li>
<li>The function <code>perm</code> permutes and further extens the permutation group with the $H$ (semidirect product).</li>
<li>The function <code>eperm</code> selects out those permutations, given by <code>perm</code>, with even number of negative elements.</li>
<li>With <code>Show</code>, <code>Graph3D</code> is converted to <code>Graphics3D</code>. Only graphics can be exported.</li>
</ol>
<figure ><img src="https://geistlib.xyz/img/e8-polygon.webp"><figcaption>$E_8$ Polygon</figcaption></figure>
<p>Export to <code>.x3d</code> to feed into <code>Blender</code> (a rule of thumb: <code>.x3d</code> for graphics generated by <code>Graph3D</code> and <code>.dxf</code> for those directly generated by <code>Graphics3D</code>):</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-mma" data-lang="mma"><span class="line"><span class="ln">1</span><span class="cl"><span class="n">Export</span><span class="p">[</span><span class="s">"graph.x3d"</span><span class="p">,</span><span class="w"> </span><span class="n">graph</span><span class="p">]</span><span class="w">
</span></span></span></code></pre></div><p>Import <code>graph.x3d</code> into <code>Blender</code>, add light source and a floor plane, and render.</p>
<p><img src="https://geistlib.xyz/img/blender-e8-polygon.webp" alt="E8 Polygon, Rendered with Blender"></p>
<p>Or, if you like,</p>
<p><img src="https://geistlib.xyz/img/blender-e8-space.webp" alt="E8 Polygon2, Rendered with Blender"></p>
Gap-fillings for some theorems in mathematics textbooks
https://geistlib.xyz/gap-fillings-for-theorems/
Tue, 07 Feb 2023 00:00:00 +0000https://geistlib.xyz/gap-fillings-for-theorems/<p>For the time being much will be on analysis since these are what I am now reviewing. This was motivated by a sentence in Segal & Pressley’s <em>Loop Groups</em>, saying</p>
<blockquote>
<p>By a representation fo a tpological group $G$ we shall always mean a complete locally convex complex topological vector space $E$ […]</p>
</blockquote>
<p>This for me means $E$ is Frechet, though not acutally is. Why assume this?</p>
<blockquote>
<p>We shall sometimes consider the dual $E^\ast$ of a representation $E$ with the contragredient action - if $g$ acts on $E$ by $T$ then it acts on $E^\ast$ by $(T^\mathsf{t})^{-1}$ […] We shall always give $E^\ast$ the topology of uniform convergence on compact subsets. Then it is locally convex and complete, and $(E^\ast)^\ast$ is canonically isomorphic to $E$</p>
</blockquote>
<p>And I found myself unable to understand these.</p>
<h2 id="some-basic-mathematical-analysis">Some Basic Mathematical Analysis</h2>
<p><em>Closure and limit points in metric spaces</em> The closure $\overline{U}$ of $U\subset X$ in a metric space is the set of limits.
<div class="proof">
<em>Proof: </em>
First, every point in $\overline{U}$ is a limit point. Let $x\in \overline{U}$, we construct a series in $U$ that converges to $x$. Since $x\in \overline{U}$, $B_{1/n}(x)\cap U$ for $n\in\mathbb{N}^+$ is nonempty. For each $n$ choose a point $x_n\in B_{1/n}(x)\cap U$. The series $(x_n)$ are all in $U$. For $\epsilon>0$, choose $N$ s.t. $\epsilon>1/N$, then $|x_N-x|<\epsilon$, and also for all $n>N$, so the series converges to $x$.
<br>
Second, the limit points are all in $\overline{U}$. Let $(x_n)$ be a convergent series in $X$ with all $(x_n)$ in $X$ and $\lim x_n = x$. Suppose that $x\notin \overline{U}$, then $x\in \overline{U}^c$ which is open. Hence for every $\epsilon >0$ there is an open ball $B_\epsilon(x)$ contained in $\overline{U}^c$, <em>i.e.</em> if $d(y,x)<\epsilon$ then $y\in B_\epsilon\subset \overline{U}^c \subset U^c$. Since the series converges there is an $N$ s.t. for all $n>N$, $d(x_n,x)<\epsilon$. This means $x_{N+1} \in B_\epsilon \subset U^c$, a contradiction.
<span style="float:right">□</span>
</div>
</p>
<p><em>Precompact set</em>. A precompact (totally bounded) set $U\subset X$ of a metric space is a set with a finite $\epsilon$-net $F_\epsilon\subset X$ for every $\epsilon > 0$. In fact, $U$ is precompact iff for every $\epsilon >0$ there is a finite $\epsilon$-net $F_\epsilon\subset U$.
<div class="proof">
<em>Proof: </em>
The $\leftarrow$ direction is trivial. For $\rightarrow$, for $x\in F_\epsilon$, if $x\in U$, skip. If $x\notin U$, it is possible to pick $x'\in U\cap B_{2\epsilon}(x)$ s.t. all $y\in U\cap B_\epsilon(x)$ is in $B_{2\epsilon}(x')$. This is because for any $y_1,y_2\in U\cap B_\epsilon(x)$,
$$
d(y_1,y_2)\leq d(y_1,x)+ d(y_2,x) < 2\epsilon;
$$
To find a $\epsilon$-net in $U$, do the above procedure for $\epsilon/2$-net in $X$.
<span style="float:right">□</span>
</div>
</p>
<h2 id="rudins-functional-analysis">Rudin’s Functional Analysis</h2>
<h3 id="chapter-1-tvs">Chapter 1: TVS</h3>
<p><em>Theorem 1.11</em> If $\mathcal{B}$ is a local base for a TVS $X$, then $\forall U\in \mathcal{B}$, $\exists U’\in \mathcal{B}$ s.t. $\overline{U’} \subset U$.
<div class="proof">
<em>Proof: </em>
Let $U\in\mathcal{B}$, the complement $U^c$ is closed and $0\notin U^c$, thus there is a 0-neighborhood $V$ s.t. $\overline{\{0\}+V}=\overline{V}\subset U$ since $\{0\}$ is compact and $\{0\}\cap U^c = \emptyset$. Every 0-neighborhood contains a member of $\mathcal{B}$, thus there is a $U'\in\mathcal{B}$ s.t. $U'\subset V$. Taking closure $\overline{U'}\subset\overline{V}\subset U$.
<span style="float:right">□</span>
</div>
</p>
<p><em>Theorem 1.13 (b)</em> For TVS $X$, if $A,B\subset X$, then $\overline{A}+\overline{B}\subset \overline{A+B}$.
<div class="proof">
<em>Proof: </em>
Let $a\in \overline{A}$, $b\in \overline{B}$. To prove $a+b\in \overline{A+B}$, one needs to show that every $(a+b)$-neighborhood $U$ is not disjoint from $A+B$, since the very definition of closure $\overline{V}$ of $V$ is the complement of the union of open sets disjoint from $V$.
<span style="float:right">□</span>
</div>
</p>
<h3 id="chapter-2-completeness">Chapter 2: Completeness</h3>
<p><em>Theorem 2.2</em> Baire’s theorem.
<div class="proof">
<em>Proof: </em>
The statement that there exists an open $B_n\neq \emptyset$ with
$$
\overline{B}_n\subset V_n \cap B_{n-1}
$$
is in general false. One needs to invoke the properties of complete metric space/locally compact Hausdorff space. $V_n$ is dense and open, $B_{n-1}$ is open, then the intersection $W$ is nonempty and open. Now one needs to find am open subset $B_n\subset W$ s.t. $\overline{B}_n\subset W$.
For complete metric space, One can always choose a $x$-neighborhood with small radius. For locally compact Hausdorff space, one needs to use the fact that there is a local base $\mathcal{B}$ consisting of closed compact neighborhoods of $x\in W$; $W$ is an $x$-neighborhood, so there is a $B_n\in\mathcal{B}$ contained in $W$ which is compact and closed. The infinite intersection $K$ is nonempty by closedness of each intersectian, and finite interesection property.
<span style="float:right">□</span>
</div>
</p>
<h2 id="von-neumann-algebras">Von Neumann Algebras</h2>
<p><em>Only bicommutants are relevant</em>. Let $S\subset B(H)$ and $S’=\{b\in B(H)| ab=ba, \forall a\in S \}$, then ${{S’}’}’ =S’$.
<div class="proof">
<em>Proof: </em>
Confusing definition unravellings.
<ol>
<li>$S'\subset S'''$. Let $b\in S'$, then $\forall c\in S''$, $bc=cb$, this means $b\in S'''$.</li>
<li>$S'''\subset S'$. Let $a\in S$, then $\forall b\in S'$, $ab=ba$, this means $a\in S''$. $a\in S''$, then $\forall d\in S'''$, $ad=da$, but this means $S'''\subset S'$.</li>
</ol>
A remark: To prove 2. both $S$ and $S'''$ are needed, hence one cannot prove $S=S''$ in this way, and it is not necesarrily true (otherwise we don't need von Neumann algebras at all).
<span style="float:right">□</span>
</div>
</p>
<h2 id="follands-a-course-in-abstract-hrmonic-analysis">Folland’s <em>A course in abstract hrmonic analysis</em></h2>
<p><em>Theorem 1.4 (d)</em>. For $A$ a unital Banach algebra and $x,y\in A$, it is known that if $x$ is invertible then $x-y$ is invertible when $||y||<||x^{-1}||^{-1}$, and that if $x$ is invertible and $||y||\leq \frac{1}{2}||x^{-1}||^{-1}$ then $||(x-y)^{-1}-x^{-1}|| \leq 2||x^{-1}||^2||y||$, show that (1.) the set of invertible elements of $A$ is open, and (2.) the map $x\to x^{-1}$ is continuous on it.
<div class="proof">
<em>Proof: </em>
(1.), Let $x$ be invertible and $||x-q|| < ||x^{-1}||^{-1}$, then $x-(x-q) = q$ is invertible. (2.) The continuity is obvious, but actually it can be proved that the map is diffferentiable. Let $T$ be the liner operator on $A$ s.t. $u(y)=-y^{-1}x y^{-1}$, then
$$
||(x+y)^{-1}-x^{-1}-u(y)|| \leq ||(1+x^{-1}y)^{-1}+x^{-1}y||||x^{-1}|| \leq 2(||x^{-1}||^3 ||y||^2)
$$
then $\operatorname{lim}_{y\to 0}\frac{||(x+y)^{-1}-x^{-1}-u(y)||}{||y||} = 0$, meaning that the map $x\to x^{-1}$ is differentiable on the set of invertible elements with derivative $u$.
<span style="float:right">□</span>
</div>
</p>
<h2 id="introduction-to-homotopy-theory-egbert-rjike">Introduction to Homotopy Theory, Egbert Rjike</h2>
<p><em>Exercise 1.1 (a)</em>. Derive the <em>element conversion rule</em>,
$$
\dfrac{\Gamma\vdash A\equiv A’ \operatorname{type}\quad \Gamma\vdash a:A}{\Gamma\vdash a:A’}
$$
<div class="proof">
<em>Proof: </em>
First, from context, using $\delta$-rule (generic element)
$$
\dfrac{\dfrac{\Gamma\vdash A\equiv A'\operatorname{type}}{\Gamma\vdash A'\operatorname{type}}}{\Gamma,x:A'\vdash x:A'},
$$
and with symmetry,
$$
\dfrac{\Gamma\vdash A\equiv A'\operatorname{type}}{\Gamma\vdash A'\equiv A\operatorname{type}}.
$$
Then, with variable conversion rule,
$$
\dfrac{\Gamma, x:A' \vdash x:A'\quad \Gamma \vdash A'\equiv A\operatorname{type}}{\Gamma,x:A \vdash x:A'}.
$$
Finally, with substitution,
$$
\dfrac{\Gamma, x:A \vdash x:A' \quad \Gamma \vdash a:A}{\Gamma\vdash a:A'}.
$$
<span style="float:right">□</span>
</div>
</p>
The Law of Excluded Middle
https://geistlib.xyz/the-law-of-excluded-middle/
Wed, 01 Feb 2023 19:30:42 +0100https://geistlib.xyz/the-law-of-excluded-middle/<div class="colored" style="text-align: center;"> [Under Construction] </div>
<h2 id="introduction">Introduction</h2>
<p>There are terminological differences in the literature, so here we will stipulate that</p>
<ul>
<li>LEM says that $\vdash P\vee \neg P$.</li>
<li>The principle of <em>bivalence</em> PB says that there are precisely two truth values for a proposition $P$.</li>
</ul>
<p>LEM and PB may look similar, since in natural language they all mean 「$P$ is either true or false」. The problem is that 「either…or」 is heavily ambiguous. In intuitionistic logic (IL), in which the LEM is not valid, a proposition $P$, when a semantics is imposed, is indeed always true or false: IL is a 2-valued logic, i.e. PB holds in IL. What is not allowed are, for example, inferences in the following form</p>
<blockquote>
<p>Either $P$ or $\neg P$. If $P$ then $Q$, if $\neg P$ then $Q$. Since $P\vee \neg P$ is <em>true</em>, $Q$ is true.</p>
</blockquote>
<p>An illustration that demonstrates</p>
<ol>
<li><em>why</em> LEM tends to be rejected by intuitionists</li>
<li>what’s the difference between LEM and PB</li>
</ol>
<p>is the folloing dialogue.</p>
<h3 id="a-debate-between-an-agent-and-a-fatalist">A debate between an agent and a fatalist</h3>
<p>An agent, Adam, was preparing for the next air-raid so that he would have more chance to survive. Now came a Fatalist, preaching the might of Fate:
<pre class="poem">
F: O' Adam, why are you working so hard to prepare for the raid?
A: I think we agree, if I prepare, it's more likely that I'll survive.
F: I seriously doubt that. Do you agree that either you'll be killed in the raid, or you'll survive?
</pre>
Let’s suppose that Adam was in fact Aristotle, who thought that LEM is valid, or more precisely, didn’t know about the difference between PB and LEM, and so didn’t caution himself about the insidiousness of the either-or clause.
<pre class="poem">
A: Sure.
F: Then, do you agree, that, if you won't be killed, you won't be killed?
A: That I think is trivial.
F: Then, I think, if you won't be killed, then you won't be killed even if you do not prepare or do prepare.
A: I can admit that it is a valid inference, <em>provided that</em> I really won't be killed, but there's no guarentee.
F: OK, then let's say that you will be killed. Then you will be killed even if you do prepare or do not prepare, right?
A: It is a valid inference, again, <em>provided that</em> I really will be killed, but there's no guarentee.
F: We agreed that either you'll be killed in the raid, or you'll survive, right?
A: Yes, indeed.
F: So, if you'll be killed, then your action is meaningless, and if you won't be killed, your action is again meaningless. Meaningless, ineffective.
A: What?
</pre>
It seemed that Adam was totally confused. He thought for a moment, and said:
<pre class="poem">
A: No, let's say I won't be killed, since saying I will be killed just feels bad.
Now, I won't be killed, then my action will indeed be useless, but it doesn't render false that if I don't prepare, it is possible that I'll be killed.
F: You said that you won't be killed, then it is impossible that you'll be killed.
A: If I won't be killed, then even if I don't prepare, I won't be killed. Sure, but if I don't make any hypothesis regarding my fate, it is valid that
if I don't prepare, I might be killed, and I think the probability for being killed is larger than when I prepare.
F: I think we have excluded the possibility that you will be killed.
A: If it is excluded, then you cannot say that if I'll be killed, even if I prepare, I'll be killed, because, the possibility is excluded.
So I still should prepare, since being killed is possible, and preparation is not proved to be useless.
F: You see, I'm not saying that you'll be killed and won't be killed, I'm saying that, <em>either</em> you'll be killed, <em>or</em> you won't be.
A: Maybe you can say that, but you shouldn't infer from that either-or. Once you have decided that I'll be killed, you're not allowed to say that I won't be killed.
F: Neither you are allowed to say that you'll be killed after you said that you won't be killed.
A: No, I didn't <em>infer from</em> I'll be killed, I inferred from 'if I don't prepare', see?
</pre>
$$
\mathsf{If}\text{ I won’t be killed }\quad \mathsf{then}\text{ if I don’t prepare, I won’t be killed.}
$$
$$
\mathsf{If}\text{ I don’t prepare }\quad \mathsf{then}\text{ I might and might not be killed.}
$$
<pre class="poem">
A: So, I can still say that, if I don't prepare, I might and might not be killed, and hence I should prepare.
</pre>
</p>
<h3 id="drinkers-paradox">Drinker’s paradox</h3>
<p>The problem, roughly, is that, $F$ never took a stance on whether $A$ would or would not be killed. In the drinker’s paradox, the LEM, which the fatalist accepts, will allows one to say that</p>
<blockquote>
<p>In a pub, there is a man $x$, when $x$ drinks, everyone in the pub drinks.</p>
</blockquote>
<p>The dialogue will be like this:
<pre class="poem">
A: I don't agree with you.
F: Either everyone in the pub drinks, or not, right?
A: Indeed.
F: If all drink, then there is a man X, when X drinks, everyones drink, right?
A: Yes, since, trivially, everybody is drinking now.
F: If it is not the case, then I choose someone that is not drinking, and say that this is X.
A: But what happens when <em>this</em> X drinks, and there is someone, say Y, not drinking?
F: Then I choose Y.
A: Why are you allowed to alter your choice?
F: Why am I not allowed? I merely said that there is such a man.
</pre>
</p>
<p>Maybe Adam knows how to do better this time,
<pre class="poem">
A: OK. You are allowed to alter your choice, but again, you should not infer from either-or. Take a stance.
F: OK, everyone drinks. Then there is a man X, when X drinks, everyone drinks.
A: Sure, but the hypothesis 'if all drink' needs to be dropped to prove your point.
F: Then I drop the hypothesis. If someone, say, X is not drinking, I choose X. Remember that I have the right to alter my choice.
A: It doesn't prove that when X drinks, everybody drink.
F: I can wait until everybody drinks.
A: You see, you assumed that some X is not drinking when you chose this 'some' X, or you won't be able to choose.
</pre>
</p>
<h3 id="bhk-interpretation">BHK interpretation</h3>
<p>Now Fatalist may try to attack back,</p>
<pre class="poem">
F: But you agree that a proposition is either true or false?
A: Sure. By that I mean, P is true or not P is true, but not that P or not P is a valid departure point for a inference.
F: Then what do you mean by 'not P is true'? P, not P, one of them must be true, so P or not P should be true. And truth starts a valid inference.
A: 'Not P is true' means there is no mean to show that P is true. So P or not P true means, you can show that there is a proof of P, or that there is no proof of P.
F: A proof of P either exists or not.
A: To admit this, you need to show that there is a proof of P, or there isn't, first.
F: What if I can neither show P nor show that I can't show P? You said that P is true or false.
A: If you can show P, <em>then</em> P is true, and you won't be able to show that you can't show P, etc. So there is no problem. Before showing one, I refrain from saying that P is true or not.
F: But you said I need to take a stance.
A: That is because you used P's either-true-or-not as a point of departure for your inference; once you proved P, you cannot say not P.
F: Does the truth value of P depend on my proof of it?
A: I don't know the truth of P <em>in itself</em>, whatever it means, what I know is whether my inference is valid.
P might be true or false, but, for example, only after I proved P, I <em>know</em> that P is true.
If I don't know whether P is true or false, I cannot use the individual assertions 'P true', or 'P false', together with the <em>fact</em> that
P is either true or false <em>after there is a prove of one of them</em>, for I don't know.
</pre>
Further comments on Dummett's Comments on Frege
https://geistlib.xyz/further-comments-on-dummetts-comments-on-frege/
Sun, 29 Jan 2023 00:00:00 +0000https://geistlib.xyz/further-comments-on-dummetts-comments-on-frege/<h2 id="frege-philosophy-of-language">Frege, Philosophy of Language</h2>
<h3 id="the-evolution-of-freges-thought">The Evolution of Frege’s Thought</h3>
<p>Dummett divides Frege’s career into six periods.</p>
<ol>
<li>1879-1889, <em>Begriffsschrift</em>. Quantifier and variables, axiomatization of 0th- and 1st-order logic. The informal commentary contains the germ of Frege’s later doctrine of assertion. Distinguishinig between the judgeable content and the act of judgment itself. The assertion sign. The problem of Sinn/Bedeutung and identity-statements are prosed.</li>
<li>1884-1890, <em>Grundlagen der Arithmetik</em>. The irrelevance of mental images to Sinn, the objective character of Sinn and of logic as against psychology. Distinction betwwen objects and concepts. relations and functions. The emphasis on the central role of sentences in language. The context principle. New explanations of the notions of the analytic and the a priori.</li>
<li>1891-1904. <em>Function und Begriff</em> to <em>Was ist eine Funktion</em>, including the publications of <em>Grundgesetze</em>. In this period the distinction between Sinn and Bedeutung is made. Systematic development of his philosophy of logic. Assimilation of sentences to complex names. Complete definition.</li>
<li>1905-1913. Unproductive.</li>
<li>1914-1918. <em>Logik in der Mathematik</em>. Sinn and thought, undefiniability of truth and the criticism of the correspondence theory. Wittgenstein visited Frege around late 1913 to early 1914.</li>
<li>1919-1925. Rejection of the logical notion of class (“the extension of a concept”). There is no object that is given through logic alone. Holding geometry as prior to number theory.</li>
</ol>
<h3 id="sense-and-tone">Sense and Tone</h3>
<p>The sense (I’ll use the word <em>Sinn</em> for the sense in this sense) of individual words and the Sinn of sentences are different, at least in <em>Grundlagen</em>. First of all, there are two notions of <em>significance</em>,</p>
<ol>
<li>Significance is that which effects a linguistic act, i.e. a language game. A “unit of significance” is thus an atomic entity that effects a linguistic act.</li>
<li>Significance is that which carries meaning. A “unit of significance” is thus an atomic entity that carry a meaning of their own.</li>
</ol>
<p>The first point made is that the Sinn of an individual word is not determined by its occurence in any sentence, so, in this sense, a sentence is <em>not</em> a unit of significance as stated by (2). Of course, the word “meaning” is ambiguous there. Nevertheless, the crude fact that a totally new sentence can be formed and understood proves that words at least have, in some sense, their own meaning. This meaning, or the Sinn of an individual word, is the way in which it can be organized by some syntactic rule and form sentences, and general sentences at that. This means that the Sinn of a word is not determined by its occurence in any particular sentence, but by some general rule that determines how a particular word, in its typographical sense, can be combined with other words to form any sentence.</p>
<p>In the sense of (1), however, clearly a word is not a unit of significance, but a sentence is: an expression with which a move in the language game is made, or a linguistic act is performed. For a particular sentence $S$, its Sinn is more or less determined by the words that it is constituted, but the Sinn itself is about its role in effecting a linguistic act, or, for Frege, its truth condition. Hence the Sinn, the meaning, of a sentence is determined by the words that constitute it and their organization, but Sinn itself, the notion of the meaning of a sentence, is the linguistic act the sentence effects.</p>
<p>Here is a crude analogy, which I think would be sufficient to illustrate the difference between how the Sinn of a sentence is determined by its word, and what the Sinn of a sentence is. What constitues the notion of “drinking alcohol from a cup” is the way this act can be done, that is, picking up the cup etc. However the meaning of drinking alcohol from a cup is context-dependent, in the sense that it would be quite outrageous to drink when one is participating at e.g. a lecture.</p>
<p>Some further remarks:</p>
<ol>
<li>The context principle of Frege and, I’ll add further that, the thesis held by Frege that Sinn of a sentence is that which is communicable, foreshadow the <em>meaning if use</em> doctrine of Wittgenstein, and Frege in fact gives a more refined notion of meaning compared to Wittgenstein.</li>
<li>However, after <em>Grundlagen</em> the contextual definitions are objected, which made Frege take the fatal step of introducing the notion of class into his system.</li>
<li>While the distinction between Sinn and Bedeutung is not made explicit in <em>Grundlagen</em>, it is needed for the proper explanation of the notions of object, concept and relation which are there used.</li>
</ol>
<h3 id="sense-and-reference">Sense and Reference</h3>
<ul>
<li>The <em>Sinn</em> of an expression is that part of its meaning which is relevant to, or which needs to be grasped in order to obtain, the determination of the truth-value of sentences in which the expression occurs.</li>
<li>The <em>Bedeutung</em> really coincides with thenotion of an interpretation for formulas of predicate logic as employed in modern mathematical logic.</li>
</ul>
<p>Now it seems that the two notions coincide, since once the Bedeutung of each word in a sentence ahs been determined, the truth-value of the sentence is thereby determined. However, Bedeutung is not an <em>ingredient of meaning</em>. It is Sinn, as part of the meaning of sentences, that determines its reference. Any freature of the meaning of a word which doesn’t affect the reference that it has does not belong to its Sinn.</p>
<p>Now since the word meaning is imprecise, this needs further explanation. How can it be decided that the truth of a claim that something does or does not form an ingredient in <em>meaning</em>? A first pair of questions that could be asked might be of the following forms</p>
<ol>
<li>Under what conditions an expression, in particular a sentence, is said to have a meaning or lack one?</li>
<li>Under what conditions two expressions do or do not have the same meaning?</li>
</ol>
<p>However, a better question might be</p>
<ul>
<li>What does a person know when he knows what a word or expression means, that is, when he understands it?</li>
</ul>
<p>Thus if Sinn is an ingredient in meaning, it would be something which constitutes part of what someone who understands the word or expression implicitly grasps, and in his grasp of which his understanding in part consists. Thus to claim that Bedeutung is not an ingredient in meaning is to claim that the understanding of a word or expression never consists, even in part, merely in associating something in the world with that word or expression.</p>
<p>A point that needs to be made is that the claim does not mean that Bedeutung has nothing to do with meaning. Via the Bedeutung of the words in a sentence that its truth-value is determined, and the Sinn of a word coinstitutes the contribution which it makes to determining the truth-conditions of sentences in which it occurs precisely by associating a certain Bedeutung with it. Hence the Sinn of a word consists in means by which a Bedeutung of an appropriate kind is determined for that word, which makes a link betweeen Bedeutung and Sinn. Bedeutung is a consequence of meaning, but understanding which a speaker of a language has of a word in that language, or just that part of his understanding of it which is relevant to his recognition of sentences containing it as true or as false, can never consist merely in his associating a certain thing with it as its referent; there must be some particular <em>means</em> by which the association is effected, and the knowledge of which constitutes his grasp of its sense.</p>
<p>Whoever knows the Sinne of two expressions with the same Sinne must know that they have the same Sinn, since these are what is presented when one grasp the meaning of an expression. The Sinn can be appropriately said to be primitive in the process of understanding. Hence the names “the Morning Star” and “the Evening Star” can not have the same sense: the truth of the identity-statement “the Morning Star is the same heavenly body as the Evening Star” was an astronomical discovery.</p>
<div class="remark">
<div class="remark-style">
<span class="remark-head">Remark.</span>
The Sinn of a proper name is always context-dependent. Consider the name <em>John</em>, the Sinn, namely the method that takes John as argument and gives the man John, could be some sort of "restriction" process. There are many people named John, but when in, say, a particular room with several people among which there is one John, the Sinn of the word "John" would be a process that starts with restricting the possible candidates for "John" to that particular room, and selecting out males, etc.
<span style="float:right">◈</span>
</div>
</div>
<div class="remark">
<div class="remark-style">
<span class="remark-head">Remark.</span>
A comparison of the Sinn-Bedeutung distinction for some seemingly direct proper names (e.g. Alexander the Great) with the doctrines of true names in various forms of language mysticism, e.g. Kabbalah would be interesting. Moreover, for names like "Alexander the Great", the problem is that what count as the Bedeutung is unclear for those who live in 21st century. Between the sense of the name and <em>information</em> that one possess about its bearer there is no sharp line that can be drawn.
<span style="float:right">◈</span>
</div>
</div>
Axiom of Choice
https://geistlib.xyz/axiom-of-choice/
Sat, 28 Jan 2023 08:51:31 +0100https://geistlib.xyz/axiom-of-choice/<h2 id="external-axiom-of-choice">External axiom of choice</h2>
<p><em>The</em> axiom of choice, which should be called the <em>set theoretic axiom of choice</em>, is the following statement:
<div class="theorem-style">
<span class="definition-head">Definition.</span>
The Axiom of Choice $\operatorname{AC}$ states that for each family $(X_i)_{i\in I}$ of non-empty sets $X_i$ the product set $\prod_{i\in I}X_i$ is non-empty.
</div>
</p>
<p>This is equivalent to saying that whenever $A$ and $B$ are sets and $f:A\to B$ is a surjective function, $f$ has a right inverse $s:B\to A$, s.t. $f\circ s=\operatorname{id}_B$. Now generalizing to topos-theoretic universe, the equivalent, at least when the topos is that of set, is the <em>topos-theoretic axiom of choice</em>
<div class="theorem-style">
<span class="definition-head">Definition.</span>
For a topos $E$, the axiom of choice says that every epimorphism in $E$ is split.
</div>
</p>
<p>The rational for the definition is as follows.</p>
<p>First recall that $b:B$ means $b$ is a generalized element of $B$, i.e. it is a morphism with $B$ its codomain in a category.</p>
<p>Given an $B$-indexed family of non-empty objects $(X_b)$, there is a way of selecting one value from each family $X_b$. An $B$-indexed family of objects is an arrow $f:A\to B$, and the non-emptiness mean that each fibre is occupied, $\vdash (\forall b:B)(\exists a:A) fa=b$, that is, $f$ is an epimorphism. Now a selection of values means an arrow $s:B\to A$ that is $f\circ s = 1_B$. Hence axiom of choice for $E$ says that each epimorphism in $E$ is split. This is also the notion of choice used when one says that AC fails or not in a particular topos. It is also called the <em>external</em> or <em>extensional</em> axiom of choice. When $E$ is not balanced (every monomorphic and epimorphic morphism is an isomorphism), in the statement of AC the “epimorphism” should be replaced by other restricted notions of epimorphism. The category $\operatorname{Set}$ is balanced, so non of these really matters for $\operatorname{Set}$.</p>
<p>Now a theorem states that the axiom of choice <em>implies</em> excluded middle (so no excluded middle then no choice).
<div class="theorem">
<div class="theorem-style">
<span class="theorem-head">Theorem(Diaconescu-Goodman-Myhill) .</span>
If the axiom of choice holds for a topos $E$, then $E$ is Boolean.
</div>
</div>
</p>
<p>$E$ is boolean means the law of excluded middle holds, or more precisely, Boolean logic is sound which is equivalent to the statement that double negation arrow is an isomorphism, in its internal logic. The law of excluded middle is a <em>weaker</em> form of AC that only allow $A$ in $f:A\to B$ to be finite, and in fact $A$ being $2=\{a\neq b\}$ would be sufficient.</p>
<p>In constructive type theory, there is a formulation of axiom of choice, given by Martin-Lof in his <em>One hundred years of Zermelo’s axiom of choice, what was the problem with it</em> (2009), which is proved to be equivalent to the above topos-theoretic axiom of choice:
$$
(\forall i:I)(\exists x:S)(\rho_i(x))\to(\exists f:I\to S)(\operatorname{Ext}(f)\wedge(\forall i:I)\rho_i(f(i))),
$$
where
$$
\operatorname{Ext}(f)=(\forall i,j:I)(i=_I j \to f(i)=_S f(j)).
$$</p>
<h2 id="constructive-axiom-of-choice">Constructive axiom of choice</h2>
<p>There is a so-called <em>constructive</em> axiom of choice, that was stated to be a theorem, which is the truth of
$$
(\forall i:I)(\exists x:S) \rho(i,x) \to (\exists f:I\to S)(\forall i:I) \rho(i,f(i)).
$$</p>
<p>It is clear that the statement is in no way equivalent to the topos-theoretic one.</p>
<p>The first assertion $(\forall i:I)(\exists x:S) \rho(i,x)$ means, given $i:I$, one can construct an $x:S$ that proves $\rho(i,x)$. Hence there is a way to feed $i:I$ into a, say, procedure, $P$, not necessarily a function or such, and output $P(i)=(P_1(i)=x:S,P_2(i))$, where $P_1:I\to S$ is a procedure that eats $i$ and gives $x$ and $P_2(i)$ is a proof of $\rho(i,x)$. The second assertion $(\exists f:I\to S)(\forall i:I)(\rho(i,f(i)))$ means, one can construct $f:I\to S$ with a procdure $Q$, such that upon being fed $i:S$, $Q(i)=(f:I\to S, Q_2(i))$. The truth of the constructive axiom of choice is then evident: Put $Q(i)=P(i)$, which is given by the hypothesis.</p>
<p>The truth of such a statement rests in the fact that $P,Q$ are <em>procedures</em> rather than functions, which can readily be processes of choosing elements. Given an $i:I$, constructing $x:S$ such that $\rho(i,x)$ is already an instance of “making a choice”, the very existence of $x$ implies the existence of a choice procedure. For intuitionistic type theory, a procedure or a method is a function and vice verca, so the constructive axiom of choice holds. This is different from the external axiom of choice, which operates in a totally different formal system.</p>
<p>The care taken with respect to the identities in the formulation given by Martin-Lof is targeted at making the choice procedures really functions.</p>
<h2 id="equivalent-statements-to-the-external-axiom-of-choice">Equivalent statements to the external axiom of choice</h2>
<p>In $\operatorname{ZF}$, external AC is equivalent to</p>
<ol>
<li><em>The Axiom of multiple choice</em>: For every family $(X_i)_{i\in I}$ of non-empty sets there is a family $(F_i)_{i\in I}$ of non-empty finite sets $F_i \subset X_i$ for each $i\in I$.</li>
<li><em>Multiplicative axiom</em> of Russell: for every family $(X_i)_{i\in I}$ of non-empty pairwise disjoint sets there is a set $Y$ with $|Y\cap X_i|=1$ for each $i\in I$.</li>
<li><em>Hausdorff’s maximal chain condition</em>: each poset contains a maximal chain.</li>
<li><em>Kurepa’s maximal chain condition</em>: each poset has a maximal antichain. (antichain: $x\leq y$ implies $x=y$).</li>
<li>Each preordered set contains a maximal antichain</li>
<li><em>Zorn’s lemma</em>: If in a poset $X$ each chain has an upper bound, then $X$ has a maximal element.</li>
<li><em>Teichmueller-Tukey lemma</em>: If a nonempty subcollection $U$ of $\mathcal{P}X$ is of finite character ($A\in U$ iff every finite subset of $A$ belongs to $U$), then $U$ contains a maximal element w.r.t. the inclusion-order.</li>
<li>Every chain can be well-ordered.</li>
<li>The power set of a well-orderable set is well-orderable.</li>
<li>Every set can be well-ordered.</li>
</ol>
Notes on Medieval Canon Law
https://geistlib.xyz/notes-on-medieval-canon-law/
Tue, 10 Jan 2023 16:02:55 +0100https://geistlib.xyz/notes-on-medieval-canon-law/<h2 id="history">History</h2>
<h3 id="in-the-early-christian-church">In the Early Christian Church</h3>
<h4 id="before-constantine">Before Constantine</h4>
<p>Under the circumstances that Christians constituted a small secretive group with the surrounding society being hostile towards them, the law of the Christian church during the first three centuries of its existence was directed chefly towards maintaining discipline among church members and concentrated on the internal concerns of the group. The matters concerned are largely internal: the order of worship, relationships among members of the community, the rights and obligations assigned to different subgroups among the members.</p>
<p>Sources:</p>
<ol>
<li><em>Didache</em>, or <em>Doctrine of the Twelve Apostles</em>: The earliest surviving handbook of church law, dating from the end of the 1st or the beginning of the 2nd century.</li>
<li><em>Pastor</em> of Hermas. Apocalypse and a lawbook consisting of five revelations, a dozen rules of conduct, and ten parables on eschatological themes.</li>
<li><em>Traditio apostolica</em>. Ascribed to Hippolytus. Early 3rd century. Mainly liturgical but contains valuable informations on the organization and structure of the 3rd-century church.</li>
<li><em>Didascalia apostolorum</em>. Mid-3rd century. Based on <em>traditio apostolica</em> and adds further information, about matters as the community’s responsibility for widows and orphans, Jewish-Christian relations, rules on fasting and penance, liturgical matters.</li>
</ol>
<p>Readings:</p>
<ul>
<li>Jean Gaudemet, *Les sources du droit de l’eglise en Occident du IIe au VIIe siecle.</li>
<li>Roger L. Reynolds’ article, <em>Law, Canon: To Gratian</em>, in the <em>Dictionary of the Middle Ages</em>.</li>
</ul>
<h4 id="from-constantines-time-onward">From Constantine’s time onward</h4>
<p>The Christian emperors explicityl recognized the jurisdictional authority of bishops and other church officers over issues that involved doctrine and morals and gave their decisions the force of public law. Bishops established their own courts, the <em>audientia episcopalis</em>, in order to adjudicate matters. Canon law came to be vested with coercive power as well as moral authority. The ecclesiastical hierarchy became in effect an arm of the judicial apparatus of Roman government.</p>
<ul>
<li>Church councils merged as an increasingly important feature in the governance. The canons and decrees of these bodies soon became the principal sources of church law. The source of new law, doctrinal pronouncements and spiritual guidance became church councils and <em>synods</em>, smaller regional assemblies of the clergy and leading laymen. Councils and synods ofthen also functioned as courts.</li>
<li>The church began to develop an organizational hierarchical structure. Parish (parish priest) - diocese (bishop) - province (metropolitan) - state (patriarch). The First Council of Constantinople (381) recognized the bishops of Alexandria, Antioch, Constantinople, Jerusalem, Rome as patriarchs (pentarchy).</li>
<li>The bishops of Rome commenced to take a mor prominent role as makers of ecclesiastical law by the 5th century. Papal decretals (or letters) stated the decisions of the Roman bishops on issues that had been appealed to them and also set forth general rules for determining similar controversies.</li>
</ul>
<p>Sources:</p>
<ol>
<li><em>Constitutiones apostolicae</em>, circa 308, articulates a detailed scheme of the obligations and prerogatives of various groups within the Christian church.</li>
<li><em>Statuta ecclesiae antiqua</em>. 5th century, rich in disciplinary regulations for clergy and laity. Collection of decrees drawn from Gallic and Spanish councils.</li>
<li><em>Dionysiana</em>, compiled by a Scythian monk Dionysius Exiguus, first half of 6th century. Better organized and more systematic, included both papal decisions (i.e. decretals) and conciliar canons.</li>
<li><em>Hispana</em>. 7th century collection, long regarded as an authoritative canonical collection. Including canons drawn from the early Greek, North Afircan, Gallic and especially Spanish, where conciliar legislation was both extensive and important, councils, and also numerous papal decretals.
<ul>
<li>Earliest version known as the <em>Collectio hispana chronologica</em></li>
<li>In the 2nd half of 7th century revised into <em>Collectio hispana systematica</em>.</li>
</ul>
</li>
</ol>
<h4 id="characteristics">Characteristics</h4>
<p>Canons during the first five centuries regulated matters such as</p>
<ol>
<li>Structure of the liturgical calendar.</li>
<li>Forms and ceremonies for performing liturgical functions e.g. Eucharist, baptism.</li>
<li>Details for observance of fasting seasons and celebration of feasts.</li>
<li>The distribution of charitable offerings to widows and other disadvantaged members.</li>
<li>Drew increasingly sharp lines between authentic Christians and others (heretics, apostates, unbelievers).</li>
<li>Enumerate the powers and qualifications, obligations and disciplines of bishops and other clerics.</li>
</ol>
<p>Also,</p>
<ul>
<li>Monasticism: 4th century onward, canon law also took acount of the status of monks nad nuns.</li>
<li>Management and use of the church’s material goods: From Constantine’s time onward.</li>
</ul>
<p>The episcopal courts by and large adapted for their own purposes the norms current in Roman civil law. However the ecclesiastical courts of this early period appear in general to have enjoyed great latitude in standards, and the procedures varied considerably between different regions and different judges.</p>
<p>Prominent among the problems that the canonical collections dealt with were Christian marriage and family law, Christian attitudes towards slavery, military service, and economic activities, relations between Christians and their non-Christian neighbours, and the preservation of beliefs and practices that church authorities regarded as essential.</p>
<h3 id="in-the-early-middle-ages">In the Early Middle Ages</h3>
<p>Germans who had been converted before the invasions, mainly Visigoths and Ostrogoths, had already embraced the Arian heresy. During the early stages of Germanic settlement the church experienced episodes of sharp hostility between the Germanic monarchs and the catholic hierarchy. Even after conversion to catholic faith the new rulers proved less willing than Constantine and his successors had been to allocate generous political and judicial powers to the clergy.</p>
<ul>
<li>Isolationism and particularism, expansion of royal power and contraction of canonical jurisdiction: The Germanic rulers regarded law as an attribute of personality rather than of territory. A legal tradition formed an inalienable part of each individual’s ethnic heritage and that everone should be governed by the norms of the legal system into which he was born (i.e. Romans subject to Roman law, Burgundians judged by Burgundian law, etc.) Hence canon law was regarded as simply one further kind of personal law applicable to those born into catholic <em>families</em>. Nevertheless since the Christian clergy as administrators are technically competent, and exercised over their flocks considerable authority, Germanic kings ofthen employed clerics in their own households as administrative assistants, advisers, and political functionaries. The clerics put the customary tribal laws of the Germans into written form, and thus the early Germanic laws frequently incorporated provisions to protect the clergy, churches, and church property. The Germanic kings also proceeded to preside over synods, appoint bishops, execute heretics and punish offences against Christian morality as they understood it. The canonical jurisdiction of bishops was largely restricted to settling disputes among the clergy and supervising the treatment of slaves and freedmen.</li>
<li>Monastic laws: The growth of monasticism made the monastry rich, and the temptations for abuse likewise grew. Church councils, popes, and kings regularly attempted to repress the more flagrant kinds of abuses as they appeared and successive collections of canon law featured ever greater varieties of measures designed to maintain and regulate monastic discipline.</li>
<li>Inward-looking character of 7-9th century: The practice of public penance, that could be performed only once in a lifetime, began to be displaced late in the sixth century by private rites of confession and private penance which could be repeated as often as necessary.</li>
</ul>
<p>Sources:</p>
<ul>
<li>Earliest well-developed methodical penitential written by Finnian of Clonard. First half of the 6th century. Priests throughout Western Christendom consulted these manuals (penitentials) and relied upon them for guidance in dealing with the sinners who confessed to them, hence in effect the penitentials became new sources of law.</li>
<li>Pseudo-Isodorian Decretals, comprised a vast compendium of genuine conciliar canons and papal letters, interwoven with falsified canons composed by forgers. The infulence was pervasie.
<ul>
<li>The forgers inserted a wholly new office, <em>primate</em>, intermediate in authority between the metropolitan and the patriarch, into the church’s hierarchy,</li>
<li>exalted the papal authority,</li>
<li>invented new procedural forms and evidential requirements that considerably complicated litigation in the medieval church.</li>
</ul>
</li>
</ul>
<p>The emergence of a new European political hegemony under Frankish monarchs of the Carolingian family fostered a new unity in canon law. Charlemagne made the renerwal of canon law a goal of his imperial policy and sought to enhance the effectiveness of the ecclesiastical courts. He asked Pope Adrian I to furnish him with an up-to-date compendium of the canons that could serve as the fundamental statement of the church’s current law. Thus came the <em>Hadriana</em>, a revised version of the <em>Dionysiana</em>. In conjuction with the <em>Hispana</em>, the synod of Aachen(802) directed bishops throughout the Carolingian empire to use the <em>Hadriana</em>.</p>
<p>Charlemagne viewed himself as the head of both the religious and civil establishment within his empire. He saw no sharp dividing line between royal and ecclesiastical powers. Capitularies, or regulatory directives, are issued by Charlemagne and his successors, in order to reform ecclesiastical institutions and discipline.</p>
<ul>
<li>The <em>Capitulary of Herstal</em> (779) established the enforce payment of <em>tithe</em>. The resulting growth of ecclesiastical resources made it possible to multiply the number of parishes and to bring regular religious services and instruction to many parts of the empire where they previously had been haphazard and occasional.</li>
<li>Other capitularies dealt with monastic schools and libraries, standardization of liturgical observances, clerical discipline, and a host of other matters.</li>
</ul>
<p>Later canonists came to treat the Carolingian capitularies as legitimate sources of ecclesiastical law and routinely incorporated them in subsequent collections of the canons.</p>
<h3 id="fragmentation-of-the-carolingian-empire">Fragmentation of the Carolingian Empire</h3>
<p>‘Feudalism’: The later Carolingian Empire was faced with fragmentation and barbarian and Muslim raiding. The central government began to crumble and many functions of Carolingian monarchs now were taken over by local officials and war lords etc. Local military put a large part of their effort into defending churches and monasteries etc. and in return asserted control over bishops, monasteries, and other church establishments. Around 10th and 11th centuries the church officials are named by local landowners who often demanded concession of church property for securing the appointment, the changed situation of the church required revised lawbooks.</p>
<p>Influential compilations that appeared during this period, during which the state of affairs is conventionally described as ’the proprietary church regime’, includes</p>
<ol>
<li><em>Libri duo de synodalibus causis et disciplinis ecclesiasticis</em>, composed about 906 by Abbot Regino of Prum. A notable feature is that the Book II gave to the canon law concerning the duties of the laity.</li>
<li><em>Decretum</em> by bishop of Worms, Buchard. Early 11th century. This is a canonical and theological encyclopedia that also includes what would be classified by later witers as moral theology.</li>
</ol>
<p>The realities of church life differed substantially from what canon law said they ought to be. This situation provoked reforming reactions, hence the famous Cluniac reform and Gregorian reform etc. In mid-11th century reform-minded clerics began to be named as popes, with the active support of Henry III of Germany. The clerics also commenced to reassert papal leadership also in the Western church as a whole. After the appointment of Bruno of Toul as Pope Leo IX, the church reform went mature, via Pope Stephen IX, Pope Gregory VII. In order to secure the freedom of the church from lay control, simony and Nicolaitism are in particular targeted. Since the reformers believed that the abuses they foughtt reflected structural weakness in the church’s legal system, the canon law played a key role in their strategy. Gregory VII and other reformers concluded that they should</p>
<ol>
<li>Compile fresh collections of old law to demonstrate that their goals had a legitimate foundation in ecclesiastical tradition.
<ol>
<li><em>Collectio canonum</em>, circa 1083, Bishop Anslem of Lucca</li>
<li>The collection assembled by Cardinal Deusdedit circa 1087</li>
<li><em>The collection in seventy-four titles</em>, circa 1067, unknown author.</li>
<li><em>Decretum</em>, by Ivo of Chartres. The work was too bulky and complex to achieve wide circulation.</li>
<li><em>Panormia</em>, another collection, also by Ivo of Chartres, more compact, achieved far greater popular success. Especially the prologue that appears in numerous manuscripts. The prologue set forth rules for the interpretation of canonical texts that became central to the work of later canonists, and especially to Gratian.</li>
<li><em>Tripartita</em>, ascribed to Ivo.</li>
</ol>
</li>
<li>Create new laws that would buttress their programme by repairing gaps in the existing legal corpus. These are mainly done by the securing of papacy through reforming councils and synods.</li>
<li>Develop more adequate procedural mechanisms and more effective courts to correct violations of church law. These required basic institutional innovations and was slow and often frustrating. Synod, since was infrequent and many of its members were not well-informed about legal analysis and the intricacies of procedure, was not efficient. Papal legates were used to supervise the implementation of canon law and papal policy.</li>
<li>Find better means of detecting violators and bringing them to the courts for prosecution.</li>
</ol>
<p>As of the beginning of 12th century, the Western church needed some authoritative guide and agreed-upon body of law. Such a guide appeared in the mid-12th century in the <em>Decretum</em> of Gratian.</p>
May Queen, Diana and Sovereignty
https://geistlib.xyz/may-queen-diana-and-sovereignty/
Mon, 09 Jan 2023 15:44:15 +0100https://geistlib.xyz/may-queen-diana-and-sovereignty/<p>Some scattered thoughts to be synthesized:</p>
<ol>
<li>Court feast of the Holy Roman Empire usually occurs in Pentecost, which is in May. The festivities, beginning on Whitsunday, start with a ceremonial crowning of the emperor and the empress.</li>
<li>Diana is a virgin goddess associated with aloof sacred places and sovereignty. According to Dumezil she is originally a celestial goddess that combines with herself the world of the sky (dium).</li>
<li>The ceremonial high offices of the prince-electors are in particular suited, in functionality, for court feasts, rather than coronation.</li>
<li>It is speculated that the Feast of Assumption originated from Nemoralia.</li>
<li>Pentecost, a holy day associated with <em>harvests</em>, had a focus in the ritual procession going up to the temple, was the wedding theme. There is some Mariology present, see <em>Mystici Corporis Christi</em>.</li>
<li>May King and May Queen. See Frazer’s book in the reference.</li>
</ol>
<p>Possibly useful references:</p>
<ul>
<li>Mystici Corporis Christi, 26, 110. See <a href="https://files.geistlib.xyz/encyclical_tex/fin/Pius%20XII%20encyclicals.pdf">Pius XII Encyclicals</a></li>
<li>Ad Caeli Reginam. See <a href="https://files.geistlib.xyz/encyclical_tex/fin/Pius%20XII%20encyclicals.pdf">Pius XII Encyclicals</a></li>
<li>Frazer, Lectures on the early history of the kingship, Lect. VI</li>
<li>Joachim Bumke, Courtly Culture, Chp. 4</li>
<li>《罗密欧与朱丽叶》里有提到圣灵降临节的婚礼习俗</li>
<li>A focus in the ritual procession going up to the temple, was the wedding theme <a href="https://en.wikibooks.org/wiki/Hebrew_Roots/Holy_Days/Pentecost/History_of_Pentecost">https://en.wikibooks.org/wiki/Hebrew_Roots/Holy_Days/Pentecost/History_of_Pentecost</a></li>
<li>Grassi, J. A. (1972). The Wedding at Cana (John II 1-111): A Pentecostal Meditation? Novum Testamentum, 14(2), 131. doi:10.2307/1560179 (<a href="https://doi.org/10.2307/1560179">https://doi.org/10.2307/1560179</a>)</li>
<li>There is an mention of Pentecost and its associated folk customs, related to wedding, in <em>Romeo and Juliet</em>.</li>
</ul>
Studies on Cyber Subcultural Religious Phenomena
https://geistlib.xyz/studies-on-cyber-subcultural-religious-phenomena/
Mon, 12 Dec 2022 19:14:53 +0100https://geistlib.xyz/studies-on-cyber-subcultural-religious-phenomena/<ul>
<li>New-age phenomena in cyberspace subcultures</li>
<li>Archetypal psychoanalysis of internet subcultures, in particular techno-mystical cults</li>
<li>Literary and phenomenological analysis of science fictions</li>
<li>Studies on futurology as a phenomenom</li>
<li>Intelligence and technological singularity in cultural imagination</li>
</ul>
<h2 id="links">Links</h2>
<ul>
<li>Levity <a href="http://www.levity.com/">http://www.levity.com/</a>
<ul>
<li>The Millennial Meme Nest <a href="http://www.levity.com/eschaton/evolvingideas.html">http://www.levity.com/eschaton/evolvingideas.html</a></li>
</ul>
</li>
<li>Psychoceramics <a href="https://dev.null.org/psychoceramics/">https://dev.null.org/psychoceramics/</a></li>
</ul>
<h2 id="reading-list">Reading List</h2>
<ul>
<li>Erik Davis - TechGnosis</li>
<li>Reza Negarestani - Chronosis</li>
<li>K-punk blog</li>
<li>MIT Press, Urbanomic serieses</li>
</ul>
Cybernetics, Consciousness and Metasystem Transition
https://geistlib.xyz/cybernetics-and-metasystem-transition/
Mon, 12 Dec 2022 16:47:30 +0100https://geistlib.xyz/cybernetics-and-metasystem-transition/<p>Let’s declare war against <em>Man</em> and all forms of <em>Humanism</em>.</p>
<ul>
<li>A. N. Whitehead</li>
<li>Teilhard de Chardin</li>
<li>Wolfhart Pannenberg, Karl Loewith</li>
<li>Valentin Turchin</li>
<li>Gaia Hypothesis</li>
<li>Eric Voegelin, Mircea Eliade, Julian Jaynes</li>
<li>History of consciousness, cognitive archaeology</li>
<li>Emergence, entropy, information; Bayesian inference</li>
</ul>
<p>Possible links</p>
<ul>
<li>Semantic anti-realism</li>
<li>Scientific anti-realism (Bas van Fraassen)</li>
<li>Animal consciousness, ontic pancomputationalism</li>
</ul>
<p>Quotes from <em>To Our Friends</em>,</p>
<blockquote>
<p>At the apex of his insanity, Man has even proclaimed himself a “geological force,” going so far as to give the name of his species to a phase of the life of the planet: he’s taken to speaking of an “anthropocene.” For the last time, he assigns himself the main role, even if it’s to accuse himself of having trashed everything-the seas and the skies, the ground and what’s underground-even if it’s to confess his guilt for the unprecedented extinction of plant and animal species. But what’s remarkable is that he continues relating in the same disastrous manner to the disaster produced by his own disastrous relationship with the world. He calculates the rate at which the ice pack is disappearing. He measures the extermination of the non-human forms of life. As to climate change, he doesn’t talk about it based on his sensible experience-a bird that doesn’t return in the same period of the year, an insect whose sounds aren’t heard anymore, a plant that no longer flowers at the same time as some other one. He talks about it scientifically with numbers and averages. He thinks he’s saying something when he establishes that the temperature will rise so many degrees and the precipitation will decrease by so many inches or millimeters. He even speaks of “biodiversity.” He observes the rarefaction of life on earth from space. He has the hubris to claim, paternally, to be “protecting the environment,” which certainly never asked for anything of the sort. All this has the look of a last bold move in a game that can’t be won.</p>
</blockquote>
<h2 id="stickers">Stickers</h2>
<ul>
<li>Computer architectures always come with a <em>fixed</em> instruction set. Sequential models of computation, e.g. Turing machine, push-down automata, are all given a fixed instruction set, while lambda calculus doesn’t seem to possess one. Problem: why disassociating memory from intellect? This practice seems to be shaped by a general, essentially modern or early-modern trend in the Western theory of mind which in St. Augustine’s time wasn’t the case (See Augustine’s <em>On Trinity</em>).</li>
<li>It is frequently stated that the ability of language representation, i.e. encoding and decoding, is decoupled from that of meaning and grammar processing (syntactical and semantical abilities), but, at least for computational models, representation of input and output matters. See <a href="https://cstheory.stackexchange.com/questions/1117/realizability-theory-difference-in-power-between-lambda-calculus-and-turing-mac">the stackexchange question</a> and <a href="https://math.andrej.com/2008/02/06/representations-of-uncomputable-and-uncountable-sets/">Andrej Bauer’s post</a>, “It is meaningless to discuss representations of a set by a datatype without also considering operations that we want to perform on the set.” What’s happending in <a href="https://doi.org/10.1016/0093-934x(80)90034-6">Brother John’s case</a>?</li>
<li>What is <em>information</em>? It directs and gives forms to the “external” world, but for it to be able to direct, it needs to be given a form. There should not be information without someone to decode and encode it. Same with orderliness, etc.</li>
</ul>
<h2 id="related">Related</h2>
<ul>
<li><a href="https://geistlib.xyz/grand-history/">Grand Cosmic and Natural History</a>. The track given by Teilhard de Chardin.</li>
<li><a href="https://geistlib.xyz/against_realism/">Against Realism</a>. What are the effects of the second cosmogony - the emergence of consciousness - on cosmic history?</li>
</ul>
<h2 id="reading-list">Reading List</h2>
<ul>
<li>Erik Davis - TechGnosis. Introduction to general history and background</li>
<li>Merlin Donald - Origins of the Modern Mind</li>
<li>Julian Jaynes - The Origin of Consciousness in the Breakdown of the Bicameral Mind</li>
</ul>
<p>(In progress)</p>
<ul>
<li>John Maynard Smith & Eors Szathmary - The Major Transitions in Evolution</li>
<li>Eva Jablonka & Marion Lamb - Inheritance Systems and the Extended Evolutionary Synthesis</li>
<li>Eva Jablonka & Marion Lamb - Evolution in Four Dimensions: Genetic, Epigenetic, Behavioral, and Symbolic Variation in the History of Life</li>
<li>N. J. Enfield & Jack Sidnell - Consequences of Language, From Primary to Enhanced Intersubjectivity</li>
</ul>
<p>Some interesting books on music origin</p>
<ul>
<li>Joseph Jordania - Why do People Sing? Music in Human Evolution.</li>
<li>The Origins of Music (2001)</li>
</ul>
<h2 id="literature">Literature</h2>
<h3 id="origin-of-life">Origin Of Life</h3>
<ul>
<li>Niesert, U., Harnasch, D. & Bresch, C. Origin of life between scylla and charybdis. J Mol Evol 17, 348–353 (1981). <a href="https://doi.org/10.1007/BF01734356">https://doi.org/10.1007/BF01734356</a>
<ul>
<li>About possible catastrophes in the RNA world abiogenesis. A criticism of any theory of the origin of life that assumes a cooperative organization of a large population of molecules without providing explicit safeguards against short-circuiting of metabolic pathways.</li>
</ul>
</li>
<li>R. Landauer, “Irreversibility and Heat Generation in the Computing Process,” in IBM Journal of Research and Development, vol. 5, no. 3, pp. 183-191, July 1961, <a href="https://doi.org/10.1147/rd.53.0183">https://doi.org/10.1147/rd.53.0183</a>
<ul>
<li>Landauer’s principle. A <em>physical</em> principle pertaining to the lower theoretical limit of energy consumption of computation - is it possible that this to be formulated purely logically in a intuitionistic variant of logic?</li>
<li>To put it in another way, is there a purely logical description/interpretation of entropy, that doesn’t take the detour through the notion of <em>manipulation</em> of information via some physical process?</li>
<li>A note <a href="https://arxiv.org/abs/physics/0210005">https://arxiv.org/abs/physics/0210005</a></li>
<li>Very informative post on Landauer’s principle by Euan McLean <a href="https://www.lesswrong.com/posts/9zKKweu5826vSigu3/deconfusing-landauer-s-principle#The_second_law_for_any_Shannon_entropy">https://www.lesswrong.com/posts/9zKKweu5826vSigu3/deconfusing-landauer-s-principle#The_second_law_for_any_Shannon_entropy</a></li>
</ul>
</li>
</ul>
<h3 id="mind-and-consciousness">Mind and consciousness</h3>
<ul>
<li>Lecours, A. Linguistic and other psychological aspects of paroxysmal aphasia*1. Brain and Language, 10(1), 1–23 (1980). doi:10.1016/0093-934x(80)90034-6 (<a href="https://doi.org/10.1016/0093-934x(80)90034-6">https://doi.org/10.1016/0093-934x(80)90034-6</a>)
<ul>
<li>The case of Brother John. Aphasia, language loss and higher cognition, including intelligence.</li>
</ul>
</li>
</ul>
Old Quantum Theory 3: Atomic Spectra
https://geistlib.xyz/old-quantum-theory-atomic-spectra/
Mon, 12 Dec 2022 14:03:59 +0100https://geistlib.xyz/old-quantum-theory-atomic-spectra/<h2 id="postulates-and-reflections">Postulates and reflections</h2>
<p>The theory of atomic spectra was based upon the two postulates</p>
<ol>
<li>An atomic system exist in a series of states corresponding to a discrete series of values for its energy.
<ul>
<li>Hence any change of the energy of the system, <em>e.g.</em> emission and absorption of electromagnetic radiation, must take place by a complete transition between two such states.</li>
<li>These states will be denoted as the <em>stationary states</em> of the system.</li>
</ul>
</li>
<li>Radiation absorbed or emitted during a transition is unifrequentic, the frequency $\nu$ being given by $E_1 - E_2 = h\nu$.</li>
</ol>
<p>The thing that need to be done is determining the stationary states.</p>
<ol>
<li>Some classical orbits should be filtered out. Since what is at hand is classical physics, for the determination of stationary orbitsm the principles and rules needed are those that filter out the quantum-mechanically allowed <em>classical</em> orbits.</li>
<li>The stationary states should be characterized by integers, called <em>quantum numbers</em>. This is because the series of allowed values for the stationary states are discrete.</li>
<li>Under adiabatic change the quantum number should not change. When an atomic system is subjected to a slow change, <em>i.e.</em> an <em>adiabatic</em> change, it must stay in the same stationary state as before, or more precisely the quantum number should not change since a stationary state is characterized by its quantum number.</li>
</ol>
<p>Thus to find the quantum condition, quantities which do not change when the system is subjected to adiabatic changes should be derived. These quantities are the <em>adiabatic invariants</em>. In an almost periodic system, where each of the coordinates is an angualr variable, these adiabatic invariants are the <em>action variables</em> $I_k$ of classical mechanics. These are briefly reviewed in <a href="https://geistlib.xyz/old-quantum-theory-rydberg-formula/#almost-periodic-motion">Old Quantum Theory, Special: Algebra of observables from convolution#Almost periodic motion</a> , though their being adiabatic invariants isn’t mentioned.</p>
<h2 id="bohr-sommerfeld-wilson-quantization-rules">Bohr-Sommerfeld-Wilson quantization rules</h2>
<p>As the action variables
$$
I_k = \oint p_k d q_k
$$
are adiabatic invariants, they can be used to determine the stationary orbits. This is done throught the <em>Bohr-Sommerfeld-Wilson</em> quantization rules
$$
I_k = \oint p_k dq_k = n_k h
$$
Where $n_k$, the quantum numbers, are integers.</p>
<h3 id="application-hydrogen-atom">Application: Hydrogen atom</h3>
<p>The Lagrangian for a hydrogen atom is
$$
L = \frac{1}{2}m(\dot{r}^2+r^2\dot{\theta}+r^2\sin^2\theta\phi^2)+\frac{e^2}{r}
$$
where $r,\theta,\phi$ are spherical coordinates. The corresponding canonical momenta are given by
$$
\begin{align*}
p_r & = m\dot{r}\\
p_\theta & = mr^2\dot{\theta}\\
p_\phi & = mr^2\sin^2\theta \phi
\end{align*}
$$
from which the Hamiltonian follows as
$$
H = \frac{1}{2m}\left( p^2_r + \frac{p^2_\theta}{r^2} + \frac{p^2_\phi}{r^2\sin^2\theta}\right) - \frac{e^2}{r}.
$$</p>
<h4 id="magnetic-quantum-number">Magnetic quantum number</h4>
<p>It can be seen from the equation of motion that $p_\phi$ is a constant. Transform from spherical to Cartesian coordinates with the $z$-axis along the polar axis, $p_\phi$ is the $z$-component of the angular momentum. Since
$$
n_\phi h = \oint p_\phi d\phi = 2\pi p_\phi,
$$
put $M_z = p_\phi = n_\phi \hbar$, the $z$-component of the angular momentum is quantized. $n_\phi = m$ is the magnetic quantum number.</p>
<h4 id="azimuthal-quantum-number">Azimuthal quantum number</h4>
<p>Squaring the angular momentum,
$$
M^2 = p^2_\theta + \frac{p^2_\theta}{\sin^2_\phi \theta}.
$$
This is again a constant of motion. Put
$$
n_\theta h = I_\theta = 2\int_{\theta_1}^{\theta_2}\left[ M^2 - \frac{M^2_z}{\sin^2\theta}\right]^{1/2}d\theta
$$
where $\theta_1$ and $\theta_2$ are those values of $\theta$ for which the radical vanishes, it follows that
$$
\begin{equation}\label{eqM}
M = (n_\theta + n_\phi) \hbar.
\end{equation}
$$
Put $k=n_\phi + n_\theta$, $k$ is called the <em>azimuthal quantum number</em>. In wave mechanics $l = k-1$, the orbital quantum number, would take the place of $k$.</p>
<h4 id="principal-quantum-number">Principal quantum number</h4>
<p>The last coordinate $r$ gives
$$
n_r h = I_r = 2\int_{r_\text{min}}^{r_\text{max}}\left[ 2mE + \frac{2me^2}{r} - \frac{M^2}{r^2}\right]^{1/2} dr = -2\pi M + \pi e^2\sqrt{-2m/E}
$$
where $E$ is the energy of the electron and $r_{\text{min},\text{max}}$ are the zeroes of the radical. The integration is done by integrate $r$ in the complex plane and introduce a cut between $r_{\text{min,max}}$. Using $\eqref{eqM}$,</p>
<p>$$
E = -\frac{me^4}{2\hbar^2(n_r + n_\theta + n_\phi)^2}
$$</p>
<p><img src="https://geistlib.xyz/img/hydrogen_plot.svg" alt="Hydrogen Atom"></p>
<p>Identifying $n_r + n_\theta + n_\phi$ with $n$, the <em>principal quantum number</em>, this $E$ agrees with the electron energy
$$
E = \frac{2\pi^2 m e^4}{n^2 h^2}.
$$
given by Bohr.</p>
<h3 id="orbits">Orbits</h3>
<p>It can be seen that $n=n_r$ determines the energy, $k=n_\theta$ the total angular momentum, and $m=n_\theta$ the $z$-component of the angular momentum. Since $r_{\text{min,max}}$ are solutions to the equation
$$
2mEr^2 + 2me^2r-M^2 = 0,
$$
the semi-major axis of the orbit ellipse, $a=\frac{1}{2}(r_{\text{min}}+ r_{\text{max}})$, is
$$
a = -\frac{e^2}{2E} = \frac{\hbar^2 n^2}{me^2},
$$
and the eccentricity $\epsilon$ would be given by
$$
\epsilon = \frac{r_{\text{max}}-r_{\text{min}}}{r_{\text{max}}+r_{\text{min}}}
$$
with the semi-minor axis $b$ being
$$
b = a\sqrt{1-\epsilon^2} = \frac{\hbar kn}{me^2}.
$$</p>
<p>The value $k=0$ should be excluded as it describes a linear orbit. Thus $k\in [1,n]\cap \mathbb{Z}$ since $n-k=n_r$. The orbits are characterized by $nk$, corresponding to $ns$-,$np$-,$nd$-orbits.</p>
Old Quantum Theory, Special: Algebra of observables from convolution
https://geistlib.xyz/old-quantum-theory-rydberg-formula/
Fri, 09 Dec 2022 23:55:25 +0100https://geistlib.xyz/old-quantum-theory-rydberg-formula/<h2 id="overview">Overview</h2>
<p>The idea presented here is that of Alain Connes, from his book <em>Noncommutative geometry</em>, the first chapter.</p>
<p>After reviewing Hamilton-Jacobi theory and almost periodic systems, we show that the algebra of observables of an almost perodic classical system can be seen as a convolution algebra of the group generated by the fundamental frequencies.</p>
<p>The observation that the allowed frequencies in an atomic spectrum forms a groupoid indicates that one should try to then form a convolution algebra of the groupoid. It turns out that some aspects of matrix mechanics can then be derived.</p>
<h2 id="a-review-of-hamilton-jacobi-theory">A Review of Hamilton-Jacobi Theory</h2>
<h3 id="hamiltons-principal-function">Hamilton’s principal function</h3>
<p>While the action
$$
S[q(t),\dot{q}(t)] = \int_{t_0}^{t_1} L dt
$$
is a function of $q(t)$ and $\dot{q}(t)$, it can also be thought of as a function of $q(t)$ and $t$. This is done by varying the end point $q(t)$ from the <em>actual path</em>:
$$
\delta S = \left.\frac{\partial L}{\partial \dot{q}}\right|_{t_0}^{t} \delta q + \int_{t_0}^{t} \left(\frac{\partial L}{\partial q} - \frac{d}{dt}\frac{\partial L}{\partial \dot{q}}\right)\delta q dt
$$
Since the initial time and the initial point is fixed, $\delta q(t_0)=0$. Furthermore by Lagrange’s equation the integral vanishes (the path taken is the actual one). Denoting $\delta q(t)$ as $\delta q$, we have
$$
\delta S = \frac{\partial L}{\partial \dot{q}}\delta q = p\delta q.
$$</p>
<p>Which means, for arbitrary number of degrees of freedom
$$
\partial S/ \partial q_i = p_i.
$$</p>
<p>Now from the definition of the action $dS/dt = L$, thus
$$
\frac{dS}{dt} =L = \frac{\partial S}{\partial t} + \sum_i p_i \dot{q}_i
$$
Recall that $H = \sum_{i}p_i \dot{q}_i -L$, so
$$
\frac{\partial S}{\partial t} = -H.
$$
Substituting back to the total time derivative,
$$
dS = \sum_i p_i dq_i - H dt.
$$</p>
<p>The function $S$ of this form is called <em>Hamilton’s principal function</em>.</p>
<p>When the Hamiltonian is time-independent, the integral over $H$ can be carried out and subtracted, i.e.
$$
S_0 = \int\sum_{i} p_i dq_i = S + (t-t_0)H.
$$
The function $S_0$ is called the <em>abbreviated action</em>. When working with $S_0$, the time-independent Hamiltonian $H$ would be denoted by $E$ (the <em>energy</em>).</p>
<h3 id="hamilton-jacobi-equation">Hamilton-Jacobi equation</h3>
<p>From Hamilton’s principal function $S(q,t)$, it can be seen that
$$
\frac{\partial S}{\partial t} + H(q,p,t) = 0.
$$
Also $\partial S/\partial q = p$. Replacing the momenta $p$ in the Hamiltonian by $\partial S/\partial q$, we have a equation of the function $S(q,t)$, called the <em>Hamilton-Jacobi equation</em>:
$$
\frac{\partial S}{\partial t} + H(q,\frac{\partial S}{\partial q};t) = 0.
$$</p>
<h3 id="almost-periodic-motion">Almost periodic motion</h3>
<p>Consider a closed system ($H$ is time independent) with $n$ number of degrees of freedom, executing a motion finite in all the coordinates.</p>
<p>Suppose further that in the Hamilton-Jacobi equation all the variables can be completely separated. Observe the form of the Hamilton-Jacobi equation, this means we only need to consider, separately, $S_i$ where $S_i$ depends only on one coordinate $q_i$.</p>
<p>Since $H$ is time independent it is convenient to work with the abbreviated action $S_0$, written just as $S$. We have
$$
S_i = \int p_i dq_i
$$
Since the motion is finite, $q_i$ varies in a certain range, and when $q_i$ travels completely its range once, $S_i$ increases by
$$
\Delta S_i = 2\pi I_i
$$
and
$$
I_i = \frac{1}{2\pi} \oint p_i dq_i.
$$</p>
<p>Now carry out a canonical transformation with the new variables being $I_i$ (as momenta) and $w_i$ (as coordinates), where the generating function is $S_0 = S_0(q,E)$. For a closed system $I = I(E)$, so $S_0 = S_0(q,I)$. Thus
$$
w_i = \partial S_0(q,I)/\partial I_i = \sum_k \partial{S_k(q_k,I)}/{\partial I_i}.
$$</p>
<p>Observe that when $\Delta S_i = 2\pi I_i$, $\Delta w_i(q,I) = 2\pi$. It means that any (one-valued) function $F(q,p)$ of the state of the system, if expressed in terms of the canonical variables, should be a periodic function of $w_i$s, and the period in each variable is $2\pi$. Thus we have a multiple Fourier series
$$
F = \sum_{l_1 l_2\ldots l_n} A_{l_1\ldots l_n}\exp(i\sum l_i w_i)
$$
where $l_i$ are integers.</p>
<p>The equation of motion in these variables are
$$
\begin{gather*}
\dot{I}_i = 0\\
\dot{w}_i = \frac{\partial E(I)}{\partial I_i}.
\end{gather*}
$$
Substuting for $w$ in $F$ with $\omega_i t = \partial E/\partial I_i t$ (so that $\omega_i t = w_i - C$ for some $C$ constant), where $\omega_i$ are the <em>fundamental frequencies</em>,
$$
F = \sum_{l_1 l_2\ldots l_n} A_{l_1\ldots l_n}\exp(it\sum l_i \omega_i).
$$</p>
<p>The observable $F$ is almost periodic.</p>
<h2 id="algebra-of-observables-classical-hydrogen-atom">Algebra of observables: Classical hydrogen atom</h2>
<p>The dynamical system for the planetary model of the hydrogen atom is completely integrable. The description of such a system is simple: the algebra of observables is the commutative algebra of almost periodic functions,
$$
q(t) = \sum q_{l_1\ldots l_n}\exp(2\pi i l\cdot\nu t)
$$
where $l\cdot \nu = \sum l_i\nu_i$. $\nu_i$ are related to the fundamental frequencies $\omega_i$ through $\nu_i = \omega_i/2\pi$.</p>
<p>The atom emits an electromagnetic wave, whose radiative part is the superposition of waves whose frequencies are $l\cdot\nu$. It means that the set of frequencies of the emitted radiation is an additive subgroup $G$ of the real numbers $\mathbb{R}$. In particular, if $\nu_a$ is an emitted frequency, then $m\nu_a, m\in \mathbb{Z}$ should also be an allowed frequency.</p>
<p>Moreover, the algebra of the observable quantities is the <em>convolution algebra</em> of the group $G$, whose elements are generated from the fundamental frequencies $\nu_i$. Spelling out, any observable quantity $q$ is a function of $G$, the product of two of them is defined by
$$
q_1 \ast q_2 (g) = \sum_{h} q_1(g h^{-1}) q_2(h),
$$
saying that the $n \nu$ component $q_n$ is given by the sum of $q_m \cdot q_{n-m}$, to match the frequencies.</p>
<h2 id="algebra-of-observables-from-rydberg-formula">Algebra of observables: From Rydberg formula</h2>
<p>The Rydberg formula for the spectrum lines of a hydrogen atom, suppressing constants $R$ and $c$, reads
$$
\nu = \frac{1}{m^2}-\frac{1}{n^2}\quad (m,n\in\mathbb{Z}).
$$
Here $m$ is fixed. This means there is a set $I$, the spectrum being the set of differences $\nu_{ij} = k_i - k_j$. In particular, $\nu_{ij}+\nu_{jk} = \nu_{ik}$ is also in the spectrum; notice that this doesn’t means all frequencies add: $j$ appears in such a way that $(i,j)\cdot (j,k) = (i,k)$ makes sense.</p>
<p>With the generalization given by Ritz, the frequencies can be expressed, for arbitrary atoms, in general by
$$
\nu = F_r(m) - F_s(n), (m,n\in \mathbb{Z}).
$$
The functions $F_i(\tau)$ are approximately $\frac{Rc}{(\tau+a_i)}$. Hence the precise form of the frequency formula doesn’t matter.</p>
<p>The multiplication $(i,j)\cdot(j,k) = (i,k)$ defines a groupoid $\mathcal{G}$: the objects are $k\in I$, the morphisms are pairs $(i,j):i\to j$, the morphisms are composed by the multiplication. Given a ring $R$, the convolution algebra $R[\mathcal{G}]$ should have a convolution product of the form
$$
\phi\cdot \psi ((i,k)) = \sum_{j}\phi((i,k)\cdot(k,j))\psi((j,k)) = \sum_{j}\phi((i,j))\psi((j,k))
$$
where $\phi,\psi:\mathcal{G}\to R$. A simple example is to put $\phi,\psi$ as matrices $A,B$ and $(i,j)$ as a index for matrix component:
$$
(AB)_{(i,k)} = \sum_j A_{(i,j)} B_{(j,k)}.
$$
The convolution is now over the groupoid over the set $I$.</p>
<p>Now consider an observable, with time dependence, in a system where there is no time dependence,
$$
q_{(i.j)} = q_{(i,j)}\exp(2\pi i \nu_{ij} t)
$$
with $i,j\in I$, in analogue to the classical
$$
q_{l_1\ldots l_n}(t) = q_{l_1\ldots l_n} \exp(2\pi i l\cdot \nu t).
$$
From the Hamilton’s equation of evolution $\dot{q} = \{H,q\}$, the analogue of the Hamiltonian $H$ should be
$$
H_{(i,j)} = \delta_{ij} h\nu_{i},
$$
where $\nu_i - \nu_j = \nu_{ij},\forall i,j\in I$. $h$ is present to convert frequencies into energies. We see that
$$
\frac{dq}{dt} = \frac{2\pi i}{h}(Hq - qH).
$$
note that $Hq = H\cdot q$ is the convolution product, which in this case should be seen as matrix multiplication.
Thus we have found an instance of matrix mechanics, by considering the groupoid formed by the frequencies of the spectrum of an atom, and forming a convolution algebra of the groupoid to get the algebra of observables. The algebra of observables thus obtained yields an instance of Heisenberg’s equation of evolution.</p>
Mathematica: Time Dependent Navier-Stokes
https://geistlib.xyz/mathematica-time-dependent-navier-stokes/
Fri, 09 Dec 2022 02:27:01 +0100https://geistlib.xyz/mathematica-time-dependent-navier-stokes/<p>Some results:</p>
<p><video class="video-shortcode" preload="auto" controls>
<source src="https://geistlib.xyz/vid/NS.webm" type="video/webm">
There should have been a video here but your browser does not seem
to support it.
</video>
<video class="video-shortcode" preload="auto" controls>
<source src="https://geistlib.xyz/vid/NS_h.webm" type="video/webm">
There should have been a video here but your browser does not seem
to support it.
</video>
</p>
<p><video class="video-shortcode" preload="auto" controls>
<source src="https://geistlib.xyz/vid/NS_r.webm" type="video/webm">
There should have been a video here but your browser does not seem
to support it.
</video>
<video class="video-shortcode" preload="auto" controls>
<source src="https://geistlib.xyz/vid/NS_sr.webm" type="video/webm">
There should have been a video here but your browser does not seem
to support it.
</video>
</p>
<p><video class="video-shortcode" preload="auto" controls>
<source src="https://geistlib.xyz/vid/NS_st.webm" type="video/webm">
There should have been a video here but your browser does not seem
to support it.
</video>
<video class="video-shortcode" preload="auto" controls>
<source src="https://geistlib.xyz/vid/NS_st_d_l.webm" type="video/webm">
There should have been a video here but your browser does not seem
to support it.
</video>
<video class="video-shortcode" preload="auto" controls>
<source src="https://geistlib.xyz/vid/NS_st_r_l.webm" type="video/webm">
There should have been a video here but your browser does not seem
to support it.
</video>
</p>
<h2 id="the-equation">The Equation</h2>
<p>Let $u$ be the velocity field of an 2-dimensional incompressible fluid ($\nabla \cdot u =0$), let $p$ be the pressure gradient. $\mu, \rho$ are the viscosity and the density. The Navier-Stokes equation is:
$$
\frac{\partial u}{\partial t} + \nabla(\mu\nabla u)+\rho u\cdot \nabla u + p = 0,\quad \nabla \cdot u =0.
$$</p>
<p>The above equation in components amounts to
$$
\begin{align}
\frac{\partial u_x}{\partial t} + \rho(u_x\partial_x + u_y\partial_y )u_x + \mu(\frac{\partial^2}{\partial x^2}+\frac{\partial^2}{\partial y^2})u_x + p_x = 0 \\
\frac{\partial u_y}{\partial t} + \rho(u_x\partial_x + u_y\partial_y ) u_y + \mu(\frac{\partial^2}{\partial x^2}+\frac{\partial^2}{\partial y^2})u_y + p_y = 0 \\
\partial_x u_x + \partial_y u_y = 0
\end{align}
$$</p>
<h2 id="boundary-conditions">Boundary conditions</h2>
<p>Suppose that the geometry is a rectangle (possibily with some holes). Suppose further that there is an inflow on the left, say, $x=0$, then the Dirichlet boundary condition should be of the following form
$$
u_x(t,x,y)|_{x=0}= V(t,y),\quad u_y(t,x,y)|_{x=0}=0.
$$</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-mma" data-lang="mma"><span class="line"><span class="ln">1</span><span class="cl"><span class="n">iBC</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DirichletCondition</span><span class="p">[{</span><span class="n">u</span><span class="p">[</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">V</span><span class="p">[</span><span class="n">t</span><span class="p">,</span><span class="n">y</span><span class="p">]</span><span class="w">
</span></span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="w"> </span><span class="p">,</span><span class="w"> </span><span class="n">uy</span><span class="p">[</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">];</span><span class="w">
</span></span></span></code></pre></div><p>If the fluid flows out on the right, say $x=4$ the boundary condition should be of Dirichlet type,
$$
p(t,x,y)|_{x=4}=0.
$$</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-mma" data-lang="mma"><span class="line"><span class="ln">1</span><span class="cl"><span class="n">oBC</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DirichletCondition</span><span class="p">[</span><span class="n">p</span><span class="p">[</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">4</span><span class="p">];</span><span class="w">
</span></span></span></code></pre></div><p>On the remaining walls, which are $y=\pm 1/2$, velocities are all zero,
$$
u_x(t,x,y)|_{y=\pm 1/2}=u_y(t,x,y)|_{y=\pm 1/2} = 0.
$$
In mathematica the wall doesn’t need to be specified preciesly. One needs only to provide a range, <em>e.g.</em></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-mma" data-lang="mma"><span class="line"><span class="ln">1</span><span class="cl"><span class="n">wallBC</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DirichletCondition</span><span class="p">[{</span><span class="n">ux</span><span class="p">[</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">vy</span><span class="p">[</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">},</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">4</span><span class="p">];</span><span class="w">
</span></span></span></code></pre></div><p>Finally the initial condition can be set to be such that the fluid is at rest,
$$
u(t,x,y)|_{t=0} = 0 = p(t,x,y)|_{t=0}.
$$</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-mma" data-lang="mma"><span class="line"><span class="ln">1</span><span class="cl"><span class="n">ic</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="n">ux</span><span class="p">[</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">uy</span><span class="p">[</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="p">[</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">};</span><span class="w">
</span></span></span></code></pre></div><h2 id="drawing-the-region">Drawing the region</h2>
<p>For example</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-mma" data-lang="mma"><span class="line"><span class="ln">1</span><span class="cl"><span class="err">\</span><span class="p">[</span><span class="n">CapitalOmega</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w">
</span></span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="w"> </span><span class="n">RegionUnion</span><span class="p">[</span><span class="w">
</span></span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="w"> </span><span class="n">RegionDifference</span><span class="p">[</span><span class="n">Rectangle</span><span class="p">[{</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mf">-.5</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">4</span><span class="p">,</span><span class="w"> </span><span class="mf">.5</span><span class="p">}],</span><span class="w">
</span></span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="w"> </span><span class="n">Rectangle</span><span class="p">[{</span><span class="mf">.5</span><span class="p">,</span><span class="w"> </span><span class="mf">-0.1</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mf">.3</span><span class="p">,</span><span class="w"> </span><span class="mf">0.1</span><span class="p">}]]];</span><span class="w">
</span></span></span></code></pre></div><h2 id="finite-element-method">Finite element method</h2>
<p>To use the finite element method, the equation should be set to be
$$
\begin{align}
u_x + \rho(u_x\partial_x + u_y\partial_y )u_x + \mu(\frac{\partial^2}{\partial x^2}+\frac{\partial^2}{\partial y^2})u_x + p_x = 0 \\
u_y + \rho(u_x\partial_x + u_y\partial_y ) u_y + \mu(\frac{\partial^2}{\partial x^2}+\frac{\partial^2}{\partial y^2})u_y + p_y = 0 \\
\partial_x u_x + \partial_y u_y = 0
\end{align}
$$
Since $\partial_t u$ is now seen as $\frac{u(t+\Delta t)-u(t)}{\Delta t}$ and $u(t+\Delta t)\sim u(t)+u(t)\Delta t$. The corresponding code is</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-mma" data-lang="mma"><span class="line"><span class="ln"> 1</span><span class="cl"><span class="n">nsEq</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 2</span><span class="cl"><span class="w"></span><span class="err">\</span><span class="o">!</span><span class="err">\</span><span class="p">(</span><span class="err">\</span><span class="o">*</span><span class="n">SuperscriptBox</span><span class="p">[</span><span class="err">\</span><span class="p">(</span><span class="n">ux</span><span class="err">\</span><span class="p">),</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 3</span><span class="cl"><span class="w"></span><span class="n">TagBox</span><span class="p">[</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 4</span><span class="cl"><span class="w"></span><span class="n">RowBox</span><span class="p">[{</span><span class="s">"("</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 5</span><span class="cl"><span class="w"></span><span class="n">RowBox</span><span class="p">[{</span><span class="s">"1"</span><span class="p">,</span><span class="w"> </span><span class="s">","</span><span class="p">,</span><span class="w"> </span><span class="s">"0"</span><span class="p">,</span><span class="w"> </span><span class="s">","</span><span class="p">,</span><span class="w"> </span><span class="s">"0"</span><span class="p">}],</span><span class="w"> </span><span class="s">")"</span><span class="p">}],</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 6</span><span class="cl"><span class="w"></span><span class="n">Derivative</span><span class="p">],</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 7</span><span class="cl"><span class="w"></span><span class="n">MultilineFunction</span><span class="o">-></span><span class="n">None</span><span class="p">]</span><span class="err">\</span><span class="p">)[</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 8</span><span class="cl"><span class="w"> </span><span class="n">y</span><span class="p">]</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">Rho</span><span class="p">]</span><span class="w"> </span><span class="p">{</span><span class="n">ux</span><span class="p">[</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">],</span><span class="w"> </span><span class="n">uy</span><span class="p">[</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">]}</span><span class="err">.</span><span class="n">Inactive</span><span class="p">[</span><span class="n">Grad</span><span class="p">][</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 9</span><span class="cl"><span class="w"> </span><span class="n">ux</span><span class="p">[</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">],</span><span class="w"> </span><span class="p">{</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">}]</span><span class="w"> </span><span class="o">+</span><span class="w">
</span></span></span><span class="line"><span class="ln">10</span><span class="cl"><span class="w"> </span><span class="n">Inactive</span><span class="p">[</span><span class="n">Div</span><span class="p">][(</span><span class="o">-</span><span class="err">\</span><span class="p">[</span><span class="n">Mu</span><span class="p">]</span><span class="w"> </span><span class="n">Inactive</span><span class="p">[</span><span class="n">Grad</span><span class="p">][</span><span class="n">ux</span><span class="p">[</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">],</span><span class="w"> </span><span class="p">{</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">}]),</span><span class="w"> </span><span class="p">{</span><span class="n">x</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln">11</span><span class="cl"><span class="w"> </span><span class="n">y</span><span class="p">}]</span><span class="w"> </span><span class="o">+</span><span class="w">
</span></span></span><span class="line"><span class="ln">12</span><span class="cl"><span class="w"></span><span class="err">\</span><span class="o">!</span><span class="err">\</span><span class="p">(</span><span class="err">\</span><span class="o">*</span><span class="n">SuperscriptBox</span><span class="p">[</span><span class="err">\</span><span class="p">(</span><span class="n">p</span><span class="err">\</span><span class="p">),</span><span class="w">
</span></span></span><span class="line"><span class="ln">13</span><span class="cl"><span class="w"></span><span class="n">TagBox</span><span class="p">[</span><span class="w">
</span></span></span><span class="line"><span class="ln">14</span><span class="cl"><span class="w"></span><span class="n">RowBox</span><span class="p">[{</span><span class="s">"("</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln">15</span><span class="cl"><span class="w"></span><span class="n">RowBox</span><span class="p">[{</span><span class="s">"0"</span><span class="p">,</span><span class="w"> </span><span class="s">","</span><span class="p">,</span><span class="w"> </span><span class="s">"1"</span><span class="p">,</span><span class="w"> </span><span class="s">","</span><span class="p">,</span><span class="w"> </span><span class="s">"0"</span><span class="p">}],</span><span class="w"> </span><span class="s">")"</span><span class="p">}],</span><span class="w">
</span></span></span><span class="line"><span class="ln">16</span><span class="cl"><span class="w"></span><span class="n">Derivative</span><span class="p">],</span><span class="w">
</span></span></span><span class="line"><span class="ln">17</span><span class="cl"><span class="w"></span><span class="n">MultilineFunction</span><span class="o">-></span><span class="n">None</span><span class="p">]</span><span class="err">\</span><span class="p">)[</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">],</span><span class="w">
</span></span></span><span class="line"><span class="ln">18</span><span class="cl"><span class="w"></span><span class="err">\</span><span class="o">!</span><span class="err">\</span><span class="p">(</span><span class="err">\</span><span class="o">*</span><span class="n">SuperscriptBox</span><span class="p">[</span><span class="err">\</span><span class="p">(</span><span class="n">uy</span><span class="err">\</span><span class="p">),</span><span class="w">
</span></span></span><span class="line"><span class="ln">19</span><span class="cl"><span class="w"></span><span class="n">TagBox</span><span class="p">[</span><span class="w">
</span></span></span><span class="line"><span class="ln">20</span><span class="cl"><span class="w"></span><span class="n">RowBox</span><span class="p">[{</span><span class="s">"("</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln">21</span><span class="cl"><span class="w"></span><span class="n">RowBox</span><span class="p">[{</span><span class="s">"1"</span><span class="p">,</span><span class="w"> </span><span class="s">","</span><span class="p">,</span><span class="w"> </span><span class="s">"0"</span><span class="p">,</span><span class="w"> </span><span class="s">","</span><span class="p">,</span><span class="w"> </span><span class="s">"0"</span><span class="p">}],</span><span class="w"> </span><span class="s">")"</span><span class="p">}],</span><span class="w">
</span></span></span><span class="line"><span class="ln">22</span><span class="cl"><span class="w"></span><span class="n">Derivative</span><span class="p">],</span><span class="w">
</span></span></span><span class="line"><span class="ln">23</span><span class="cl"><span class="w"></span><span class="n">MultilineFunction</span><span class="o">-></span><span class="n">None</span><span class="p">]</span><span class="err">\</span><span class="p">)[</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln">24</span><span class="cl"><span class="w"> </span><span class="n">y</span><span class="p">]</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">Rho</span><span class="p">]</span><span class="w"> </span><span class="p">{</span><span class="n">ux</span><span class="p">[</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">],</span><span class="w"> </span><span class="n">uy</span><span class="p">[</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">]}</span><span class="err">.</span><span class="n">Inactive</span><span class="p">[</span><span class="n">Grad</span><span class="p">][</span><span class="w">
</span></span></span><span class="line"><span class="ln">25</span><span class="cl"><span class="w"> </span><span class="n">uy</span><span class="p">[</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">],</span><span class="w"> </span><span class="p">{</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">}]</span><span class="w"> </span><span class="o">+</span><span class="w">
</span></span></span><span class="line"><span class="ln">26</span><span class="cl"><span class="w"> </span><span class="n">Inactive</span><span class="p">[</span><span class="n">Div</span><span class="p">][(</span><span class="o">-</span><span class="err">\</span><span class="p">[</span><span class="n">Mu</span><span class="p">]</span><span class="w"> </span><span class="n">Inactive</span><span class="p">[</span><span class="n">Grad</span><span class="p">][</span><span class="n">uy</span><span class="p">[</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">],</span><span class="w"> </span><span class="p">{</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">}]),</span><span class="w"> </span><span class="p">{</span><span class="n">x</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln">27</span><span class="cl"><span class="w"> </span><span class="n">y</span><span class="p">}]</span><span class="w"> </span><span class="o">+</span><span class="w">
</span></span></span><span class="line"><span class="ln">28</span><span class="cl"><span class="w"></span><span class="err">\</span><span class="o">!</span><span class="err">\</span><span class="p">(</span><span class="err">\</span><span class="o">*</span><span class="n">SuperscriptBox</span><span class="p">[</span><span class="err">\</span><span class="p">(</span><span class="n">p</span><span class="err">\</span><span class="p">),</span><span class="w">
</span></span></span><span class="line"><span class="ln">29</span><span class="cl"><span class="w"></span><span class="n">TagBox</span><span class="p">[</span><span class="w">
</span></span></span><span class="line"><span class="ln">30</span><span class="cl"><span class="w"></span><span class="n">RowBox</span><span class="p">[{</span><span class="s">"("</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln">31</span><span class="cl"><span class="w"></span><span class="n">RowBox</span><span class="p">[{</span><span class="s">"0"</span><span class="p">,</span><span class="w"> </span><span class="s">","</span><span class="p">,</span><span class="w"> </span><span class="s">"0"</span><span class="p">,</span><span class="w"> </span><span class="s">","</span><span class="p">,</span><span class="w"> </span><span class="s">"1"</span><span class="p">}],</span><span class="w"> </span><span class="s">")"</span><span class="p">}],</span><span class="w">
</span></span></span><span class="line"><span class="ln">32</span><span class="cl"><span class="w"></span><span class="n">Derivative</span><span class="p">],</span><span class="w">
</span></span></span><span class="line"><span class="ln">33</span><span class="cl"><span class="w"></span><span class="n">MultilineFunction</span><span class="o">-></span><span class="n">None</span><span class="p">]</span><span class="err">\</span><span class="p">)[</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">],</span><span class="w">
</span></span></span><span class="line"><span class="ln">34</span><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="ln">35</span><span class="cl"><span class="w"></span><span class="err">\</span><span class="o">!</span><span class="err">\</span><span class="p">(</span><span class="err">\</span><span class="o">*</span><span class="n">SuperscriptBox</span><span class="p">[</span><span class="err">\</span><span class="p">(</span><span class="n">ux</span><span class="err">\</span><span class="p">),</span><span class="w">
</span></span></span><span class="line"><span class="ln">36</span><span class="cl"><span class="w"></span><span class="n">TagBox</span><span class="p">[</span><span class="w">
</span></span></span><span class="line"><span class="ln">37</span><span class="cl"><span class="w"></span><span class="n">RowBox</span><span class="p">[{</span><span class="s">"("</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln">38</span><span class="cl"><span class="w"></span><span class="n">RowBox</span><span class="p">[{</span><span class="s">"0"</span><span class="p">,</span><span class="w"> </span><span class="s">","</span><span class="p">,</span><span class="w"> </span><span class="s">"1"</span><span class="p">,</span><span class="w"> </span><span class="s">","</span><span class="p">,</span><span class="w"> </span><span class="s">"0"</span><span class="p">}],</span><span class="w"> </span><span class="s">")"</span><span class="p">}],</span><span class="w">
</span></span></span><span class="line"><span class="ln">39</span><span class="cl"><span class="w"></span><span class="n">Derivative</span><span class="p">],</span><span class="w">
</span></span></span><span class="line"><span class="ln">40</span><span class="cl"><span class="w"></span><span class="n">MultilineFunction</span><span class="o">-></span><span class="n">None</span><span class="p">]</span><span class="err">\</span><span class="p">)[</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">]</span><span class="w"> </span><span class="o">+</span><span class="w">
</span></span></span><span class="line"><span class="ln">41</span><span class="cl"><span class="w"></span><span class="err">\</span><span class="o">!</span><span class="err">\</span><span class="p">(</span><span class="err">\</span><span class="o">*</span><span class="n">SuperscriptBox</span><span class="p">[</span><span class="err">\</span><span class="p">(</span><span class="n">uy</span><span class="err">\</span><span class="p">),</span><span class="w">
</span></span></span><span class="line"><span class="ln">42</span><span class="cl"><span class="w"></span><span class="n">TagBox</span><span class="p">[</span><span class="w">
</span></span></span><span class="line"><span class="ln">43</span><span class="cl"><span class="w"></span><span class="n">RowBox</span><span class="p">[{</span><span class="s">"("</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln">44</span><span class="cl"><span class="w"></span><span class="n">RowBox</span><span class="p">[{</span><span class="s">"0"</span><span class="p">,</span><span class="w"> </span><span class="s">","</span><span class="p">,</span><span class="w"> </span><span class="s">"0"</span><span class="p">,</span><span class="w"> </span><span class="s">","</span><span class="p">,</span><span class="w"> </span><span class="s">"1"</span><span class="p">}],</span><span class="w"> </span><span class="s">")"</span><span class="p">}],</span><span class="w">
</span></span></span><span class="line"><span class="ln">45</span><span class="cl"><span class="w"></span><span class="n">Derivative</span><span class="p">],</span><span class="w">
</span></span></span><span class="line"><span class="ln">46</span><span class="cl"><span class="w"></span><span class="n">MultilineFunction</span><span class="o">-></span><span class="n">None</span><span class="p">]</span><span class="err">\</span><span class="p">)[</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">]}</span><span class="w">
</span></span></span></code></pre></div><p>The viscosity $\mu$ and the density $\rho$ can be specified with</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-mma" data-lang="mma"><span class="line"><span class="ln">1</span><span class="cl"><span class="n">nsEq</span><span class="w"> </span><span class="o">/.</span><span class="w"> </span><span class="p">{</span><span class="err">\</span><span class="p">[</span><span class="n">Mu</span><span class="p">]</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mi">10</span><span class="o">^</span><span class="mi">-3</span><span class="p">,</span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">Rho</span><span class="p">]</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mi">1</span><span class="p">}</span><span class="w">
</span></span></span></code></pre></div><p>if $\mu$ is set to $10^{-3}$ and $\rho$ to $1$.</p>
<p>The Mathematica code for solving $\{u_x,u_y,p\}$ at a certain time $t$, for $t\in\{0,10\}$ is then</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-mma" data-lang="mma"><span class="line"><span class="ln">1</span><span class="cl"><span class="n">time</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">10</span><span class="w">
</span></span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="w"></span><span class="p">{</span><span class="n">uxs</span><span class="p">,</span><span class="w"> </span><span class="n">uys</span><span class="p">,</span><span class="w"> </span><span class="n">ps</span><span class="p">}</span><span class="w"> </span><span class="o">=</span><span class="w">
</span></span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="w"> </span><span class="n">NDSolveValue</span><span class="p">[{</span><span class="n">nsEq</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="p">{</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">},</span><span class="w"> </span><span class="n">bcs</span><span class="p">,</span><span class="w"> </span><span class="n">ic</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="n">ux</span><span class="p">,</span><span class="w"> </span><span class="n">uy</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">}</span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">Element</span><span class="p">]</span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">CapitalOmega</span><span class="p">],</span><span class="w"> </span><span class="p">{</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">time</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="w"> </span><span class="n">Method</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="s">"PDEDiscretization"</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="s">"MethodOfLines"</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln">5</span><span class="cl"><span class="w"> </span><span class="s">"SpatialDiscretization"</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="s">"FiniteElement"</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln">6</span><span class="cl"><span class="w"> </span><span class="s">"InterpolationOrder"</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="n">ux</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="n">uy</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mi">1</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln">7</span><span class="cl"><span class="w"> </span><span class="s">"MeshOptions"</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="s">"MaxCellMeasure"</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mf">0.0005</span><span class="p">}}}}</span><span class="w">
</span></span></span><span class="line"><span class="ln">8</span><span class="cl"><span class="w"> </span><span class="p">];</span><span class="w">
</span></span></span></code></pre></div><p>Here $u_x,u_y$ are required to be more precise than $p$ (see the document for <code>InterpolationOrder</code> for details). Since the complexity of the problem is unknown, it is advisable to monitor the progress, hence</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-mma" data-lang="mma"><span class="line"><span class="ln"> 1</span><span class="cl"><span class="n">Monitor</span><span class="p">[</span><span class="n">AbsoluteTiming</span><span class="p">[</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 2</span><span class="cl"><span class="w"> </span><span class="p">{</span><span class="n">uxs</span><span class="p">,</span><span class="w"> </span><span class="n">uys</span><span class="p">,</span><span class="w"> </span><span class="n">ps</span><span class="p">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">NDSolveValue</span><span class="p">[{</span><span class="n">nsEq</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="p">{</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">},</span><span class="w"> </span><span class="n">bcs</span><span class="p">,</span><span class="w"> </span><span class="n">ic</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 3</span><span class="cl"><span class="w"> </span><span class="p">{</span><span class="n">ux</span><span class="p">,</span><span class="w"> </span><span class="n">uy</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">}</span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">Element</span><span class="p">]</span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">CapitalOmega</span><span class="p">],</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 4</span><span class="cl"><span class="w"> </span><span class="p">{</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">time</span><span class="p">},</span><span class="w"> </span><span class="n">Method</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="s">"PDEDiscretization"</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="s">"MethodOfLines"</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 5</span><span class="cl"><span class="w"> </span><span class="s">"SpatialDiscretization"</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="s">"FiniteElement"</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 6</span><span class="cl"><span class="w"> </span><span class="s">"InterpolationOrder"</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="n">ux</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="n">uy</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mi">1</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 7</span><span class="cl"><span class="w"> </span><span class="s">"MeshOptions"</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="s">"MaxCellMeasure"</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mf">0.0005</span><span class="p">}}}},</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 8</span><span class="cl"><span class="w"> </span><span class="n">EvaluationMonitor</span><span class="w"> </span><span class="o">:></span><span class="w"> </span><span class="p">(</span><span class="n">currentTime</span><span class="w"> </span><span class="o">=</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 9</span><span class="cl"><span class="w"> </span><span class="n">Row</span><span class="p">[{</span><span class="s">"t = "</span><span class="p">,</span><span class="w"> </span><span class="n">CForm</span><span class="p">[</span><span class="n">t</span><span class="p">]}])];],</span><span class="w"> </span><span class="n">currentTime</span><span class="p">]</span><span class="w">
</span></span></span><span class="line"><span class="ln">10</span><span class="cl"><span class="w"> </span><span class="p">];</span><span class="w">
</span></span></span></code></pre></div><h2 id="visualizing-vorticity">Visualizing vorticity</h2>
<p>The vorticity is
$$
\omega = \nabla\times u = - \partial_y u_{x} + \partial_x u_{y}.
$$</p>
<p>This is a <em>vector</em>, where the basis vectors are suppressed in the addition. As a function it is defined as</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-mma" data-lang="mma"><span class="line"><span class="ln"> 1</span><span class="cl"><span class="n">Function</span><span class="p">[{</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">},</span><span class="w"> </span><span class="o">-</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 2</span><span class="cl"><span class="w"></span><span class="err">\</span><span class="o">!</span><span class="err">\</span><span class="p">(</span><span class="err">\</span><span class="o">*</span><span class="n">SuperscriptBox</span><span class="p">[</span><span class="err">\</span><span class="p">(</span><span class="n">xVel</span><span class="err">\</span><span class="p">),</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 3</span><span class="cl"><span class="w"></span><span class="n">TagBox</span><span class="p">[</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 4</span><span class="cl"><span class="w"></span><span class="n">RowBox</span><span class="p">[{</span><span class="s">"("</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 5</span><span class="cl"><span class="w"></span><span class="n">RowBox</span><span class="p">[{</span><span class="s">"0"</span><span class="p">,</span><span class="w"> </span><span class="s">","</span><span class="p">,</span><span class="w"> </span><span class="s">"0"</span><span class="p">,</span><span class="w"> </span><span class="s">","</span><span class="p">,</span><span class="w"> </span><span class="s">"1"</span><span class="p">}],</span><span class="w"> </span><span class="s">")"</span><span class="p">}],</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 6</span><span class="cl"><span class="w"></span><span class="n">Derivative</span><span class="p">],</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 7</span><span class="cl"><span class="w"></span><span class="n">MultilineFunction</span><span class="o">-></span><span class="n">None</span><span class="p">]</span><span class="err">\</span><span class="p">)[</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">]</span><span class="w"> </span><span class="o">+</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 8</span><span class="cl"><span class="w"></span><span class="err">\</span><span class="o">!</span><span class="err">\</span><span class="p">(</span><span class="err">\</span><span class="o">*</span><span class="n">SuperscriptBox</span><span class="p">[</span><span class="err">\</span><span class="p">(</span><span class="n">yVel</span><span class="err">\</span><span class="p">),</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 9</span><span class="cl"><span class="w"></span><span class="n">TagBox</span><span class="p">[</span><span class="w">
</span></span></span><span class="line"><span class="ln">10</span><span class="cl"><span class="w"></span><span class="n">RowBox</span><span class="p">[{</span><span class="s">"("</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln">11</span><span class="cl"><span class="w"></span><span class="n">RowBox</span><span class="p">[{</span><span class="s">"0"</span><span class="p">,</span><span class="w"> </span><span class="s">","</span><span class="p">,</span><span class="w"> </span><span class="s">"1"</span><span class="p">,</span><span class="w"> </span><span class="s">","</span><span class="p">,</span><span class="w"> </span><span class="s">"0"</span><span class="p">}],</span><span class="w"> </span><span class="s">")"</span><span class="p">}],</span><span class="w">
</span></span></span><span class="line"><span class="ln">12</span><span class="cl"><span class="w"></span><span class="n">Derivative</span><span class="p">],</span><span class="w">
</span></span></span><span class="line"><span class="ln">13</span><span class="cl"><span class="w"></span><span class="n">MultilineFunction</span><span class="o">-></span><span class="n">None</span><span class="p">]</span><span class="err">\</span><span class="p">)[</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">]]</span><span class="w">
</span></span></span></code></pre></div><p><code>Contours</code> and <code>ContourStyle</code> should be set appropriately</p>
<p>Finally</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-mma" data-lang="mma"><span class="line"><span class="ln">1</span><span class="cl"><span class="n">frames</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Table</span><span class="p">[</span><span class="w">
</span></span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="w"> </span><span class="n">Show</span><span class="p">[</span><span class="n">ContourPlot</span><span class="p">[</span><span class="n">vorticity</span><span class="p">[</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">],</span><span class="w"> </span><span class="p">{</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="o">/</span><span class="mi">2</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="o">/</span><span class="mi">2</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="w"> </span><span class="n">AspectRatio</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">Automatic</span><span class="p">,</span><span class="w"> </span><span class="n">ContourShading</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">None</span><span class="p">,</span><span class="w"> </span><span class="n">Contours</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">contour</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="w"> </span><span class="n">ContourStyle</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">contourColor</span><span class="p">,</span><span class="w"> </span><span class="n">Axes</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">False</span><span class="p">,</span><span class="w"> </span><span class="n">Frame</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">None</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln">5</span><span class="cl"><span class="w"> </span><span class="n">PlotRange</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{{</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">4</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">-1</span><span class="o">/</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="o">/</span><span class="mi">2</span><span class="p">},</span><span class="w"> </span><span class="n">All</span><span class="p">}]],</span><span class="w"> </span><span class="p">{</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="n">time</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="o">/</span><span class="mi">10</span><span class="p">}];</span><span class="w">
</span></span></span></code></pre></div><p>which can be animated or exported.</p>
Old Quantum Theory 2: Light Quanta
https://geistlib.xyz/old-quantum-theory-light-quanta/
Thu, 08 Dec 2022 22:10:19 +0100https://geistlib.xyz/old-quantum-theory-light-quanta/<h2 id="history-and-overview">History and Overview</h2>
<p>Planck’s argument for the necessarity to consier the energy of harmonic oscillators to be discrete was given in the year 1900. It was in 1905 that Einstein published his paper on light quanta. He quoted Planck’s radiation law, and felt that his and Planck’s considerations were to some extent complementary, while in a later paper published in 1906 he showed that Planck was using the concept of light quanta which he developed in his 1905 work.</p>
<p>The 1905 paper was <em>not</em> about an explanation of the photo-electric effect since the measurements of this effect at that time were not really sufficiently accurate to point without any doubt to a violation of classical behaviour. He was worried more about the impossibility of fitting black-body radiation into classical Maxwell theory. He appealed to fluorescence, photo-electricity and photo-ionization data as evidence in favour of his thesis.</p>
<h2 id="low--and-high-temperature-behaviour-of-plancks-law">Low- and high-temperature behaviour of Planck’s law</h2>
<p>For long wavelengths and high temperatures, the classical argument should be valid, since Planck’s radiation law in the form of
$$
u(\nu,T) = \frac{b\nu^3}{e^{a\nu/T}-1}
$$
leads in the limit as $T/\nu$ is large to the classical formula of Rayleigh-Jeans
$$
u(\nu,T) = \frac{8\pi \nu^2}{c^3}kT.
$$</p>
<p>For low temperatures and short wavelengths, Planck’s law goes over into Wien’s law
$$
u(\nu,T) = b\nu^3 e^{-a\nu/T}.
$$
In the region of validity of Wien’s law, the entropy density $\sigma$ is
$$
\sigma = -\frac{u(\nu,T)}{a\nu}\left(\log\frac{u(\nu,T)}{b\nu^3}-1\right)
$$
and the entropy will then be
$$
S = -\frac{E}{a\nu}\left(\log\frac{E}{Vb\nu^3 d\nu}-1\right).
$$
Let $S_0$ be the entropy of the same amount of radiative energy $E$ in the same frequency range but within a volume $V_0$, we have
$$
S-S_0 = \frac{E}{a\nu}\log\frac{V}{V_0}.
$$
Now, the formula for the entropy change of a perfect gas of $n$ particles is
$$
S-S_0 = nk\log\frac{V}{V_0},
$$
it can then be concluded that in the region where Wien’s law is valid, one can say that thermodynamically speaking monochromatic radiation consists of independent energy quanta of magnitude $ka\nu$. Using the fact that $a=h/k$, the magnitude is $h\nu$.</p>
<h2 id="going-backward-to-plancks-law">Going backward to Planck’s law</h2>
<p>If one makes the following assumptions</p>
<ol>
<li>The energy of a resonator must be an integral number of $h\nu$.</li>
<li>The energy of a resonator changes discontinuously in absorption or emission by an amount that is an integral number of $h\nu$.</li>
<li>Use Maxwell’s theory (for the energy of dipoles).</li>
</ol>
<p>Going backward through Einstein’s reasoning, one ends up not with Planck’s radiation law but with Wien’s law. There is an additional hypothesis needed to obtain Planck’s radiation law. In Planck’s derivation of $W$, the probability that a certain state is realized, if $P=\frac{E}{h\nu}$, and $N$ is the number of oscillators, $W$ was given by
$$
W=\frac{(N+P+1)!}{(N-1)!P!},
$$
while classically this should be
$$
W=\frac{(N+P+1)!}{(N-1)!P!n_1!n_2!…}
$$
since all the oscillators in a particular class are distinguishable. This amounts to saying that light quanta are bosons.</p>
Mathematica: Special Functions Visualization
https://geistlib.xyz/mathematica-special-functions/
Thu, 08 Dec 2022 04:16:16 +0100https://geistlib.xyz/mathematica-special-functions/<h2 id="elliptic-and-related-functions">Elliptic and related functions</h2>
<h3 id="theta-function">Theta function</h3>
<p>Jacobi $\theta_1$ function, with the nome $q=\frac{1}{2} e^{u i\pi},u\in\{0,2\}$.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-mma" data-lang="mma"><span class="line"><span class="ln">1</span><span class="cl"><span class="n">plots</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Table</span><span class="p">[</span><span class="w">
</span></span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="w"> </span><span class="n">ComplexPlot3D</span><span class="p">[</span><span class="w">
</span></span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="w"> </span><span class="n">EllipticTheta</span><span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">z</span><span class="p">,</span><span class="w"> </span><span class="mf">.5</span><span class="w"> </span><span class="n">Exp</span><span class="p">[</span><span class="n">u</span><span class="w"> </span><span class="n">I</span><span class="w"> </span><span class="n">Pi</span><span class="p">]],</span><span class="w"> </span><span class="p">{</span><span class="n">z</span><span class="p">,</span><span class="w"> </span><span class="mi">-5</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mf">1.5</span><span class="w"> </span><span class="n">I</span><span class="p">,</span><span class="w"> </span><span class="mi">5</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mf">1.5</span><span class="w"> </span><span class="n">I</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="w"> </span><span class="n">PlotRange</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">All</span><span class="p">,</span><span class="w"> </span><span class="n">Boxed</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">False</span><span class="p">,</span><span class="w"> </span><span class="n">Axes</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">False</span><span class="p">],</span><span class="w"> </span><span class="p">{</span><span class="n">u</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mf">0.05</span><span class="p">}]</span><span class="w">
</span></span></span><span class="line"><span class="ln">5</span><span class="cl"><span class="w"></span><span class="n">Export</span><span class="p">[</span><span class="s">"ani.avi"</span><span class="p">,</span><span class="w"> </span><span class="n">plots</span><span class="p">,</span><span class="w"> </span><span class="n">Antialiasing</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">True</span><span class="p">,</span><span class="w"> </span><span class="n">ImageResolution</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mi">500</span><span class="p">]</span><span class="w">
</span></span></span></code></pre></div><p>The animation shows the absoute value plots of $|\theta_1(z,q)|$ with $\text{Re}(z) \in [-5,5]$ as the $x$-axis and $\text{Im}(z) \in [-3/2,3/2]$ as the $y$-axis, with varying $q$.</p>
<video class="video-shortcode" preload="auto" controls>
<source src="https://geistlib.xyz/vid/plt_jacobi_theta_3d.webm" type="video/webm">
There should have been a video here but your browser does not seem
to support it.
</video>
<h3 id="weierstrass-elliptic-function">Weierstrass elliptic function</h3>
<p>Starting with the auxiliary function $\sigma$, through taking derivative and quotienting, one can get the $\wp$-function.</p>
<p>Auxiliary: Weierstrass $\sigma$,
$$
\sigma(z;\Lambda) = z\prod_{w\in\Lambda^\ast}(1-\frac{z}{w})\exp\left(z/w+\frac{1}{2}(z/w)^2\right),\Lambda^\ast = \Lambda - \{0\}
$$
where $w$ should be seen as a shorthand for $m\omega_1 + n\omega_2$ with $\Lambda = \{m\omega_1,n\omega_2\}, (m,n\in \mathbb{Z})$.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-mma" data-lang="mma"><span class="line"><span class="ln"> 1</span><span class="cl"><span class="n">pC3D</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ComplexPlot3D</span><span class="p">[</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 2</span><span class="cl"><span class="w"> </span><span class="n">WeierstrassSigma</span><span class="p">[</span><span class="n">z</span><span class="p">,</span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">}],</span><span class="w"> </span><span class="p">{</span><span class="n">z</span><span class="p">,</span><span class="w"> </span><span class="mi">-10</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="n">I</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="n">I</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 3</span><span class="cl"><span class="w"> </span><span class="n">AxesLabel</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="s">"R"</span><span class="p">,</span><span class="w"> </span><span class="s">"I"</span><span class="p">,</span><span class="w"> </span><span class="s">"A"</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 4</span><span class="cl"><span class="w"> </span><span class="n">ScalingFunctions</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="n">None</span><span class="p">,</span><span class="w"> </span><span class="n">None</span><span class="p">,</span><span class="w"> </span><span class="s">"Log"</span><span class="p">},</span><span class="w"> </span><span class="n">PlotRange</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="mf">.1</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="o">^</span><span class="mi">17</span><span class="p">}</span><span class="w"> </span><span class="p">];</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 5</span><span class="cl"><span class="w"></span><span class="n">pC</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ComplexPlot</span><span class="p">[</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 6</span><span class="cl"><span class="w"> </span><span class="n">WeierstrassSigma</span><span class="p">[</span><span class="n">z</span><span class="p">,</span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">}],</span><span class="w"> </span><span class="p">{</span><span class="n">z</span><span class="p">,</span><span class="w"> </span><span class="mi">-10</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="n">I</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="n">I</span><span class="p">},</span><span class="w"> </span><span class="n">Axes</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">False</span><span class="p">,</span><span class="w"> </span><span class="n">Frame</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">False</span><span class="p">];</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 7</span><span class="cl"><span class="w"></span><span class="n">level</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-3</span><span class="p">;</span><span class="w"> </span><span class="n">gr</span><span class="w"> </span><span class="o">=</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 8</span><span class="cl"><span class="w"> </span><span class="n">Graphics3D</span><span class="p">[{</span><span class="n">Texture</span><span class="p">[</span><span class="n">pC</span><span class="p">],</span><span class="w"> </span><span class="n">EdgeForm</span><span class="p">[],</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 9</span><span class="cl"><span class="w"> </span><span class="n">Polygon</span><span class="p">[{{</span><span class="mi">-10</span><span class="p">,</span><span class="w"> </span><span class="mi">-10</span><span class="p">,</span><span class="w"> </span><span class="n">level</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="mi">-10</span><span class="p">,</span><span class="w"> </span><span class="n">level</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln">10</span><span class="cl"><span class="w"> </span><span class="n">level</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">-10</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="n">level</span><span class="p">}},</span><span class="w">
</span></span></span><span class="line"><span class="ln">11</span><span class="cl"><span class="w"> </span><span class="n">VertexTextureCoordinates</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{{</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">}}]},</span><span class="w">
</span></span></span><span class="line"><span class="ln">12</span><span class="cl"><span class="w"> </span><span class="n">Lighting</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="s">"Neutral"</span><span class="p">];</span><span class="w">
</span></span></span><span class="line"><span class="ln">13</span><span class="cl"><span class="w"></span><span class="n">Show</span><span class="p">[</span><span class="n">pC3D</span><span class="p">,</span><span class="w"> </span><span class="n">gr</span><span class="p">,</span><span class="w"> </span><span class="n">PlotRange</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">All</span><span class="p">,</span><span class="w"> </span><span class="n">BoxRatios</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mf">.6</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln">14</span><span class="cl"><span class="w"> </span><span class="n">FaceGrids</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="n">Back</span><span class="p">,</span><span class="w"> </span><span class="n">Left</span><span class="p">}]</span><span class="w">
</span></span></span></code></pre></div><p>$\text{Re}(z),\text{Im}(z)\in[-10,10]$, $|\sigma(z,\{1,1\})|$ is $\log$-scaled.</p>
<p><img src="https://geistlib.xyz/img/weierstrass_sigma.svg" alt="Weierstrass sigma"></p>
<p>Auxiliary: Weierstrass $\zeta$. We have</p>
<p>$$
\zeta(z;\Lambda) = \frac{\sigma’(z;\Lambda)}{\sigma(z;\Lambda)}
$$</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-mma" data-lang="mma"><span class="line"><span class="ln"> 1</span><span class="cl"><span class="n">pC3D</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ComplexPlot3D</span><span class="p">[</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 2</span><span class="cl"><span class="w"> </span><span class="n">WeierstrassZeta</span><span class="p">[</span><span class="n">z</span><span class="p">,</span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">}],</span><span class="w"> </span><span class="p">{</span><span class="n">z</span><span class="p">,</span><span class="w"> </span><span class="mi">-10</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="n">I</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="n">I</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 3</span><span class="cl"><span class="w"> </span><span class="n">AxesLabel</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="s">"R"</span><span class="p">,</span><span class="w"> </span><span class="s">"I"</span><span class="p">,</span><span class="w"> </span><span class="s">"A"</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 4</span><span class="cl"><span class="w"> </span><span class="n">ScalingFunctions</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="n">None</span><span class="p">,</span><span class="w"> </span><span class="n">None</span><span class="p">,</span><span class="w"> </span><span class="s">"Log"</span><span class="p">},</span><span class="w"> </span><span class="n">PlotRange</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="mf">.1</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">}];</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 5</span><span class="cl"><span class="w"></span><span class="n">pC</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ComplexPlot</span><span class="p">[</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 6</span><span class="cl"><span class="w"> </span><span class="n">WeierstrassZeta</span><span class="p">[</span><span class="n">z</span><span class="p">,</span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">}],</span><span class="w"> </span><span class="p">{</span><span class="n">z</span><span class="p">,</span><span class="w"> </span><span class="mi">-10</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="n">I</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="n">I</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 7</span><span class="cl"><span class="w"> </span><span class="n">Axes</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">False</span><span class="p">,</span><span class="w"> </span><span class="n">Frame</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">False</span><span class="p">];</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 8</span><span class="cl"><span class="w"></span><span class="n">level</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-3</span><span class="p">;</span><span class="w"> </span><span class="n">gr</span><span class="w"> </span><span class="o">=</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 9</span><span class="cl"><span class="w"> </span><span class="n">Graphics3D</span><span class="p">[{</span><span class="n">Texture</span><span class="p">[</span><span class="n">pC</span><span class="p">],</span><span class="w"> </span><span class="n">EdgeForm</span><span class="p">[],</span><span class="w">
</span></span></span><span class="line"><span class="ln">10</span><span class="cl"><span class="w"> </span><span class="n">Polygon</span><span class="p">[{{</span><span class="mi">-10</span><span class="p">,</span><span class="w"> </span><span class="mi">-10</span><span class="p">,</span><span class="w"> </span><span class="n">level</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="mi">-10</span><span class="p">,</span><span class="w"> </span><span class="n">level</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln">11</span><span class="cl"><span class="w"> </span><span class="n">level</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">-10</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="n">level</span><span class="p">}},</span><span class="w">
</span></span></span><span class="line"><span class="ln">12</span><span class="cl"><span class="w"> </span><span class="n">VertexTextureCoordinates</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{{</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">}}]},</span><span class="w">
</span></span></span><span class="line"><span class="ln">13</span><span class="cl"><span class="w"> </span><span class="n">Lighting</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="s">"Neutral"</span><span class="p">];</span><span class="w">
</span></span></span></code></pre></div><p>$\text{Re}(z),\text{Im}(z)\in[-10,10]$, $|\zeta(z,\{1,1\})|$ is $\log$-scaled.</p>
<p><img src="https://geistlib.xyz/img/weierstrass_zeta.svg" alt="Weierstrass zeta"></p>
<p>Finally, Weierstrass $\wp$, we have</p>
<p>$$
\wp(z;\Lambda) = -\zeta’(z;\Lambda)
$$</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-mma" data-lang="mma"><span class="line"><span class="ln"> 1</span><span class="cl"><span class="n">pC3D</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ComplexPlot3D</span><span class="p">[</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 2</span><span class="cl"><span class="w"> </span><span class="n">WeierstrassP</span><span class="p">[</span><span class="n">z</span><span class="p">,</span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">}],</span><span class="w"> </span><span class="p">{</span><span class="n">z</span><span class="p">,</span><span class="w"> </span><span class="mi">-10</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="n">I</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="n">I</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 3</span><span class="cl"><span class="w"> </span><span class="n">AxesLabel</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="s">"R"</span><span class="p">,</span><span class="w"> </span><span class="s">"I"</span><span class="p">,</span><span class="w"> </span><span class="s">"A"</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 4</span><span class="cl"><span class="w"> </span><span class="n">ScalingFunctions</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="n">None</span><span class="p">,</span><span class="w"> </span><span class="n">None</span><span class="p">,</span><span class="w"> </span><span class="s">"Log"</span><span class="p">},</span><span class="w"> </span><span class="n">PlotRange</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="mf">.1</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">}];</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 5</span><span class="cl"><span class="w"></span><span class="n">pC</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ComplexPlot</span><span class="p">[</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 6</span><span class="cl"><span class="w"> </span><span class="n">WeierstrassP</span><span class="p">[</span><span class="n">z</span><span class="p">,</span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">}],</span><span class="w"> </span><span class="p">{</span><span class="n">z</span><span class="p">,</span><span class="w"> </span><span class="mi">-10</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="n">I</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="n">I</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 7</span><span class="cl"><span class="w"> </span><span class="n">Axes</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">False</span><span class="p">,</span><span class="w"> </span><span class="n">Frame</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">False</span><span class="p">];</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 8</span><span class="cl"><span class="w"></span><span class="n">level</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-3</span><span class="p">;</span><span class="w"> </span><span class="n">gr</span><span class="w"> </span><span class="o">=</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 9</span><span class="cl"><span class="w"> </span><span class="n">Graphics3D</span><span class="p">[{</span><span class="n">Texture</span><span class="p">[</span><span class="n">pC</span><span class="p">],</span><span class="w"> </span><span class="n">EdgeForm</span><span class="p">[],</span><span class="w">
</span></span></span><span class="line"><span class="ln">10</span><span class="cl"><span class="w"> </span><span class="n">Polygon</span><span class="p">[{{</span><span class="mi">-10</span><span class="p">,</span><span class="w"> </span><span class="mi">-10</span><span class="p">,</span><span class="w"> </span><span class="n">level</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="mi">-10</span><span class="p">,</span><span class="w"> </span><span class="n">level</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln">11</span><span class="cl"><span class="w"> </span><span class="n">level</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">-10</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="n">level</span><span class="p">}},</span><span class="w">
</span></span></span><span class="line"><span class="ln">12</span><span class="cl"><span class="w"> </span><span class="n">VertexTextureCoordinates</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{{</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">}}]},</span><span class="w">
</span></span></span><span class="line"><span class="ln">13</span><span class="cl"><span class="w"> </span><span class="n">Lighting</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="s">"Neutral"</span><span class="p">];</span><span class="w">
</span></span></span></code></pre></div><p>$\text{Re}(z),\text{Im}(z)\in[-10,10]$, $|\wp(z,\{1,1\})|$ is $\log$-scaled.</p>
<p><img src="https://geistlib.xyz/img/weierstrass_wp.svg" alt="Weierstrass_wp"></p>
Index Theory 0: Overview
https://geistlib.xyz/index-theory-0-overview/
Wed, 07 Dec 2022 00:40:33 +0100https://geistlib.xyz/index-theory-0-overview/<p>This is the first of the note series on index theory. The series would be a survey of the history and prehistory of index theory, from Poincare-Hopf theorem and Leftschetz fixed point theorem to Atiyah-Singer index theorem, and further to its most recent generalization in KK theory, culminating in Baum-Connes conjecture.</p>
<h2 id="theorems">Theorems</h2>
<p>While not the first instance of the index theorem, the prototype of all the index theorems is the <em>Poincare-Hopf theorem</em>.</p>
<p>For a smooth $n$-manifold $M$, the <em>index</em> $\text{index}_x (V)$ of a vector field $V$ with isolated zero at $x$ is defined to be the degree of tha map $u:\partial D\to \mathbb{S}^{n-1}:z \mapsto V(z)/||V(z)||$ where $D$ is a closed ball centered at $x$ so that $x$ is the only zero of $V$ in $D$.</p>
<p>Given an oriented rank $n$-vector bundle $E\to M$ and let $s$ be a cross-section of $E$ that is transverse to $0$. This section $s$ can be seen as the vector field $V$ above.</p>
<p>Here is <a href="https://www.youtube.com/watch?v=wZvFKcQ_3Rc&t=162s">a helpful video</a> to visualize what index really is.</p>
<div class="theorem">
<div class="theorem-style">
<span class="theorem-head">Theorem(Poincare-Hopf) .</span>
Let $M$ be a compact smooth manifold and $V$ a vector field on $M$ with isolated zeros $\{x_i\}$. If $M$ has boundary then $V$ should point in the outward normal direction along the boundary. Then
$$
\sum_{x_i} \text{index}_{x_i} (V) = \chi(M)
$$
where $\chi(M)$ is the Euler characteristic.
</div>
</div>
<p>Since the Euler characteristic of a compact manifold $M$ is equal to the self-intersection of the diagonal $\Delta\subset M\times M$, the Poincare-Hopf theorem is a special case of the <em>Lefschetz fixed-point theorem</em>:
<div class="theorem">
<div class="theorem-style">
<span class="theorem-head">Theorem(Lefschetz fixed-point) .</span>
Let $f:X\to X$ be a smooth map on a compact orientable manifold. If the global Lefschetz number $L(f)$ of $f$ is nonzero, then $f$ has a fixed point.
</div>
</div>
</p>
<p>At the same time, the Euler characteristic, by Hodge theory, is the index of the Dirac operator $D=d+d^\ast$. Via Chern-Weil theory it obtains another characterization.
<div class="theorem">
<div class="theorem-style">
<span class="theorem-head">Theorem(Chern-Gauss-Bonnet) .</span>
If $M$ is a compact smooth manifold of dimension $2n$. For $\nabla$ any Levi-Civita connection on its tangent bundle, let $F_\nabla$ be its curvature 2-form valued in the Lie algebra $\mathfrak{so}(2n)$, and let $\text{Pf}(F_\nabla)$ be its Pfaffian $2n$-form, then
$$
\chi(M) = \left(\frac{-1}{2\pi}\right)^n\int_M \text{Pf}(F_\nabla).
$$
</div>
</div>
</p>
<p>The theorem has an classical version, and can be related directly to the Poincare-Hopf theorem.
<div class="theorem">
<div class="theorem-style">
<span class="theorem-head">Theorem(Gauss-Bonnet) .</span>
For $M$ a compact, $2n$-dimensional hypersurface in $\mathbb{R}^{2n+1}$, we have
$$
\chi(M)=\frac{2}{\gamma_{2n}}\int_M K
$$
where $K$ is the Gaussian curvature and $\gamma_k$ is the volume of the unit $k$-sphere $S^k$.
</div>
</div>
The relation to the Poincare-Hopf formula is as follows. By the degree formula
$$
\int_M K = \int_M J_g \omega_M = \int_M g^\ast \omega_{S^{2n}} = \text{deg}(g)\int_{S^{2n}}\omega_{S^{2n}} = \text{deg}(g)\cdot \gamma_{2n}
$$
where $g:M \to S^{2n}$ is the Gauss map of $M$ and $J_g(x)$ is its Jacobian (which is the definition of $K(x)$). The vector field $V$ can be chosen to be such that at $x$ we have $V(x) = u\cdot g(x) g(x)-u$ where $u\in S^{2n}$ is a unit vector s.t. $u$ and $-u$ are regular values of $g$. The zeros of $V$ are then those $x\in M$ s.t. $g(x)=\pm u$. It can be shown that $\text{index}_x(V) = \pm 1$ at all the zeros $x$, plus when $g$ is orientation preserving, minus when $g$ is orientation reversing. The sum of indices at zeros where $g(x)=u$ is $\text{deg}(g)$ (the intersection number with $u$ of $g$) and adding the indicese at zeros where $g(x)=-u$ again gives $\text{deg}(g)$. The sum of all the indices will then be $\sum_{x} \text{index}_i (V) = 2 \text{deg}(g)$.</p>
<p>Chern-Gauss-Bonnet is the special case when considering the Dirac operator
$$
D= d + d^\ast
$$
in the theorem of Atiyah and Singer.
<div class="theorem">
<div class="theorem-style">
<span class="theorem-head">Theorem(Atiyah-Singer) .</span>
$a\text{-index} = t\text{-index}$.
</div>
</div>
</p>
<p>In the K-theory formulation of the index theorem, the topological index $t\text{-index}$ is defined in terms of a push-forward map/fiber integration/wrong way map/umkehr map/Gysin map/shriek map. Translating this into $C^\ast$-algebraic formulation and note that the Fredholm index of a pseudo-differential operator can be identified via six-term exact sequence to the a index defined by another push-forward $K^0(T^\ast M)\to K(\mathcal{K})\cong \mathbb{Z}$, the Atiyah-Singer index theorem can be seen as a special case of Baum-Connes isomorphism with the help of the Connes-Thom isomorphism,
$$
K(C^\ast(X))\cong K(C^\ast(X)\rtimes \mathcal{G})
$$
which in this case becomes the inverse geometric assembly map
$$
\mu_{\text{geo}} : K(C^\ast(X\rtimes \mathcal{G})) \to K(C^\ast(\mathcal{G}))
$$
map for Lie groupoids.</p>
Old Quantum Theory 1: The Black Body Radiation Law
https://geistlib.xyz/old-quantum-theory-the-black-body-radiation-law/
Tue, 06 Dec 2022 20:40:11 +0100https://geistlib.xyz/old-quantum-theory-the-black-body-radiation-law/<p>Recently I’m realizing that to have a deeper understanding of quantization, in particular the geometric one, one needs to understand how quantum theory is developed better, thus the decision for a review of the old quantum theory.</p>
<p>This is the first one of the series of notes on the old quantum theory, where the black body radiation law of Planck is reviewed.</p>
<h2 id="black-body">Black body</h2>
<p>A body at a definite temperature $T$ will both emit and absorb radiation. A <em>black body</em> is a body that absorbs all the radiation incident upon it. The radiation emitted by a black body will depend only on its temperature, since at equilibrium, the ratio of the radiation of a given wavelength absorbed by it to the radiation of the same waelength emitted by it should be unity.</p>
<h2 id="energy-density">Energy density</h2>
<p>Let $u(\nu,T)d\nu$ be the energy density of all radiation components with frequencies between $\nu$ and $\nu+d\nu$. From thermodynamic considerations, one can prove that $u(\nu,T)$ must have the form
$$
u(\nu,T) = \nu^3 f(\nu/T).
$$</p>
<p>The immediate consequences are</p>
<ol>
<li>Wien’s displacement law, $\lambda_{\text{max}}T = \text{const.}$: proved by noting that $\nu = c/\lambda$ and solving for $du/d\lambda=0$.</li>
<li>Stefan-Boltzmann law, $u(T) = \sigma T^4 = \int_0^\infty y^3 f(y) dy$ where $y = \nu/T$. Found by simple integration $u(T) = \int_0^\infty u(\nu,T) d\nu$.</li>
</ol>
<p>The proof proceeds as follows:</p>
<ol>
<li>In a reversible adiabatic transformation the ratio $\nu/T$ is invariant.</li>
<li>The total energy of the radiation field is the sum of the contributions from different frequencies. Each contribution can be written as a function of $\nu/T$, multiplied by $T$ or $\nu$.</li>
<li>Find the number of eigenfrequencies in a volume $V$ lyting between $\nu$ and $\nu+d\nu$, and obtain the total energy density in that region.</li>
</ol>
<h3 id="1-invariance-of-nut">1. Invariance of $\nu/T$</h3>
<p>Consider the radiation field in a cube with volume $V$ and with edgelength $L$, with reflecting walls. In equilibrium radiation field will consist of standing waves. Recall that the wavelength $\lambda=c/\nu$. The wave length should divide the edgelength, hence for $l,m,n\in \mathbb{N}$.
$$
(L/\lambda)^2 = l^2+m^2+n^2 = (\nu L/c)^2
$$</p>
<p>Since $l,m,n$ cannot change continuously, under an adiabatic change in $V$, $l,m,n$ shoould remain invariant. Thus $\nu L$ should remain invariant, thus the invariance of $\nu^3 L^3 = \nu^3 V$.</p>
<p>The radiation pressure $P$ is $P=\frac{1}{3}u(T)$ from electromagnetic theory. Combined with the thermodynamic equation $\left(\frac{\partial U}{\partial V}\right)_V = T\left(\frac{\partial P}{\partial T}\right)_V - P$ and $U=uV$, this yields $u=\frac{1}{3}T\frac{du}{dT}-\frac{1}{3}u$ or equivalently $u=aT^4$. From the Maxwell relation
$$
\left(\partial S/\partial V\right)_T = \left(\partial P/\partial T\right)_V
$$
we find $S=\frac{4}{3}aT^3 V$.</p>
<p>Under a reversible adiabatic transformation the entropy $S$ is invariant. Hence $T^3 V$ and $\nu^3 V$ are both invariant under the change. $nu/T$ should be invariant under the change.</p>
<h3 id="2-contribution-from-different-frequencies">2. Contribution from different frequencies</h3>
<p>The entropy per unit volume $s$ can be written as $s=\sum_\nu s_\nu(T)$, where $s_\nu(T)$ is the contribution of frequency $\nu$ at temperature $T$. Each $s_\nu(T)$ can only depend on $\nu$ and $T$ via the adiabatic invariant $\nu/T$ since under isoentropic change $\nu/T$ is invariant.</p>
<p>Write the spectral resolution of $u(T)$ as $u(T)=\sum_\nu u_\nu(T)$, using $u=aT^4$ and $S=\frac{4}{3}aT^3 V$, it follows that
$$
s= \frac{4u}{3T},
$$
and thus
$$
u(T) = \sum_nu \nu f(\nu/T) = \int \nu N(\nu) f(\nu/T)d\nu.
$$
where $N(\nu)$ is the number density of frequencies.</p>
<h3 id="3-number-of-eigenfrequencies">3. Number of eigenfrequencies</h3>
<p>The number $N(\nu)d\nu$ is proportional to the number of points with integral coordinates within the spherical shell between the spheres with radii $\nu L/c$ and $(\nu + d\nu )L/c$, thus $N(\nu) = 8\pi\nu^2/c^3$. From this, immediately,
$$
u(\nu,T) = \nu^3 f(\nu/T).
$$</p>
<h2 id="exact-form-of-the-function-fnut">Exact form of the function $f(\nu/T)$</h2>
<h3 id="rayleigh-jeans-law">Rayleigh-Jeans law</h3>
<p>Recall Kirchhoff’s law: the radiation field is the same independent of what body is in equilibrium with it.</p>
<p>We can assume that the black body consists of a system of radiating harmonic oscillators to compute the radiation field explicitly. The radiation emitted per unit time by an oscillating dipole is given by
$$
E_{\text{EM}} = \frac{8\pi^2 e^2 \nu^2}{3mcz^3}\overline{\epsilon}
$$
where $e,m,\overline{\epsilon}$ are the oscillating charge, mass and the average value of the nergy of the harmonic oscillator.</p>
<p>The energy absorbed per unit time by the oscillator is
$$
E_{\text{ab}} = \frac{\pi e^2}{3m}u(\nu,T).
$$</p>
<p>In equilibrium, $E_{\text{EM}} = E_{\text{ab}}$, thus
$$
u(\nu,T) = 8\pi\nu^2\overline{\epsilon}/c^3.
$$</p>
<p>Now if one take for $\overline{\epsilon}$ the average energy of an harmonic oscillator at a temperature $T$, <em>i.e.</em> use the classical value $kT$ for the average energy of a 1-dimensional harmonic oscillator, then
$$
u(\nu,T)=\frac{8\pi \nu^2}{c^3}kT,
$$
which is the Rayleigh-Jeans law.</p>
<h3 id="wiens-law">Wien’s law</h3>
<blockquote>
<p>History: Planck was not aware of, or didn’t attach any significance to Rayleigh’s reasoning. Until 1900 the experimental data were better represented by Wien’s law (1896) $u(\nu,T) = b\nu^3 e^{-a\nu/T}$. Planck himself remarked that very few physicists were interested in entropy while he himself had studied it for most of his active career. Most people were trying to find the energy density of the radiation field as funtion of $\nu$ and $T$ while Planck suspected that the key to the problem was to be found in the relation between the entropy density $s_\nu$ and the oscillator energy $\overline{\epsilon}$.</p>
</blockquote>
<p>Consider a set of $n$ identical and independent oscillators behaving in exactly the same way. The total energy $\epsilon_n = n\epsilon$. Then</p>
<ol>
<li>The excess of the total energy over the equilibrium value is $n\Delta \epsilon = \Delta \epsilon_n$.</li>
<li>The rate of change $d\epsilon_n/dt = nd\epsilon/dt$.</li>
<li>The total entropy $S_n = nS$.</li>
</ol>
<p>Planck showed that for a single oscillator the rate of change of the entropy satisfies
$$
dS/dt = -\frac{d\epsilon}{dt}\Delta \epsilon f(\epsilon),\quad f(\epsilon)=-\frac{3}{5}\frac{d^2 S}{d\epsilon^2}.
$$</p>
<p>Assuming that the same expression holds for the set of $n$ oscillators and that the rate of chagne of the entropy of $n$ oscillators is equal to $n$ times that of a single one, then
$$
\frac{d^2 S}{d\epsilon^2} = -\frac{\alpha}{\epsilon}
$$</p>
<p>With $dS/d\overline{\epsilon} = 1/T$, we have
$$
\overline{\epsilon} = \frac{1}{\gamma} e^{-1/\alpha T},
$$</p>
<p>from which Wien’s law follows immediately, acknowledging that $u(\nu,T) = \nu^3 f(\nu/T)$.</p>
<h2 id="plancks-law">Planck’s law</h2>
<p>The experimental evidence that at longer wavelengths Wien’s law didn’t agree with experiments obliged Planck to modify his argument. Planck tried other expressions for $d^2 S/d\overline{\epsilon}^2$ and found that
$$
\frac{d^2 S}{d\overline{\epsilon}^2}=-\frac{\alpha’}{\overline{\epsilon}(\beta+\overline{\epsilon})}
$$
together with $dS/d\overline{\epsilon}=1/T$ and $u(\nu,T)=\frac{8\pi\nu^2\overline{\epsilon}}{c^3}$ leads to the <em>Planck’s law</em>:
$$
u(\nu,T) = \frac{b\nu^3}{e^{\alpha\nu/T}-1}.
$$
This expression is in excellent agreement with experimental data.</p>
<h2 id="ad-hoc-argument-for-plancks-law">Ad hoc argument for Planck’s law</h2>
<p>After finding the law bearing his name, Planck presented a derivation of it based upon Boltzmann’s relation between entropy and probability
$$
S=k\log W
$$
where $k$ is a constant in fact introduced by Planck, and $W$ the probability that a certain state is realized. To find $W$, the total energy of the $N$ oscillators $\epsilon_N = N\overline{\epsilon}$ was considered as a quantity which can only be divided into an integral finite number $P$ of equal parts $\Delta$:
$$
\epsilon_N = P\Delta
$$
where $P$ is a rather large integer. Now consider the number of ways in which $N-1$ strokes and $P$ dots can be arraged, this is
$$
W= \frac{(N+P-1)!}{(N-1)!P!}.
$$
Neglect th 1’s in the enumerator and the denominator and use the Stirling formula $x!=\frac{x^x}{e^x}$, and assume that $S_N = NS$ (the oscillators are independent),
$$
S_N = k((N+P)\log(N+P)-N\log N - P\log P).
$$
This can be rewritten as
$$
S = k(1+\frac{\overline{\epsilon}}{\Delta} \log(1+\frac{\overline{\epsilon}}{\Delta})-\frac{\overline{\epsilon}}{\Delta}\log\frac{\overline{\epsilon}}{\Delta}).
$$</p>
<p>Since $T/\nu$ is a function of $\epsilon/\nu$ (from the spectral resolution of $u(T)$), and thus $S$ a function of $\epsilon/nu$ (from the thermodynamic relation $dS/d\overline{\epsilon} = 1/T$), it follows from the above expression that $\Delta$ must be proportional to $\nu$,
$$
\Delta = h\nu.
$$
Classical arguments require the limit $h\to 0$, while $h$ is necessary to be kept finite.</p>
<p>Note that
$$
\frac{d^2 S}{d\overline{\epsilon}^2} = \frac{-k}{\overline{\epsilon}(\Delta +\overline{\epsilon})},
$$
from which Planck’s law can be derived in a similar way above.</p>
<p>The physical meaning of $h$ and of the basis of Planck’s theory became clearer after Einstein’s introduction of light quanta.</p>
Mathematica: Nonlinear Oscillation of a Pendulum
https://geistlib.xyz/mathematica-nonlinear-oscillation-of-pendulum/
Tue, 06 Dec 2022 01:34:44 +0100https://geistlib.xyz/mathematica-nonlinear-oscillation-of-pendulum/<h2 id="nonlinear-pendulum">Nonlinear pendulum</h2>
<p>Let ${m,g,l,\phi}$ define a pendulum system, where $m$ is the mass of the oscillating particle, $l$ is the length of the pendulum, $g$ is the gravitational acceleration, $\phi$ is the angle of libration. Neglecting damping, the total energy of the system coincides with the Hamiltonian $H$
$$
H=T+V
$$
where $T$ is the kinetic energy $T=\frac{1}{2}ml^2(\partial_t\phi(t))^2$ and the potential, with the origin chosen to be at the lowest point in the particle orbit, is $V= mgl(1-\cos(\phi(t)))$.</p>
<p>The canonical position $q$ is then $q=\phi(t)$, and the canonical momentum should be $p=\partial_t\phi(t)$.</p>
<h2 id="energy-and-phase-diagram">Energy and Phase diagram</h2>
<p>The system can then be characterized by</p>
<ol>
<li>A phase space diagram <code>cPlot</code>, to be made into the shadow of</li>
<li>an energy plot <code>pPlot</code>.</li>
</ol>
<p>Normalizing $m,l,g$ to 1 and taking the canonical coordinates,</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-mathematica" data-lang="mathematica"><span class="line"><span class="ln"> 1</span><span class="cl"><span class="n">T</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="o">/</span><span class="mi">2</span><span class="w"> </span><span class="n">m</span><span class="w"> </span><span class="n">l</span><span class="o">^</span><span class="mi">2</span><span class="w"> </span><span class="p">(</span><span class="err">\</span><span class="o">!</span><span class="err">\</span><span class="p">(</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 2</span><span class="cl"><span class="w"></span><span class="err">\</span><span class="o">*</span><span class="n">SubscriptBox</span><span class="p">[</span><span class="err">\</span><span class="p">(</span><span class="err">\</span><span class="p">[</span><span class="n">PartialD</span><span class="p">]</span><span class="err">\</span><span class="p">),</span><span class="w"> </span><span class="err">\</span><span class="p">(</span><span class="n">t</span><span class="err">\</span><span class="p">)]</span><span class="err">\</span><span class="p">(</span><span class="err">\</span><span class="p">[</span><span class="n">Phi</span><span class="p">][</span><span class="n">t</span><span class="p">]</span><span class="err">\</span><span class="p">)</span><span class="err">\</span><span class="p">))</span><span class="o">^</span><span class="mi">2</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 3</span><span class="cl"><span class="w"></span><span class="n">V</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">m</span><span class="w"> </span><span class="n">g</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">Cos</span><span class="p">[</span><span class="err">\</span><span class="p">[</span><span class="n">Phi</span><span class="p">][</span><span class="n">t</span><span class="p">]]);</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 4</span><span class="cl"><span class="w"></span><span class="n">H</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">T</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">V</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 5</span><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="ln"> 6</span><span class="cl"><span class="w"></span><span class="n">cPlot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ContourPlot</span><span class="p">[</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 7</span><span class="cl"><span class="w"> </span><span class="n">Evaluate</span><span class="p">[</span><span class="n">H</span><span class="w"> </span><span class="o">/.</span><span class="w"> </span><span class="p">{</span><span class="n">l</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">g</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">m</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">Phi</span><span class="p">][</span><span class="n">t</span><span class="p">]</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">Phi</span><span class="p">],</span><span class="w"> </span><span class="err">\</span><span class="o">!</span><span class="err">\</span><span class="p">(</span><span class="w">
</span></span></span><span class="line"><span class="ln"> 8</span><span class="cl"><span class="w"></span><span class="err">\</span><span class="o">*</span><span class="n">SubscriptBox</span><span class="p">[</span><span class="err">\</span><span class="p">(</span><span class="err">\</span><span class="p">[</span><span class="n">PartialD</span><span class="p">]</span><span class="err">\</span><span class="p">),</span><span class="w"> </span><span class="err">\</span><span class="p">(</span><span class="n">t</span><span class="err">\</span><span class="p">)]</span><span class="err">\</span><span class="p">(</span><span class="err">\</span><span class="p">[</span><span class="n">Phi</span><span class="p">][</span><span class="n">t</span><span class="p">]</span><span class="err">\</span><span class="p">)</span><span class="err">\</span><span class="p">)</span><span class="w"> </span><span class="o">-></span><span class="w">
</span></span></span><span class="line"><span class="ln"> 9</span><span class="cl"><span class="w"> </span><span class="n">p</span><span class="p">}],</span><span class="w"> </span><span class="p">{</span><span class="err">\</span><span class="p">[</span><span class="n">Phi</span><span class="p">],</span><span class="w"> </span><span class="mi">-2</span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">Pi</span><span class="p">],</span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">Pi</span><span class="p">]},</span><span class="w"> </span><span class="p">{</span><span class="n">p</span><span class="p">,</span><span class="w"> </span><span class="mf">-3.3</span><span class="p">,</span><span class="w"> </span><span class="mf">3.3</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln">10</span><span class="cl"><span class="w"> </span><span class="n">Contours</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mi">15</span><span class="p">,</span><span class="w"> </span><span class="n">PlotRange</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mf">7.5</span><span class="p">},</span><span class="w"> </span><span class="n">Axes</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">False</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln">11</span><span class="cl"><span class="w"> </span><span class="n">Frame</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">False</span><span class="p">,</span><span class="w"> </span><span class="n">ColorFunction</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="s">"Rainbow"</span><span class="p">];</span><span class="w">
</span></span></span><span class="line"><span class="ln">12</span><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="ln">13</span><span class="cl"><span class="w"></span><span class="n">pPlot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Plot3D</span><span class="p">[</span><span class="w">
</span></span></span><span class="line"><span class="ln">14</span><span class="cl"><span class="w"> </span><span class="n">Evaluate</span><span class="p">[</span><span class="n">H</span><span class="w"> </span><span class="o">/.</span><span class="w"> </span><span class="p">{</span><span class="n">l</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">g</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">m</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">Phi</span><span class="p">][</span><span class="n">t</span><span class="p">]</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">Phi</span><span class="p">],</span><span class="w"> </span><span class="err">\</span><span class="o">!</span><span class="err">\</span><span class="p">(</span><span class="w">
</span></span></span><span class="line"><span class="ln">15</span><span class="cl"><span class="w"></span><span class="err">\</span><span class="o">*</span><span class="n">SubscriptBox</span><span class="p">[</span><span class="err">\</span><span class="p">(</span><span class="err">\</span><span class="p">[</span><span class="n">PartialD</span><span class="p">]</span><span class="err">\</span><span class="p">),</span><span class="w"> </span><span class="err">\</span><span class="p">(</span><span class="n">t</span><span class="err">\</span><span class="p">)]</span><span class="err">\</span><span class="p">(</span><span class="err">\</span><span class="p">[</span><span class="n">Phi</span><span class="p">][</span><span class="n">t</span><span class="p">]</span><span class="err">\</span><span class="p">)</span><span class="err">\</span><span class="p">)</span><span class="w"> </span><span class="o">-></span><span class="w">
</span></span></span><span class="line"><span class="ln">16</span><span class="cl"><span class="w"> </span><span class="n">p</span><span class="p">}],</span><span class="w"> </span><span class="p">{</span><span class="err">\</span><span class="p">[</span><span class="n">Phi</span><span class="p">],</span><span class="w"> </span><span class="mi">-2</span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">Pi</span><span class="p">],</span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">Pi</span><span class="p">]},</span><span class="w"> </span><span class="p">{</span><span class="n">p</span><span class="p">,</span><span class="w"> </span><span class="mf">-3.3</span><span class="p">,</span><span class="w"> </span><span class="mf">3.3</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln">17</span><span class="cl"><span class="w"> </span><span class="n">PlotRange</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mf">7.5</span><span class="p">},</span><span class="w"> </span><span class="n">MeshFunctions</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="nv">#3</span><span class="w"> </span><span class="o">&</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln">18</span><span class="cl"><span class="w"> </span><span class="n">AxesLabel</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="s">"q"</span><span class="p">,</span><span class="w"> </span><span class="s">"p"</span><span class="p">,</span><span class="w"> </span><span class="s">"H"</span><span class="p">},</span><span class="w"> </span><span class="n">Axes</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">True</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="ln">19</span><span class="cl"><span class="w"> </span><span class="n">ColorFunction</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="s">"Rainbow"</span><span class="p">];</span><span class="w">
</span></span></span><span class="line"><span class="ln">20</span><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="ln">21</span><span class="cl"><span class="w"></span><span class="n">level</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-3</span><span class="p">;</span><span class="w"> </span><span class="n">gr</span><span class="w"> </span><span class="o">=</span><span class="w">
</span></span></span><span class="line"><span class="ln">22</span><span class="cl"><span class="w"> </span><span class="n">Graphics3D</span><span class="p">[{</span><span class="n">Texture</span><span class="p">[</span><span class="n">cPlot</span><span class="p">],</span><span class="w"> </span><span class="n">EdgeForm</span><span class="p">[],</span><span class="w">
</span></span></span><span class="line"><span class="ln">23</span><span class="cl"><span class="w"> </span><span class="n">Polygon</span><span class="p">[{{</span><span class="mi">-2</span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">Pi</span><span class="p">],</span><span class="w"> </span><span class="mf">-3.3</span><span class="p">,</span><span class="w"> </span><span class="n">level</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">2</span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">Pi</span><span class="p">],</span><span class="w"> </span><span class="mf">-3.3</span><span class="p">,</span><span class="w"> </span><span class="n">level</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">2</span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">Pi</span><span class="p">],</span><span class="w">
</span></span></span><span class="line"><span class="ln">24</span><span class="cl"><span class="w"> </span><span class="mf">3.3</span><span class="p">,</span><span class="w"> </span><span class="n">level</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">-2</span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">Pi</span><span class="p">],</span><span class="w"> </span><span class="mf">3.3</span><span class="p">,</span><span class="w"> </span><span class="n">level</span><span class="p">}},</span><span class="w">
</span></span></span><span class="line"><span class="ln">25</span><span class="cl"><span class="w"> </span><span class="n">VertexTextureCoordinates</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{{</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">}}]},</span><span class="w">
</span></span></span><span class="line"><span class="ln">26</span><span class="cl"><span class="w"> </span><span class="n">Lighting</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="s">"Neutral"</span><span class="p">];</span><span class="w">
</span></span></span><span class="line"><span class="ln">27</span><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="ln">28</span><span class="cl"><span class="w"></span><span class="n">Show</span><span class="p">[</span><span class="n">pPlot</span><span class="p">,</span><span class="w"> </span><span class="n">gr</span><span class="p">,</span><span class="w"> </span><span class="n">PlotRange</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">All</span><span class="p">,</span><span class="w"> </span><span class="n">BoxRatios</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mf">.6</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln">29</span><span class="cl"><span class="w"> </span><span class="n">FaceGrids</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="n">Back</span><span class="p">,</span><span class="w"> </span><span class="n">Left</span><span class="p">}]</span><span class="w">
</span></span></span></code></pre></div><p>The above codes yield
<img src="https://geistlib.xyz/img/nonlinear.svg" alt="Nonlinear pendulum energy and phase plot"></p>
<h2 id="periods">Periods</h2>
<p>Suppose that the angle at the highest orbital point is $\phi_0$, then at this point
$$
V(\phi_0) = E = mgl(1-\cos\phi_0),\quad T(\phi=\phi_0)=0.
$$
The kinetic energy for angle $\phi$ is then
$$
\frac{1}{2}ml^2\phi’^2 = 2mgl\left(\sin^2(\phi_0/2)-\sin^2(\phi/2)\right).
$$
Separating the variables, the period $P$ would be
$$
P=\int_0^P dt = \frac{2}{\sqrt{g/l}}\int^{\phi_0}_0 \frac{d\phi}{\sqrt{\sin^2(\phi_0/2)-\sin^2(\phi/2)}},
$$
which is proportional to the complete elliptic integral of the first kind $K(k^2)$
$$
P = \frac{4}{\sqrt{g/l}}\int_0^1\frac{dz}{\sqrt{(1-z^2)(1-k^2z^2)}}=\frac{4}{\sqrt{g/l}}K(k^2)
$$
with the modulus $k^2=\frac{E}{2mgl}$. Now $m=g=l=1$, hence a period function $P$ depending on $\phi_0$ and $\omega_0$</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-mma" data-lang="mma"><span class="line"><span class="ln">1</span><span class="cl"><span class="n">P</span><span class="p">[</span><span class="nv">om_</span><span class="p">,</span><span class="w"> </span><span class="nv">ph0_</span><span class="p">]</span><span class="w"> </span><span class="o">:=</span><span class="w">
</span></span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="w"> </span><span class="n">Block</span><span class="p">[{</span><span class="n">k</span><span class="p">,</span><span class="w"> </span><span class="n">d</span><span class="p">},</span><span class="w"> </span><span class="n">k</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Sin</span><span class="p">[</span><span class="n">ph0</span><span class="o">/</span><span class="mi">2</span><span class="p">];</span><span class="w"> </span><span class="n">d</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">4</span><span class="w"> </span><span class="n">EllipticK</span><span class="p">[</span><span class="n">k</span><span class="o">^</span><span class="mi">2</span><span class="p">]</span><span class="o">/</span><span class="n">om</span><span class="p">]</span><span class="w">
</span></span></span></code></pre></div><p>From which a characterization of the period $P$ can be given by a plot</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-mma" data-lang="mma"><span class="line"><span class="ln">1</span><span class="cl"><span class="n">Plot</span><span class="p">[</span><span class="n">Evaluate</span><span class="o">@</span><span class="n">Table</span><span class="p">[</span><span class="n">P</span><span class="p">[</span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">Phi</span><span class="p">]</span><span class="mi">0</span><span class="p">],</span><span class="w"> </span><span class="p">{</span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">}],</span><span class="w"> </span><span class="p">{</span><span class="err">\</span><span class="p">[</span><span class="n">Phi</span><span class="p">]</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">Pi</span><span class="p">]},</span><span class="w">
</span></span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="w"> </span><span class="n">AxesLabel</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="s">"\!\(\*SubscriptBox[\(\[Phi]\), \(0\)]\)"</span><span class="p">,</span><span class="w"> </span><span class="s">"Period"</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="w"> </span><span class="n">PlotLegends</span><span class="w"> </span><span class="o">-></span><span class="w">
</span></span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="w"> </span><span class="n">LineLegend</span><span class="p">[</span><span class="n">Table</span><span class="p">[</span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="p">{</span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">}],</span><span class="w">
</span></span></span><span class="line"><span class="ln">5</span><span class="cl"><span class="w"> </span><span class="n">LegendLabel</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="s">"\!\(\*SubscriptBox[\(\[Omega]\), \(0\)]\)"</span><span class="p">],</span><span class="w">
</span></span></span><span class="line"><span class="ln">6</span><span class="cl"><span class="w"> </span><span class="n">PlotRange</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">Automatic</span><span class="p">]</span><span class="w">
</span></span></span></code></pre></div><p><img src="https://geistlib.xyz/img/nonlinear_pendulum_periods.svg" alt="Nonlinear pendulum periods"></p>
<h2 id="approximations-of-periods">Approximations of Periods</h2>
<p>The period
$$
P = \frac{4}{\sqrt{g/l}}\int_0^1\frac{dz}{\sqrt{(1-z^2)(1-k^2z^2)}}
$$
can be approximated by expanding the integrand containing the modulus $k^2$ around $k=0$. Expand it up to 10th order and integrate via</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-mma" data-lang="mma"><span class="line"><span class="ln">1</span><span class="cl"><span class="n">taylor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Series</span><span class="p">[</span><span class="mi">1</span><span class="o">/</span><span class="n">Sqrt</span><span class="p">[</span><span class="mi">1</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">k</span><span class="o">^</span><span class="mi">2</span><span class="w"> </span><span class="n">z</span><span class="o">^</span><span class="mi">2</span><span class="p">],</span><span class="w"> </span><span class="p">{</span><span class="n">k</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">}];</span><span class="w">
</span></span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="w"></span><span class="n">Pn</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Expand</span><span class="p">[</span><span class="w">
</span></span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="w"> </span><span class="mi">4</span><span class="w"> </span><span class="n">Integrate</span><span class="p">[</span><span class="n">Normal</span><span class="p">[</span><span class="n">taylor</span><span class="p">]</span><span class="o">/</span><span class="n">Sqrt</span><span class="p">[</span><span class="mi">1</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">z</span><span class="o">^</span><span class="mi">2</span><span class="p">],</span><span class="w"> </span><span class="p">{</span><span class="n">z</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">}]</span><span class="o">/</span><span class="err">\</span><span class="p">[</span><span class="n">Omega</span><span class="p">]]</span><span class="w">
</span></span></span></code></pre></div><p>Now let’s see how good the approximation is by evaluating at $\omega_0=1$.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-mma" data-lang="mma"><span class="line"><span class="ln">1</span><span class="cl"><span class="n">pn</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Pn</span><span class="w"> </span><span class="o">/.</span><span class="w"> </span><span class="p">{</span><span class="n">k</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">Sin</span><span class="p">[</span><span class="n">ph0</span><span class="o">/</span><span class="mi">2</span><span class="p">],</span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">Omega</span><span class="p">]</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mi">1</span><span class="p">};</span><span class="w">
</span></span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="w"></span><span class="n">Plot</span><span class="p">[{</span><span class="n">P</span><span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">ph0</span><span class="p">],</span><span class="w"> </span><span class="n">pn</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="n">ph0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="err">\</span><span class="p">[</span><span class="n">Pi</span><span class="p">]},</span><span class="w">
</span></span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="w"> </span><span class="n">AxesLabel</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="s">"\!\(\*SubscriptBox[\(\[Phi]\), \(0\)]\)"</span><span class="p">,</span><span class="w"> </span><span class="s">"P,Pn"</span><span class="p">},</span><span class="w">
</span></span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="w"> </span><span class="n">PlotLegends</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="s">"Expressions"</span><span class="p">,</span><span class="w"> </span><span class="n">LabelStyle</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">{</span><span class="n">FontColor</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">Gray</span><span class="p">}]</span><span class="w">
</span></span></span></code></pre></div><p><img src="https://geistlib.xyz/img/nonlinear_approx.svg" alt="Nonlinear pendulum periods approximation"></p>
Supercollider Cheat Sheets
https://geistlib.xyz/supercollider-+-iannix-cheat-sheets/
Sat, 26 Nov 2022 12:16:52 +0100https://geistlib.xyz/supercollider-+-iannix-cheat-sheets/<h2 id="quick-reference">Quick Reference</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="ln">1</span><span class="cl">s.boot;
</span></span><span class="line"><span class="ln">2</span><span class="cl">FreqScope.new;
</span></span><span class="line"><span class="ln">3</span><span class="cl">Stethoscope.new;
</span></span></code></pre></div><h2 id="connecting-to-iannix-via-osc">Connecting to IanniX via OSC</h2>
<ol>
<li>Run <code>NetAddr.localAddr</code> in sclang. The printed message would be something like <code>NetAddr(127.0.0.1, 57120)</code>.</li>
<li>In IanniX, inspector <code>-></code> config <code>-></code> Network. Change the port to, e.g., <code>57120</code>.</li>
</ol>
<p>To check whether the connection is working, run <code>OSCFunc.trace(true,true)</code> in sclang. Make a cursor in IanniX and play, see if there are any OSC messages printed.</p>
<p>Create a cursor object in IanniX and play it, in config <code>-></code> message lines will be printed in the form of</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-plain" data-lang="plain"><span class="line"><span class="ln">1</span><span class="cl">00:00:11:466 : osc://127.0.0.1:57120/cursor 2 0.8434560298919678 0.2949684262275696 0.5 1.6178126335144043 -0.9992097616195679 0
</span></span></code></pre></div><p>Now an OSC response function can be defined with <code>OSCdef.new</code>, e.g.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-plain" data-lang="plain"><span class="line"><span class="ln"> 1</span><span class="cl">(
</span></span><span class="line"><span class="ln"> 2</span><span class="cl">OSCdef.new(
</span></span><span class="line"><span class="ln"> 3</span><span class="cl"> \cursor_message,
</span></span><span class="line"><span class="ln"> 4</span><span class="cl"> {
</span></span><span class="line"><span class="ln"> 5</span><span class="cl"> arg msg, time, addr, port;
</span></span><span class="line"><span class="ln"> 6</span><span class="cl"> [msg,time,addr,port].postln;
</span></span><span class="line"><span class="ln"> 7</span><span class="cl"> },
</span></span><span class="line"><span class="ln"> 8</span><span class="cl"> '/cursor'
</span></span><span class="line"><span class="ln"> 9</span><span class="cl">);
</span></span><span class="line"><span class="ln">10</span><span class="cl">)
</span></span></code></pre></div><p>Run the code in sclang and run IanniX, OSC responses will be printed in the post window.</p>
<p>A quick example:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-plain" data-lang="plain"><span class="line"><span class="ln"> 1</span><span class="cl">Ndef( \sounds, { SinOsc.ar([\lfreq.kr(300),\rfreq.kr(301)], 0, 0.3) } );
</span></span><span class="line"><span class="ln"> 2</span><span class="cl">
</span></span><span class="line"><span class="ln"> 3</span><span class="cl">(
</span></span><span class="line"><span class="ln"> 4</span><span class="cl">OSCdef.new(
</span></span><span class="line"><span class="ln"> 5</span><span class="cl"> \shift,
</span></span><span class="line"><span class="ln"> 6</span><span class="cl"> {
</span></span><span class="line"><span class="ln"> 7</span><span class="cl"> arg msg;
</span></span><span class="line"><span class="ln"> 8</span><span class="cl"> Ndef( \sounds ).set( \lfreq, ([275, 325, \lin].asSpec.map( msg[3] )) );
</span></span><span class="line"><span class="ln"> 9</span><span class="cl"> Ndef( \sounds ).set( \rfreq, ([275, 325, \lin].asSpec.map( msg[4] )) );
</span></span><span class="line"><span class="ln">10</span><span class="cl"> },
</span></span><span class="line"><span class="ln">11</span><span class="cl"> '/cursor'
</span></span><span class="line"><span class="ln">12</span><span class="cl">);
</span></span><span class="line"><span class="ln">13</span><span class="cl">)
</span></span></code></pre></div><p>Draw a circular curve in IanniX and run.</p>
Notes on 「The Philosophical Basis of Intuitionistic Logic」
https://geistlib.xyz/notes-on-dummettss-the-philosophical-basis-of-intuitionistic-logic/
Sun, 13 Nov 2022 09:57:04 +0100https://geistlib.xyz/notes-on-dummettss-the-philosophical-basis-of-intuitionistic-logic/<p>In search of a total justification of intuitionistic logic, that repudiates, within mathematical reasoning, the canons of classical logic in favour of those of intuitionistic logic. Not necessary in line with the arguments made by Brouwer or Heyting etc. The crucial thing is on questions of <em>meaning</em>.</p>
<p><strong>Hard work required to read this work.</strong> This is more or less an article concerning disputes <em>inside</em> the group of intuitionists on whether the ontological thesis of constructivists is prior and essential to the acceptance of intuitionistic logic and if it can be construed as a premise for a proof-centered meaning theory, and finally the meaning of the logical constants and quantifiers.</p>
<p>In the following Dummett’s and my own opinions are mixed and I won’t bother to acknowledge which opinion is his and which is mine. After all this is a collection of notes.</p>
<h2 id="meaning-is-use">“Meaning is use”</h2>
<p>Dummett presents two lines of argument for repudiating classical reasoning in mathematics in favour of intuitionistic reasoning. While he distinguishes between the two lines of argument, they are fundamentally, in my opinion, the same. The idea is that the meaning of a mathematical statement determines and is exhaustively determined by its <em>use</em>. The two arguments are both versions of the private language argument.</p>
<ol>
<li>The argument is based on how two individuals agree about the meaning of a statement made. They agree about the use to be made of the statement. Also, in terms of the <em>knowledge</em> of meaning, since a knowledge of meaning should not be supposed to consist in verbalisable knowledge for it would involve an infinite regress where it would be impossible for anyone to learn a language without being already equipped with a fairly extensive language, the knowledge constitutes the understanding of the language of mathematics must be implicit knowledge with an observable difference manifested between the behaviour or capacities of someone who is said to have that knowledge and some one who is said to lack it.</li>
<li>When learning a language of a mathematical theory what is learned to do is to make use of the statements of that language. This is all that is shown and all that can be shown. Since converse would mean that someone might have learned all that is directly taught when the language of a mathematical theory is taught to him, and might then behave in every way like someone who understood that language, and yet not actually understand it or understand it only incorrectly, which leads to the assertion that meaning is in principle incommunicable. Then we have the private language argument where no one individual ever has a guarantee that he is understood by any other individual.</li>
</ol>
<h2 id="does-the-thesis-that-meaning-is-use-conflict-a-revisionary-attitude-to-some-aspects-of-language">Does the thesis that meaning is use conflict a revisionary attitude to some aspects of language?</h2>
<p>The answer given by Dummett is “No”, and what the thesis does do is to restrict the selection of the feature of sentences which is to be treated as central to the theory of meaning.</p>
<h3 id="holistic-veiw-of-language">Holistic veiw of language</h3>
<p>If meaning is use, is exhaustively determined by use, a possible consequence: ruling out any form of revisionism, <em>i.e.</em> use is beyond criticism. There can be no palce for rejecting any establisehd mathemtaical practice since the practice is simply constitutive of the meanings of mathematical statements. This can be supported only by the adoption of a holistic view of language: it is illegitimate to ask after the content of any <em>single</em> statement or any <em>one</em> theory since the significance of each statement or of each deductively systematised body of statements is modified by the multiple connections it has with other statements in other areas of our language taken as a whole. On such a view, understanding of sentences which lie in the interior of the structure consists soley in a grasp of their place in the structure as a whole and their interaction with its other constituent sentences.</p>
<p>This holistic view should be seen as a strong version of structralism and bears an analogy with Hilbert’s view of classical mathematics and with Boole’s view of his logical calculus.</p>
<p>The difficulty in such a view is to know how it can be <em>justified</em>. With what right do we feel an assurance that the observation statements deduced with the help of the complex theories embedded in the interior of the total linguistic structure are ture, when these observation statments are interpreted in therms of their stimulus meanings?</p>
<h3 id="molecular-view-of-language">Molecular view of language</h3>
<p>Rejection of the holistic view of language should be based on insisting that each statement of any mathematical theory must have a determinate individual content (the language must be molecular). Even though a grasp of this content cannot in general consist of a a piece of verbalisable knowledge, it can nevertheless be subjected to criticism. The line of thought is roughly speaking</p>
<ol>
<li>There must be a harmony between the two aspects: ‘introduction rules’ and ’elimination rules’.</li>
<li>The theory of meaning determining the aformentioned harmony should be able to explain all the features of sentences in the language.</li>
</ol>
<h4 id="logical-harmony">Logical Harmony</h4>
<p>An existing practice in the use of a certain fragment of language is capable of being subjected to cricticism if it is impossible to systematise it - to frame a model whereby each sentence carries a determinate content which can, in turn, be explained in terms of the use of that sentence. That is, the linguistic system as a whole should be coherent, this guarentees a harmony between the following two aspects of the use of observation statments</p>
<ol>
<li>The propensities acquired to assent to and dissent from them under certain types of stimuli (consequence of the utterance/<em>elimination rules</em>/indirect means of establishing a statement);</li>
<li>The possibility of deducing them by means of non-observational statements (conditions for the utterance/<em>introduction rules</em>/direct meas of establishing a statement).</li>
</ol>
<p>Namely, it must not be possible to deduce observation statments (by 2.) from which the perceptual stimuli require dissent (by 1.). In particular, of an observation statement deduced by means of theory, it must hold that we can place ourselves in a situation in which stimuli occur which require assent to it. Thus, the language as a whole should be a <em>conservative extension</em> <span class="colored"> (not sure what he means here, since when talking about conservative extensions we are refering to theories) </span>
of that fragment of the language containing only observation statetments.</p>
<p>This is loosely to say there must be a harmony between the introduction and elimination rules. This is not accurate, for, <em>e.g.</em>, in classical logic it is possible to infer a disjunctive statement, say by double negation elimination, without appeal to the rule of disjunction introduction.</p>
<h4 id="theory-of-meaning">Theory of meaning</h4>
<p>Exactly what the demanded harmony is depends upon the theory of meaning accepted for the language: the general model of that in which the content of an individual sentence consists. The notion of <em>conservative extension</em> that is demanded upon the addition of any expression or sentence (that can be added) to the language can be made precise by appealing to some concept such as that of truth or that of being assertible or capable in principle of being established, etc. Precisely which concept is to be chosen and how it is to be explained depends upon the theory of meaning that is adopted.</p>
<p>A theory of meaning seizes upon some one general feature of sentences as central (‘meaning is […]’). The justification for a particular selection of one single feature of sentences as central is that it is hoped that every other feature of the use of sentences can be derived, in a uniform manner, from this central one.</p>
<h2 id="theories-of-meaning">Theories of meaning</h2>
<h3 id="platonistic-interpretation-of-a-mathematical-theory">Platonistic interpretation of a mathematical theory</h3>
<p>Here Dummetts went into an lengthy argument reasoning that the Platonistic theory of meaning cannot be a theory in which meaning is fully determined by use.</p>
<h3 id="replacing-the-notion-of-truth-with-that-of-proof">Replacing the notion of truth with that of <em>proof</em></h3>
<p>If meaning is use, then the notion of <em>truth</em>, considered as a feature which each mathematical statement either determinately possesses or determinately lacks, independently of our means of recognising its truth-value, cannot be the central notion for a theory of the meanings of mathematical statements.</p>
<p>The notion of truth should be replaced by that of <em>proof</em>. A grasp of the meaning of a statement consists in a capacity to recognise a proof of it when one is presented. For expressions smaller than a sentence must consist in a knowledge of the way in which its presence in a sentence contributes to determining what is to count as a proof of that sentence.</p>
<p>As soon as the logical constants are construed in terms of this conception of meaning, certain forms of reasoning which are conventianally accepted could be shown to be devoid of justification.</p>
<h2 id="on-the-meaning-is-use-argument">On the “Meaning is use” argument</h2>
<p>It is vulnerable:</p>
<blockquote>
<p>It follows that, in so far as an intuitionist position in the philosophy of mathematics (or, at least, the acceptance of an intuitionistic logic for mathematics) is supported by an argument of this first type <em>(i.e. the line of thought presented before)</em>, similar, though not necessarily identical, revisions must be made in the logic accepted for statements of other kinds. What is involved is a thesis in the theory of meaning of the highest possible level of generality. Such a thesis is vulnerable in many places: if it should prove that it cannot be coherently applied to any one region of discourse, to any one class of statements, then the thesis cannot be generally true, and the general argument in favour of it must be fallacious. Construed in this way, therefore, a position in the philosophy of mathematics will be capable of being undermined by considerations which have nothing directly to do with mathematics at all.</p>
</blockquote>
<p>It conforms to Kreisel’s dictum</p>
<blockquote>
<p>The point is not the existence of mathematical objects but the objectiveity of mathematical truth.</p>
</blockquote>
<h2 id="ontology-of-mathematics">Ontology of mathematics</h2>
<h3 id="alternative-defence-of-the-rejection-of-classical-in-favour-of-intuitionistic">Alternative defence of the rejection of classical in favour of intuitionistic</h3>
<p>This defence starts from some the celebrated thesis that mathematical statements do not relate to an objective mathematical reality existing independently of us. Mathematical objects are, on this thesis, creations of the human mind, in the sense that their being is to be thought of. Esse est concipi.</p>
<p>This defence is not vulnerale in the same way as the “meaning is use” argument since it is not that general, but it doesn’t conforms to Kreisel’s dictum. On this view, before considering the meaning of a mathematical statement, one must resolve the metaphysical question whether mathematical objects are creations of the human mind or independently existing abstract objects. Now, on what basis could we possibly resolve this metaphysical question, at a stage at which we do not even know what model to use for our understanding of mathematical statements? A furthur question can be: what’s the difference between the assertion that $A$ is creation of human mind and that $A$ is existing <em>abstract</em> object - in what sense is it <em>abstract</em> and what does the word <em>existing</em> even means?</p>
<p>Is this alternative defence viable?</p>
<ol>
<li>Is there a route from the constructivist ontological thesis to the intuitionistic theory of meaning?</li>
<li>Can the ontological thesis serve as a premiss for the constructivist view of the meanings of mathematical statements?</li>
</ol>
<ul>
<li>The preliminary position is that any thesis concerning the ontological status of objects of a given kind must be, at the same time, a thesis about what makes a statement involving reference to such object true. The question of the ontological status of a class of objects cannot be separated from that of the correct notion of truth for statements about those objects. The argument is reinforced, at first sight, by reflection upon Frege’s dictum:</li>
</ul>
<blockquote>
<p>Only in the context of a sentence does a name stand for anything.</p>
</blockquote>
<ul>
<li>The position is preliminary since it is not so straightforward. A model of the meanings of mathematical statements in terms of proof rather than of truth need <em>not</em> rest upon any particular view about the ontological character of mathematical objects.</li>
</ul>
<h4 id="a-platonistic-ontology-is-consistent-with-intuitionistic-meaning-theory">A Platonistic ontology is consistent with intuitionistic meaning theory</h4>
<p>For example a Platonist can believe that natural numbers are abstract objects, but he may nevertheless, when he comes to consider the meaning of existential and universal quantification over the natural numbers, be convinced by a line of reasoning such as that is considered before (the first defence of the rejection of classical logic): quantification over a denumerable totality cannot be construed in terms of our grasp of the conditions under which a quantified statement is true, but rather must be understood in terms of our ability to recognise a proof or disproof of such a statement. This means, a Platonistic ontological thesis is consistent with intuitionistic model of meaning, when one consider statements which are not effectively decidable.</p>
<h2 id="can-the-constructivist-ontology-be-prior">Can the constructivist ontology be prior?</h2>
<p>Now the question is whether the opposite combination of views is possible. Is it consistent to hold that there is a notion of truth under which each number-theoretic statement is determinately either true or false (and that it is in terms of our grasp of their truth-conditions that our understanding of those statements is to be explained), and at the same time hold that natural numbers are creations of human thought. If it is <em>possible</em>, then there can be no route from the constructivist ontological thesis to the intuitionistic (proof-centered) model of meaning.</p>
<p>If it is impossible, then there is a route, but it still not follow that the constructivist ontological thesis could serve as a premise for the intuitionistic meaning theory: What is the substance of the ontological thesis, if it were not merely a picture encapsulating that conception of meaning? Answer: The ontological thesis can be about the meaning of a restricted class of statements concerning given objects, but not the entire class, then the ontological thesis would be prior to meaning theory. Now is it legitimate to do this?</p>
<p>After a lengthy discussion (which is given here in the next section) Dummets states that, there is one way to make it legitimate from the ontology to the theory of meaning: Holding that there is no notion of truth applicable even to numerical equations, save that in which a statement is true when we have actually performed a computation or effected a proof which justifies that statement. Such a claim must rest on the most resolute scepticism concerning subjunctive conditionals.</p>
<h2 id="the-meaning-of-vdash_n--and-the-notion-of-proof">The meaning of “$\vdash_n $” and the notion of proof</h2>
<p>Let us define truth with the Tarskian schema
$$
S\text{ is true iff }A
$$
where $A$ is a number-theoretic statement and $S$ is a canonical name of that sentence.</p>
<p>A digression: Of course there are counter examples to such a scheme, <em>e.g.</em> those sentence $A$ which are neither true nor false, since then $S$ is false, but by hypothesis $A$ is not false. However it is inconsistent to assert of any statement that it is neither true nor false in intuitionistic logic, hence this is not really a counter-example.</p>
<p>A problem with this truth definition is that it is devoid of tense. Was an equation like $598017+246532=844549$ already true before the computation was performed? We may perform the computation $598017+246532$ and discover that $A$ which is $598017+246532=844549$ is true, which is $S$. The truth-definition leaves such questions unanswered for it doesn’t provide for inflections of tense or mood of the predicate “is true”.</p>
<p>Introducing tense leads to further difficulties. This can be seen from the problesm surrounding the theory of the creative subject. We can say that if we know that at any stage $A$ has been or will be proved, then we are entitled to assert $A$:
$$
\vdash_n A\to A.
$$
The converse of the statement is
$$
A\to \exists n (\vdash_n A),
$$
whose double negation
$$
A\to\neg\neg \exists n (\vdash_n A),
$$
means: if we know that $A$ is true, then we shall never be able to assert that it will never be proved. But the converse itself looks dubious. Accepting it means
$$
A\leftrightarrow \exists n (\vdash_n A)
$$
then the operator $\exists n (\vdash_n (\cdot))$ becomes a redundant truth-operator and may be distributed across any logical constant. For example
$$
\vdash_k\forall m A(m) \to \forall m \exists n (\vdash_n A(m)).
$$
Then if we have once proved a universally quantified statement, we are in some way committed to producing, at some time in the future, individual proofs of all its instances. Kreisel’s proposal to the solution is to construe $\vdash_n$ so that a proof at stage $n$ of a universally quantified statement counts as being, at the same time, a proof of each instance, so that a stronger thesis can be asserted:
$$
\vdash_k\forall m A(m) \to \forall m (\vdash_k A(m)).
$$
However this, in the way presented by Dummett (p.235 of the book <em>Truth and other enigmas</em>, 1978), committed us via,
$$
(\vdash_m A)\wedge (\vdash_k (A\to B)) \to \exists n (\vdash_n B)
$$
and
$$
(n=\text{max}(m,k)\wedge (\vdash_m A)\wedge(\vdash_k C))\to ((\vdash_n A)\wedge(\vdash_n C))
$$
that whenever we had proved a statement $A$ and had recognised some other statment $B$ as being a consequence of $A$, to actually drawing that consequence some time in the future. This means, the notion of proof becomes as such that a proof of a statement is taken as simultaneously constituting a proof of anything that has already been recognised as a consequence of that statement:
$$
(n=\text{max}(m,k)\wedge(\vdash_m A)\wedge(\vdash_k(A\to B)))\to (\vdash_n B).
$$
Now, when are we to be said to have recognised that one statement is a consequence of another? How can it be that a demonstration of the validity of a schema of first-order predicate logic is simultaneously a demonstration of the truth of all its instances?</p>
<p>However, the axiom that led us to earlier difficulties,
$$
A\to \exists n (\vdash_n A),
$$
when the implication sign is interpreted intuitionistically, merely says that given a proof of $A$ we can effectively find a proof that $A$ was proved at some stage, which seems totally acceptable. The difficultiey seems to be that <em>the logical laws are themselves at fault</em>.</p>
<p>The law
$$
\forall x A(x) \to A(m)
$$
leads via the axiom to the conclusion
$$
\forall x A(x)\to \exists n (\vdash_n A(m))
$$
which says taht we shall explicitly prove every instance of every universally quantified statement which we prove. This law seems problematic. This law is ordinarily justified by saying that given a proof of $\forall x A(x)$ we can effectly find a proof of $A(m)$ for each $m$. The justification of the conclusion then should be that given a proof of $\forall x A(x)$ we can effectively find a proof that $A(m)$ <em>will be proved</em> at some stage. For given $m$ this can be done by proving $A(m)$ and noting the stage at which we do so. Hence
$$
\exists n (\vdash_n A(m))
$$
should be so understood that its assertion doesn’t amount to a claim that we shall prove $A(m)$ at some stage $n$ as a matter of fact, but only that we are capable of bring it about that $A(m)$ is proved at some stage: The difficulties thus appear to have arisen from understanding the existential quantifier in the axiom in an excessively classicaal or realistic manner, namely as meaning that there will in fact be a stage $n$ at which the statement is proved, rather than as meaning that we have an effective means, if we choose to apply it, of making it the case that there is such a stage.</p>
<p>The confusion concerning the theory of the creative subject arose in part from a desire to relate the intuitionistic truth of a mthematical statement with a use of the logical constants which is alien to intuitionistic mathematics. $\exists n (\vdash_n A)$ doesn’t mean that $A$ would in fact be proved at some stage, if it means that, then no matter whether the existential quantifier is interpreted classically or constructively, it will fail to jibe with the way it and the other logical constants are construed within ordinary mathematical statements. Hence, however we try to modify our notion of a statement’s being proved, we shall not obtain anything equivalent to the mathemtaical statement $A$ itself.</p>
<p>The notion of proof then needs to be anti-realist rather than realist.</p>
Short Notes on Various Papers, 2022
https://geistlib.xyz/short-notes-on-various-papers/
Sat, 12 Nov 2022 00:01:12 +0200https://geistlib.xyz/short-notes-on-various-papers/<h2 id="artarchitecture">Art/Architecture</h2>
<h3 id="dirk-van-den-heuvelbetween-brutalists-the-banham-hypothesis-and-the-smithson-way-of-life">Dirk van den Heuvel,<em>Between Brutalists. The Banham Hypothesis and the Smithson Way of Life</em></h3>
<p><strong>2022-09-25</strong>. <a href="https://doi.org/10.1080/13602365.2015.1027721">https://doi.org/10.1080/13602365.2015.1027721</a></p>
<blockquote>
<p>“The Smithsons and Banham held very different opinions about the direction of the New Brutalist project […] Smithsons sought to combine modern architecture with a multiplicity of tendencies within British culture, reaching back to Arts and Crafts concepts, among others.”</p>
</blockquote>
<p>The position of the Smithsons are essentially identical to that of Eric Gill and William Lethaby. See the introduction to the book <em>A Holy Tradition of Working</em>, Angelico Press, 2020. The intrinsic properties of the materials are regarded as important in the work of the Smithsons, since honesty to the material and its function are manifested through the reflection upon their functional properties.</p>
<h2 id="philosophymathematics">Philosophy/Mathematics</h2>
<h3 id="riskin-j-the-defecating-duck-or-the-ambiguous-origins-of-artificial-life">Riskin, J. <em>The Defecating Duck, or, the Ambiguous Origins of Artificial Life</em>.</h3>
<p><strong>circa 2022-11</strong>. <a href="https://doi.org/10.1086/377722">https://doi.org/10.1086/377722</a></p>
<p>A iluminating insight given by Riskin: the design of automata became increasingly a matter, not just of representation, but of simulation.</p>
<blockquote>
<p>By imitating the stuff of life, automaton makers were once again amining, not merely for versimilitude, but for simulation; they hoped to make the parts of their machines work as much as possible like the parts of living things and thereby to test the limits of resemblance between synthetic and natural life.
In short, the projects of artificial life have been attempts to reach the outer bounds of mechanism.</p>
</blockquote>
<p>Some comments:</p>
<ol>
<li>Interestingly the focus of 18th century mechanicians are on producing devices that are capable of <em>bledding, defecating and breathing</em>. While nowadays people focus more on intelligence, some kind of self-sufficiency or non-determinacy.</li>
<li>What is machine and what is life in the mind of 18th century mechanicians? This is not obvious since what can be counted as <em>synthetic</em> is ambiguous.</li>
<li>A speculation: the attempt to simulate life itself altered the concept of life. It would be helpful to study the notion of life in e.g. the classical world or in the middle ages and comparatively the notion of life in 17-19th century, and investigate how the notion of life was transformed.</li>
</ol>
<p>Wrote some stuff during various conversations in Chinese and not willing to translate:</p>
<p>Riskin 那篇文章就在说这些机器人被造出来时本来就有一种考察、试图理解人的运作的目的。她是说人在探索机械论的极限。但我就不明白跟机械论有什么关系，看人谈论机械论的时候，再翻更古代的东西，经常会发现古代人看世界的方式有时候同样惊人地机械论，但好像没什么人试图用机械去_模拟_人。如果要让制造出的人偶显得“逼真”，“更像人”，似乎让它能干更多事或者让它有有弹性的皮肤比让他们能呼吸、眼球能跟随手运动重要…让人注意 Jaquet-Droz 制造的自动机的是他在试图对类似呼吸、眼球运动的非常生理但又跟“逼真”只有间接关系的东西进行精确复刻，以至于精确到一定程度人应该怎么运作的标准就以机器的运作机制规定了，人会不由自主去想只要机械更加精密人就能够被完整复刻出来。</p>
<p>造人偶的过程本身就是一种实验，类似用计算机模拟大气也可以看成实验一样。一般人不会认为大气的行为可以用计算解释，至少不会认为是计算机的不断计算的结果。但就科学认识论上，人完全可以而且应该扔掉关于大气的各种物理的/物质的假设，至少在用计算方法时是这样的。如果模拟能够达到足够精确，那么人还需要那些乱七八糟的关于物质的假设么？大气的运作就是计算过程。在对微观世界的研究中这种事情已经在发生了，而且我自己居然不觉得有什么问题，当你不需要“物质”这种实体的时候，量子力学整个会显得清晰起来，那么我在抛弃“物质”的时候到底是在干什么呢？我可以这么干么？如果我这么干了那么我到底在研究什么（那些造人偶的到底是在试图模拟什么东西）？
有些时候这种思路不显得有任何问题。比如现在人普遍认为对微观的认识在很多情况下对理解宏观没有帮助，甚至可以说有证明（就重整化群标度率共形场那些东西），接下来人会说宏观物体的行为跟微观物体本身就没什么关系。对，你构造出了与微观物不同的宏观物的观念，那么自然两者就跟没多少关系。可同样的说法似乎不能用在上一段的三个例子上。</p>
<p>确实有必要考察一下“生物”这个概念的流变，特别是实验方法对它的影响。指的不是对既存的“生物”的认识的“加深”等，指的是被看作”生物“的东西本身是如何变的。人用实验方法去研究“生物”，它就会变成实验室里的东西，实验室里的东西就是能够用实验操作去认识的某种东西，这跟具有特定 telos 的“生物”并不同，跟作为特定热力学系统的定义也不同。除非能证明不同的定义所给出的集合（或者有更多结构的集合）之间有同构，那么它们就会给出不同的生物概念。一些进步观点上脑的人会认为定义变化是“人对生物的理解加深了”，可是什么是那个人对其理解加深的生物？问什么是物质时人觉得是在耍赖，问什么是人时又觉得过于敏感，那么不如问什么是生物。
要说X是机械，首先要指出X是被出于特定目的设计的，否则什么是机械并不是简单的问题，甚至是无法解决的问题。如果机械就是受力学规律支配的东西，那么石头、大气都是机械，人是机械的意思是人受力学规律支配。但就跟大气受统计规律支配而且统计规律跟力学规律之间不交流一样（用比较准确的语言是 RG 会遇上不动点，flow 不下去，或者即使QFT在高能标不同向低能标走时遇上的共形场论也一样），这种意义上的机械照样可以被别的规律支配，这些规律之间不交流。所以要让X是机械的说法变的有力，还是要说机械是被设计出来的东西，于是你就有智能设计论了，或者要找出别的方法去定义这个机械使人脑子里那个模糊的”机械论“有一个确定的含义。很难想象这种古典形式的机械论会直接引导出现代形式。人开始用机械去模拟、探索生物，跟人用计算机模拟、探索大气是一码事，他们不需要相信什么机械论也可以这么做。设计出机械试图去模拟生物，用实验去重复、再现生物的行为，生物的概念就会变成实验室里的东西和能用机械去模拟的东西，生物是在实验室和模拟中被认识的。人这样规定了生物，规定了生物是某种应该在实验室和模拟中被认识的现象，就会认为“生物是没有设计者的机械”（根据上面说的，这个词本身就有问题），没有设计者，因为人不觉得自己是实验室这个“宇宙”（附带着物体被观看的方式）的设计者，反而认为自己打造出的实验室就是宇宙。这可能难以理解，放到计算机模拟就非常好理解了</p>
<h3 id="jeremy-heis-ernst-cassirers-neo-kantian-philosophy-of-geometry">Jeremy Heis, <em>Ernst Cassirer’s Neo-Kantian Philosophy of Geometry</em></h3>
<p><strong>2022-09-16</strong>. <a href="https://doi.org/10.1080/09608788.2011.583421">https://doi.org/10.1080/09608788.2011.583421</a></p>
<p>Cassirer</p>
<ol>
<li>Does not defend the necessary truth of Euclidean geometry;</li>
<li>Doesn’t assert that man have <em>a priori</em> knowledge of the curature of physical space;</li>
<li>Deny that arithmetic depends on a pure intuition of time;</li>
<li>Defends Richard Dedekind’s logicism about arithmetic.</li>
</ol>
<p>This means the fundamental divergence between Neo-Kantianism and Frege, Russell and the logical empiricists are <em>not</em> about pure intuition. Nontheless Cassirer was attentive to the question of how mathematics remains a unified science over time despite the conceptual and ontological revolutions that it has undergone (<em>i.e.</em> what is the underlying epistemology), which is similar to what philosophers of science like van Fraassen are now concentrating on (viz. why mathematicians prefer certain kinds of proofs, what gives them reasons to introduce new objects, what they are looking for in new concepts).</p>
<p>For Cassirer,</p>
<ol>
<li>Mathematics avoids being a game inasmuch as it is employed in empirical science.</li>
<li>Mathematics is such a unity that removing those portions of mathematics that are not applied would leave the rest of mathematics simply unintelligible.</li>
</ol>
<p>This is based on a rather <em>historical</em> perspective,</p>
<blockquote>
<p>As Cassirer puts it, ‘the unity of mathematics no longer lies in its object – whether it be the study of magnitude and number, the study of extension, as the general theory of manifolds, the theory of motion, or equally as the theory of forces.’ Rather the explanation has to go in the opposite direction: we can say that they were studying the same objects only because we can say that they are parts of the same history.</p>
</blockquote>
<p>And there is a ‘general logical structure’ underlying the history, presented through the <em>method</em> of mathematics. This is curiously similar to the position of Lakoff, MacLane <em>etc</em>.</p>
<p>Suprisingly enough, Cassirer’s ontology of mathematical objects is very much ‘categorical’ in the sense of category theory:</p>
<blockquote>
<p>He endorses an ontology of mathematical objects derived from Dedekind: each mathematical object is a position in a relational structure, all of the essential properties of these objects are relations to other objects in the structure, and reference to each object is only possible in the context of the whole system of objects in that structure.</p>
</blockquote>
<h2 id="sciencemathematics">Science/Mathematics</h2>
<h3 id="guenther-witzany-what-is-life">Guenther Witzany, <em>What is Life?</em></h3>
<p><strong>2022-11-11</strong> <a href="https://doi.org/10.3389/fspas.2020.00007">https://doi.org/10.3389/fspas.2020.00007</a></p>
<p>First, a language and philosophical problem. Witzany argues that life is a social event, communicative interaction. However, with which and what agents as participants is it a social event? Whose communicative interaction is life? In a social event and communicative interaction agents are always present, and agents are, first of all, “living” beings, so Witzany basically is arguing that life is a social event of living beings. In Witzany’s biocommunication scheme of life, viruses are essential agents of life, but are viruses living beings? If they cannot be counted as living, in what sense are they agents? A possible detour is arguing that the notion of life resides only in some particular context(s) where living beings are present, <em>i.e.</em> the definition of life in terms of social events and communication is justified by the language structure manifested internal to these contexts. A more usable and illuminating account of sentence meaning is needed to clarify the use of the word “life”, since by abandoning the physicalism of 20th century in biology one is effectively abandoning the theory-metatheory paradigm and hence semantic realism, also the correspondence theory of truth.</p>
<p>Interestingly, the abandoning of physicalism leads to a demand for a new theory of meaning in the style of proof-theoretic semantics and semantic anti-realism, and at the same time to a style of evolutionary thinking with that of Teilhard de Chardin, Vernadsky etc. as representatives (Margulis’ symbiogenesis is an instance of Earth-Life phenomenom a la Gaia hypothesis).</p>
<p>A general framework might be given by a future process philosophy with a more complete mathematical-logical perspective, where mereology or point-free geometry of Whitehead is realized/exhibited by Grothendieck topology and sheaf semantics, and with toposophy as the organizing principle of formalizing contexts. If reality is internal to a context, life can surely be internal to a social event, without a foundational metatheory in which life is absolutely and transcendentally defined.</p>
<p>Though not of this paper, a review that can be helpful:
Claus Emmeche, <em>Taking the semiotic turn, or how significant philosophy of biology should be done</em>. Published in: Sats - Nordic Journal of Philosophy 3 (1): 155-162, 2002. Review of: Günther Witzany: Life: The communicative structure. A new philosophy of biology. Norderstedt: Libri Books on Demand, 2000. <a href="https://www.nbi.dk/~emmeche/cePubl/2002b.Wit.Sats.html">https://www.nbi.dk/~emmeche/cePubl/2002b.Wit.Sats.html</a></p>
Readings on William Lawvere's Work
https://geistlib.xyz/readings-on-william-lawveres-work/
Wed, 09 Nov 2022 22:37:24 +0100https://geistlib.xyz/readings-on-william-lawveres-work/<ul>
<li>The collected works of F. W. Lawvere can be found in the following Git repository <a href="https://github.com/mattearnshaw/lawvere">https://github.com/mattearnshaw/lawvere</a></li>
<li>The chronological list of publications can be found in Lawvere’s website <a href="https://www.acsu.buffalo.edu/~wlawvere/">https://www.acsu.buffalo.edu/~wlawvere/</a></li>
</ul>
<h2 id="preliminary-notes">Preliminary Notes</h2>
<p>I focus mainly on early works since these are the most original. The following account is mainly assembled from information given in</p>
<ul>
<li>the interview <a href="http://www.mat.uc.pt/~picado/lawvere/interview.pdf">http://www.mat.uc.pt/~picado/lawvere/interview.pdf</a> ,</li>
<li>Lawvere’s own comment on his thesis given in the 2004 reprint of <em>Functorial semantics of algebraic theories</em>,</li>
<li>Andrei Rodin’s <em>Axiomatic Method and Category Theory</em>.</li>
<li>J. Bell’s <em>The development of categorical logic</em> in the book <em>The Handbook of Philosophical Logic, Vol.12</em></li>
<li>and <em>The history of categorical logic 1963-1977</em> in the book <em>Handbook of the History of Logic, Vol.6</em>, written by J.-P. Marquis and Reyes G. E.</li>
</ul>
<p>While category theory was invented in 1945 and by the 1950s widely used in algebraic topology and geometry, in logic, even though the use of algebraic techniques was long-established, logicians were by and large unacquanted with category theory. J. Lambek, an algebraist, pointed out the similarities between the axioms for categories and deductive systems such as those introduced by Gentzen in the 1930s.</p>
<p>The idea of recasting the entire apparatus of logic, semantics as well as syntax, in category-theoretic terms, was given by Lawvere. This is the opening of the field now called categorical logic.</p>
<ul>
<li><em>Functorial semantics of algebraic theories</em> (1963). In this work, an algebraic theory is identified as a particular kind of category, an interpretation of one theory in another as a functor between them, and a model of such a theory as a functor on it to the category of sets.</li>
</ul>
<p>At the same time, Lawvere was also convinced that category theory, resting on the bedrock concepts of map and map composition, could serve as a foundation for mathematics reflecting its essence in a direct and faithful fashion, unlike set theory in the Frege-Church-Russel etc. tradition. In the following works, Lawvere put forward a program of category-theoretic foundations of mathematics,</p>
<ul>
<li><em>An elementary theory of the category of sets</em> (1964). Here a first step was taken toward the goal of categorical foundation of mathematics. Here is also the first published appearance of the categorical characterization of the natural number system, known later as the Peano-Lawvere axiom. This is continued in:</li>
<li><em>The category of categories as a foundation for mathematics</em> (1966)</li>
</ul>
<p>In the following two works, the categorical description of algebraic theories is extended to full first-order, <em>i.e.</em> elementary theories, building on the observation that existential and universal quantification can be seen as left and right adjoints of substitution. Also the notion of an object of truth values (in later developments becoming the subobject classifier) is introduced, to enable relations and partially defined operations to be described.</p>
<ul>
<li><em>Functorial semantics of elementary theoreis</em> (1966).</li>
<li><em>Theories as categories and the completeness theorem</em> (1967).</li>
</ul>
<p>After that the use of adjoint functors is emphasized both in practice and also from a more general point of view, and important for topos theory, the idea of truth-value object was furthur explored in</p>
<ul>
<li><em>Diagonal arguments and Cartesian closed categories</em> (1969). Before this paper adjoints were used by Lawvere to show that any category satisfying certain specifications was equivalent to a fixed category of interest, or to establish certain properties of given functors in a context. Now adjoints are cooked into the definition of Cartesian closed category.</li>
<li><em>Adjointness in foundations</em> (1969). This paper deserves special attentian for its general philosophical orientation, containing the seeds of a categorical program in logic and the foundations of mathematics. The logical quantifiers can be presented as adjoint functors to the simple and fundamental operation of substitution.</li>
<li><em>Equality in hyperdoctrines and the comprehension schema as an adjoint functor</em> (1970). This paper contains in particular the observation that the presence of such an object in a category enables the comprehension principle to be reduced to an elementary statement about adjoint functors. The comprehension principle can be presented as an adjoint functor in a proper context.</li>
</ul>
<p>Some comments.</p>
<ol>
<li>It is interesting enough to note that, Lawvere indicated that a given theory as a category could be thought of as the <em>Sinn</em> of a theory presented in a first order language, and the category of models of the theory could be thought of as the <em>Bedeutung</em> of the theory.</li>
<li>In the papers mainly on adjoints, Lawvere suggests extensions of his earlier work on algebraic theories to theories written in higher-order tpye theories and as a special case first-order theories.</li>
</ol>
<p>Also during 1967, in lectures given in several places, he suggested that a foundation for continuum mechanics in category-theoretic terms should be sought on the basis of a direct axiomatization of the essence of differential topology using results and methods of algebraic geometry. To achieve this would require an axiomatic study of categories of smooth sets similar to the topos of Grothendieck, <em>i.e.</em> an elementary axiomatic description of Grothendieck topoi. These strands are woven together in collaboration with Myles TIerney,</p>
<ul>
<li><em>Quantifiers and Sheaves</em> (1970). See also Tierney’s <em>Sheaf theory and the continuum hypothesis</em> (1972) and <em>Axiomatic sheaf theory: some constructions and applications</em> (1973). These works, together with the desire to provide a categorical formulation of Cohen’s proof of the independence of the continuum hypothesis from the axioms of set theory, led to the concept of elementary topos, since every Grothendieck topos had an object of truth values, and Grothendieck topologies are closely connected with self-maps on that object.</li>
</ul>
<p>In the development of topos theory, the concept of classifying topos for a first-order theory emerged. Reyes and Joyal in 1972 identified a general type of first-order theory, called geometric theory, which could be shown always to possess a classifying topos. In virtue of the work of Joyal and Reyes, Lawvere pointed out that a previous theorem of Deligne on coherent topoi (classifying topois of finitary geometric theories) was equivalent to the Goedel-Henkin completeness theorem for geometric theories. Also the theorem of Baar on the existence of enough Bollean topoi was equivalent to a Boolean-valued completeness theorem for infinitary geometric theories.</p>
<ul>
<li><em>Continuously variable sets, algebraic geometry = geometric logic</em>. (1975)</li>
</ul>
<p>Some additional remarks</p>
<ol>
<li>In the interview aforementioned, Lawvere stated that George Mackey was in deep connection with category theory.</li>
<li>Lawvere’s motivation for studying categories was for simplifying the foundations of continuum physics, after having some initial understanding of mathematical logic he concluded that the solution to the foundational problem would be to develop and axiomatic theory of the category of categories.</li>
</ol>
<h2 id="notes">Notes</h2>
<ol>
<li><a href="https://geistlib.xyz/lawvere-adjointness-in-foundations/">Adjointness in Foundations</a></li>
</ol>
Readings on Per Martin Loef's Work
https://geistlib.xyz/readings-on-per-martin-loefs-work/
Wed, 09 Nov 2022 22:37:14 +0100https://geistlib.xyz/readings-on-per-martin-loefs-work/<ul>
<li>The collected works of Per Martin-Löf can be found in the following Git repository: <a href="https://github.com/michaelt/martin-lof">https://github.com/michaelt/martin-lof</a> . These are not complete and lacks some important works.</li>
<li>For a complete list of Per Martin-Loef’s work, see the endnote of Goeran Sundholm’s <em>On the Philosophical Work of Per Martin-Loef</em> included in the book <em>Epistemology versus Ontology</em>.</li>
<li>Evidently one should also read the works of Brouwer, Dummett and Heyting.</li>
</ul>
<h2 id="some-preliminary-notes">Some Preliminary Notes</h2>
<p>What follows is summarized from Goeran Sundholm’s <em>On the Philosophical Work of Per Martin-Loef</em> included in the book <em>Epistemology versus Ontology</em>. Works that I am not interested in are omitted.</p>
<p>The logicist program’s task was to design a sizeable formal system, with clearly delimited axioms and reuls of inference, adequate for the needs of mathematical analysis. It should admit of classical logic. The axioms and primitive rules of inference should be rendered immediately evident from the meaning explanations for the primitive signs of the formal language of the formal system in question. This wasn’t successful, since axioms such as Reducibility were not rendered evident by the relevant meaning-explanations.</p>
<p>The foundations of mathematics then had two choice:</p>
<ol>
<li>Retain classical logic in a mathematical object-language, but give up hope for meaning explanation. This is Hilbert’s choice: the Metamathematical paradigm.</li>
<li>Insist on retaining a contentual language with meaning explanations, but jettison classical logic. This is the choice of Brouwer, Heyting etc. This is the theory of meaning.</li>
</ol>
<p>Martin-Loef started with metamathematical paradigm. The formal languages and systems dealt with are objects of metamathematical study, and in that spirit normalization theorems are established for the early version of type theory and other systems. In this peroid, all starts with Howard’s <em>The formulae-as-types notion of construction</em> where an isomorphism a la Curry is established between axiomatic Hilbert-style systems for predicate logic and arithmetic and matching calculi in combinatory logic.</p>
<ul>
<li><em>Infinite terms and a system of natural deduction</em>. This is on Curry-Howard isomorphism between natural-deduction derivations and the terms of a matching lambda-calculus, <em>i.e.</em> natural-deduction derivations and lambda-calculus terms are essentially equivalent. Upon reading the manuscript of Howard’s <em>The formulae-as-types notion of construction</em>, Martin-Loef carried over the idea from Howard’s Hilbert-style calculi to the framework of Gentzen’s Natural Deduction, and from combinatorial logic used by Howard to lambda calculus.</li>
<li><em>Hauptsatz for the intuitionistic theory of iterated inductive definitions</em>. This is about normalization proofs for second-order logic. Martin-Loef searched for the optimal way of proving normalization result for systems of natural deduction equipped with the aforementioned insight of equivalence. This carried over the computability method of W. W. Tait to proofs of normalization for natural-deduction derivations. Then with the insight of J.-Y Girard on how to extend Goedel’s <em>Dialectica</em> interpretation to second-order arithmetic, he gave a normalization proof for second-order logic.
<ul>
<li><em>Hauptsatz for intuitionistic simple theory of types</em>. Here the computability approach was extended to the intuitionistic simple theory of types.</li>
</ul>
</li>
<li><em>A Theory of Types</em>. This is an unpublished manuscript, a revised written presentation. The first system of Intuitionistic Type Theory was designed and presented here. Its main building blocks were Gentzen’s natural-deduction style of formalization, with proof-theoretic reduction steps from Prawitz, Goedel’s Dialectica system T, the Curry-Howard isomorphism, and Tait’s computability method for normalization proofs.</li>
<li><em>An Intuitionistic Theory of Types</em>. This is a lecture note. This 1972 work was published in 1995.</li>
</ul>
<p>In 1974, stimulated by reading Wittgenstein and listening to Michael Dummett’s lecture <em>The Philosophical Basis of Intuitionistic Logic</em>, Martin-Loef turned to the theory of meaning, and brought type theory within the contentual approach in logic. The aim was to let the works to admit a detailed and coherent semantics: Disign a full-scale formal language, with explicit meaning-explanations, that is adequate for the needs of mathematical analysis in the style of Errett Bishop;s constructive presentation.</p>
<p>To begin with he tried to view the natural-deduction elimination rules as basic, or meaning giving. These are soon abandonded.</p>
<ul>
<li><em>Syntax and semantics of the language of primitive recursive functions</em>. This can also be seen as a contribution to the proper interpretation of mathematics in Wittgenstein’s <em>Tractatus</em>.</li>
<li><em>Syntax and semantics of mathematical language</em>. Unpublished and uncompleted. This gave meaning explanations for the language of type theory.</li>
</ul>
<p>Introduction rules are then used instead.</p>
<ul>
<li><em>Constructive mathematics and computer programming</em>. The pattern of meaning explanation based on the introduction-rule constructors that yield canonical proof-objects is introduced. Here he also emphasizes his epistemological stance that was influenced by Husserl, which is, roughly speaking, an insistence on first-person knowledge.</li>
<li><em>Intuitionistic type theory, notes by Giovanni Sambin</em>. The identity is changed from extensional to intensional. In this mature form, Martin-Loef’s constructive type theory, from the point of view of the foundations of mathematics, is a mathematically precise rendering of the BHK meaning-explanations given by Arend Heyting in 1930.</li>
</ul>
<p>From the late 1970s to about 1985, reading Edmund Husserl, Martin-Loef, at least in conversation, regarded his syntactic-semantic method of logical exploration as a version of phenomenology. In this period Martin-Loef attempted to avoid the use of type-theoretical abstraction and tried to work within predicate logic (<em>i.e.</em> avoiding the use of proof-objects and the form of judgement $a:\text{proof}(A)$, working instead with the predicate logic form $A \text{ true}$ as principal form of judgement). These culminated in the Siena lectures.</p>
<ul>
<li><em>On the meaning of logical constants and the justification of the logical laws</em>.</li>
</ul>
<p>From then on the works are mainly on philosophical notions such as judgement, evidence, rightness and knowledge.</p>
<h2 id="notes">Notes</h2>
<p>1.<a href="https://geistlib.xyz/notes-on-martin-lofs-siena-lectures/">On the Meanings of the Logical Constants and the Justification of Logical Laws</a></p>
Monochromization of PDF Files
https://geistlib.xyz/monochromization-of-pdf-files/
Mon, 07 Nov 2022 13:03:30 +0100https://geistlib.xyz/monochromization-of-pdf-files/<p>Written for <code>POSIX</code> shells.
Depends on:</p>
<ol>
<li><code>qpdf</code>.</li>
<li><code>parallel</code>, <em>GNU parallel</em> for the full name. <code>xargs</code> can be used if desired but it would result in a painfully slow script.</li>
<li><code>imagemagick</code> for the <code>convert</code> command.</li>
<li>Optional: <code>ocrmypdf</code> if OCR is turned on.</li>
</ol>
<p>The output file will be generated in a directory under <code>/tmp/</code> with a name of the form <code>tmp.XXXXXXXXX.monochromize</code>. The directory will <em>not</em> be deleted automatically.</p>
<p>The threshold value is out of 100. e.g. <code>-e 1 -t 90</code> to turn all the pixel points, with transparency below 90%, black.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-Shell" data-lang="Shell"><span class="line"><span class="ln"> 1</span><span class="cl"><span class="cp">#!/bin/sh
</span></span></span><span class="line"><span class="ln"> 2</span><span class="cl"><span class="cp"></span>
</span></span><span class="line"><span class="ln"> 3</span><span class="cl"><span class="nv">GREEN</span><span class="o">=</span><span class="s1">'\033[0;32m'</span>
</span></span><span class="line"><span class="ln"> 4</span><span class="cl"><span class="nv">CYAN</span><span class="o">=</span><span class="s1">'\033[0;36m'</span>
</span></span><span class="line"><span class="ln"> 5</span><span class="cl"><span class="nv">NC</span><span class="o">=</span><span class="s1">'\033[0m'</span>
</span></span><span class="line"><span class="ln"> 6</span><span class="cl">
</span></span><span class="line"><span class="ln"> 7</span><span class="cl"><span class="nv">test_page</span><span class="o">=</span><span class="m">23</span>
</span></span><span class="line"><span class="ln"> 8</span><span class="cl"><span class="nv">density</span><span class="o">=</span><span class="m">300</span>
</span></span><span class="line"><span class="ln"> 9</span><span class="cl"><span class="nv">threshold</span><span class="o">=</span><span class="m">50</span>
</span></span><span class="line"><span class="ln">10</span><span class="cl"><span class="nv">ocr</span><span class="o">=</span><span class="m">0</span>
</span></span><span class="line"><span class="ln">11</span><span class="cl"><span class="nv">lang</span><span class="o">=</span>eng
</span></span><span class="line"><span class="ln">12</span><span class="cl"><span class="nv">output</span><span class="o">=</span>output.pdf
</span></span><span class="line"><span class="ln">13</span><span class="cl">
</span></span><span class="line"><span class="ln">14</span><span class="cl"><span class="nv">test_threshold_arg</span><span class="o">=</span><span class="m">0</span>
</span></span><span class="line"><span class="ln">15</span><span class="cl">
</span></span><span class="line"><span class="ln">16</span><span class="cl">show_help_msg<span class="o">()</span> <span class="o">{</span>
</span></span><span class="line"><span class="ln">17</span><span class="cl"><span class="nb">echo</span> <span class="k">$(</span>cat <span class="s"><<EOF
</span></span></span><span class="line"><span class="ln">18</span><span class="cl"><span class="s">Usage: $CYAN${0##*/}$NC [OPTIONS] $GREEN-i$NC INPUT $GREEN-o$NC OUTPUT\n
</span></span></span><span class="line"><span class="ln">19</span><span class="cl"><span class="s">
</span></span></span><span class="line"><span class="ln">20</span><span class="cl"><span class="s">\t$GREEN-i$NC Input file name\n
</span></span></span><span class="line"><span class="ln">21</span><span class="cl"><span class="s">\t$GREEN-o$NC Output file name\n\n
</span></span></span><span class="line"><span class="ln">22</span><span class="cl"><span class="s">\t$GREEN-l$NC Set ocr language\n
</span></span></span><span class="line"><span class="ln">23</span><span class="cl"><span class="s">\t$GREEN-t$NC Set threshold\n
</span></span></span><span class="line"><span class="ln">24</span><span class="cl"><span class="s">\t$GREEN-r$NC Set OCR (0 off, 1 on, default off)\n\n
</span></span></span><span class="line"><span class="ln">25</span><span class="cl"><span class="s">\t$GREEN-e$NC Test threshold (0 off, 1 on, default 0)\n
</span></span></span><span class="line"><span class="ln">26</span><span class="cl"><span class="s">\t$GREEN-h$NC Show this help message\n
</span></span></span><span class="line"><span class="ln">27</span><span class="cl"><span class="s">EOF</span>
</span></span><span class="line"><span class="ln">28</span><span class="cl"><span class="k">)</span>
</span></span><span class="line"><span class="ln">29</span><span class="cl"><span class="nb">exit</span> <span class="m">0</span>
</span></span><span class="line"><span class="ln">30</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">31</span><span class="cl">
</span></span><span class="line"><span class="ln">32</span><span class="cl">test_threshold<span class="o">()</span> <span class="o">{</span>
</span></span><span class="line"><span class="ln">33</span><span class="cl"><span class="k">if</span> <span class="o">[</span> ! -e <span class="s2">"</span><span class="nv">$input</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> show_help_msg <span class="p">;</span> <span class="k">fi</span>
</span></span><span class="line"><span class="ln">34</span><span class="cl">
</span></span><span class="line"><span class="ln">35</span><span class="cl"><span class="nv">test_f</span><span class="o">=</span><span class="k">$(</span>mktemp --suffix .test_threshold.input.pdf<span class="k">)</span>
</span></span><span class="line"><span class="ln">36</span><span class="cl"><span class="nv">output</span><span class="o">=</span><span class="k">$(</span>mktemp --suffix .test_threshold.output.pdf<span class="k">)</span>
</span></span><span class="line"><span class="ln">37</span><span class="cl">
</span></span><span class="line"><span class="ln">38</span><span class="cl">qpdf <span class="s2">"</span><span class="nv">$input</span><span class="s2">"</span> --pages . <span class="nv">$test_page</span> -- <span class="s2">"</span><span class="nv">$test_f</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">39</span><span class="cl">convert -density <span class="nv">$density</span> <span class="s2">"</span><span class="nv">$test_f</span><span class="s2">"</span> -threshold <span class="nv">$threshold</span>% -type bilevel -compress fax <span class="s2">"</span><span class="nv">$output</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">40</span><span class="cl">
</span></span><span class="line"><span class="ln">41</span><span class="cl">zathura <span class="s2">"</span><span class="nv">$output</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">42</span><span class="cl">
</span></span><span class="line"><span class="ln">43</span><span class="cl"><span class="nb">trap</span> <span class="s2">"kill </span><span class="nv">$!</span><span class="s2"> 2>/dev/null; rm -f "</span><span class="nv">$test_f</span><span class="s2">" "</span><span class="nv">$output</span><span class="s2">""</span> EXIT
</span></span><span class="line"><span class="ln">44</span><span class="cl">
</span></span><span class="line"><span class="ln">45</span><span class="cl"><span class="nb">exit</span> <span class="m">0</span>
</span></span><span class="line"><span class="ln">46</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">47</span><span class="cl">
</span></span><span class="line"><span class="ln">48</span><span class="cl">start_monochromize<span class="o">()</span> <span class="o">{</span>
</span></span><span class="line"><span class="ln">49</span><span class="cl"><span class="nv">working_dir</span><span class="o">=</span><span class="k">$(</span>mktemp -d --suffix .monochromize<span class="k">)</span>
</span></span><span class="line"><span class="ln">50</span><span class="cl"><span class="nb">echo</span> Working Directory <span class="nv">$working_dir</span>
</span></span><span class="line"><span class="ln">51</span><span class="cl">mkdir <span class="nv">$working_dir</span>/split
</span></span><span class="line"><span class="ln">52</span><span class="cl">mkdir <span class="nv">$working_dir</span>/comp
</span></span><span class="line"><span class="ln">53</span><span class="cl">qpdf --split-pages <span class="s2">"</span><span class="nv">$input</span><span class="s2">"</span> <span class="nv">$working_dir</span>/split/out.pdf
</span></span><span class="line"><span class="ln">54</span><span class="cl"><span class="nb">local</span> <span class="nv">page_count</span><span class="o">=</span><span class="k">$(</span>ls <span class="nv">$working_dir</span>/split <span class="p">|</span> wc -l<span class="k">)</span>
</span></span><span class="line"><span class="ln">55</span><span class="cl">seq -w <span class="m">1</span> <span class="nv">$page_count</span> <span class="p">|</span> parallel convert -density <span class="nv">$density</span> <span class="nv">$working_dir</span>/split/out-<span class="o">{}</span>.pdf -threshold <span class="nv">$threshold</span>% -type bilevel -compress fax <span class="nv">$working_dir</span>/comp/comp-<span class="o">{}</span>.pdf
</span></span><span class="line"><span class="ln">56</span><span class="cl">qpdf --empty --pages <span class="nv">$working_dir</span>/comp/comp* -- <span class="nv">$working_dir</span>/<span class="s2">"</span><span class="nv">$output</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">57</span><span class="cl"><span class="nb">echo</span> Output <span class="nv">$working_dir</span>/<span class="nv">$output</span>
</span></span><span class="line"><span class="ln">58</span><span class="cl">
</span></span><span class="line"><span class="ln">59</span><span class="cl"><span class="k">if</span> <span class="o">[</span> <span class="s2">"</span><span class="nv">$ocr</span><span class="s2">"</span> -eq <span class="m">1</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> ocrmypdf -l <span class="nv">$lang</span> --optimize <span class="m">3</span> --skip-text <span class="nv">$working_dir</span>/<span class="s2">"</span><span class="nv">$output</span><span class="s2">"</span> <span class="nv">$working_dir</span>/<span class="s2">"</span><span class="si">${</span><span class="nv">output</span><span class="si">}</span><span class="s2">_ocr.pdf"</span> <span class="p">;</span> <span class="k">fi</span>
</span></span><span class="line"><span class="ln">60</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">61</span><span class="cl">
</span></span><span class="line"><span class="ln">62</span><span class="cl">
</span></span><span class="line"><span class="ln">63</span><span class="cl"><span class="k">while</span> <span class="nb">getopts</span> <span class="s1">':t:i:o:r:l:p:e:h:'</span> opt<span class="p">;</span> <span class="k">do</span>
</span></span><span class="line"><span class="ln">64</span><span class="cl"> <span class="k">case</span> <span class="s2">"</span><span class="nv">$opt</span><span class="s2">"</span> in
</span></span><span class="line"><span class="ln">65</span><span class="cl"> t<span class="o">)</span> <span class="nv">threshold</span><span class="o">=</span><span class="s2">"</span><span class="nv">$OPTARG</span><span class="s2">"</span> <span class="p">;;</span>
</span></span><span class="line"><span class="ln">66</span><span class="cl"> i<span class="o">)</span> <span class="nv">input</span><span class="o">=</span><span class="s2">"</span><span class="nv">$OPTARG</span><span class="s2">"</span> <span class="p">;;</span>
</span></span><span class="line"><span class="ln">67</span><span class="cl"> o<span class="o">)</span> <span class="nv">output</span><span class="o">=</span><span class="s2">"</span><span class="nv">$OPTARG</span><span class="s2">"</span> <span class="p">;;</span>
</span></span><span class="line"><span class="ln">68</span><span class="cl"> r<span class="o">)</span> <span class="nv">ocr</span><span class="o">=</span><span class="nv">$OPTARG</span> <span class="p">;;</span>
</span></span><span class="line"><span class="ln">69</span><span class="cl"> l<span class="o">)</span> <span class="nv">lang</span><span class="o">=</span><span class="s2">"</span><span class="nv">$OPTARG</span><span class="s2">"</span> <span class="p">;;</span>
</span></span><span class="line"><span class="ln">70</span><span class="cl"> p<span class="o">)</span> <span class="nv">test_page</span><span class="o">=</span><span class="nv">$OPTARG</span> <span class="p">;;</span>
</span></span><span class="line"><span class="ln">71</span><span class="cl"> e<span class="o">)</span> <span class="nv">test_threshold_arg</span><span class="o">=</span><span class="nv">$OPTARG</span> <span class="p">;;</span>
</span></span><span class="line"><span class="ln">72</span><span class="cl"> <span class="k">esac</span>
</span></span><span class="line"><span class="ln">73</span><span class="cl"><span class="k">done</span>
</span></span><span class="line"><span class="ln">74</span><span class="cl">
</span></span><span class="line"><span class="ln">75</span><span class="cl"><span class="k">if</span> <span class="o">[</span> <span class="s2">"</span><span class="nv">$#</span><span class="s2">"</span> -eq <span class="m">0</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> show_help_msg <span class="p">;</span> <span class="k">fi</span>
</span></span><span class="line"><span class="ln">76</span><span class="cl"><span class="k">if</span> <span class="o">[</span> ! -e <span class="s2">"</span><span class="nv">$input</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> show_help_msg <span class="p">;</span> <span class="k">fi</span>
</span></span><span class="line"><span class="ln">77</span><span class="cl"><span class="k">if</span> <span class="o">[</span> <span class="s2">"</span><span class="nv">$test_threshold_arg</span><span class="s2">"</span> -eq <span class="m">1</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> test_threshold <span class="p">;</span> <span class="k">fi</span>
</span></span><span class="line"><span class="ln">78</span><span class="cl">
</span></span><span class="line"><span class="ln">79</span><span class="cl">start_monochromize
</span></span></code></pre></div>Typesetting
https://geistlib.xyz/typesetting/
Sat, 20 Aug 2022 00:00:00 +0000https://geistlib.xyz/typesetting/<blockquote>
<p>DISCLAIMER : NO COPYRIGHT INFRINGEMENT INTENDED. I DO NOT OWN THE RIGHTS TO THE WORKS. If you want the files to be taken down, please contact me immediately via vacaniat <code>at</code> geistlib <code>dot</code> xyz</p>
</blockquote>
<ul>
<li>
<p><a href="https://files.geistlib.xyz/encyclical_tex/">Papal Encyclicals</a></p>
<ul>
<li>The texts are from <a href="vatican.va">vatican.va</a>.
<ul>
<li>Benedict XVI:
<ul>
<li>Deus Caritas Est</li>
<li>Spe Salvi</li>
<li>Caritas in Veritate</li>
</ul>
</li>
<li>Pius XII:
<ul>
<li>Apostolic Constitution “Munificentissimus Deus”</li>
<li>Summi Pontificatus</li>
<li>Mystici Corporis Christi</li>
<li>Divino Afflante Spiritu</li>
<li>Orientales omnes Ecclesias</li>
<li>Communium Interpretes Dolorum</li>
<li>Mediator Dei</li>
<li>Humani Generis</li>
<li>Sacra Virginitas</li>
<li>Doctor Mellifluus</li>
<li>Ad Sinarum Gentem</li>
<li>Ad Caeli Reginam</li>
<li>Miranda Prorsus</li>
<li>Musicae Sacrae</li>
<li>Ad Apostolorum Principis</li>
<li>Meminisse Iuvat</li>
</ul>
</li>
</ul>
</li>
<li>The <code>.tex</code> files should be compiled with <code>xelatex</code>, twice to generate the TOC.</li>
</ul>
</li>
<li>
<p><a href="https://files.geistlib.xyz/bonaventure_hexaemeron_tex/">Collationes in Hexaemeron, St. Bonaventure, Latin-English</a></p>
<ul>
<li>English text from <a href="http://john114.org/Docs/SB_HEX.htm">here</a>, with Latin text from <em>Doctoris Seraphici S. Bonaventurae opera omnia, Tomus V</em>.</li>
</ul>
</li>
<li>
<p><a href="https://files.geistlib.xyz/Catholic%20Social%20Teachings%2C%20Pre-Vatican%20II/">Pre-Vatican II Catholic Social Teachings</a></p>
<ul>
<li>Including:
<ul>
<li>Rerum Novarum</li>
<li>Singulari Quadam</li>
<li>Quadragesimo Anno</li>
<li>Mater et Magistra</li>
<li>Pacem in Terris</li>
</ul>
</li>
</ul>
</li>
<li>
<p><a href="https://files.geistlib.xyz/anthony_of_padua_tex/">The Sermons of St. Antony of Padua, trans Paul Spilsbury)</a></p>
<ul>
<li>Typesetting <a href="https://www.documentacatholicaomnia.eu/03d/1195-1231,_Antonius_Patavinus,_Sermones,_EN.pdf">Paul Spilsbury’s translation</a>, in progress (Fourth Sunday in Lent completed).</li>
</ul>
</li>
</ul>
<p>Usage: <code>wget -r --no-parent</code> the corresponding url (of the directory), (<code>cd</code> to the directory,) then</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">xelatex main.tex
</span></span><span class="line"><span class="ln">2</span><span class="cl">xelatex main.tex <span class="c1"># second run for the proper generation of the title page and the TOC</span>
</span></span></code></pre></div>The Meaning of Implications
https://geistlib.xyz/the-meaning-of-implication/
Sat, 20 Aug 2022 01:22:05 +0200https://geistlib.xyz/the-meaning-of-implication/<p>There is a valid formula in classical logic
$$
\exists y. \{ A(y) \rightarrow \forall x. A(x)\}
$$</p>
<p>where ‘$\rightarrow$’ is the material implication. In natural language the formula reads:</p>
<ul>
<li>If there is a $y$ s.t. $A(y)$, then any $x$ has the property $A(x)$.</li>
</ul>
<p>The property $A$ can be interpreted as ‘drinks’, while the universe can be chosen to be customers in a pub. Then the formula reads</p>
<ul>
<li>If one particular customer $y$ drinks, then all customers drink.</li>
</ul>
<p>This is absurd, but indeed valid in classical logic. There is a 13-line sequent proof, see <a href="https://www.irif.fr/~mellies/mpri/mpri-ens/biblio/categorical-semantics-of-linear-logic.pdf">Categorical Semantics of Linear Logic</a>, page 18, formula 15. Here is a more confusing but intuitive proof:</p>
<ol>
<li>Let $p$ be $\forall x.A(x)$, then either $p$ or $\neg p$. This is <em>tertium non datur</em>.</li>
<li>Now suppose $p$, then obviously the formula holds.</li>
<li>Suppose $\neg p$, then $\exists y.\neg A(y)$, so $A(y)$ is false, thus <em>ex falso quodlibet</em> the formula holds.</li>
</ol>
<p>The formula is an illustration of how the intuitive meaning such as 'imply','means','then' are not correct interpretations for the connective <em>material implication</em> $\rightarrow$. A theory of implication is needed to cope with the problem of what $\rightarrow$ means.</p>
<p>Now one can say that the meaning of the connectives should be dependent on the model that ‘realize’ the logic, but this leads to a problem on the justification of the validity of logic. If the ‘meaning’ of the connectives are nonexistent without a model, or a given external world, then the validity of logic itself is a derivative of the validity of its semantics. Now suppose that in a given model $X$ a particular logic is seen to be valid, what is the justification in extending this logic to another structure $Y$? The logic should be <em>generated by</em> the model, since the connectives are meaningless without semantics. The universality of logic means that associated to a logic there is a unique external world. Now there is only one external world which includes all other external worlds (one model $X$ of which the other models are sub-models), then the interpretation of the connectives are not invariant under the restriction of models to their sub-models, thus they are in fact not even well-defined. Now there is a problem with the <em>criteria for truth</em>, if the notion of truth cannot be established with an interpretation of logic, then how can one derive from the meaning of a sentence that it should be counted as true? In the words of Michel Dummet, ‘how, in general, we can derive from the meaning of a sentence our knowledge of what counts as showing it to be true, or of when we are to recognise it as true’. The criteria for $p$ to be true should be in the - or some - logic, since it is in the law of propositional dynamics. This is the <em>realist</em> tradition in proof theory or semantics.</p>
<p>Another option is to hold that the ‘meaning’ of the connectives are internal to the logic itself, without refering to any notion of external world. The semantics are then <em>generated</em> by the logic. Non-equivalent semantics then originates from <em>different logic</em>s. This is the <em>anti-realist</em> tradition in proof theory or semantics. The upshot is that the connectives are well-defined, invariant w.r.t the change of the models that realize the logic since semantics doesn’t affect the meaning of the connectives. Formal proofs are then autonomous entities, without the need of any semantics. The problem is that different semantics then corresponds to different logic, and hence the external world now becomes a family of external worlds, one corresponding to a particular logic that, acting as the universal law of the propositional dynamics, generates the semantics of the world. The variance of the interpretations in the realist tradition now becomes the variance of the semantical structure of the worlds.</p>
<p>It is easy to notice that</p>
<ol>
<li>The realist tradition is similar to the viewpoint that all the (smooth) manifolds are subspaces of an “external” Euclidean space (through Whitney embedding), and the anti-realist tradition is similar to the veiwpoint that the manifolds are autonomous entities determined by their smooth structures.</li>
<li>The realist tradition is similar to the ideology underlying the set-theoretic foundation(s) of mathematics. The anti-realist tradition is similar to the ideology underlying the categorical/practical foundation(s) of mathematics.</li>
</ol>
<p>In 1. the “external world” in the realist tradition is this universal Euclidean space $\mathsf{Euc}$. In 2. the “external world” in the realist tradition is the category $\mathsf{Set}$. For realists, the entire history of the universe, past and future, subsists in a unified eternal reality, <em>e.g.</em> $\mathsf{Euc}$ or $\mathsf{Set}$. For anti-realists the ’external worlds’ are dependent upon the logic <em>chosen</em>, e.g. the internal logic of a particular category or the internal logic of the delooping $BG$ of the diffeomorphism group $G$ of a manifold.</p>
<p>Now restrict to the case of a manifold $X$ as a realization (a model or an instance in the equivalence class of its external worlds) of its the internal logic associated to the delooping of the diffeomorphism group of $X$. For realists, the manifold $X$ itself is the primary object, while the diffeomorphism group is derivative. For anti-realists, the manifold $X$ is first seen as a realization of its diffeomorphism group. Classical mechanics is more or less described by symplectic manifolds $M$, the conserved quantities are simply the component of the momentum $M\to\mathfrak{g}^\ast$ of a symmetry group $G$ with $\operatorname{Lie}(G)=\mathfrak{g}$ on a Lie algebra element, and the manifold $M$ is, roughly, the <em>realization</em> of $\mathfrak{g}^\ast$. For groupoid $\mathcal{G}$-actions on a manifold $M$, the role of $\mathfrak{g}^\ast$ is now played by the object manifold $\mathcal{G}_0$, while $M$ is still seen as a realization of $\mathcal{G}$. While quantizing a classical system, what is quantized is the symmetries $\mathcal{G}$. The action is <em>linearized</em> and become a unitary representation on a Hilbert space. The manifold $M$ plays only a secondary role that transmits some topological information to the quantum theory, e.g. semi-classically the states are Lagrangian submanifolds, the prequantum bundle has the Chern class equal to the second integral cohomology of the base. In other words, there are indications in mathematical physics that our description of physics is anti-realist. This boils, also, down to the <em>criteria</em> for distinguishing two states. To distinguish a state $A$ from a state $B$, there should be a symmetry showing that $A$ are $B$ are <em>not</em> symmetric under a symmetry transformation. States are points in a symplectic manifold, and the vanishing of the symplectic form in a Lagrangian submanifold means the points in the submanifold are indistinguishable under any symmetry transformation: the delooping of the diffeomorphism group cannot probe down to the internal structure of a Lagrangian submanifold. The physical world is <em>generated</em> by the syntax of physics: the criteria for distinguishing states are encoded in the symmetry group that encodes the syntax.</p>
<p>What is the meaning of the implication ‘$\to$’? In various realizations the implication $A\to B$ usually becomes a Hom-object $\operatorname{Hom}(A,B)$ (via $A\multimap B$), the collection of morphisms from, by an abuse of notation, the object corresponding to the proposition $A$ to that of $B$. Ignoring the technicalities this is just a morphism $A\to B$. Realization is a functor, and in the groupoid action case the morphism $A\to B$ comes from a morphism in the groupoid. Suppose that there is a category $\mathcal{C}$, s.t. all actions on $M$ (functors on the delooping $\operatorname{Aut}(M)$) factors through $\mathcal{C}$, through a functor. Then every arrow $A’\to B’$ comes from a ‘universal arrow’ $A\to B$ in $\mathcal{C}$. This <em>is</em> the meaning of the implication: it is the arrows in a universal (‘syntactic’) category. These are all not allowed in the realist tradition, since the existence of a unique external world subsumes the law of excluded middle (a proposition can only be either true or false since the world includes the truth values of all possible propositions logical syntax can form, and also without this external world there is no logic at all), which excludes the possibility of putting <em>e.g.</em> a Grothendieck topos as the universal category. Even if there is a universal category for classical logic, the construction should not be used: why is it forbidden for the construction to be extended to any kind of non-classical logic? What is the meaning of the implication ‘$\to$’ for realists? How is it possible that without a model-independent meaning the implication can be seen as a logical connective? What does it mean when one says that ‘$p$ is true’ when the criteria for a proposition to be seen as being true is outside the classical logic - what logic is invoked to make the statement that $p$ is true? This translates to physical theory as the question of how a state is distinguished from another state: what is the criteria for a state $A$ to be distinguished from $B$? The criteria is already given for realists: $A$ is distinguished from $B$ <em>a priori</em>, from the distinction the symmetry group is formed. The problem is that the symmetry group cannot probe the internal structure of a Lagrangian submanifold.</p>
<p>The law of excluded middle, or <em>tertium non datur</em>, <em>should</em> in general fail, since the meaning is not generated from the outside world. The meaning is generated by the logical syntax itself, and <em>a</em> outside world is generated by the logic. The criteria for truth itself should be determined by the world-generating logic itself, not the world that is generated by the logic. Only this allows for a meaning to be given to a logical connective, which allows for a notion of truth to be established by its logic.</p>
Quantifier as Adjoints
https://geistlib.xyz/quantifier-as-adjoints/
Thu, 21 Jul 2022 04:29:32 +0200https://geistlib.xyz/quantifier-as-adjoints/<p>A predicate $S(x,y)$ can be inteerpreted as a subset of $X\times Y$, namely the set of pairs $(\hat{x},\hat{y})$ s.t. $S(\hat{x},\hat{y})$ is true.</p>
<p>Let $p:X\times Y\rightarrow Y$ denote the projection, and $\mathcal{P}(X)$ be the powerset, endowed with the structure of a Boolean algebra.</p>
<p>$\mathcal{P}(X)$ forms a category whose arrows are inclusions.</p>
<h2 id="quantifiers-definitions-in-textbfset">Quantifiers, definitions, in $\textbf{Set}$</h2>
<p><em>Universal quantifier</em>.</p>
<p>$\forall_p$. $X,Y$ sets. For a relation $S\subseteq X\times Y$, $\forall_p S \equiv {y\in Y| (x,y)\in S, \forall x\in X }$.</p>
<p>Note that $\forall_p S\subseteq \forall_{p’}$ if $S\subseteq S’$. Hence the above defines a functor $\forall_p:\mathcal{P}(X\times Y) \rightarrow \mathcal{P}(Y)$.</p>
<p><em>Existential quantifier</em>.</p>
<p>$\exists_p$. For a relation $S\subseteq X\times Y$, $\exists_p S\equiv {y\in Y| (x,y)\in S \exists x\in X}$. This also gives a functor $\exists_p:\mathcal{P}(X\times Y)\rightarrow \mathcal{P}(Y)$.</p>
<p><em>Quantifiers as adjoints</em>.</p>
<p>Let $p^{-1}:\mathcal{P}\rightarrow \mathcal{P}(X\times Y)$ be the <em>inverse image</em> (in fact pullback) functor. The functors $\exists_p$ and $\forall_p$ are respectively the left and right adjoints of $p^{-1}$. (Hence we can define them as left and right adjoints and avoid using ‘for all’ ‘for some’ in the definition of these quantifiers from the start.)</p>
<p><em>Left adjoints are existential quantifiers</em>. We just use $\exists_p$ as symbols for the left adjoint of $p^{-1}$. $\text{Hom}(\exists_p S,T) \simeq \text{Hom}(S, p^{-1}T)$. This translates to $\exists_p S\subseteq T \Leftrightarrow S\subseteq p^{-1}T$, now $S\subseteq p^{-1}T$ means ‘if $(x,y)\in S$ then $p(x,y)\in T$’, i.e. ‘if $(x,y)\in S$ <em>for some</em> $x\in X$ then $y\in T$’ (<em>for some</em> is not necessary in the sentence)</p>
<p><em>Right adjoints are universal quantifiers</em>. We just use $\forall_p$ as symbols for the right adjoint of $p^{-1}$. $\text{Hom}(p^{-1}T,S) \simeq \text{Hom}(T, \forall_p S)$. This translates to $p^{-1} T\subseteq S \Leftrightarrow T\subseteq \forall_p S$, now $p^{-1}T\subseteq S$ means ‘if $p(x,y)\in T$ then $(x,y)\in S$’, i.e. ‘if $y \in T$ then $x\in X$ then $(x,y)\in S$, forall $x\in X$’ (<em>for all</em> is not necessary in the sentence)</p>
<h2 id="generalizing-to-arbitrary-morphism-and-topos">Generalizing to arbitrary morphism and Topos</h2>
<p><em>Arbitrary morphism</em>. Replacing the projection with arbitrary morphism $f:Z\rightarrow Y$, it can be proved in the same way that $\exists_f$, $\forall_f$ are left and right adjoints of the inverse image functor $f^{-1}: \mathcal{P}(Y) \rightarrow \mathcal{P}(Z)$, respectively.</p>
<p><em>Topos</em>. Let $f:Z\rightarrow Y$ be a morphism in a topos $\mathcal{T}$. The poset $\text{Sub}_\mathcal{T}(X)$ will take the role of $\mathcal{P}(X)$.</p>
<p><em>Natural isomorphism of subobject functor with a representable functor</em>. There is a natural isomorphism $\text{Sub}_\mathcal{T}(X)\simeq \text{Hom}_\mathcal{T}(X,\Omega)$, where $\Omega$ is the object of ’truth values’ in the definition of a subobject classifier. (For a proof see <em>Moerdjik, Mac Lane, p.33</em>; and all the conditions are in the definition of <em>elementary topos</em>, i.e. admitting a subobject classifier and all finite limits, see <em>op.cit., p.173</em>)</p>
<p><em>Currying (exponential transpose)</em>. $f:Z\rightarrow Y$ a morphism in $\mathcal{T}$, there is always a morphism of objects $\Omega^f: \Omega^Y \rightarrow \Omega^Z$. <em>Note</em>: $\Omega^X$ are denoted by $PX$ in <em>op.cit</em>.</p>
<p><em>Internally lef adjoint</em>. Let $Y,Z$ be objects in $\mathcal{E}$ and let $\phi: \Omega^Y \rightarrow \Omega^Z$ and $\psi: \Omega^Z \rightarrow \Omega^Y$ be morphisms. $\phi$ is said to be <em>internally left adjoint</em> to $\psi$ if $\forall A\in\mathcal{E}_0$, the maps $\phi_\ast = \phi \circ (\cdot),\psi_\ast = \psi \circ (\cdot)$ induced on Hom-sets form an adjoint pair, with $\phi_\ast \dashv \psi_\ast$..</p>
<p><em>Left and Right adjoints as quantifiers</em>. $f:Z\rightarrow Y$ a morphism in $\mathcal{E}$, then $\Omega^f : \Omega^Y \rightarrow \Omega^Z$ has internal left and right adjoints $\exists_f,\forall_f: \Omega^Z \rightarrow \Omega^Y$, respectly. This comes from the fact that the pullback (or inverse image) functor $(f\times \text{id})^{-1}: \text{Sub}_\mathcal{E}(Y\times A)\rightarrow \text{Sub}_\mathcal{E}(Z\times A)$ is natural in $A$ (it is constructed by pullback) and has left and right adjoints $\exists_{f\times \text{id}},\forall_{f\times \text{id}}$. Composing with the natural isomorphism $\text{Sub}_\mathcal{E} (\cdot \times A)\simeq \text{Hom}_\mathcal{E}(\cdot\times A,\Omega) \simeq \text{Hom}_\mathcal{E}(A,\Omega^{(\cdot)})$ we obtain the natural transformations $(\exists_f)_\ast,(\forall_f)_\ast : \text{Hom}_\mathcal{E}(\cdot,\Omega^Z)\rightarrow \text{Hom}_\mathcal{E}(\cdot,\Omega^Y)$.</p>
<p>From the adjoint pair $\exists_{f\times \text{id}} \dashv (f\times \text{id})^{-1} \dashv \exists_{f\times \text{id}}$ we get adjoint pairs $((\exists_f)_\ast)_A \dashv (\Omega^f)_A \dashv ((\forall_f)_\ast)_A$ for all $A$. The natural transformations $\text{Hom}_\mathcal{E}(\cdot,\Omega^Z) \rightarrow \text{Hom}_\mathcal{E}(\cdot,\Omega^Y)$ are in bijection with $\text{Hom}_\mathcal{E}(\Omega^Z,\Omega^Y)$,. So from $(\exists_f)_*$ and $(\forall_f)_\ast$ we obtain $\forall_f$ and $\exists_f$.</p>
Improvisations and Compositions
https://geistlib.xyz/improvisations_and_compositions/
Thu, 21 Jul 2022 04:18:23 +0200https://geistlib.xyz/improvisations_and_compositions/<div style="display: flex">
<div style="flex: 50%;">
<div id="Improvisations and Composition-2021"><h2 id="2021" class="header"><a href="#Improvisations and Composition-2021">2021</a></h2></div>
<ol>
<li>
<span id="Improvisations and Composition-2021-Part I"></span><strong id="Part I">Part I</strong>
<li>
<span id="Improvisations and Composition-2021-Part II"></span><strong id="Part II">Part II</strong>
<li>
Part III,1
<li>
Part III,2
<li>
Part IV
</ol>
<p>
<audio id="player" controls>
<source src="https://geistlib.xyz/playlist/2021.mp3" type="audio/mp3" />
</audio>
</p>
</div>
<div style="flex: 50%;">
<div id="Improvisations and Composition-2019"><h2 id="2019" class="header"><a href="#Improvisations and Composition-2019">2019 "Relique"</a></h2></div>
<ol>
<li>
<span id="Improvisations and Composition-2019-Part I,1"></span><strong id="Part I,1">Part I,1</strong>
<li>
<span id="Improvisations and Composition-2019-Part I,2"></span><strong id="Part I,2">Part I,2</strong>
<li>
<span id="Improvisations and Composition-2019-Part I,3"></span><strong id="Part I,3">Part I,3</strong>
<li>
Intermezzo
<li>
Part VI,1
<li>
Part VI,2
<li>
Elegy I from 2017
<li>
Elegy II from 2017
<li>
Finale
</ol>
<p>
<audio id="player" controls>
<source src="https://geistlib.xyz/playlist/2019.mp3" type="audio/mp3" />
</audio>
</p>
</div>
</div>
Password Manager
https://geistlib.xyz/password_manager/
Thu, 21 Jul 2022 03:39:59 +0200https://geistlib.xyz/password_manager/<p>A password manager written in <code>bash</code> （not <code>POSIX shell</code> but <code>bash</code>）. Requires <code>fzf</code> or <code>demnu</code> and such for fuzzy-finding the <code>STDIN</code> inputs and write the selected items tothe <code>STDOUT</code>. <code>password</code> encrypts and stores passwords via <code>pgp</code> in a <em>single</em> file (<code>PASSWORD_STORE</code>), upon query the file is decrypted to a temp file. The temp file will be deleted afterwards. This is a crude clones of <a href="https://github.com/dylanaraps/pas">pash</a>, written since I don’t want my id’s to be exposed as the names of the <code>.gpg</code> files. You will be able to upload the <code>PASSWORD_STORE</code> file to you e.g. github repository without exposing any of your account information. For instance, mine</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="ln"> 1</span><span class="cl">-----BEGIN PGP MESSAGE-----
</span></span><span class="line"><span class="ln"> 2</span><span class="cl">
</span></span><span class="line"><span class="ln"> 3</span><span class="cl">hQIMA21DdFXR20c9AQ/9FKArzUEDuN4YWBeINf+xiFePyx5V/rsAlSq+sQVs70Qb
</span></span><span class="line"><span class="ln"> 4</span><span class="cl">zxXu8fyL5iD/2YO7VLZdho/VOv1KeowtoANv5Ntb587SsUVxX5uhL/XQTy3BGj8f
</span></span><span class="line"><span class="ln"> 5</span><span class="cl">0AY8vMG4yzn5Njr/INkClxS5uPYcXN2/bNKz/fydNqJ4GTpb9a5L1SRYQLbqtFow
</span></span><span class="line"><span class="ln"> 6</span><span class="cl">rACv4C2YYttrW0XRRR48kohpFw9MaQ/i8Dq7Xo+LvIOWLodHf/AtGKJ/33TCplm5
</span></span><span class="line"><span class="ln"> 7</span><span class="cl">spG2p3Z/dnYcTcYL3XhiF/jMsPZY/P9UWDHvkUK6EFCUx2EVGe1d6G+rsQF+CH7a
</span></span><span class="line"><span class="ln"> 8</span><span class="cl">kE8QJsbZbQATvIfBDNxFtn3PKAK3VKChIEOWWWDorHa2JaqDjYMe1q1cQa7tb/Wj
</span></span><span class="line"><span class="ln"> 9</span><span class="cl">hkmI77zb9Uy7UNJKs4J8AGF8ButGbPptB0zxAStneJnKeiA2xb1ud8zwe+rG07pE
</span></span><span class="line"><span class="ln">10</span><span class="cl">XJcAKm23J1COU6rlk5p0i3iKPmBMnZ/zmidMXXB9iWFVSLrgnaDI0z+Jwqo//jLv
</span></span><span class="line"><span class="ln">11</span><span class="cl">ybkUlHxCMIjaW9YVtfaal2iEK09O84FeC59hY3/yHsV8whcQX3/fVjdeykjMZacT
</span></span><span class="line"><span class="ln">12</span><span class="cl">lKG79OTImAvzLYWOxcFjC1vBxK5qaOhRoTrzKvycoKWQHrmcDfPQV+tPA+9sNYPU
</span></span><span class="line"><span class="ln">13</span><span class="cl">VYEfIS8K7vNODvO7giL5jywbg0JPMh9EuVoQMi6G9nmZAV8lyVeG0QoNiy3SA5jS
</span></span><span class="line"><span class="ln">14</span><span class="cl">wQgBIvIOBfuPxhkdrH8ihGlZqWKDXawB6cUaYbp2ROSro2ucYmUW8MUdMCCaa6lf
</span></span><span class="line"><span class="ln">15</span><span class="cl">ucEBSygZWCAyGITxTsk9XVHXqKkiFzZOn3S/4hWmerNSdZO95eDz7l+QSGkTwQoZ
</span></span><span class="line"><span class="ln">16</span><span class="cl">Ykk6U6JWt7JQOb1fW4qjm3BLpkS170QD6aIOrsJZYxtNSEPDw4624gpat8lMRSTD
</span></span><span class="line"><span class="ln">17</span><span class="cl">oJkB9nPmQ+8ksc3ds0fFdAd4V6Yq5GQ3uG7XzwZgb3NyRLJ8vzHQ4vdGrEi3AT+n
</span></span><span class="line"><span class="ln">18</span><span class="cl">argR0S2N+qkMGGlNe8RX4VVslyf/dkzbRKg+jokw8Z3gULXE+mjeZGxTRYVNdkId
</span></span><span class="line"><span class="ln">19</span><span class="cl">CrRFa+bQ5ptjsfJkREoPIj/8XiFOJbnbtpmEIdi8GfChrYPhsa+PS7y22HNXsuPH
</span></span><span class="line"><span class="ln">20</span><span class="cl">/aRylJvAnP9rHc+1URSMFwYvMwtMwQClMfEFoBwc5jZIUUG+uUzFkL/cJqxtgQ0E
</span></span><span class="line"><span class="ln">21</span><span class="cl">vPLL9+NECg8oAOd29k8uEOuOGlly1038sWohohak7+0MXWMO6GZwonWspFONGeMF
</span></span><span class="line"><span class="ln">22</span><span class="cl">sUKhB8mVh5vcuhyROlFYi97MDJI7abbpm/cGhcHm2fsHwSK5rAQK1keb033rx+tj
</span></span><span class="line"><span class="ln">23</span><span class="cl">nuvFC45MKQEvf4//DrCgKd1oBmSqtGbybQg=
</span></span><span class="line"><span class="ln">24</span><span class="cl">=dune
</span></span><span class="line"><span class="ln">25</span><span class="cl">-----END PGP MESSAGE-----
</span></span></code></pre></div><ul>
<li><code>password</code> for query.</li>
<li><code>password n(ew)</code> to add new account. Passwords will be randomly generated.</li>
<li><code>password e(dit)</code> to edit the account information manually, e.g. to modify the password for already-existing accounts.</li>
<li><code>password h</code> for help.</li>
</ul>
<p>Note that</p>
<ul>
<li>The script utilizes <code>xclip</code> to write passwords <em>to the clipboard</em>. The clipboard will be <em>cleared</em> after 15 seconds. You should modified the function <code>pass_copy()</code> if you don’t want this behaviour.</li>
<li>When modifying passwords manually it would be better to avoid symbols like <code>"</code>.</li>
<li>When the script is executed through commands such as <code>xterm -e</code>, you need to use the commented <code>pass_copy()</code> function since the script will fail to write passowords to the clipboard.</li>
</ul>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln"> 1</span><span class="cl"><span class="cp">#!/usr/bin/env bash
</span></span></span><span class="line"><span class="ln"> 2</span><span class="cl"><span class="cp"></span>
</span></span><span class="line"><span class="ln"> 3</span><span class="cl"><span class="nb">set</span> -Eeuo pipefail
</span></span><span class="line"><span class="ln"> 4</span><span class="cl">
</span></span><span class="line"><span class="ln"> 5</span><span class="cl"><span class="nv">BIN_NAME</span><span class="o">=</span><span class="si">${</span><span class="nv">0</span><span class="p">##*/</span><span class="si">}</span>
</span></span><span class="line"><span class="ln"> 6</span><span class="cl"><span class="nv">MENU</span><span class="o">=</span><span class="si">${</span><span class="nv">PASSWORD_MENU</span><span class="k">:-</span><span class="nv">fzf</span><span class="si">}</span>
</span></span><span class="line"><span class="ln"> 7</span><span class="cl"><span class="nv">PASSWORD_STORE</span><span class="o">=</span><span class="si">${</span><span class="nv">PASSWORD_STORE</span><span class="k">:-</span><span class="nv">$HOME</span><span class="p">/.password</span><span class="si">}</span>
</span></span><span class="line"><span class="ln"> 8</span><span class="cl"><span class="nv">GREPPER</span><span class="o">=</span><span class="si">${</span><span class="nv">PASSWORD_GREPPER</span><span class="k">:-</span><span class="nv">grep</span><span class="si">}</span>
</span></span><span class="line"><span class="ln"> 9</span><span class="cl"><span class="nv">EDITOR</span><span class="o">=</span><span class="si">${</span><span class="nv">EDITOR</span><span class="k">:-</span><span class="nv">vim</span><span class="si">}</span>
</span></span><span class="line"><span class="ln"> 10</span><span class="cl"><span class="nv">PASS_LENGTH</span><span class="o">=</span><span class="si">${</span><span class="nv">PASSWORD_LENGTH</span><span class="k">:-</span><span class="nv">14</span><span class="si">}</span>
</span></span><span class="line"><span class="ln"> 11</span><span class="cl"><span class="nv">PASS_COPY</span><span class="o">=</span><span class="si">${</span><span class="nv">PASS_COPY</span><span class="p">:=xclip -selection clipboard</span><span class="si">}</span>
</span></span><span class="line"><span class="ln"> 12</span><span class="cl"><span class="nv">PASS_TIMEOUT_SEC</span><span class="o">=</span><span class="si">${</span><span class="nv">PASS_TIMEOUT</span><span class="p">:=15</span><span class="si">}</span>
</span></span><span class="line"><span class="ln"> 13</span><span class="cl">
</span></span><span class="line"><span class="ln"> 14</span><span class="cl">
</span></span><span class="line"><span class="ln"> 15</span><span class="cl"><span class="nb">umask</span> <span class="m">077</span>
</span></span><span class="line"><span class="ln"> 16</span><span class="cl"><span class="nv">TMP</span><span class="o">=</span><span class="sb">`</span>mktemp<span class="sb">`</span>
</span></span><span class="line"><span class="ln"> 17</span><span class="cl"><span class="nb">trap</span> <span class="s2">"[ -n "</span><span class="nv">$TMP</span><span class="s2">" ] && rm -f </span><span class="nv">$TMP</span><span class="s2">"</span> EXIT SIGHUP SIGINT SIGQUIT SIGKILL
</span></span><span class="line"><span class="ln"> 18</span><span class="cl">
</span></span><span class="line"><span class="ln"> 19</span><span class="cl">die<span class="o">(){</span>
</span></span><span class="line"><span class="ln"> 20</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"</span><span class="nv">$@</span><span class="s2">"</span> ><span class="p">&</span><span class="m">2</span>
</span></span><span class="line"><span class="ln"> 21</span><span class="cl"> <span class="nb">exit</span> <span class="m">1</span>
</span></span><span class="line"><span class="ln"> 22</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln"> 23</span><span class="cl">
</span></span><span class="line"><span class="ln"> 24</span><span class="cl">pass_copy<span class="o">(){</span>
</span></span><span class="line"><span class="ln"> 25</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"Clearing clipboard in </span><span class="nv">$PASS_TIMEOUT_SEC</span><span class="s2"> seconds."</span>
</span></span><span class="line"><span class="ln"> 26</span><span class="cl"> <span class="o">{</span>
</span></span><span class="line"><span class="ln"> 27</span><span class="cl"> sleep <span class="s2">"</span><span class="nv">$PASS_TIMEOUT_SEC</span><span class="s2">"</span> <span class="o">||</span> <span class="nb">kill</span> <span class="m">0</span>
</span></span><span class="line"><span class="ln"> 28</span><span class="cl"> setsid <span class="nv">$PASS_COPY</span> </dev/null
</span></span><span class="line"><span class="ln"> 29</span><span class="cl"> <span class="o">}</span> <span class="p">&</span>
</span></span><span class="line"><span class="ln"> 30</span><span class="cl"> <span class="nv">$PASS_COPY</span> <span class="o"><<<</span> <span class="s2">"</span><span class="nv">$1</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln"> 31</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln"> 32</span><span class="cl">
</span></span><span class="line"><span class="ln"> 33</span><span class="cl"><span class="c1">#</span>
</span></span><span class="line"><span class="ln"> 34</span><span class="cl"><span class="c1">#pass_copy(){</span>
</span></span><span class="line"><span class="ln"> 35</span><span class="cl"><span class="c1"># $PASS_COPY <<< "$1"</span>
</span></span><span class="line"><span class="ln"> 36</span><span class="cl"><span class="c1"># echo "Clearing clipboard in $PASS_TIMEOUT_SEC seconds."</span>
</span></span><span class="line"><span class="ln"> 37</span><span class="cl"><span class="c1"># setsid clearclip $PASS_TIMEOUT_SEC &</span>
</span></span><span class="line"><span class="ln"> 38</span><span class="cl"><span class="c1">#}</span>
</span></span><span class="line"><span class="ln"> 39</span><span class="cl"><span class="c1">#</span>
</span></span><span class="line"><span class="ln"> 40</span><span class="cl"><span class="c1"># with</span>
</span></span><span class="line"><span class="ln"> 41</span><span class="cl"><span class="c1">#</span>
</span></span><span class="line"><span class="ln"> 42</span><span class="cl"><span class="c1"># clearclip</span>
</span></span><span class="line"><span class="ln"> 43</span><span class="cl"><span class="c1">#</span>
</span></span><span class="line"><span class="ln"> 44</span><span class="cl"><span class="c1"># #!/usr/bin/env sh</span>
</span></span><span class="line"><span class="ln"> 45</span><span class="cl"><span class="c1">#</span>
</span></span><span class="line"><span class="ln"> 46</span><span class="cl"><span class="c1"># sleep $1</span>
</span></span><span class="line"><span class="ln"> 47</span><span class="cl"><span class="c1"># xsel -c -b</span>
</span></span><span class="line"><span class="ln"> 48</span><span class="cl">
</span></span><span class="line"><span class="ln"> 49</span><span class="cl">
</span></span><span class="line"><span class="ln"> 50</span><span class="cl">get_pass<span class="o">(){</span>
</span></span><span class="line"><span class="ln"> 51</span><span class="cl"> gpg -d <span class="nv">$PASSWORD_STORE</span> 2>/dev/null > <span class="nv">$TMP</span>
</span></span><span class="line"><span class="ln"> 52</span><span class="cl"> <span class="nb">local</span> <span class="nv">chosen</span><span class="o">=</span><span class="k">$(</span>awk <span class="s1">'{print $1 "\t" $2 "\t\t" $5}'</span> < <span class="nv">$TMP</span> <span class="p">|</span> <span class="nv">$MENU</span> <span class="p">|</span> awk <span class="s1">'{print $1}'</span> <span class="k">)</span>
</span></span><span class="line"><span class="ln"> 53</span><span class="cl"> <span class="o">[</span> -z <span class="s2">"</span><span class="nv">$chosen</span><span class="s2">"</span> <span class="o">]</span> <span class="o">&&</span> die <span class="s2">"Nothing chosen"</span>
</span></span><span class="line"><span class="ln"> 54</span><span class="cl"> <span class="nb">local</span> <span class="nv">pass</span><span class="o">=</span><span class="k">$(</span><span class="nv">$GREPPER</span> ^<span class="s2">"</span><span class="nv">$chosen</span><span class="s2">"</span> < <span class="nv">$TMP</span> <span class="p">|</span> awk <span class="s1">'{print $4}'</span> <span class="k">)</span>
</span></span><span class="line"><span class="ln"> 55</span><span class="cl"> pass_copy <span class="s2">"</span><span class="nv">$pass</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln"> 56</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln"> 57</span><span class="cl">
</span></span><span class="line"><span class="ln"> 58</span><span class="cl">get_username<span class="o">(){</span>
</span></span><span class="line"><span class="ln"> 59</span><span class="cl"> gpg -d <span class="nv">$PASSWORD_STORE</span> 2>/dev/null > <span class="nv">$TMP</span>
</span></span><span class="line"><span class="ln"> 60</span><span class="cl"> <span class="nb">local</span> <span class="nv">chosen</span><span class="o">=</span><span class="k">$(</span>awk <span class="s1">'{print $1 "\t" $2 "\t\t" $5}'</span> < <span class="nv">$TMP</span> <span class="p">|</span> <span class="nv">$MENU</span> <span class="p">|</span> awk <span class="s1">'{print $1}'</span> <span class="k">)</span>
</span></span><span class="line"><span class="ln"> 61</span><span class="cl"> <span class="o">[</span> -z <span class="s2">"</span><span class="nv">$chosen</span><span class="s2">"</span> <span class="o">]</span> <span class="o">&&</span> die <span class="s2">"Nothing chosen"</span>
</span></span><span class="line"><span class="ln"> 62</span><span class="cl"> <span class="nb">local</span> <span class="nv">name</span><span class="o">=</span><span class="k">$(</span><span class="nv">$GREPPER</span> ^<span class="s2">"</span><span class="nv">$chosen</span><span class="s2">"</span> < <span class="nv">$TMP</span> <span class="p">|</span> awk <span class="s1">'{print $3}'</span> <span class="k">)</span>
</span></span><span class="line"><span class="ln"> 63</span><span class="cl"> pass_copy <span class="s2">"</span><span class="nv">$name</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln"> 64</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln"> 65</span><span class="cl">
</span></span><span class="line"><span class="ln"> 66</span><span class="cl">get_all<span class="o">(){</span>
</span></span><span class="line"><span class="ln"> 67</span><span class="cl"> gpg -d <span class="nv">$PASSWORD_STORE</span> 2>/dev/null > <span class="nv">$TMP</span>
</span></span><span class="line"><span class="ln"> 68</span><span class="cl"> <span class="nb">local</span> <span class="nv">chosen</span><span class="o">=</span><span class="k">$(</span>awk <span class="s1">'{print $1 "\t" $2 "\t\t" $5}'</span> < <span class="nv">$TMP</span> <span class="p">|</span> <span class="nv">$MENU</span> <span class="p">|</span> awk <span class="s1">'{print $1}'</span> <span class="k">)</span>
</span></span><span class="line"><span class="ln"> 69</span><span class="cl"> <span class="o">[</span> -z <span class="s2">"</span><span class="nv">$chosen</span><span class="s2">"</span> <span class="o">]</span> <span class="o">&&</span> die <span class="s2">"Nothing chosen"</span>
</span></span><span class="line"><span class="ln"> 70</span><span class="cl"> <span class="nb">local</span> <span class="nv">all</span><span class="o">=</span><span class="k">$(</span><span class="nv">$GREPPER</span> ^<span class="s2">"</span><span class="nv">$chosen</span><span class="s2">"</span> < <span class="nv">$TMP</span> <span class="p">|</span> awk <span class="s1">'{print $3"\n"$4}'</span> <span class="k">)</span>
</span></span><span class="line"><span class="ln"> 71</span><span class="cl"> <span class="nb">echo</span> <span class="nv">$all</span> <span class="p">|</span> awk <span class="s1">'{print $1}'</span>
</span></span><span class="line"><span class="ln"> 72</span><span class="cl"> <span class="nb">local</span> <span class="nv">pass</span><span class="o">=</span><span class="s2">"</span><span class="k">$(</span><span class="nb">echo</span> <span class="nv">$all</span> <span class="p">|</span> awk <span class="s1">'{print $2}'</span><span class="k">)</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln"> 73</span><span class="cl"> pass_copy <span class="s2">"</span><span class="nv">$pass</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln"> 74</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln"> 75</span><span class="cl">
</span></span><span class="line"><span class="ln"> 76</span><span class="cl">edit_pass<span class="o">(){</span>
</span></span><span class="line"><span class="ln"> 77</span><span class="cl"> gpg -d <span class="nv">$PASSWORD_STORE</span> 2>/dev/null > <span class="nv">$TMP</span>
</span></span><span class="line"><span class="ln"> 78</span><span class="cl"> <span class="nv">$EDITOR</span> <span class="nv">$TMP</span>
</span></span><span class="line"><span class="ln"> 79</span><span class="cl"> gpg -ae < <span class="nv">$TMP</span> > <span class="nv">$PASSWORD_STORE</span>
</span></span><span class="line"><span class="ln"> 80</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln"> 81</span><span class="cl">
</span></span><span class="line"><span class="ln"> 82</span><span class="cl">show<span class="o">(){</span>
</span></span><span class="line"><span class="ln"> 83</span><span class="cl"> gpg -d <span class="nv">$PASSWORD_STORE</span> 2>/dev/null
</span></span><span class="line"><span class="ln"> 84</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln"> 85</span><span class="cl">
</span></span><span class="line"><span class="ln"> 86</span><span class="cl">gen_pass<span class="o">(){</span>
</span></span><span class="line"><span class="ln"> 87</span><span class="cl"> <span class="nv">LC_ALL</span><span class="o">=</span>C </dev/urandom tr -dc <span class="s1">'1234567890!@#$%^&*(){}[]qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM'</span> <span class="p">|</span> head -c<span class="nv">$PASS_LENGTH</span> <span class="p">;</span> <span class="nb">echo</span> <span class="s2">""</span>
</span></span><span class="line"><span class="ln"> 88</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln"> 89</span><span class="cl">
</span></span><span class="line"><span class="ln"> 90</span><span class="cl">
</span></span><span class="line"><span class="ln"> 91</span><span class="cl">new_pass<span class="o">(){</span>
</span></span><span class="line"><span class="ln"> 92</span><span class="cl"> gpg -d <span class="nv">$PASSWORD_STORE</span> 2>/dev/null > <span class="nv">$TMP</span>
</span></span><span class="line"><span class="ln"> 93</span><span class="cl"> <span class="nb">local</span> uid
</span></span><span class="line"><span class="ln"> 94</span><span class="cl"> <span class="nb">local</span> name
</span></span><span class="line"><span class="ln"> 95</span><span class="cl"> <span class="nb">local</span> tag
</span></span><span class="line"><span class="ln"> 96</span><span class="cl"> <span class="nb">local</span> pass
</span></span><span class="line"><span class="ln"> 97</span><span class="cl"> <span class="nb">local</span> addi
</span></span><span class="line"><span class="ln"> 98</span><span class="cl"> <span class="nb">read</span> -p <span class="s2">"Tag (without space):"</span> tag
</span></span><span class="line"><span class="ln"> 99</span><span class="cl"> <span class="o">[</span> -z <span class="s2">"</span><span class="nv">$tag</span><span class="s2">"</span> <span class="o">]</span> <span class="o">&&</span> die <span class="s2">"No tag specified"</span>
</span></span><span class="line"><span class="ln">100</span><span class="cl"> <span class="o">[</span> -n <span class="s2">"</span><span class="k">$(</span><span class="nb">echo</span> <span class="nv">$tag</span> <span class="p">|</span> awk <span class="s1">'{print $2}'</span><span class="k">)</span><span class="s2">"</span> <span class="o">]</span> <span class="o">&&</span> die <span class="s2">"No space allowed"</span>
</span></span><span class="line"><span class="ln">101</span><span class="cl"> <span class="nb">echo</span>
</span></span><span class="line"><span class="ln">102</span><span class="cl"> <span class="nb">read</span> -p <span class="s2">"Username (without space) :"</span> name
</span></span><span class="line"><span class="ln">103</span><span class="cl"> <span class="o">[</span> -z <span class="s2">"</span><span class="nv">$name</span><span class="s2">"</span> <span class="o">]</span> <span class="o">&&</span> die <span class="s2">"No username specified"</span>
</span></span><span class="line"><span class="ln">104</span><span class="cl"> <span class="o">[</span> -n <span class="s2">"</span><span class="k">$(</span><span class="nb">echo</span> <span class="nv">$name</span> <span class="p">|</span> awk <span class="s1">'{print $2}'</span><span class="k">)</span><span class="s2">"</span> <span class="o">]</span> <span class="o">&&</span> die <span class="s2">"No space allowed"</span>
</span></span><span class="line"><span class="ln">105</span><span class="cl"> <span class="nb">echo</span>
</span></span><span class="line"><span class="ln">106</span><span class="cl"> <span class="nb">read</span> -p <span class="s2">"Additional info (only the first word will be printed when querying):"</span> addi
</span></span><span class="line"><span class="ln">107</span><span class="cl"> <span class="nb">echo</span>
</span></span><span class="line"><span class="ln">108</span><span class="cl"> <span class="nv">pass</span><span class="o">=</span><span class="k">$(</span>gen_pass<span class="k">)</span>
</span></span><span class="line"><span class="ln">109</span><span class="cl"> <span class="nv">uid</span><span class="o">=</span><span class="k">$(</span><span class="nb">echo</span> <span class="s2">"</span><span class="nv">$tag</span><span class="s2"> </span><span class="nv">$name</span><span class="s2"> </span><span class="nv">$pass</span><span class="s2"> </span><span class="nv">$addi</span><span class="s2">"</span> <span class="p">|</span> md5sum <span class="p">|</span> head -c5<span class="k">)</span>
</span></span><span class="line"><span class="ln">110</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"</span><span class="nv">$uid</span><span class="s2"> </span><span class="nv">$tag</span><span class="s2"> </span><span class="nv">$name</span><span class="s2"> </span><span class="nv">$pass</span><span class="s2"> </span><span class="nv">$addi</span><span class="s2">"</span> >> <span class="nv">$TMP</span>
</span></span><span class="line"><span class="ln">111</span><span class="cl"> gpg -ae < <span class="nv">$TMP</span> > <span class="nv">$PASSWORD_STORE</span>
</span></span><span class="line"><span class="ln">112</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"New account information stored as"</span>
</span></span><span class="line"><span class="ln">113</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"</span><span class="nv">$uid</span><span class="s2"> </span><span class="nv">$tag</span><span class="s2"> </span><span class="nv">$name</span><span class="s2"> PASSWORD </span><span class="nv">$addi</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">114</span><span class="cl"> pass_copy <span class="s2">"</span><span class="nv">$pass</span><span class="s2">"</span> <span class="o">&&</span> <span class="nb">echo</span> <span class="s2">"Password copied to the clipboard"</span>
</span></span><span class="line"><span class="ln">115</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">116</span><span class="cl">
</span></span><span class="line"><span class="ln">117</span><span class="cl">help<span class="o">(){</span>
</span></span><span class="line"><span class="ln">118</span><span class="cl">cat <span class="s"><<EOF
</span></span></span><span class="line"><span class="ln">119</span><span class="cl"><span class="s">password file format:
</span></span></span><span class="line"><span class="ln">120</span><span class="cl"><span class="s"> UID TAG USERNAME PASSWORD ADDITIONAL_INFO
</span></span></span><span class="line"><span class="ln">121</span><span class="cl"><span class="s"> - Ensure that UIDs do not coincide when editing the password file by hand.
</span></span></span><span class="line"><span class="ln">122</span><span class="cl"><span class="s"> - Except for the last one, all the fields should be free from blank spaces.
</span></span></span><span class="line"><span class="ln">123</span><span class="cl"><span class="s"> - Only the first column of the ADDITIONAL_INFO field will be printed when querying.
</span></span></span><span class="line"><span class="ln">124</span><span class="cl"><span class="s"> - To check all the information stored use $BIN_NAME show | grep ^<UID>.
</span></span></span><span class="line"><span class="ln">125</span><span class="cl"><span class="s">
</span></span></span><span class="line"><span class="ln">126</span><span class="cl"><span class="s"> $BIN_NAME h[elp] Show this help message
</span></span></span><span class="line"><span class="ln">127</span><span class="cl"><span class="s"> $BIN_NAME e[dit] Edit the password file
</span></span></span><span class="line"><span class="ln">128</span><span class="cl"><span class="s"> $BIN_NAME a[ll] Get username and password (username will be printed and password will be copied)
</span></span></span><span class="line"><span class="ln">129</span><span class="cl"><span class="s"> $BIN_NAME i[d] Get username
</span></span></span><span class="line"><span class="ln">130</span><span class="cl"><span class="s"> $BIN_NAME n[ew] Add a new account
</span></span></span><span class="line"><span class="ln">131</span><span class="cl"><span class="s"> $BIN_NAME s[how] Decrypt and show the password-store file
</span></span></span><span class="line"><span class="ln">132</span><span class="cl"><span class="s"> $BIN_NAME Get password
</span></span></span><span class="line"><span class="ln">133</span><span class="cl"><span class="s">EOF</span>
</span></span><span class="line"><span class="ln">134</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">135</span><span class="cl">
</span></span><span class="line"><span class="ln">136</span><span class="cl"><span class="k">case</span> <span class="si">${</span><span class="nv">1</span><span class="p">-default</span><span class="si">}</span> in
</span></span><span class="line"><span class="ln">137</span><span class="cl"> e*<span class="o">)</span> edit_pass <span class="p">;;</span>
</span></span><span class="line"><span class="ln">138</span><span class="cl"> i*<span class="o">)</span> get_username <span class="p">;;</span>
</span></span><span class="line"><span class="ln">139</span><span class="cl"> a*<span class="o">)</span> get_all <span class="p">;;</span>
</span></span><span class="line"><span class="ln">140</span><span class="cl"> n* <span class="o">)</span> new_pass <span class="p">;;</span>
</span></span><span class="line"><span class="ln">141</span><span class="cl"> s* <span class="o">)</span> show <span class="p">;;</span>
</span></span><span class="line"><span class="ln">142</span><span class="cl"> <span class="s2">"default"</span> <span class="o">)</span> get_pass <span class="p">;;</span>
</span></span><span class="line"><span class="ln">143</span><span class="cl"> * <span class="o">)</span> <span class="nb">help</span> <span class="p">;;</span>
</span></span><span class="line"><span class="ln">144</span><span class="cl"><span class="k">esac</span>
</span></span></code></pre></div>Runit Service Listing
https://geistlib.xyz/runit-service-listing/
Thu, 21 Jul 2022 03:37:12 +0200https://geistlib.xyz/runit-service-listing/<p>User specified services are in <code>/usr/local/etc/runsvdir-$USER</code>. Note that the formatting is for POSIX shell. Bash requires escaping <code>echo</code>s, i.e. <code>echo -> echo -e</code>, to work properly.</p>
<h2 id="listing">Listing</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln"> 1</span><span class="cl"><span class="cp">#!/bin/sh
</span></span></span><span class="line"><span class="ln"> 2</span><span class="cl"><span class="cp"></span>
</span></span><span class="line"><span class="ln"> 3</span><span class="cl"><span class="nv">GREEN</span><span class="o">=</span><span class="s1">'\033[0;32m'</span>
</span></span><span class="line"><span class="ln"> 4</span><span class="cl"><span class="nv">CYAN</span><span class="o">=</span><span class="s1">'\033[0;36m'</span>
</span></span><span class="line"><span class="ln"> 5</span><span class="cl"><span class="nv">NC</span><span class="o">=</span><span class="s1">'\033[0m'</span>
</span></span><span class="line"><span class="ln"> 6</span><span class="cl">
</span></span><span class="line"><span class="ln"> 7</span><span class="cl"><span class="nv">SYS_SVDIR</span><span class="o">=</span><span class="s2">"/etc/runit/sv"</span>
</span></span><span class="line"><span class="ln"> 8</span><span class="cl"><span class="nv">SYS_RUNSVDIR</span><span class="o">=</span><span class="s2">"/run/runit/service"</span>
</span></span><span class="line"><span class="ln"> 9</span><span class="cl"><span class="nv">USER_RUNSVDIR</span><span class="o">=</span><span class="s2">"/usr/local/etc/runsvdir-</span><span class="nv">$USER</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">10</span><span class="cl"><span class="nv">USER_SVDIR</span><span class="o">=</span><span class="s2">"/usr/local/etc/svdir-</span><span class="nv">$USER</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">11</span><span class="cl">
</span></span><span class="line"><span class="ln">12</span><span class="cl"><span class="nv">BIN_NAME</span><span class="o">=</span><span class="si">${</span><span class="nv">0</span><span class="p">##*/</span><span class="si">}</span>
</span></span><span class="line"><span class="ln">13</span><span class="cl">
</span></span><span class="line"><span class="ln">14</span><span class="cl">list_all<span class="o">(){</span>
</span></span><span class="line"><span class="ln">15</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">SYSTEM:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">16</span><span class="cl"> ls -1 <span class="nv">$SYS_SVDIR</span>
</span></span><span class="line"><span class="ln">17</span><span class="cl">
</span></span><span class="line"><span class="ln">18</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"\n</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">USER:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">19</span><span class="cl"> ls -1 <span class="nv">$USER_SVDIR</span>
</span></span><span class="line"><span class="ln">20</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">21</span><span class="cl">
</span></span><span class="line"><span class="ln">22</span><span class="cl">all_status<span class="o">(){</span>
</span></span><span class="line"><span class="ln">23</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">SYSTEM:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">24</span><span class="cl"> sudo sv status <span class="nv">$SYS_RUNSVDIR</span>/*
</span></span><span class="line"><span class="ln">25</span><span class="cl">
</span></span><span class="line"><span class="ln">26</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"\n</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">USER:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">27</span><span class="cl"> sv status <span class="nv">$USER_RUNSVDIR</span>/*
</span></span><span class="line"><span class="ln">28</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">29</span><span class="cl">
</span></span><span class="line"><span class="ln">30</span><span class="cl">list_running<span class="o">(){</span>
</span></span><span class="line"><span class="ln">31</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">SYSTEM:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">32</span><span class="cl"> sudo fd pid <span class="nv">$SYS_RUNSVDIR</span> -t f -L <span class="p">|</span> sudo xargs cat <span class="p">|</span> xargs ps -fp
</span></span><span class="line"><span class="ln">33</span><span class="cl">
</span></span><span class="line"><span class="ln">34</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"\n</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">USER:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">35</span><span class="cl"> fd pid <span class="nv">$USER_RUNSVDIR</span> -t f -L <span class="p">|</span> xargs cat <span class="p">|</span> xargs ps -fp 2>/dev/null
</span></span><span class="line"><span class="ln">36</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">37</span><span class="cl">
</span></span><span class="line"><span class="ln">38</span><span class="cl">list_supervised<span class="o">(){</span>
</span></span><span class="line"><span class="ln">39</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">SYSTEM:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">40</span><span class="cl"> ls -1 <span class="nv">$SYS_RUNSVDIR</span>
</span></span><span class="line"><span class="ln">41</span><span class="cl">
</span></span><span class="line"><span class="ln">42</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"\n</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">USER:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">43</span><span class="cl"> ls -1 <span class="nv">$USER_RUNSVDIR</span>
</span></span><span class="line"><span class="ln">44</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">45</span><span class="cl">
</span></span><span class="line"><span class="ln">46</span><span class="cl">list_disabled<span class="o">(){</span>
</span></span><span class="line"><span class="ln">47</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">SYSTEM:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">48</span><span class="cl"> sudo fd down <span class="nv">$SYS_RUNSVDIR</span> -t f -L <span class="p">|</span> awk -F/ <span class="s1">'{print $(NF-1)}'</span>
</span></span><span class="line"><span class="ln">49</span><span class="cl">
</span></span><span class="line"><span class="ln">50</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"\n</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">USER:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">51</span><span class="cl"> fd down <span class="nv">$USER_RUNSVDIR</span> -t f -L <span class="p">|</span> awk -F/ <span class="s1">'{print $(NF-1)}'</span>
</span></span><span class="line"><span class="ln">52</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">53</span><span class="cl">
</span></span><span class="line"><span class="ln">54</span><span class="cl">list_not_supervised<span class="o">(){</span>
</span></span><span class="line"><span class="ln">55</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">SYSTEM:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">56</span><span class="cl"> ls -1 <span class="nv">$SYS_RUNSVDIR</span> <span class="nv">$SYS_SVDIR</span> <span class="p">|</span> grep -v : <span class="p">|</span> sort <span class="p">|</span> uniq -u
</span></span><span class="line"><span class="ln">57</span><span class="cl">
</span></span><span class="line"><span class="ln">58</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"\n</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">USER:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">59</span><span class="cl"> ls -1 <span class="nv">$USER_SVDIR</span> <span class="nv">$USER_RUNSVDIR</span> <span class="p">|</span> grep -v : <span class="p">|</span> sort <span class="p">|</span> uniq -u
</span></span><span class="line"><span class="ln">60</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">61</span><span class="cl">
</span></span><span class="line"><span class="ln">62</span><span class="cl">list_stopped<span class="o">(){</span>
</span></span><span class="line"><span class="ln">63</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">SYSTEM:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">64</span><span class="cl"> sudo fd pid <span class="nv">$SYS_RUNSVDIR</span> -t f -L <span class="p">|</span> sudo xargs -I <span class="o">{}</span> sh -c <span class="s2">"[ ! -s {} ] && echo {}"</span> <span class="p">|</span> awk -F/ <span class="s1">'{print $(NF-2)}'</span>
</span></span><span class="line"><span class="ln">65</span><span class="cl">
</span></span><span class="line"><span class="ln">66</span><span class="cl">
</span></span><span class="line"><span class="ln">67</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"\n</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">USER:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">68</span><span class="cl"> fd pid <span class="nv">$USER_RUNSVDIR</span> -t f -L <span class="p">|</span> xargs -I <span class="o">{}</span> sh -c <span class="s2">"[ ! -s {} ] && echo {}"</span> <span class="p">|</span> awk -F/ <span class="s1">'{print $(NF-2)}'</span>
</span></span><span class="line"><span class="ln">69</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">70</span><span class="cl">
</span></span><span class="line"><span class="ln">71</span><span class="cl">help<span class="o">(){</span>
</span></span><span class="line"><span class="ln">72</span><span class="cl">cat <span class="s"><<EOF
</span></span></span><span class="line"><span class="ln">73</span><span class="cl"><span class="s"> $BIN_NAME r running
</span></span></span><span class="line"><span class="ln">74</span><span class="cl"><span class="s"> $BIN_NAME s down(stopped)
</span></span></span><span class="line"><span class="ln">75</span><span class="cl"><span class="s">
</span></span></span><span class="line"><span class="ln">76</span><span class="cl"><span class="s"> $BIN_NAME a all
</span></span></span><span class="line"><span class="ln">77</span><span class="cl"><span class="s">
</span></span></span><span class="line"><span class="ln">78</span><span class="cl"><span class="s"> $BIN_NAME u supervised
</span></span></span><span class="line"><span class="ln">79</span><span class="cl"><span class="s"> $BIN_NAME n not supervised
</span></span></span><span class="line"><span class="ln">80</span><span class="cl"><span class="s"> $BIN_NAME d disabled(not auto starting)
</span></span></span><span class="line"><span class="ln">81</span><span class="cl"><span class="s"> $BIN_NAME z show status of all supervised services
</span></span></span><span class="line"><span class="ln">82</span><span class="cl"><span class="s">EOF</span>
</span></span><span class="line"><span class="ln">83</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">84</span><span class="cl">
</span></span><span class="line"><span class="ln">85</span><span class="cl"><span class="k">case</span> <span class="nv">$1</span> in
</span></span><span class="line"><span class="ln">86</span><span class="cl"> r*<span class="o">)</span> list_running <span class="p">;;</span>
</span></span><span class="line"><span class="ln">87</span><span class="cl"> d*<span class="o">)</span> list_disabled <span class="p">;;</span>
</span></span><span class="line"><span class="ln">88</span><span class="cl"> u*<span class="o">)</span> list_supervised <span class="p">;;</span>
</span></span><span class="line"><span class="ln">89</span><span class="cl"> a*<span class="o">)</span> list_all <span class="p">;;</span>
</span></span><span class="line"><span class="ln">90</span><span class="cl"> n*<span class="o">)</span> list_not_supervised <span class="p">;;</span>
</span></span><span class="line"><span class="ln">91</span><span class="cl"> s*<span class="o">)</span> list_stopped <span class="p">;;</span>
</span></span><span class="line"><span class="ln">92</span><span class="cl"> z*<span class="o">)</span> all_status <span class="p">;;</span>
</span></span><span class="line"><span class="ln">93</span><span class="cl"> *<span class="o">)</span> <span class="nb">help</span> <span class="p">;;</span>
</span></span><span class="line"><span class="ln">94</span><span class="cl"><span class="k">esac</span>
</span></span></code></pre></div><p>The following implementation uses <code>find</code> instead of <code>fd</code></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln"> 1</span><span class="cl"><span class="cp">#!/bin/sh
</span></span></span><span class="line"><span class="ln"> 2</span><span class="cl"><span class="cp"></span>
</span></span><span class="line"><span class="ln"> 3</span><span class="cl"><span class="nv">GREEN</span><span class="o">=</span><span class="s1">'\033[0;32m'</span>
</span></span><span class="line"><span class="ln"> 4</span><span class="cl"><span class="nv">CYAN</span><span class="o">=</span><span class="s1">'\033[0;36m'</span>
</span></span><span class="line"><span class="ln"> 5</span><span class="cl"><span class="nv">NC</span><span class="o">=</span><span class="s1">'\033[0m'</span>
</span></span><span class="line"><span class="ln"> 6</span><span class="cl">
</span></span><span class="line"><span class="ln"> 7</span><span class="cl"><span class="nv">SYS_SVDIR</span><span class="o">=</span><span class="s2">"/etc/runit/sv"</span>
</span></span><span class="line"><span class="ln"> 8</span><span class="cl"><span class="nv">SYS_RUNSVDIR</span><span class="o">=</span><span class="s2">"/run/runit/service"</span>
</span></span><span class="line"><span class="ln"> 9</span><span class="cl"><span class="nv">USER_RUNSVDIR</span><span class="o">=</span><span class="s2">"/usr/local/etc/runsvdir-</span><span class="nv">$USER</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">10</span><span class="cl"><span class="nv">USER_SVDIR</span><span class="o">=</span><span class="s2">"/usr/local/etc/svdir-</span><span class="nv">$USER</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">11</span><span class="cl">
</span></span><span class="line"><span class="ln">12</span><span class="cl"><span class="nv">BIN_NAME</span><span class="o">=</span><span class="si">${</span><span class="nv">0</span><span class="p">##*/</span><span class="si">}</span>
</span></span><span class="line"><span class="ln">13</span><span class="cl">
</span></span><span class="line"><span class="ln">14</span><span class="cl">list_all<span class="o">(){</span>
</span></span><span class="line"><span class="ln">15</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">SYSTEM:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">16</span><span class="cl"> ls -1 <span class="nv">$SYS_SVDIR</span>
</span></span><span class="line"><span class="ln">17</span><span class="cl">
</span></span><span class="line"><span class="ln">18</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"\n</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">USER:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">19</span><span class="cl"> ls -1 <span class="nv">$USER_SVDIR</span>
</span></span><span class="line"><span class="ln">20</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">21</span><span class="cl">
</span></span><span class="line"><span class="ln">22</span><span class="cl">all_status<span class="o">(){</span>
</span></span><span class="line"><span class="ln">23</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">SYSTEM:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">24</span><span class="cl"> sudo sv status <span class="nv">$SYS_RUNSVDIR</span>/*
</span></span><span class="line"><span class="ln">25</span><span class="cl">
</span></span><span class="line"><span class="ln">26</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"\n</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">USER:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">27</span><span class="cl"> sv status <span class="nv">$USER_RUNSVDIR</span>/*
</span></span><span class="line"><span class="ln">28</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">29</span><span class="cl">
</span></span><span class="line"><span class="ln">30</span><span class="cl">list_running<span class="o">(){</span>
</span></span><span class="line"><span class="ln">31</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">SYSTEM:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">32</span><span class="cl"> sudo find -L <span class="nv">$SYS_RUNSVDIR</span> -type f -name pid <span class="p">|</span> sudo xargs cat <span class="p">|</span> xargs ps -fp
</span></span><span class="line"><span class="ln">33</span><span class="cl">
</span></span><span class="line"><span class="ln">34</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"\n</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">USER:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">35</span><span class="cl"> find -L <span class="nv">$USER_RUNSVDIR</span> -type f -name pid <span class="p">|</span> xargs cat <span class="p">|</span> xargs ps -fp
</span></span><span class="line"><span class="ln">36</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">37</span><span class="cl">
</span></span><span class="line"><span class="ln">38</span><span class="cl">list_supervised<span class="o">(){</span>
</span></span><span class="line"><span class="ln">39</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">SYSTEM:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">40</span><span class="cl"> ls -1 <span class="nv">$SYS_RUNSVDIR</span>
</span></span><span class="line"><span class="ln">41</span><span class="cl">
</span></span><span class="line"><span class="ln">42</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"\n</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">USER:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">43</span><span class="cl"> ls -1 <span class="nv">$USER_RUNSVDIR</span>
</span></span><span class="line"><span class="ln">44</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">45</span><span class="cl">
</span></span><span class="line"><span class="ln">46</span><span class="cl">list_not_supervised<span class="o">(){</span>
</span></span><span class="line"><span class="ln">47</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">SYSTEM:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">48</span><span class="cl"> ls -1 <span class="nv">$SYS_RUNSVDIR</span> <span class="nv">$SYS_SVDIR</span> <span class="p">|</span> grep -v : <span class="p">|</span> sort <span class="p">|</span> uniq -u
</span></span><span class="line"><span class="ln">49</span><span class="cl">
</span></span><span class="line"><span class="ln">50</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"\n</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">USER:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">51</span><span class="cl"> ls -1 <span class="nv">$USER_SVDIR</span> <span class="nv">$USER_RUNSVDIR</span> <span class="p">|</span> grep -v : <span class="p">|</span> sort <span class="p">|</span> uniq -u
</span></span><span class="line"><span class="ln">52</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">53</span><span class="cl">
</span></span><span class="line"><span class="ln">54</span><span class="cl">list_disabled<span class="o">(){</span>
</span></span><span class="line"><span class="ln">55</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">SYSTEM:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">56</span><span class="cl"> sudo find -L <span class="nv">$SYS_RUNSVDIR</span> -type f -name down <span class="p">|</span> awk -F/ <span class="s1">'{print $(NF-1)}'</span>
</span></span><span class="line"><span class="ln">57</span><span class="cl">
</span></span><span class="line"><span class="ln">58</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"\n</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">USER:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">59</span><span class="cl"> find -L <span class="nv">$USER_RUNSVDIR</span> -type f -name down <span class="p">|</span> awk -F/ <span class="s1">'{print $(NF-1)}'</span>
</span></span><span class="line"><span class="ln">60</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">61</span><span class="cl">
</span></span><span class="line"><span class="ln">62</span><span class="cl">list_stopped<span class="o">(){</span>
</span></span><span class="line"><span class="ln">63</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">SYSTEM:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">64</span><span class="cl"> sudo find -L <span class="nv">$SYS_RUNSVDIR</span> -type f -name pid<span class="p">|</span> sudo xargs -I <span class="o">{}</span> sh -c <span class="s2">"[ ! -s {} ] && echo {}"</span> <span class="p">|</span> awk -F/ <span class="s1">'{print $(NF-2)}'</span>
</span></span><span class="line"><span class="ln">65</span><span class="cl">
</span></span><span class="line"><span class="ln">66</span><span class="cl">
</span></span><span class="line"><span class="ln">67</span><span class="cl"> <span class="nb">echo</span> <span class="s2">"\n</span><span class="si">${</span><span class="nv">CYAN</span><span class="si">}</span><span class="s2">USER:</span><span class="nv">$NC</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln">68</span><span class="cl"> find -L <span class="nv">$USER_RUNSVDIR</span> -type f -name pid <span class="p">|</span> xargs -I <span class="o">{}</span> sh -c <span class="s2">"[ ! -s {} ] && echo {}"</span> <span class="p">|</span> awk -F/ <span class="s1">'{print $(NF-2)}'</span>
</span></span><span class="line"><span class="ln">69</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">70</span><span class="cl">
</span></span><span class="line"><span class="ln">71</span><span class="cl">help<span class="o">(){</span>
</span></span><span class="line"><span class="ln">72</span><span class="cl">cat <span class="s"><<EOF
</span></span></span><span class="line"><span class="ln">73</span><span class="cl"><span class="s"> $BIN_NAME r running
</span></span></span><span class="line"><span class="ln">74</span><span class="cl"><span class="s"> $BIN_NAME s down(stopped)
</span></span></span><span class="line"><span class="ln">75</span><span class="cl"><span class="s">
</span></span></span><span class="line"><span class="ln">76</span><span class="cl"><span class="s"> $BIN_NAME a all
</span></span></span><span class="line"><span class="ln">77</span><span class="cl"><span class="s">
</span></span></span><span class="line"><span class="ln">78</span><span class="cl"><span class="s"> $BIN_NAME u supervised
</span></span></span><span class="line"><span class="ln">79</span><span class="cl"><span class="s"> $BIN_NAME n not supervised
</span></span></span><span class="line"><span class="ln">80</span><span class="cl"><span class="s"> $BIN_NAME d disabled(not auto starting)
</span></span></span><span class="line"><span class="ln">81</span><span class="cl"><span class="s"> $BIN_NAME z show status of all supervised services
</span></span></span><span class="line"><span class="ln">82</span><span class="cl"><span class="s">EOF</span>
</span></span><span class="line"><span class="ln">83</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">84</span><span class="cl">
</span></span><span class="line"><span class="ln">85</span><span class="cl"><span class="k">case</span> <span class="nv">$1</span> in
</span></span><span class="line"><span class="ln">86</span><span class="cl"> r*<span class="o">)</span> list_running <span class="p">;;</span>
</span></span><span class="line"><span class="ln">87</span><span class="cl"> d*<span class="o">)</span> list_disabled <span class="p">;;</span>
</span></span><span class="line"><span class="ln">88</span><span class="cl"> u*<span class="o">)</span> list_supervised <span class="p">;;</span>
</span></span><span class="line"><span class="ln">89</span><span class="cl"> a*<span class="o">)</span> list_all <span class="p">;;</span>
</span></span><span class="line"><span class="ln">90</span><span class="cl"> s*<span class="o">)</span> list_stopped <span class="p">;;</span>
</span></span><span class="line"><span class="ln">91</span><span class="cl"> z*<span class="o">)</span> all_status <span class="p">;;</span>
</span></span><span class="line"><span class="ln">92</span><span class="cl"> *<span class="o">)</span> <span class="nb">help</span> <span class="p">;;</span>
</span></span><span class="line"><span class="ln">93</span><span class="cl"><span class="k">esac</span>
</span></span></code></pre></div><h2 id="managing">Managing</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln"> 1</span><span class="cl"><span class="cp">#!/bin/sh
</span></span></span><span class="line"><span class="ln"> 2</span><span class="cl"><span class="cp"></span>
</span></span><span class="line"><span class="ln"> 3</span><span class="cl"><span class="nv">BIN_NAME</span><span class="o">=</span><span class="si">${</span><span class="nv">0</span><span class="p">##*/</span><span class="si">}</span>
</span></span><span class="line"><span class="ln"> 4</span><span class="cl">
</span></span><span class="line"><span class="ln"> 5</span><span class="cl"><span class="nv">USER_RUNSVDIR</span><span class="o">=</span><span class="s2">"/usr/local/etc/runsvdir-</span><span class="nv">$USER</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln"> 6</span><span class="cl"><span class="nv">USER_SVDIR</span><span class="o">=</span><span class="s2">"/usr/local/etc/svdir-</span><span class="nv">$USER</span><span class="s2">"</span>
</span></span><span class="line"><span class="ln"> 7</span><span class="cl"><span class="nv">SYS_SVDIR</span><span class="o">=</span><span class="s2">"/etc/runit/sv"</span>
</span></span><span class="line"><span class="ln"> 8</span><span class="cl"><span class="nv">SYS_RUNSVDIR</span><span class="o">=</span><span class="s2">"/run/runit/service"</span>
</span></span><span class="line"><span class="ln"> 9</span><span class="cl">
</span></span><span class="line"><span class="ln">10</span><span class="cl">user_start<span class="o">(){</span>
</span></span><span class="line"><span class="ln">11</span><span class="cl"> <span class="nb">export</span> <span class="nv">SVDIR</span><span class="o">=</span><span class="nv">$USER_RUNSVDIR</span>
</span></span><span class="line"><span class="ln">12</span><span class="cl"> fd pid <span class="nv">$USER_RUNSVDIR</span> -t f -L <span class="p">|</span> xargs -I <span class="o">{}</span> sh -c <span class="s2">"[ ! -s {} ] && echo {}"</span> <span class="p">|</span> awk -F/ <span class="s1">'{print $(NF-2)}'</span> <span class="p">|</span> fzf --prompt<span class="o">=</span><span class="s2">"Start User Service >"</span> <span class="p">|</span> xargs -I <span class="o">{}</span> sv start <span class="o">{}</span>
</span></span><span class="line"><span class="ln">13</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">14</span><span class="cl">
</span></span><span class="line"><span class="ln">15</span><span class="cl">system_start<span class="o">(){</span>
</span></span><span class="line"><span class="ln">16</span><span class="cl"> sudo fd pid <span class="nv">$SYS_RUNSVDIR</span> -t f -L <span class="p">|</span> sudo xargs -I <span class="o">{}</span> sh -c <span class="s2">"[ ! -s {} ] && echo {}"</span> <span class="p">|</span> awk -F/ <span class="s1">'{print $(NF-2)}'</span> <span class="p">|</span> fzf --prompt<span class="o">=</span><span class="s2">"Start System Service >"</span> <span class="p">|</span> sudo xargs -I <span class="o">{}</span> sv start <span class="o">{}</span>
</span></span><span class="line"><span class="ln">17</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">18</span><span class="cl">
</span></span><span class="line"><span class="ln">19</span><span class="cl">user_stop<span class="o">(){</span>
</span></span><span class="line"><span class="ln">20</span><span class="cl"> <span class="nb">export</span> <span class="nv">SVDIR</span><span class="o">=</span><span class="nv">$USER_RUNSVDIR</span>
</span></span><span class="line"><span class="ln">21</span><span class="cl"> fd pid <span class="nv">$USER_RUNSVDIR</span> -t f -L <span class="p">|</span> xargs -I <span class="o">{}</span> sh -c <span class="s2">"[ -s {} ] && echo {}"</span> <span class="p">|</span> awk -F/ <span class="s1">'{print $(NF-2)}'</span> <span class="p">|</span> fzf --prompt<span class="o">=</span><span class="s2">"Stop User Service >"</span> <span class="p">|</span> xargs -I <span class="o">{}</span> sv stop <span class="o">{}</span>
</span></span><span class="line"><span class="ln">22</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">23</span><span class="cl">
</span></span><span class="line"><span class="ln">24</span><span class="cl">system_stop<span class="o">(){</span>
</span></span><span class="line"><span class="ln">25</span><span class="cl"> sudo fd pid <span class="nv">$SYS_RUNSVDIR</span> -t f -L <span class="p">|</span> sudo xargs -I <span class="o">{}</span> sh -c <span class="s2">"[ -s {} ] && echo {}"</span> <span class="p">|</span> awk -F/ <span class="s1">'{print $(NF-2)}'</span> <span class="p">|</span> fzf --prompt<span class="o">=</span><span class="s2">"Stop System Service >"</span> <span class="p">|</span> sudo xargs -I <span class="o">{}</span> sv stop <span class="o">{}</span>
</span></span><span class="line"><span class="ln">26</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">27</span><span class="cl">
</span></span><span class="line"><span class="ln">28</span><span class="cl">help<span class="o">(){</span>
</span></span><span class="line"><span class="ln">29</span><span class="cl">cat <span class="s"><<EOF
</span></span></span><span class="line"><span class="ln">30</span><span class="cl"><span class="s"> $BIN_NAME sr system start
</span></span></span><span class="line"><span class="ln">31</span><span class="cl"><span class="s"> $BIN_NAME ss system stop
</span></span></span><span class="line"><span class="ln">32</span><span class="cl"><span class="s"> $BIN_NAME ur user start
</span></span></span><span class="line"><span class="ln">33</span><span class="cl"><span class="s"> $BIN_NAME us user stop
</span></span></span><span class="line"><span class="ln">34</span><span class="cl"><span class="s"> $BIN_NAME * help
</span></span></span><span class="line"><span class="ln">35</span><span class="cl"><span class="s">EOF</span>
</span></span><span class="line"><span class="ln">36</span><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="ln">37</span><span class="cl">
</span></span><span class="line"><span class="ln">38</span><span class="cl"><span class="k">case</span> <span class="nv">$1</span> in
</span></span><span class="line"><span class="ln">39</span><span class="cl"> <span class="s2">"sr"</span><span class="o">)</span> system_start <span class="p">;;</span>
</span></span><span class="line"><span class="ln">40</span><span class="cl"> <span class="s2">"ss"</span><span class="o">)</span> system_stop <span class="p">;;</span>
</span></span><span class="line"><span class="ln">41</span><span class="cl"> <span class="s2">"ur"</span><span class="o">)</span> user_start <span class="p">;;</span>
</span></span><span class="line"><span class="ln">42</span><span class="cl"> <span class="s2">"us"</span><span class="o">)</span> user_stop <span class="p">;;</span>
</span></span><span class="line"><span class="ln">43</span><span class="cl"> *<span class="o">)</span> <span class="nb">help</span> <span class="p">;;</span>
</span></span><span class="line"><span class="ln">44</span><span class="cl"><span class="k">esac</span>
</span></span></code></pre></div>Notes and comments on 'Axiomatic Methods and Category Theory' by Andrei Rodin
https://geistlib.xyz/notes_and_comments_on_axiomatic_rodin/
Thu, 21 Jul 2022 03:07:57 +0200https://geistlib.xyz/notes_and_comments_on_axiomatic_rodin/<p>The basic theme of the book is highly related to the <em>pragmatist</em> idea. Pragmatic in the sense of Charles Saunders Peirce.</p>
<p>Is the present detachment of foundations of mathematics from the foundations of natural science indeed an epistemic necessity or rather an outcome of bad epistemic strategy?</p>
<h2 id="history-of-axiomatic-method">History of Axiomatic Method</h2>
<p>Euclid: (…)</p>
<h3 id="hilbert">Hilbert</h3>
<ol>
<li>The criterion of formal consistency cannot be used straightforwardly because the proof of consistency of Bourbaki’s set theory or any other formal set theory requires using some stronger theory. So we don’t really know whether or not the background set theory is consistent.</li>
<li>Second, what can and what cannot be proved in a formal theory depends on the chosen background logic and such a choice is a matter of controversy.</li>
</ol>
<h4 id="foundations-of-1899-logical-form-and-mathematical-intuition">Foundations of 1899, Logical Form and Mathematical Intuition</h4>
<p>Hilbert, unlike Frege, does <em>not</em> think about mathematical axioms as self-evident truths:</p>
<blockquote>
<p>[A]s soon as I posited an axiom it will exist and be “true”. [..] If the arbitrarily posited axioms together with all their consequencesdo not contradict eachother, thentheyaretrueand the things defined by these axioms exist. For me, this is the criterion of truth and existence. ([64], p. 12)</p>
</blockquote>
<p>In order to stipulate that a set of axiom-like expressions represents a set of axioms, Hilbert needs to <em>assume that there exist “things defined by these axioms”</em> which make all terms in the axioms meaningful and make these axioms true.</p>
<p>Hence <em>consistency</em> is the only prerequisite for the existence of these “things”. Hence his notion of Geometry is a free creation of mind (at least in the quoted paragraph).</p>
<p>Now, <em>what</em> are the things defined by axioms? <em>How</em> do the axioms define them? There are 2 answers.</p>
<ol>
<li><em>Objects of thought</em> (Gedankendinge) related by corresponding <em>thought-relations</em> existing merely in virtue of the fact that one thinks of them (with the capacity, <em>intuition as in Kant’s Doctrine of Method but not in Kant’s Transcendental Aesthetics</em>, to instatiate objects and relations between objects as such) consistently, unrelated to <em>sensual intuition</em>.</li>
<li>Interpretate all axioms of a given axiomatic theory $A$ into true propositions of another theory $T$, which is called a model $M$ of the axiomatic theory $A$ in $T$. Check that the axioms are true and meaningful in <em>some model</em>, on this basis conclude that the given set of axioms is <em>relatively</em> consistent.</li>
</ol>
<p>Hilbert’s idea has some flavor of <em>mathematical structuralism</em>. Given a theory, it is merely a framework/schema of concepts together with their necessary relations to one another. Given a model of a given axiomatic theory one can always get another model of the same theory through an <em>isomorphism</em>. Hence an axiomatic theory determines its models <em>up to isomorphism</em>. Isomorphic models can be seen as equal and representing the same <em>structure</em>.</p>
<h4 id="foundations-of-1899-logicality-and-logicism">Foundations of 1899, Logicality and Logicism</h4>
<p>Logicality, two main approaches:</p>
<ol>
<li>logic is <em>content-free</em> (logical signs are understood as the “punctuation marks”).</li>
<li>logic is <em>content-invariant</em> (Tarski: given a set $M$ (representing a certain universe of discourse), an operation $Q_M$ acting on $M$ is <em>logical</em> iff it is invariant under all permutations).</li>
</ol>
<p>The second approach better squares with Hilbert’s axiomatic method. This approach to logicality is motivated by Klein’s <em>Erlangen Program</em> in geometry.</p>
<p><em>Logicism</em>. For Hilbert <em>the basic clarified form of mathematical theorizing is a purely logical axiomatic system</em>. However Hilbert does not, like Russell, tries to <em>reduce</em> mathematics to logic.</p>
<p>Kant’s objection to the Leibnizian (and hence, to some extent, Russell’s):</p>
<ol>
<li>From a <em>formal</em> point of view, mathematics is no different from a mere metaphysical speculation. A speculative metaphysical theory can be developed on an axiomatic basis just like any mathematical theory.</li>
<li>The <em>crucial difference</em> between mathematics and speculation is the fact that mathematics constructs its <em>objects</em> according to certain rules, while speculation proceeds with concepts without being involved in any similar <em>constructive activity</em>.
What makes the pure mathematics objective is the <em>rule-like character of object-construction</em>. According to Kant this objective character of mathematics allows for application of mathematics in natural sciences.</li>
</ol>
<p>Author’s words: The fact that the modern logic indeed tends to create “metaphysical worlds of thought” rather than make itself into a part of empirical science, and that today’s mainstream philosophy of logic encourages and justifies this overtly metaphysical tendency (usually by presenting it as an innocent intellectual game) appears to me very worrying.</p>
<h4 id="axiomatization-of-logic-logical-form-versus-symbolic-form">Axiomatization of Logic: Logical Form versus Symbolic Form</h4>
<p>Symbolic logic as the application of formal method of mathematics, i.e. the method of symbolic algebra, in logic. This is related to Cassirer’s notion of <em>symbolic form</em>.</p>
<p>The idea of interpreting formal logical systems on equal footing with formal mathematical theoreis suggested by Hilbert’s idea of “contentual logical thinking” is behind the recent transformation of Hilbert’s Axiomatic Method.</p>
<p>It has been shown by Gentzen that <em>a reasonable formal logical system may have no axiom at the expense of having a bigger number or rules</em>, while there is no logical system that has axioms and has no rules: rules are more essential elements of a logical system than logical axioms. “Axiomatization of logic” is really <em>developing logic by symbolic means</em>.</p>
<h4 id="foundations-of-1927-intuition-strikes-back">Foundations of 1927: Intuition Strikes Back</h4>
<blockquote>
<p>No more than any other science can mathematics be founded by logic alone; rather, as a condition for the use of logical inferences and the performance of logical operations, <em>something must already be given to us in our faculty of representation, certain extralogical concrete objects that are intuitively present as immediate experience prior to all thought</em>.</p>
</blockquote>
<p>The intuition that striked back here can be called <em>symbolic</em> intuition: mathematical intuition which allows one to manipulate and calculate with mathematical symbols.</p>
<blockquote>
<p>[I]n my theory contentual inference is replaced by manipulation of signs [ausseres Handeln] according to rules; in this way the axiomatic method attains that reliability and perfection that it can and must reach if it is to become the basic instrument of all research.</p>
</blockquote>
<p>Hilbert’s project aims at showing that the manipulation with signs (symbols) is sufficient for all mathematical purposes. Even if this foundational project works out it does not close the possibility of a different foundation with uses a different intuitive background and a different basic geometry.</p>
<h4 id="foundations-of-193401939-doing-is-showing">Foundations of 193401939: Doing is Showing?</h4>
<p><em>Finitism</em>.</p>
<p>In the symbolic setting mathematical proofs are chains of formulas constructed according to certain fixed rules (with a help of some basic construction including formulas representing axioms). In this setting to <em>prove</em> (a proposition expressed by formula $F$ is to <em>construct</em> (a chain of formulas that ends up with $F$). Thus doing mathematics in Hilbert’s formal axiomatic setting does not reduce contentual constructions in mathematics altogether but reduces all such constructions to constructions of a special sort, namely, to the <em>finite symbolic constructions</em>.</p>
<h2 id="formal-axiomatic-method-and-the-20th-century-mathematics">Formal Axiomatic Method and the 20th Century Mathematics</h2>
<p>Cantor’s <em>Continuum Hypothesis</em>. There is still no common opinion as to whether this problem is solved or still remains open <em>due to the fact that the modern set theory is developed in a formal axiomatic setting</em> unlike almost the rest of mathematics.</p>
<ul>
<li>1938 Goedel discovered that ZF is consistent with CH by building a model of ZF in which Ch holds.</li>
<li>1963 Cohen discovered that ZF is also consistent with the negation of CH by building a model of ZF in which CH does <em>not</em> hold.
Hence it is well established that neither CH nor its negation can be derived from the axioms of ZF. Controversial: whether or not this independence result provides a definite answer to the original question by allowing one to claim that the original question is ill-posed.</li>
</ul>
<p>This situation is <em>not</em> unprecedented and may be compared, in particular, with the fate of the <em>problem of parallels</em> in geometry of the 19th century.</p>
<p>The <em>methods</em> used by modern set-theorists are not essentially different from methods used in other parts of today’s mathematics.</p>
<p>Problem with <em>meta-theory</em>, in particular <em>meta-mathematics</em>:</p>
<ul>
<li>In modern set theory a <em>theory</em> is ZF or another formal axiomatic theory, while proofs of independence of Ch from the axioms of ZF and similar results belong to a <em>meta-theory</em> that tell us important things about formal axiomatic theories.</li>
<li>This terminology is heavily philosophically-laden and overtly clashes with the language in which the wider mathematical community usually describes its own activities.</li>
<li>The distinction between mathematics and <em>meta</em>-mathematics implies the view according to which formal axiomatic theories are “usual” mathematical theories while metatheories belong to a special domain of metamathematics that lays somehow “beyond” the usual mathematics and has some philosophical flavor.</li>
<li>However: formal axiomatic theories are <em>not</em> mathematical theories in the usual sense of the word while their <em>corresponding metatheories</em> are comparable with usual theories from any other area of mathematics.</li>
<li>Like <em>object language</em> and <em>metalanguage</em> in formal semantics, it would be better to use the term “object-theory” for what in formal axiomatic studies is usually called simplay a “theory”.</li>
</ul>
<p>Metamathematical results concerning ZF and and its likes make the core content of the modern set theory rather than only a foundation of this theory, which can be left aside unless one has a special interest in studying foundations (while philosophical interpretations can and should be left aside when one works in set theory as a mathematician).</p>
<h3 id="bourbaki">Bourbaki</h3>
<p>Bourbaki distinguishes between the <em>logical</em> aspect of the Axiomatic Method from another aspect which can be called <em>structural</em>. The axiomatic method of Bourbaki doesn’t allow to prove <em>non-trivial</em> facts about, say, groups (e.g. Lagrange’s theorem does not follow the group axioms). The axioms <em>define</em> a mathematical object (<em>structures</em>), but does not guarantee that all the informations about the object is encoded in the axioms (can be deduced solely from the axioms).</p>
<p>Bourbaki like Euclid begins with principles of <em>building mathematical objects</em> but not with axioms. Bourbaki would be happy to get rid of the ground set-theoretic layer but does not know how to do this exactly.</p>
<h2 id="lawvere">Lawvere</h2>
<h3 id="etcs-ccaf">ETCS, CCAF</h3>
<p><em>ETCS</em>, elementary theory of the category of sets.</p>
<p>THe major difference between ZF and others, with ETCS, lies in the choice of primitive non-logical constants. While ZF and other similar theories take the binary relation of <em>membership</em> ($\in$) between sets as primitive, ETCS takes as primitive the binary operation of <em>composition</em> of functions, which is a ternary relation between functions.</p>
<p>No <em>categorical logic</em> is involved in the ETCS in its original form.</p>
<p><em>CCAF</em>, category of categories as a foundation.</p>
<p><em>Elementary theory</em>: axioms written in accordance with the formal axiomatic method. Extended to <em>basic theory</em> introducing the category of categories and a re-introduction of the notion of functor. The definition of functor through the structure preserving rule is metatheoretical, but the following re-definition of functor as a mophism in a category of categories bring us back to the theoretical (i.e. <em>elementary</em>) level.</p>
<p>The category of categories is <em>an universe of discourse</em> and in this sense it has a <em>metatheoretical</em> status.</p>
<h3 id="conceptual-theories-and-their-presentations">Conceptual Theories and Their Presentations</h3>
<p>Read:</p>
<ul>
<li>F.W.Lawvere. <em>Functorial semantics of elementary theories</em>. Journal of Symbolic Logic, 31:294–295, 1966.</li>
<li>F.W. Lawvere. <em>Theories as categories and the completeness theorem</em>. Journal of Symbolic Logic, 32:562, 1967</li>
</ul>
<p>The idea of presenting a formal theory as a category $T$ of a special sort and presenting models of $T$ as functors from this theory to the category of sets. Terms and formulas become specific morphisms in $T$. Truth-value form a distinguished object $L$ in $T$, and every instance of the existential quantifier $\exists$ is also a morphism in $T$.</p>
<p>Distinction between a non-interpreted theory $T$ and its syntactic presentation $\mathcal{L}$:</p>
<blockquote>
<p>Given a first-order language-with-axioms $\mathcal{L}$, the associated theory $T$ might be thought of as the meaning of $\mathcal{L}$ and the category $S^{[T]}$ as the reference of $\mathcal{L}$.</p>
</blockquote>
<p>Here $S^{[T]}$ is the category of models of $T$ (of specific functors $T\rightarrow S$).</p>
<p>$T$ itself is thought of as a <em>conceptual</em> theory, which remains invariant under changes of its various presentations. $\mathcal{L}$ is to be thought of as a particular <em>presentation</em> of the corresponding theory $T$.</p>
<blockquote>
<p>Notice that Lawvere and Rosebrugh put at the first place of their description of “logic in the narrow sense” the stipulation of “limited universe of discourse”. So the authors definitely associate themselves with the logical tradition, which originates in Leibniz and then develops through Boole’s pioneering works in symbolic logic, through De Morgan, Jevons, Venn and Peirce. Answering Schröder’s criticism Frege calls logic developed in this tradition “calculus ratiocinator” (calculus or reasoning) and opposes it to another tradition (to which he adheres himself), where logic is understood as “lingua characteristica” aka characteristica universalis (universal language of thought); this latter tradition also dates back to Leibniz but then develops relatively independently by Frege, Peano, Russell, Quine and Church . While the calculus ratiocinator tradition applies logic “locally” leaving it up to the user to determine the universe of discourse in every concrete application, the characteristica universalis tradition tends to apply logic to the fixed metaphysical universe that is supposed to include all that there is. Thus Lawvere’s categorical logic belongs to the calculus ratiocinator tradition rather than the characteristica universalis tradition.</p>
</blockquote>
<p>Venn regards the choice of the universe of discourse as a matter of “application” of logic rather than matter of “symbolic statement” of logi, hence unlike Lawvere he describes <em>the notion of universe as “extra-logical”</em>. While Lawvere considers <em>making explicit a limited universe of discourse</em> as an essential determination of logic rather than a matter of its application.</p>
<p>Tarski’s topological interpretation of classicl and intuitionistic propositional calculi can be also most naturally understood as a specification of the universe of discourse of a given calculus.</p>
<p>Lawvere and Rosebrugh thus renders the “homomorphic relation” between logical connectives and the mereology of the universe of discourse as a <em>proper part of logic</em> but <em>not as a model-theoretic issue</em>. There is no “standard” logic and no metaphysical universe of everything. Hence while Venn thinks of multiple universes of discourse as certain independent domains of application of his logic, Lawvere and Rosebrugh claims that “thinking actually involves <em>relationships</em> between several universes”.</p>
<p>The assumption about the plurality of universes of discourse is necessary for the most original technical aspect of Lawvere’s proposal: his interpretation of logical quantifiers <em>there exist</em> and <em>for all</em> as functors <em>adjoint to substitution</em>. <em>IMPORTANT</em></p>
<h3 id="cartesian-closed-categories-and-curry-howard-correspondence">Cartesian closed categories and Curry-Howard correspondence</h3>
<blockquote>
<p>CCC serve as a common abstraction of type theory and propositional logic.</p>
</blockquote>
<p>i.e. not an exclusively logical category but rather a category that plays a central role in logic in particular.</p>
<p>The Curry-Howard correspondence amounts to the observation that the rules of simply typed lambda calculus can be used (mutatis mutandis) for making formal deductions; the notion of CCC makes the mathematical sense of this correspondence precise.</p>
<p>We no longer assume that we do things of one sort (build strings of symbols) and then use these things for showing something about things of another sort (by interpreting these strings of symbols as propositions about “ideal” mathematical objects); instead we explore the same structure of CCC by doing allowed calculations and showing with these calculations certain <em>facts about this very structure</em>. As we can see this arrangement is similar to Euclid’s and dissimilar to Hilbert’s.</p>
<h3 id="hyperdoctrines">Hyperdoctrines</h3>
<p>A hyperdoctrine consists of a CCC $T$ of “types” and functor $h$ that</p>
<ul>
<li>for every object $A\in T_0$ a category $P(A)$ of “parts” of $A$ (also thought of as predicates, attributes).</li>
<li>for every morphism $f:A\rightarrow B$ a functor $s_f: P(A) \leftarrow P(B)$ thought of as “substitution”.</li>
<li>$P(A)$’s are CCC.</li>
</ul>
<p>Every $P(A)$ is a partial order with parts partially ordered by inclusion. This allows for thinking about this partial order as a <em>deductive order</em> and denote it $\bot_A$.</p>
<p>Hyperdoctrines has a view as fibrations. Hence there should be some link between proof theory and homotopy theory: Voevodsky’s homotopy type theory, <em>Univalent Foundations</em>.</p>
<p><em>NEEDS TO READ MORE</em></p>
<h3 id="functorial-semantics">Functorial Semantics</h3>
<h3 id="formal-and-conceptual">Formal and Conceptual</h3>
<ul>
<li>Formal - algebra</li>
<li>Conceptual -geometry</li>
</ul>
<p>Kind of Isbell duality. Space and quantity.</p>
<h3 id="categorical-logic-and-hegelian-dialectics">Categorical Logic and Hegelian Dialectics</h3>
<h3 id="topoi-and-their-internal-logic">Topoi and their Internal Logic</h3>
<p>The subject is presented way too shallow here.</p>
<p>Geometrisation of logic in topos theory = a way of <em>objectification</em> of logic (in the Hegelian sense).</p>
神秘主义/秘仪/神话学/宗教史
https://geistlib.xyz/mysticism_and_hist_religion/
Thu, 21 Jul 2022 03:01:09 +0200https://geistlib.xyz/mysticism_and_hist_religion/<ul>
<li>“太阳”神，作为日出的太阳神与意识，Winged sun 作为主权、秩序，Sol Invictus 与君士坦丁，阿里乌异端；帝国概念。</li>
<li>世界之树，天空-大地的连接者，罗马皇帝，kingship.</li>
<li>狄俄尼索斯秘仪，作为解放者的狄俄尼索斯与基督，浪漫派。</li>
<li>罗穆路斯，Mithra-Varuna，秩序-混乱，God-image 的两面性，“God should be loved and also feared”，Jakob Boehme，Lupercalia。该隐？</li>
<li>厄琉息斯秘仪，俄耳浦斯秘仪，农业、东欧民间基督教，圣母，Hieros gamos。</li>
<li>死与复生神话动机，宇宙-秩序的生成，历史。</li>
<li>启蒙、赫耳墨斯秘籍、卡巴拉，时间观念。</li>
</ul>
<h2 id="概述">概述</h2>
<h3 id="太阳神">“太阳”神</h3>
<p>“太阳”神是个不幸的词，因为神从来都不是太阳，而是“日出的印象本身背后的原型”，是“日光的灼热”，是太阳本身的死而复生。作为日出的太阳与意识有关(荣格)，我从救赎史-精神史的角度推测意识最初是集体层展现象(emergent phenomenon)：一族生物-人形成一个“奥秘身体”一个“帝国”，帝国本身首先具备意识和人格。帝国的人格（“神圣性”“神圣血液”）向其成员流溢，使个体形成、获得意识，即成为「人」。因此日出后在天空（天空是秩序）飞翔的太阳是帝国主权（的象征）。</p>
<ul>
<li>Friedrich Heer - Holy Roman Empire</li>
<li>Henri Frankfort - Kingship and the Gods</li>
<li>Carl Jung - Autobiography</li>
<li>Julian Jaynes - The Origin of Consciousness in the Breakdown of the Bicameral Mind</li>
<li>[[https://www.math4wisdom.com/wiki/Research/20180625MusicalSyntax|Musical Activity as the Basis for the Evolution of Joint Intentionality and Nonlinear Grammar ]]</li>
</ul>
<p>一些自己写的相关的段落，以后应该会扩展成文章放在 [[文学]]：</p>
<blockquote>
<p>战争与和平和细雪差不多都有种佛教的感觉，但都不是佛教，应该说他们居然都有点 叔本华 的感觉…在两部作品中你都能看到万千生命如江流一般浩荡又缓慢地向海归去，如果说“浩荡”谷崎甚至胜过托尔斯泰。你不确切知道汇入的“海”是什么，但肯定不是“梵”，托尔斯泰写的在这方面比谷崎明显（或者说他“知道”自己在些什么），在他那里“海”是一种死亡和虚无或者更准确地说某种异教式的意识向动物性的回归和消散，谷崎没去写，他可能不知道该怎么去写。</p>
</blockquote>
<blockquote>
<p>(细雪所描绘的“贵族文化”)简单说应该是一种斯多葛式的退让，你在整个日本传统文化中都能看到这种贵族式的缓慢和节制。生活总是会继续，夏夜也总会结束。一方面短暂、脆弱的生命需要被凝固在哪里、刺绣在哪里，需要在某个会在无数人身上得到重复的动作中得到保存；另一方面漫长没有尽头的生命又需要缓慢、冷静的观察和理解，虚无感需要通过对繁复琐碎的细节的深究克服。说难听点就是 姿态 比较端正的抽烟酗酒。可这个 姿态 本身已经具备某种人的尊严了，因为你是明知道没什么意思却又“俯身”去做的，“荒谬本身被荒谬克服了”。我的意思不是这个文化内部的个体都知道这点，他们每个人都并不会这么去想，只是整个文化在自动通过其形态使内部的人做出这种姿态并成为具有尊严的人，这只有拉开距离去观察才有可能能看到，也正是细雪那书所展现的日本文化的庄严，这种庄严同时也是所有对“传统”一词有正确理解的人决定捍卫它的原因。</p>
</blockquote>
<blockquote>
<p>“不是这个文化内部的个体都知道这点，他们每个人都并不会这么去想，只是整个文化在自动通过其形态使内部的人做出这种姿态并成为具有尊严的人”，换句话说一个作为整体具备着至高无上的尊严的传统秩序体内部并没有有意识和个体性的货真价实的个体。即使其中一些行为上看似有尊严的人在做出这些行为时也根本没有怀疑和对自己的克服，更多人则是在顺应历史传统的过程中自动获得人性，或者说某种在表面上像是人性的东西。用现代的目光去回望那些曾经生活过的人，他们更像是比人生活得更加“优雅”、理性、“有品位”的动物。在由某种形而上学构筑的秩序体中，非人造的、来自某种原型的投射的秩序体在给它的组分灌输人性，使这些潜能获得产生自我意识的能力，但它无法使这些被灌输了人性的个体的潜能完成个体化，毕竟此性是无法被共性塑造的。可能也正因如此越是有明显个体性的人越能够把握那些传统社会的“伟大”，因为即使其中的每个（伪）个体都不值得敬重，整个社会作为秩序体却具备着一种最高的人性。这种人性是能看到的人绝对无法错过、忽略的，一开始可能只是旧艺术吸引人，接下来是旧的“高阶”文化作为整体使人敬佩，之后人会看到一个整个底层到高层在时光中保持着其独一性的连续体，每一个动作、每一个人的生死，全都汇聚成近乎永恒且独一无二的人性。</p>
</blockquote>
<p>以及与莫扎特有关的段落，以后可能会扩展放在 [[音乐]]，或者与上面计划写作的文章结合，但也有可能不会写：</p>
<blockquote>
<p>在有情绪的音乐里快乐比悲痛更难掌控，悲伤、悲痛就是悲伤和悲痛，但快乐总是包含更多东西。有时候是简单的苦中作乐，像 Cartola 和大量拉美音乐中那样。有时候快乐有圣诞节、灯光和热闹的人群的形态，圣诞树上快乐地闪烁彩灯中能望见逝去的时光，简单说快乐中有淡淡的忧伤。有时候快乐有春季和雨天万物复苏时的感慨万千，一年过去、新一年来到，一种博大的快乐。有时候是127一乐章里奇特的、没有硝烟的战斗性，或者又是二乐章前半段最后一个变奏里对孩童嬉戏的模仿，你居然能听到悲悯。有时候快乐则有死亡气息，像莫扎特的钢协里那样。我也不知道这种对快乐的再发现是什么时候开始出现在文学或者艺术中的，从前似乎没有过，只有在极少数情况下才会在音乐中出现。它非常近代，似乎最早是在奥地利宫廷艺术中。</p>
</blockquote>
<blockquote>
<p>想想法国巴洛克音乐中无脑的快乐。19年左右我沉迷库普兰那些浮华无脑的东西，那里似乎有这种 对快乐的再发现 的最初形态。库普兰跟夏丹是同时代人。</p>
</blockquote>
<blockquote>
<p>哪天人能在他[莫扎特]那些听起来没心没肺、快乐的乐曲中听到极深但没有浓稠的黑色调的痛苦，这个人的艺术的真实形态也会出现在他眼前，那是哈布斯堡的巴洛克帝国用欢乐和精致取代、忘记痛苦的宏伟精神。「the good humor of Mozart’s empire was an expression of the understanding that life is based on sacrifice, on self-sacrifice, which was to be carried out with style and without complaint. The music, the painting, and the overwrought architecture all reflected this」(引自 <a href="https://web.archive.org/web/20200523213452/https://www.benespen.com/journal/2017/5/2/the-long-view-the-holy-roman-empire">这里</a>，这和《细雪》中莳冈家人在衰落和战争的时代用精致和优雅对腐坏的对抗有对应关系，「短暂、脆弱的生命需要被凝固在哪里、刺绣在哪里，需要在某个会在无数人身上得到重复的动作中得到保存；另一方面漫长没有尽头的生命又需要缓慢、冷静的观察和理解，虚无感需要通过对繁复琐碎的细节的深究克服」。整个哈布斯堡帝国作为一个奥秘身体，其精神最深处的宝藏，在莫扎特那些看似快乐、浮华的音乐中再现着。他的音乐是一个已经死去的、其精神汇入每一个新人的帝国的”人格“的回响，他的音乐最深处的隐忍精神是那个帝国给“人类”留下的最宝贵的遗产。</p>
</blockquote>
<blockquote>
<p>这大概是我一直想展现给人看的「精神史」，一个近千年的帝国留下的最珍贵的遗产不是科技、法律、知识，是一种更高的人格。整个秩序内部的人都参加了这个人格的生成和构建，最终这个人格流入每个人的灵魂中，在每个人的身上获得肉身，使人这个物种的意识——浮在无意识表面薄薄的一层光，望向太阳的人所渴望的，甚至现象界的日出本身背后的真实——本身向更“高”处延展，使人的概念——人的现象——本身发生变化。</p>
</blockquote>
<h3 id="世界之树王权">世界之树，王权</h3>
<p>与上述“太阳”神息息相关，世界之树是天空-秩序-父性-精神与大地-混沌-母性-物质的连接者，我推测「皇帝」的原型即世界之树。</p>
<p>笔记：</p>
<ul>
<li>「The myth of the <em>Last World Emperor</em> […] the <em>Last Emperor</em> himself in his many forms was always the summation of the dignity of the imperial office, the supreme rallying point for Christian allegiance」 from Bernard McGinn ed., Apocalyptic Spirituality, introduction.</li>
<li>「by the middle of the thirteenth century the Joachite script also began to call for a good <em>Last Emperor</em> who would chastise the Church in order to reform it」 from Bernard McGinn ed., Apocalyptic Spirituality, the part on Savonarola.</li>
<li>「They emperors always did certain things […] They protected the Church. They made peace. More precisely, they had the duty to give peace. Also, the emperors, and the empire as a whole, were the <em>restrainers of Antichrist</em> 」 from <a href="https://web.archive.org/web/20200523213452/https://www.benespen.com/journal/2017/5/2/the-long-view-the-holy-roman-empire%7C">Here</a></li>
</ul>
<p>需要更多关于教宗和 Pontifex maximus 的了解。</p>
<ul>
<li>Frazer - Lectures on the Early History of the Kingship</li>
<li>Friedrich Heer - Holy Roman Empire</li>
</ul>
<h3 id="狄俄尼索斯">狄俄尼索斯</h3>
<p>奥秘身体的成员不是个体而是秩序的组分，或者说奥秘身体具备意识，其成员则是使意识运作的器官。帝国是秩序本身，帝国外由于没有秩序也就不再有宇宙而只有混沌；律法即秩序的法则。狄俄尼索斯是解放者，将成员从秩序解放出来，基督是律法的废除者也是成全者。浪漫派对个体和自我的重视和个体意识的形成和强化有关。既然人形似神，而人的救赎为接近神，他需要被从律法解放出来、成为不受任何自然-形而上学法则约束的个体才可获得更真实的存在(I AM)，更加接近作为造物主的神，构造世界而非被世界/帝国/形而上学构造。因此狄俄尼索斯-基督是“浪漫派将来的神”，是直觉主义、构造主义、存在主义等等背后的神。</p>
<blockquote>
<p>「Dionysus versus the “Crucified”: there you have the antithesis. It is <em>not</em> a difference in regard to their martyrdom-it is a difference in the meaning of it. Life itself, its eternal fruitfulness and recurrence, creates torment, destruction, the will to annihilation. In the other case, suf- fering-the “Crucified as the innocent one”-counts as an objection to this life, as a formula for its condemnation.-One will see that the problem is that of the meaning of suffering: whether a Christian meaning or a tragic meaning. In the former case, it is supposed to be the path to a holy existence; in the latter case, being is counted as <em>holy enough</em> to justify even a monstrous amount of suffering. The tragic man affirms even the harshest suffering … Dionysus cut to pieces is a <em>promise</em> of life: it will be eternally reborn and return again from destruction. 」from Nietzsche, <em>The Will to Power</em> (Number 1052).</p>
</blockquote>
<p>原本的、作为酒神的狄俄尼索斯和狄俄尼索斯-基督显然不同。</p>
<ul>
<li>Duns Scotus, William Ockham</li>
<li>所有神秘神学</li>
<li>所有浪漫派著作</li>
<li>数学直觉主义（布劳威尔）</li>
<li>维特根斯坦、布伦塔诺、Michael Dummett</li>
<li>John Deely - Four Ages of Understanding</li>
<li>David Rapport Lachterman - The Ethics of Geometry</li>
</ul>
Notes and comments on Frege's Philosophical Writings
https://geistlib.xyz/notes_on_frege_writings/
Thu, 21 Jul 2022 02:57:22 +0200https://geistlib.xyz/notes_on_frege_writings/<h2 id="begriffsschrift-first-chapter">Begriffsschrift, First Chapter</h2>
<p><em>Explanation of the symbols</em>. All the symbols are divided into</p>
<ol>
<li>those that can be taken to mean various things</li>
<li>those that have a fully determinate sense
The problem here is that what does it mean that a symbol can be “taken to mean various things”. When specifying that a symbol can be taken to mean something, a universe where this “something” resides should be presented simultaneously. and <em>also</em> the meaning of this particular symbol should be able to ranged over this whole universe. Is it possible for one to even <em>think about</em> this universe and the ranging-over by a symbol throughout this universe?</li>
</ol>
<p><em>Judgement</em>. Here Frege seems to be distinguishing between <em>sentences</em> and <em>propositions</em>. Sentences are sequence of words of which the <em>meaning</em> is always “recognized as” true, while propositions are those sequence of words for which a truth-value can be assigned. It doesn’t seem like that Frege is distinguishing semantics and syntax here. It is tempting to think that the “turnside” symbol is the valuation in the common sense and the content stroke is just an indicator of a propositon.</p>
<p><em>No distinction of subject and predicate</em>. Propositions are defined up to conceptual content, so propositions presenting the same conceptual content are not distinguished.</p>
<p><em>The Function</em>. In fact this section looks like Frege introducing the notion of <em>currying</em>. The proposition ‘Cato killed Cato’, when the first occuring ‘Cato’ is a variable, then ‘killing Cato’ is the function: $f(\cdot,\cdot): X \times Y \rightarrow Z$ becoming $ f(\cdot,y): X \rightarrow Z^Y$; also when the second occurence is regarded as a variable, we have the function “being killed by Cato” i.e. $f(x,\cdot): Y\rightarrow Z^X$. This is how cartesian closedness arises.</p>
<h2 id="function-and-concept">Function and Concept</h2>
<p>Note that Frege did something very much like Lambda calculus.</p>
<h2 id="on-concept-and-object">On Concept and Object</h2>
<p>The word “concept” for Frege is purely logical in its sense. He says that “what is logically simple cannot have a proper definition” but it is unclear whether is a claimed logically simple “object” really simple or even what “simple” means here.</p>
<p>Double usage of the word <em>is</em>.</p>
<ul>
<li>It is green. It is a mammal. Here “is” serves as a <em>copula</em>, a verbal sign of predication. Here the word appearing after “is” is a reference of a grammatical predicative and hence is a concept in the sense of Frege.</li>
<li>A thing is Alexander the Great. Here “is” is used like the “equals” sign in arithmetic, to express an equality (the same as, no other than, identical with). Here the word appearing after “is” is a proper name, a name of an object in the sense of Frege.</li>
</ul>
<p>Hence for Frege there can be a “concept” of morning star (=Venus): You are my morning star. This concept is something that is embodied by the appearance or even the sense of the name of the morning star. Note that this is related to the origin of words referencing colors: (it is said that) there is no color <em>blue</em> in the Old testament. I have a functionalist interpretation of this phenomenom (namely a word for a particular color originates only when it is <em>needed</em>). The word <em>lapis lazuli</em> and <em>azul</em> etc.</p>
<p>He says ’the concept “horse”’ do designate an object but in that account not a concept. Now this looks like heavily functionalist. I say ‘The concept “horse”’ designates an object since it is <em>used</em> in such a manner that it designates the concpet “horse” as an object while in ‘it is a horse’ the concept is <em>used</em> in such a manner that it designates the concpet ‘horse’ as a concept. In <em>Grundlagen</em> he proposed a simple criterion: the singular definite article always indicates an object whereas the indefinite article accompanies a concept-word (with some easily recognizable special cases as exceptions).</p>
<p>“There is such good accord between the linguistic distinction and the real one”. However this can be that “the real one” is constructed and limited by the linguistic distinction, provided that there <em>is</em> really a “real one”, since <em>Logos</em> is through whom God creates.</p>
<p>Now something interesting: <em>subject-concept</em> as in the sentence ‘all mammals have red blood’. However we could say instead “whatever is a mammal has red blood” or “if anything is a mammal then it has red blood”. Hence these are still concepts. Quantifiers such like ‘all,’ ‘any,’ ’no,’ ‘some,’ are prefixed to concept-words. In universal and particular affirmative and negative sentences we are expressing relations between concepts.</p>
<p>When negating ‘all mammals are land-dwellers’, one must negate as ‘all mammals are not land-dwellers’ if here ‘all mammals’ are logical subject of the predicate ‘are land-dwellers’. Instead we use ’not all mammals…’ so ‘all’ logically belongs with the predicate, i.e. ‘mammals are not all land-dwellers’.</p>
<p><em>Existence</em>. Frege have called existence a property of a concept (note the similarity between Kierkegaard’s rejection to the ontological arguments for God’s existence). In ’there is at least one square root of 4’ it is about a concept ‘square root of 4’, now ’the concept square root of 4 is realized’ then ’the concept square root of 4’ form the proper name of an object - which is a concept - and it is about this object that something is asserted. Now think about <em>does not exist</em>, is it legal to say ‘<em>the concept A</em> cannot be realized’ (instead of ‘A does not exist’). If ‘A’ doen’t exist, what is being said of when we say ’the concept A’? <em>Plato, sophist</em>. <em>See the chapter ’negation’ where he discuss a similar problem</em></p>
<p>The thought itself does <em>not</em> yet determine what is to be regarded as the subject.</p>
<h2 id="on-sense-and-reference">On Sense and Reference</h2>
<p>Here Frege does some distinction between semantics (extension) and syntax (a priori/analytic). Sense looks like more related to synatx and reference looks like more related to semantics.</p>
<p>Frege holds that <em>equality</em> is a relation between names or signs of objects rather than a relation between objects. In contrast to analytic or <em>a priori</em> statment $a=a$, $a=b$ inteds to say that the signs or names $a$ and $b$ designate the same thing so that those signs themselves would be under discussion. If the sign $a$ is distinguished from the sign $b$ only as object (e.g. by means of its shape) not as sign (i.e. not by the manner in which it designates something), the cognitive value of $a=a$ becomes essentially equal to that of $a=b$ if $a=b$ is true.</p>
<p>The <em>sense</em> of the sign: wherein the <em>mode of presentation</em> is contained: let $a,b,c$ be the lines conecting the vertices of a triangle with the midpoints of the opposite sides,</p>
<ul>
<li>the <em>reference</em> of the expressions ’the point of intersection of $a$ and $b$’ and ’the point of intersection of $b$ and $c$ would be the same</li>
<li>but not their senses.</li>
</ul>
<blockquote>
<p>I say that the sameness of the reference of the expressions arises from some kind of <em>ambient logic</em> chosen. When <em>the notion of sameness</em> is chosen such that two objects are the same when they are <em>equal as objects in a space</em>, or when the universe of discourse is that of ‘space-points’, their so-called <em>references</em> should be the same. When the notion of sameness is chosen such that two objects are the same when their signifiers - expressions signiying these two objects - are the same, then these two ‘points’ (we should <em>not</em> be allowed to speak of them as points since the universe of discourse is no longer that of space-points) are not the same. Maybe one should ask whether there is a notion of <em>internal/proper semantics</em> associated to a given syntax. Also in between different universes of discourse there should be a transformation or morphism between <em>objects</em> rather than regarding these ‘objects’ as some definite and given underlying objects referenced by expressions inside a standard, metaphysical universe.</p>
</blockquote>
<p>To a definite totality of signs there corresponds a definite sense. In grasping a sense one is not certainly assured of a reference, like the expression ’the least rapidly convergen series’ has a sense but demonstrably has no reference (i.e. the corresponding object). To a given reference (an object) there does not belong only a single sign.</p>
<blockquote>
<p>I still cannot comprehend what they mean when they are talking about ‘objects’ (those which are referenced) since for an ‘object’ to be percepted or thought of as existing an essense should already be given to it. I hold that there is no distinction between essence and existence since for one to think of an existing object he must construct an essence for it so that the existence of the object can, at least, be comprehended, and when changing the perspective ’the thing’ that exists just become different beings, in fact beings in literally different universes. If there is always a definite sense, as it was claimed by Frege, corresponidng to a definite totality of signs (i.e. an expression), then an essence should be already given, and hence the correponding existence. Here it would be better to say that in the universe of discourse when the objects are just expressions per se the ‘object’ referenced by the expression exists, but in a universe of discourse where mathematical analysis makes sense the expression is just meaningless and a corresponding sense is nonexistent.</p>
</blockquote>
<p>A proper name (word, sign, sign combination, expression) <em>expresses</em> its sense, <em>stands for</em> or <em>disignates</em> its reference. By means of a sign we express its sense and designate its reference.</p>
<p>Objection to <em>idealists</em>: ’the Moon is smaller than the Earth’ is different from ’the idea of the Moon is smaller than the idea of the Moon’.</p>
<blockquote>
<p>I say: same as above. This distinction is problematic (Frege seems like a complete Platonist in this repect). What is important for the sentence ’the Moon is smaller than the Earth’ is its <em>syntax</em>, its structure. In ’the Moon […]’ it is just referencing a relation (as an object) ‘A (is) R (than) B’ and one confirms that this sentence structure makes sense (grammatically). If the universe is switched to that with a physical meaning then it is no longer a matter of grammar. It is not a matter of <em>standing for</em> or <em>signifying</em> but a matter of <em>relations between different universes</em>. One should take the reality of some universe of signs seriously.</p>
</blockquote>
<p>Then Frege went on to discuss the sense and reference for an entire declarative sentence, etc. He says that the <em>truth value</em> of a sentence constitutes its reference, so I will say that the <em>truth value</em> itself depends on a <em>valuation</em> given, and different valuations can only be done on ‘a’ sentence presented in different universes. Nothing interesting.</p>
<blockquote>
<p>It is not that there is no reference for a sentence like ’the triangle $\Delta$ has two angles’ (not a good example but strangely for the time being I cannot think of an example which is <em>contingent</em> or not analytical, while I doubt if there is any difference), the reference of the sentence per se is just the grammatical form of the expression, not some <em>sense</em>. It is just that there is no way to take this sentence to a universe where mathematical statements make sense, or more precisely a universe where ordinary mathematical statements make sense cannot be constructed from this sentence. Proving the ’non-existence’ (this is a bad word) of a seemingly existing object is finding a way to prove that it cannot be constructed at all.</p>
</blockquote>
<blockquote>
<p>Maybe it can be put briefly as follows: subjective logic is a special case of objective logic, hence $a=a$ is a special case of $a=b$, of which <em>the bijection is trivial in the universe related to some syntax</em>.</p>
</blockquote>
<h2 id="negation">Negation</h2>
<p><em>Grasping the sense of a sentence would at the same time be an act of judging</em>, namely truth value comes with the meaning, or meaning is the way in which the truth-value of a sentence can be decided.</p>
Notes on 'The Logical Foundation of Cognition'
https://geistlib.xyz/logical_foundation_of_cognition/
Thu, 21 Jul 2022 02:54:08 +0200https://geistlib.xyz/logical_foundation_of_cognition/<p>Notes on the book edited by John Macnamara and Gonzalo E. Reyes.</p>
<p>I am not interested in linguistics(but for some semantics) and any particular tool/category modelling cognition so related articles will be omitted.</p>
<h2 id="logic-and-cognition-logic-and-psychology">Logic and Cognition, Logic and Psychology</h2>
<p>Putnam’s sentence:「Sometimes the problematic status of the principle of bivalence is swept under the rug in logic classes by saying something like, “in an ideal language”, or “we shall assume that every predicate has been given perfectly precise truth conditions” as though we has any idea what such an ‘ideal language’ could be」</p>
<p>Several positions on logic-psychology relation:</p>
<ol>
<li>The truth of logical claims and the soundness of logical inference rules are guaranteed by the facts of psychology, i.e. <em>psychologism</em>. Jakob Fries, Friedrich Beneke, John Stuart Mill, etc.</li>
<li>Logic does <em>not</em> derive its basic principles from psychology and does not describe psychological states and events. Gottlob Frege and Edmund Husserl.</li>
<li>Logic has nothing to do with mental process. Frege.</li>
</ol>
<blockquote>
<p>State of affairs must be somehow <em>constructed</em> or <em>categorized</em>, i.e. be endowed with some kind of scheme. Since cognition constructs the object cognized, the law of cognition <em>is</em> the law of logic.</p>
</blockquote>
<p>Piaget: frequently attributed to children illogical schemata and inference rules, rendering the <em>emergence of logically sound ones totally mysterious</em>.</p>
<blockquote>
<p>Recall the patient described in Manin’s book (his textbook on mathematical logic). He had a problem with understanding the refering objects of relation indicators (didn’t understand the words bigger, smaller. The main problem was that he couldn’t understand which word they referred to), nonwithstanding the fact that he was able to write and scrunitize on the mental disabilities he was suffering.</p>
</blockquote>
<p>Now Macnamara argues that logic is highly relevant to cognitive psychology and logic has much to learn from psychology. Nontheless he claims that logic is not <em>grounded</em> in psychology and that it does not <em>describe</em> mental states and events.</p>
<blockquote>
<p>Recall the distinction between “meta” or better “object” theory and “theory” per se in Andrei Rodin’s book. Logic should be <em>internal</em> hence there is “no” (in a crude sense) “meta”-theory of logic.</p>
</blockquote>
<p>Macnamara then propose some psychological claims to constrain <em>the logic of kinds</em> (the category-theoretic semantics for a range of natural-language expressions developed by Gonzalo Reyes, Marie Reyes and Macnamara). Some of these “Psychological claims” are actually just constraints on the syntax of some sentences from the semantics (as Putnam will point out later, but he also says “see Emmon Bach”). The 3rd one is the mosts important one: <em>We cannot conceptually grasp an individual in a universal kind supposedly denoted by the count noun ’thing’ or ‘object’</em>. This is highly related to schematization or categorization. Individuals cannot be untyped.</p>
<blockquote>
<p>However it is still legitimate to do <em>some</em> classical (untyped) logic from a purely algebraic viewpoint. <em>Typing is the (or maybe a) process of construction</em>.</p>
</blockquote>
<p><em>A kind is specified by its members but the members are specified by the kind</em>. This is familiar to the Gestalt school since the intentionality is all about this dialectical relation between the “subject” and the “object” in a cognitive process, but Macnamara seems to stress mor on the observation that perceptual figures or wholes are determined by their perceptual parts while the perceptual role of the perceptual part is determined by the perceptual whole of which it is a part. Similarly a sentence is determined gramatically and semantically by its constituents and the grammatical function and semantic role of a constituent is determined by the sentence to which it belongs.</p>
<blockquote>
<p>Note that this is also similar to the observation that individuals constitute a society but the society is at the same time “a collection of individuals”. Is it proper for one to speak of the phrase “a collection of <em>individuals</em>”? An individual, when it is presented as a member of a collection, is no longer an individual, but a member of a collection. The universe of discourse should not be changed arbitrary. Also note that changing the universe of discourse is somehow similar to undergoing a phase transition, or acting on a quantum state which is expanded on a particular eigenbasis with a different and not commuting observable.</p>
</blockquote>
<p>The 5th claim there is no way to conceptually control the notion of a <em>possible member</em> of a kind seems related to intuitionism, in particular <em>tertium non datur</em>. The 6th claim also needs to be scrunitized more in comparison with <em>the ethics of geometry</em> (though the claim itself is just an indication of the need for category-theoretic methods, and his example is in particular bad): ‘$=$’ is a typed predicable requiring that the referring expressions placed on its left and right to form a ingle sentence should both be typed by the same count noun. <em>Claim No.8 and 9 are both interesting</em>. Need to think more on them.</p>
<blockquote>
<p>The author refers to Brentano several times. Looks good to me since the phenomenological tradition originates from Brentano of whom Lvov-Warsaw school of logic is a disciple.</p>
</blockquote>
<p>Putnam’s comments on the claims provided by Macnamara is of certain value.</p>
<h2 id="tools-for-the-advancement-of-objective-logic">Tools for the Advancement of Objective Logic</h2>
<p>Hegel’s distinction of two kinds of logic:</p>
<ul>
<li>Objective logic: a guide to the complex but very non-arbitrary constructions of the concepts and their interactions which grow out of the study of “any serious object of study” (e.g. space and quantity).</li>
<li>Subjective logic: of inference between statements. Statements are here of interest only for their potential to describe the objects which concretize the concepts (commenting on the objects constructed and indicating desiderata for their construction).</li>
</ul>
<p>Looks like the “subjective” one is that one corresponding to the proper, usual logic (i.e. within a precisely defined universe of discourse), while objective logic is concerned with the transformation and relations between different universe of discourses.</p>
<p>Lawvere thinks subjective logic is a part of objective logic.</p>
<p>It is interesting that Lawvere is also thinking about <em>collective consciousness</em> or even a <em>world mind</em>.</p>
<h2 id="the-semantics-of-syntactic-categories">The Semantics of Syntactic Categories</h2>
<ol>
<li><em>External semantics</em>: what the various classes of syntactic items do in the economy of building up denotations for complex expressions.</li>
<li><em>Internal semantics</em>: the kinds of things that are included in the denotation of the items.</li>
</ol>
Personal Recommendation Library
https://geistlib.xyz/personal-recommendation-library/
Thu, 21 Jul 2022 02:42:24 +0200https://geistlib.xyz/personal-recommendation-library/<p>I am currently working on elliptic cohomology (Cobordism representation of quantum field theory, geometric quantization of Chern-Simons theory, CS-WZW correspondence) and twisted K-theory (T-duality and higher background gauge fields), flavored with Connes-style noncommutative geometry, Poisson geometry, quantum group and higher category in general. It turns out that these fields intersect with physics, logic and theoretical computer science heavily, and in fact provides profound insight for the foundations of mathematics and philosophy. Hence the interest in linear (“quantum”, quote and unquote since “quantum logic” name space is occupied already) logic and the foundation of mathematics (category-topos theoretic approach, i.e. synthetic) and its intersection with philosophy of cognition, and in turn with “phenomenological” metaphysics, which is further related to action theory, ethics (Wittgensteinian and Scotist), “theological” anthropology (in the sense of Teilhard de Chardin), jurisprudence and theology (in the sense of Schmitt, Kantorowicz and Heer), and finally theology-mythology (in the sense of Traditionalists and Mircea Eliade). With the motivation comming from these connections and insights thus germinating, I hold reconciling St. Augustine and Origen, Scotist voluntarism and intellectualism, the individual and the collective, theology and occultism, as the final telos, so all the recommendations with spirits of theorizing will be made from this perspective. Another perspective is that of music, history of music theory (which in fact should be regarded as some sort of full intellectual history, since it is a condensation of all the human yearning for form, harmony and order), art history and cultural history in general. These recommendations will present the splendor of civilizations, the depth of human psyche, and the unfathomable sublimity and magnificence of human religions, which will effectively provide insights for the above mentioned inquiry.</p>
<ul>
<li>All the books listed are recommended and <em>strongly recommended</em>. No junk like Camus or de Beauvoir or Foucault or Zizek, etc.</li>
<li>No “introductory” books. No ordinary textbooks and such.</li>
<li>No popular classics like Hobbes’ <em>Leviathan</em> and such.</li>
<li>Note that categories overlap. For example, many works labelled as psychoanalysis, especially those authored by C. G. Jung, can also be labelled as works on religion.</li>
<li>Comments are not very serious and, moreover, incomplete.</li>
<li>Try searching the <a href="https://files.geistlib.xyz/file_list.html%7Carchive">archive file list</a> page first for those whose links to the book files aren’t given. If there is no result, consult [external sites](external sites) and search in the sites listed.</li>
</ul>
<h2 id="religion">Religion</h2>
<h3 id="ancient-religion-gnosticism-iconography">Ancient Religion, Gnosticism, Iconography</h3>
<ul>
<li><em>Frankfort, Henri - Kingship and the Gods</em>. Mixture of Warburgian iconography, theology, art history, etc. <a href="https://files.geistlib.xyz/sharing/rec/Kingship%20and%20the%20Gods%2C%20A%20Study%20of%20Ancient%20Near%20Eastern%20Religion%20of%20Society%20and%20Nature%20-%20Henri%20Frankfort.pdf">URL</a></li>
<li><em>Pritchard, James - Ancient Near Eastern Texts Relating to the Old Testament</em>. Also known as ANET. <a href="https://files.geistlib.xyz/sharing/rec/Ancient%20Near%20Eastern%20Texts%20Relating%20to%20the%20Old%20Testament%20-%20James%20B.%20Pritchard.pdf">URL</a></li>
<li><em>Beatrice, Teisser - Egyptian Iconography on Syro Palestinian Cylinder Seals of the Middle Bronze Age</em></li>
<li>Jan Assmann, David Lorton - Death and Salvation in Ancient Egypt <a href="https://files.geistlib.xyz/sharing/rec/Death%20and%20Salvation%20in%20Ancient%20Egypt%20-%20Jan%20Assmann%20David%20Lorton.pdf">URL</a></li>
<li>Majercik, Ruth - The Chaldean Oracles Text, Translation, and Commentary <a href="https://files.geistlib.xyz/sharing/rec/The%20Chaldean%20Oracles%20Text%2C%20Translation%2C%20and%20Commentary%20-%20Ruth%20Majercik.pdf">URL</a></li>
<li><em>Jonas, Hans - The Gnostic Religion</em> <a href="https://files.geistlib.xyz/sharing/rec/%E8%AF%BA%E6%96%AF%E6%9B%BF%E5%AE%97%E6%95%99%20-%20%E6%B1%89%E6%96%AF%C2%B7%E7%BA%A6%E7%BA%B3%E6%96%AF.pdf">URL</a> (Chinese translation)</li>
<li>Peterson, Joseph H. - The Lesser Key of Solomon</li>
</ul>
<h3 id="hermeticism-perennial-philosophy-etc">Hermeticism, Perennial Philosophy, etc</h3>
<p>For history and heresies see the intellectual & cultural history category.</p>
<ul>
<li>David Fideler - Jesus Christ, Sun of God, Ancient Cosmology and Early Christian Symbolism <a href="https://files.geistlib.xyz/sharing/rec/David%20Fideler%20-%20Jesus%20Christ%2C%20Sun%20of%20God%2C%20Ancient%20Cosmology%20and%20Early%20Christian%20Symbolism.pdf">URL</a></li>
<li>Huxley, Adolf - Perennial Philosophy <a href="https://files.geistlib.xyz/sharing/rec/The%20Perennial%20Philosophy%20-%20Aldous%20Huxley.pdf">URL</a></li>
<li><em>Jung, Carl - The Red Book</em></li>
<li>Guenon, Rene - The Crisis of the Modern World <a href="https://files.geistlib.xyz/sharing/rec/Rene%20Guenon/1927%20-%20The%20Crisis%20of%20the%20Modern%20World.pdf">URL</a></li>
<li>Guenon, Rene - The Esotericism of Dante <a href="https://files.geistlib.xyz/sharing/rec/Rene%20Guenon/1925%20-%20The%20Esoterism%20of%20Dante.pdf">URL</a></li>
<li>Evola, Julius - The Hermetic Tradition <a href="https://files.geistlib.xyz/sharing/rec/Julius%20Evola/The%20Hermetic%20Tradition%2C%20Symbols%20and%20Teachings%20of%20the%20Royal%20Art%20-%20Julius%20Evola.djvu">URL</a></li>
<li>Evola, Julius - The Metaphysics of Sex <a href="https://files.geistlib.xyz/sharing/rec/Julius%20Evola/The%20Metaphysics%20of%20Sex%20-%20Julius%20Evola.pdf">URL</a></li>
<li><em>Evola, Julius - Revolt against the Modern World</em> <a href="https://files.geistlib.xyz/sharing/rec/Julius%20Evola/Revolt%20Against%20the%20Modern%20World%20-%20Julius%20Evola.pdf">URL</a></li>
<li>Evola, Julius - Pagan Imperialism. Evola’s works are NOT on politics and he knows basically nothing about politics. <a href="https://files.geistlib.xyz/sharing/rec/Julius%20Evola/Pagan%20Imperialism%20and%20Metaphysics%20of%20War%20-%20Julius%20Evola.pdf">URL</a></li>
<li>Ghayat Al-Hakim - Picatrix <a href="https://files.geistlib.xyz/sharing/rec/Picatrix%20-%20Ghayat%20Al-Hakim.pdf">URL</a></li>
<li><em>de Chardin, Pierre Teilhard - The Phenomenon of Man</em></li>
<li>Marsilio Ficino - Platonic Theology <a href="https://files.geistlib.xyz/sharing/rec/Ficino/">URL</a></li>
<li>Giovanni Pico della Mirandola - Oration on the Dignity of Man</li>
<li>Chemical Wedding of Christian Rosencreutz</li>
<li>G. R. S. Mead - Fragments of a Faith Forgotten</li>
</ul>
<h3 id="general-theology-christian-islamic-judaic-etc">General Theology: Christian, Islamic, Judaic, etc.</h3>
<p>Historical and Political “theology” are not included here.</p>
<p>Of course you should have read</p>
<ul>
<li><em>Saint Augustine - City of Gods</em></li>
<li><em>Saint Augustine - Confessions</em></li>
<li>The Writings of Martin Luther</li>
</ul>
<p>etc.</p>
<ul>
<li><em>Saint Augustine - Writings Against the Manichaeans and the Donatists</em></li>
<li><em>Saint Augustine - De Natura Boni</em></li>
<li><em>Saint Augustine - De Trinitate</em></li>
<li><em>Saint Augustine - Anti-Pelagian Writings</em></li>
<li><em>St. Bonaventure - The Soul’s Journey into God, Tree of Life, Life of St. Francis</em> <a href="https://files.geistlib.xyz/sharing/rec/The%20Soul%27s%20Journey%20into%20God%2C%20Tree%20of%20Life%2C%20Life%20of%20St.%20Francis%20-%20St.%20Bonaventura.pdf">URL</a></li>
<li><em>St. Bonaventure - Collationes in Hexaemeron</em>. See <a href="https://files.geistlib.xyz/bonaventure_hexaemeron_tex/Hexaemeron/">here</a>, <code>main.tex</code>. Also see Benedict XVI’s <a href="https://files.geistlib.xyz/sharing/rec/The%20Theology%20of%20History%20in%20St.Bonaventure%20-%20Pope%20Benedict%20XVI.pdf">The Theology of History in St.Bonaventure</a></li>
<li><em>St. Bonaventure - On the Reduction of the Arts to Theology</em></li>
<li>Gilson, Etienne - The Mystical Theology of St. Barnard <a href="https://files.geistlib.xyz/sharing/rec/The%20Mystical%20Theology%20of%20St%20Bernard%20-%20Etienne%20Gilson.pdf">URL</a></li>
<li><em>Anonymous - Theologia Germanica</em>. Paulist press version comes with a first rate introduction.</li>
<li><em>Austin Flannery ed. - Vatican Council II, The Basic Sixteen Documents</em></li>
<li><em>Benedict XVI - Papal Encyclicals</em>. See [URL](<a href="https://files.geistlib.xyz/encyclical_tex/fin/BenedictXVI%20Encyclicals.pdf">https://files.geistlib.xyz/encyclical_tex/fin/BenedictXVI%20Encyclicals.pdf</a> for TeX typesetted pdf) version. Especially <em>Spe Salvi</em> and <em>Deus Caritas est</em></li>
<li>St. Bernard of Clairvaux - Concerning Grace and Free Will <a href="https://files.geistlib.xyz/sharing/rec/Concerning%20Grace%20and%20Free%20Will%20-%20St.%20Bernard%2C%20W.%20W.%20Williams.pdf">URL</a></li>
<li>Hugh of St. Victor - Sacraments of the Christian Faith <a href="https://files.geistlib.xyz/sharing/rec/Sacraments%20of%20the%20Christian%20Faith%20-%20Hugh%20of%20St.%20Victor%2C%20J.%20Deferrari.pdf">URL</a></li>
<li>Goldziher, Ignaz - Introduction to Islamic Theology and Law <a href="https://files.geistlib.xyz/sharing/rec/Introduction%20to%20Islamic%20Theology%20and%20Law%20-%20Ignaz%20Goldziher.pdf">URL</a></li>
<li>M. Friedländer (trans) - The Guide for the Perplexed <a href="https://files.geistlib.xyz/sharing/rec/The%20Guide%20for%20the%20Perplexed%20-%20M.%20Friedl%C3%A4nder%2C%20Moses%20Maimonides.pdf">URL</a></li>
<li>Hardy, Edward R. - The Christology of the Later Fathers <a href="https://files.geistlib.xyz/sharing/rec/The%20Christology%20of%20the%20Later%20Fathers.pdf">URL</a></li>
<li>Henry Chadwick et. al - Alexandrian Christianity <a href="https://files.geistlib.xyz/sharing/rec/Alexandrian%20Christianity%20-%20Henry%20Chadwick%20et.%20al.pdf">URL</a></li>
<li>Philip Watson et al. - Luther and Erasmus, Free Will and Salvation <a href="https://files.geistlib.xyz/sharing/rec/Luther%20and%20Erasmus%2C%20Free%20Will%20and%20Salvation%20-%20E.%20Gordon%20Rupp%2C%20Philip%20S.%20Watson.pdf">URL</a></li>
<li>The Writings of Saint Francis of Assisi <a href="https://files.geistlib.xyz/sharing/rec/The%20Writings%20of%20Saint%20Francis%20of%20Assisi%20-%20Saint%20Francis%20of%20Assisi.pdf">URL</a></li>
<li>Petry, Ray - Late Medieval Mysticism <a href="https://files.geistlib.xyz/sharing/rec/Late%20Medieval%20Mysticism%20-%20ed.%20Ray%20C.%20Petry.pdf">URL</a></li>
<li>The Sermons and Conferences of John Tauler</li>
<li>de Chardin, Pierre Teilhard - Hymn of the Universe</li>
<li><em>de Lubac, Henri - Catholicism</em></li>
<li>Scholem, Gerschom - Major Trends in Jewish Mysticism</li>
<li>Davis, Leo Donald - First Seven Ecumenical Councils</li>
<li><em>de Lubca, Henri - Medieval Exegesis, The Four Senses of Scripture</em> <a href="https://files.geistlib.xyz/sharing/rec/Medieval%20Exegesis%20The%20Four%20Senses%20of%20Scripture%20Vol.1%20-%20Henri%20de%20Lubac.pdf">Vol.1</a> and <a href="https://files.geistlib.xyz/sharing/rec/Medieval%20Exegesis%20The%20Four%20Senses%20of%20Scripture%20Vol.2%20-%20Henri%20de%20Lubac.pdf">Vol.2</a> (not complete)</li>
<li>Scheeben, Matthias J. - The Glories of Divine Grace <a href="https://files.geistlib.xyz/sharing/rec/Scheeben/The%20Glories%20of%20Divine%20Grace%20-%20Scheeben.pdf">URL</a></li>
<li>Rosenzweig, Franz - The Star of Redemption. Maybe should be labelled as philosophy. <a href="https://files.geistlib.xyz/sharing/rec/The%20Star%20of%20Redemption%20-%20Franz%20Rosenzweig.pdf">URL</a></li>
<li><em>Clement of Alexandria - Protrepticus</em></li>
<li><em>Nygren, Anders - Agape And Eros</em></li>
<li>Catechism of the Catholic Church</li>
<li>The Lutheran Confessions</li>
<li>Hans Urs von Balthasar - Cosmic Liturgy</li>
<li><em>Hans Urs von Balthasar - The Glory of the Lord, Vol.1</em>. I’ve only read the first volume.</li>
<li>Missale Romanum</li>
</ul>
<p>Scholarly works</p>
<ul>
<li>Tzamalikos, P. - Origen: Cosmology and Ontology of Time. Essential for those interested in the works of Teilhard de Chardin.</li>
<li>Trigg, Joseph W. - Origen</li>
<li><em>Pelikan, Jaroslav - The Christian Tradition</em>. 5-volume set. Terse Church history and Christian intellectual history. <a href="https://files.geistlib.xyz/sharing/rec/The%20Christian%20Tradition%20Vol.1%20-%20Jaroslav%20Pelikan.pdf">Vol.1</a>, <a href="https://files.geistlib.xyz/sharing/rec/The%20Christian%20Tradition%2C%20Vol.2%20-%20Jaroslav%20Pelikan.pdf">Vol.2</a>, <a href="https://files.geistlib.xyz/sharing/rec/The%20Christian%20Tradition%2C%20Vol.4%20-%20Jaroslav%20Pelikan.pdf">Vol.3</a></li>
<li><em>Rev. Joseph A. Jungmann - The Mass of the Roman Rite, its Origins and Development</em>. Monumental work. <a href="https://files.geistlib.xyz/sharing/rec/The%20Mass%20of%20the%20Roman%20Rite%2C%20its%20Origins%20and%20Development%20%28Missarum%20Sollemnia%29%20-%20Rev.%20Joseph%20A.%20Jungmann.pdf">URL</a></li>
<li>Danielou, Jean - The Origins of Latin Christianity <a href="https://files.geistlib.xyz/sharing/rec/The%20Origins%20of%20Latin%20Christianity%20-%20Jean%20Dani%C3%A9lou.pdf">URL</a></li>
<li><em>Danielou, Jean - The Theology of Jewish Christianity</em> <a href="https://files.geistlib.xyz/sharing/rec/The%20Theology%20of%20Jewish%20Christianity%20-%20Jean%20Dani%C3%A9lou.pdf">URL</a></li>
</ul>
<p>Analytic (also see philosophy. Note that some philosophical works on mathematics and logic are actually theology)</p>
<ul>
<li><em>The T&T Clark Handbook of Analytic Theology</em></li>
</ul>
<p>Others</p>
<ul>
<li>Pelikan, Jaroslav - Mary Through the Centuries <a href="https://files.geistlib.xyz/sharing/rec/Mary%20through%20the%20centuries%20-%20Jaroslav%20Jan%20Pelikan.pdf">URL</a></li>
<li>Joyce, Timothy - Celtic Christianity, a Sacred Tradition. Not a theology book actually, light read. <a href="https://files.geistlib.xyz/sharing/rec/Celtic%20Christianity%2C%20a%20Sacred%20Tradition%20-%20Timothy%20J.%20Joyce.pdf">URL</a></li>
<li><em>Merezhkovsky, Dmitry - 宗教精神：路德与加尔文</em>. No English translation available. It is recommended for those who appreciate the works of Merezhkovsky to read Jung, Mircea Eliade and Teilhard de Chardin <a href="https://files.geistlib.xyz/sharing/rec/Merezhkovsky/%E5%AE%97%E6%95%99%E7%B2%BE%E7%A5%9E%EF%BC%9A%E8%B7%AF%E5%BE%B7%E4%B8%8E%E5%8A%A0%E5%B0%94%E6%96%87%20-%20%E6%A2%85%E5%88%97%E6%97%A5%E7%A7%91%E5%A4%AB%E6%96%AF%E5%9F%BA.pdf">URL</a></li>
</ul>
<h3 id="history-of-religion-mythology-theory-comparative-religion-etc">History of Religion, Mythology (Theory), Comparative Religion, etc</h3>
<p>The field overlaps heavily with psychology, anthropology and sociology. Also sometimes art history and psychoanalysis can be seen as a branch.</p>
<ul>
<li><em>Witzel, E.J. Michael - The Origins of the World’s Mythologies</em></li>
<li><em>Eliade, Mircea - A History of Religious Ideas</em>. Everyone who reads Mircea Eliade should also read Ivan Strenski’s <em>Four Theories of Myth in Twentieth-Century History</em> <a href="https://files.geistlib.xyz/sharing/rec/A%20History%20of%20Religious%20Ideas%20From%20the%20Stone%20Age%20to%20the%20Eleusinian%20Mysteries%20-%20Mircea%20Eliade%2C%20Willard%20R.%20Trask%20%28trans.%29.pdf">Vol.1</a> <a href="https://files.geistlib.xyz/sharing/rec/A%20History%20of%20Religious%20Ideas%20From%20Gautama%20Buddha%20to%20the%20Triumph%20of%20Christianity%20-%20Mircea%20Eliade%2C%20Willard%20R.%20Trask%20%28trans.%29.pdf">Vol.2</a> <a href="https://files.geistlib.xyz/sharing/rec/A%20History%20of%20Religious%20Ideas%20From%20Muhammad%20to%20the%20Age%20of%20Reforms%20-%20Mircea%20Eliade%2C%20Alf%20Hiltebeitel%2C%20Diane%20Apostolos-Cappadona%20%28trans%29.pdf">Vol.3</a></li>
<li><em>Eliade, Mircea - Patterns in Comparative Religion</em></li>
<li><em>Eliade, Mircea - Rites and Symbols of Initiation</em> <a href="https://files.geistlib.xyz/sharing/rec/Rites%20and%20Symbols%20of%20Initiation%20The%20Mysteries%20of%20Birth%20and%20Rebirth%20-%20Mircea%20Eliade.epub">URL</a></li>
<li>Dumezil, Georges - Mitra-Varuna</li>
<li><em>Jann Puhvel ed. - Myth and Law among the Indo-Europeans</em></li>
<li>Mbiti John - Introduction to African religion <a href="https://files.geistlib.xyz/sharing/rec/Introduction%20to%20African%20religion%20-%20Mbiti%2C%20John%20S.pdf">URL</a></li>
<li>Tyalor, Lily Ross - The Divinity of the Roman Emperor <a href="https://files.geistlib.xyz/sharing/rec/The%20Divinity%20of%20the%20Roman%20Emperor%20-%20Lily%20Ross%20Taylor.pdf">URL</a></li>
</ul>
<h2 id="art-music-architecture">Art, Music, Architecture</h2>
<h3 id="aesthetics-criticism">Aesthetics, Criticism</h3>
<ul>
<li><em>Tartakiewicz, Wladyslaw - History of Aesthetics</em>. 3-volume set. The 2nd volume is the “single” book on medieval aesthetics. <a href="https://files.geistlib.xyz/sharing/rec/%E4%B8%AD%E4%B8%96%E7%BA%AA%E7%BE%8E%E5%AD%A6%20-%20%E5%A1%94%E5%A1%94%E7%A7%91%E7%BB%B4%E8%8C%A8.pdf">URL</a> (Chinese, Vol.2)</li>
<li>Tartakiewicz, Wladyslaw - A History of Six [aesthetic] Ideas <a href="https://files.geistlib.xyz/sharing/rec/A%20History%20of%20Six%20Ideas%2C%20and%20Essay%20in%20Aesthetics%20-%20Tatarkiewicz.pdf">URL</a></li>
<li>Heine, Heinrich - On Romantics</li>
<li><em>Baudelaire, Charles - Essays on Aesthetics</em></li>
<li>Tanizaki Junichiro - In’ei raisan (In Praise of Shadows )</li>
<li>Dahlhaus, Carl - Esthetics of Music</li>
</ul>
<h3 id="music">Music</h3>
<ul>
<li>Rickert, Edith - Ancient English Christmas Carols MCCCC to MDCC</li>
<li>Lomax, John A - Cowboy Songs</li>
<li>The English Hymnal</li>
<li>Hymns Ancient and Modern</li>
<li>W. B. Whall - Sea Songs, Ships and Shanties</li>
<li>William Francis Allen, Charles Pickard Ware, Lucy McKim Garrison - Slave Songs of the United States</li>
<li>Liber Usualis 1961</li>
<li>The Hymns of Luther <a href="https://oll.libertyfund.org/title/luther-the-hymns-of-martin-luther#lf0225_head_011">External URL</a></li>
</ul>
<h3 id="music-history-improvisation-thoughts-theory">Music History, Improvisation, Thoughts, Theory</h3>
<ul>
<li><em>John Zorn ed. - Arcana V</em>. Tim Hodgkinson presents a superb essay titled <em>Holy Ghost</em>. Also Garland’s article is good. <a href="https://files.geistlib.xyz/sharing/rec/John%20Zorn%20et%20al.%20-%20Arcana%20V.pdf">URL</a></li>
<li><em>Lang, Paul Henry - Music in Western Civilization</em>. 保罗·亨利·朗，西方文明中的音乐。Must read for anyone interested in western music. The book is not solely about music, but rather like a Hegelian kaleidoscope presenting the spirit of ages of which the music is an ever-evolving manifestation. I read it in Chinese and wasn’t able to find an English version. <a href="https://files.geistlib.xyz/sharing/rec/%E8%A5%BF%E6%96%B9%E6%96%87%E6%98%8E%E4%B8%AD%E7%9A%84%E9%9F%B3%E4%B9%90%20-%20%E4%BF%9D%E7%BD%97%C2%B7%E4%BA%A8%E5%88%A9%C2%B7%E6%9C%97.pdf">URL</a> The English version is now on libgen.</li>
<li>Bailey, Derek - Improvisation</li>
<li>Dahlhaus, Carl - Studies on the Origin of Harmonic Tonality</li>
<li>Dahlhaus, Carl - Foundations of Music History</li>
<li>Frisch Walter - German Modernism. It is really about music and the arts of German modernism but I focused on music.</li>
<li>Cook, Nicholas - The Schenker Project. Those interested in Fin-de-siecle Vienna should also read it.</li>
<li><em>Thomas Christensen et al. - The Cambridge History of Western Music Theory</em>. Really an intellectual history.</li>
<li>林谦三 -东亚乐器考 <a href="https://files.geistlib.xyz/sharing/rec/%E4%B8%9C%E4%BA%9A%E4%B9%90%E5%99%A8%E8%80%83%20-%20%E6%9E%97%E8%B0%A6%E4%B8%89.pdf">URL</a></li>
<li>Schumann, Robert - Music and musicians, Essays and Criticisms</li>
<li><em>Gide, Andre - Notes on Chopin</em>. I read the Korean translation <em>쇼팽노트</em>.</li>
<li><em>Xenakis, Iannis - Formalized Music, Thought and Mathematics in Composition</em>.</li>
<li>Hodgkinson, Tim - Music and the Myth of Wholeness. A work on ethnomusicology and anthropology. Continuation of the essay <em>Holy Ghost</em>.</li>
</ul>
<h3 id="art-history-iconography-theory">Art History, Iconography, Theory</h3>
<ul>
<li><em>Riegl, Alois - Stilfragen(Problems of Style)</em></li>
<li><em>Warburg, Aby - The Renewal of Pagan Antiquity</em>. Including basically all of the important works of Aby Warburg. <a href="https://files.geistlib.xyz/sharing/rec/The%20Renewal%20of%20Pagan%20Antiquity%20-%20Aby%20Warburg.pdf">URL</a></li>
<li>Warburg, Aby - Images from the Region of the Pueblo Indians of North America</li>
<li>Panofsky, Erwin - Gothic Architecture and Scholasticism <a href="https://files.geistlib.xyz/sharing/rec/Gothic%20Architecture%20and%20Scholasticism%20-%20Erwin%20Panofsky.pdf">URL</a></li>
<li><em>Panofsky, Erwin - Perspective as Symbolic Form</em></li>
<li>Panofsky, Erwin - Studies in Iconology</li>
<li>Fritz Saxl, Raymond Klibansky, Erwin Panofsky - Saturn and Melancholy: Studies in the History of Natural Philosophy</li>
<li><em>Otto Benesch - The Art of the Renaissance in Northern Europe</em> <a href="https://files.geistlib.xyz/sharing/rec/The%20Art%20of%20the%20Renaissance%20in%20Northern%20Europe%20-%20Otto%20Benesch.pdf">URL</a></li>
<li>Fritz Szxl - Heritage of Images</li>
<li><em>Max Dvorak - The History of Art as the History of Ideas</em></li>
<li><em>Heinrich Wölfflin - Italian and the German sense of Form</em>. The work is quite boring, its language dull and overly academic, but it is an essential read, especially when one is going to read Otto Rank’s work on the psyche of artists.</li>
<li>Francastel, Pierre - Art and Technology in the Nineteenth and Twentieth Centuries. Actually more on the influence of technology on modern art and architecture.</li>
<li><em>Merrifield, Mary - Original Treatises</em>. Monumental but forgotten work. Also known as <em>Medieval and Renaissance Treatises on the Arts of Painting: Original Texts with English Translations</em>. The alternative title explains all. <a href="https://files.geistlib.xyz/sharing/rec/Original%20Treatises%20Vol.1%20-%20Merrifield.pdf">Vol.1</a> <a href="https://files.geistlib.xyz/sharing/rec/Original%20Treatises%20Vol.2%20-%20Merrifield.pdf">Vol.2</a></li>
<li>Male, Emile - The Gothic Image, Religious Art in France of the Thirteenth Century <a href="https://files.geistlib.xyz/sharing/rec/The%20Gothic%20Image%20Religious%20Art%20in%20France%20of%20the%20Thirteenth%20Century%20-%20Emile%20Male.pdf">URL</a></li>
<li>Kubler, George - The Shape of Time, Remarks on the History of Things <a href="https://files.geistlib.xyz/sharing/rec/The%20Shape%20of%20Time%20Remarks%20on%20the%20History%20of%20Things%20-%20George%20Kubler.pdf">URL</a></li>
<li><em>Wilhelm Worringer - Abstraction and Empathy</em></li>
<li>Wilhelm Worringer - Egyptian Art</li>
<li><em>Wilhelm Worringer - Form in Gothic</em></li>
<li><em>Louis Charbonneau-Lassay - The Bestiary of Christ</em> <a href="https://files.geistlib.xyz/sharing/rec/The%20Bestiary%20of%20Christ%20-%20Louis%20Charbonneau-Lassy.pdf">URL</a></li>
</ul>
<h3 id="architecture">Architecture</h3>
<ul>
<li><em>Studio Zaha Hadid - Total Fluidity</em></li>
<li>Braunfels, Wolfgang - Urban Design in Western Europe</li>
<li><em>Donald Watson, Alan Plattus, Robert Shibley - Time-Saver Standards for Urban Design</em>. Don’t be fooled by the title. Essential read for those interested in the history of urban design, especially the part containing the classic texts of urban design.</li>
<li>Proctor, Robert - Building the Modern Church</li>
<li>Wittkower, Rudolf - Gothic vs. Classic Architectural Projects in Seventeenth-Century Italy</li>
<li><em>Giedion, Siegfried - Space, Time and Architecture</em></li>
<li>Denis Diderot - The Architectural Plates from the Encyclopedie</li>
<li>Curtis, William J. R. - Modern Architecture since 1900 <a href="https://files.geistlib.xyz/sharing/rec/Modern%20Architecture%20since%201900%20-%20William%20J.%20R.%20Curtis.pdf">URL</a></li>
</ul>
<h2 id="philosophy">Philosophy</h2>
<p>I focus on Plato, Duns Scotus, Franz Brentano, Soren Kierkegaard, Charles Sanders Peirce, Gottlob Frege and Michael Dummett. No history of philosophy. Original works, modern commentaries and expositions are all included.</p>
<h3 id="hardcore">Hardcore</h3>
<ul>
<li><em>Plato - Complete Works</em>. Especially Phaedrus, Meno, Parmenides, Euthyphro, Timaeus, Sophist, Republic and Theatetus.</li>
<li><em>Aristotle - Categories</em></li>
<li><em>Aristotle - Nichomachean Ethics</em></li>
<li><em>Aristotle - Metaphsyics</em></li>
<li><em>Aristotle - Physics</em></li>
<li><em>Kant, Emmanuel - Kritik der praktischen Vernunft</em>. You should finish this.</li>
<li>Plotnius - The Enneads</li>
<li><em>Kierkegaard, Soren (John Climacus) - Concluding Unscientific Postscript to Philosophical Fragments</em>. To understand Kierkegaard one needs to read basically <em>all</em> his works or live a life in a specific way, so I prefer to recommend this one really essential work. Note the pseudonym is used.</li>
<li>Brentano, Franz - The Origin of the Knowledge of Right and Wrong.</li>
<li><em>Brentano, Franz - Descriptive Psychology</em>. The beginning of phenomenology in the Cartesian tradition.</li>
<li><em>Zahavi, Dan - Husserl’s Phenomenology</em>. Crystal-clear exposition of Husserl’s phenomenology.</li>
<li>Husserl, Edmund - On the Phenomenology of the Consciousness of Internal Time</li>
<li><em>Nietzsche, Friedrich - Beyond Good and Evil</em></li>
<li><em>Nietzsche, Friedrich - On the Genealogy of Morals</em>. Basically I recommend all of Nietzsche’s works, excluding his earlier works like <em>The Birth of Tragedy</em> which is a waste of time for all those Dionysian and whatever things are so widespread that even a branlet knows how to use the jargon. However, his writings on Wagner and his personality is worth reading.</li>
<li>St. Anslem - Proslogion and Monologion</li>
<li><em>John Duns Scotus</em> <a href="https://files.geistlib.xyz/sharing/rec/DunsScotus/">URL</a>
<ul>
<li>Antonie Vos’s work <em>The Philosophy of John Duns Scotus</em> will be a good introduction.</li>
<li>You should have read some works of Anslem and Augustine.</li>
<li>You will prefer to read some English works at first even if you can read Latin.</li>
<li><em>Questions on the Metaphysics of Aristotle by John Duns Scotus</em></li>
<li>For ethics, Thomas Williams’ <em>Selected Writings On Ethics</em></li>
<li>For metaphysics, Frank and Wolter’s <em>Duns Scotus, Metaphysician</em></li>
</ul>
</li>
<li>Ibn Rushd / Averroes - Long Commentary on the De Anima of Aristotle</li>
<li><em>Cross, Richard - The Metaphysics of the Incarnation, Thomas Aquinas to Duns Scotus</em></li>
<li><em>Peirce, Charles Sanders - Collected Papers</em></li>
<li><em>Wittgenstein, Ludwig - Lectures and Conversations on Aesthetics, Psychology and Religion</em>. His major works are basically unreadable and in my opinion not that worth reading. His lectures are without doubt worth reading. His best work is <em>Remarks on the Foundations of Mathematics</em>, see the corresponding section.</li>
<li><em>Wittgenstein, Ludwig - Lectures on Ethics</em></li>
<li>Wittgenstein, Ludwig - Remarks on Color. Also see <em>On Vision and Colors</em> by Arthur Schopenhauer, Philipp Otto Runge, Georg Stahl.<a href="https://files.geistlib.xyz/sharing/rec/Remarks%20on%20Colour%20-%20L.%20Wittgenstein.epub">URL</a></li>
<li>韩林合 - 维特根斯坦《哲学研究》解读. 没有必要阅读韩林合的解读，但对维特根斯坦笔记和写作的整理（仿宋体）极有价值。</li>
<li>Löwith, Karl - Nietzsche and Philosophy</li>
<li>Herbert Davidson - Alfarabi, Avicenna, and Averroes, on Intellect: Their Cosmologies, Theories of the Active Intellect, and Theories of Human Intellect</li>
<li>Jonas, Hans - The Phenomenon of Life, Toward a Philosophical Biology</li>
<li>Martin Buber - I and Thou</li>
<li>MacIntyre, Alasdair - After Virtue</li>
<li>Bolzano, Bernard - Selected Writings on Ethics and Politics</li>
<li>Max Scheler - The Nature of Sympathy</li>
<li>Max Scheler - Formalism in Ethics and Non-Formal Ethics of Values</li>
<li>Wilhelm Dilthey - Poetry and Experience</li>
<li>Ernst Cassirer - The Philosophy of Symbolic Forms</li>
<li>Heinrich Rickert - Kulturwissenschaft und Naturwissenschaft. Wierdly titled <em>Science and history: A critique of positivist epistemology</em> in English. 文化科学和自然科学</li>
<li>Hamann, Johann Georg - Selected Writings</li>
<li>Novalis - Philosophical Writings</li>
</ul>
<h3 id="philosophy-of-mathematics-and-logic">Philosophy of Mathematics and Logic</h3>
<p>Jean Yves-Girard, Frege, Dummett, Brouwer, Martin-Lof, Brentano, Bolzano, Lawvere, Husserl, Gerald Gentzen, etc.</p>
<ul>
<li>Manin, Yuri - Mathematics as Metaphor. Manin discussed the cultural aspects of mathematics well, but as a believer of Enlightenment do not really dive deep into the semantics of mathematics and physics, or rather his notion of semantics is that of pre-Romantic rationalism. Worth reading, but not deep.</li>
</ul>
<p>I focus on topos-theoretic notion of logical truth. This is a brand new subject. See <a href="https://geistlib.xyz/personal-recommendation-library/#Category and Topos">Category and Topos</a> for the time being, and also</p>
<ul>
<li><em>Michael Dummett - The Logical Basis of Metaphysics</em>. The most profound work on the theory of meaning.</li>
<li><em>Michael Dummett - The Seas of Language</em>.</li>
<li><em>Michael Dummett - Truth and Other Enigmas</em></li>
<li>Rodin, Andrei - Axiomatic Method and Category Theory <a href="https://arxiv.org/abs/1210.1478">URL</a> it is recommended to download the tar archive for the source and re-typeset the tex file.</li>
<li><em>Wittgenstein, Ludwig - Remarks on the Foundations of Mathemtaics</em>. This is his best work. It is <em>not</em>, strictly speaking, about the foundations of mathematics, in the sense of set theory, logic, etc. but rather about the structure of rules.</li>
<li>Hans Halvorson - The Logic in Philosophy of Science. The philosophy presented is quite bad and even stupid, but the exposition of mathematics is great.</li>
<li><em>Frege’s complete works</em>.</li>
<li>Arend Heyting - Intuitionism, an introduction.</li>
</ul>
<p>Keywords:</p>
<ul>
<li>Intuitionistic logic</li>
<li>Synthetic differential geometry</li>
<li>Internal logic/Internal language</li>
<li>Curry-Howard correspondence</li>
<li>Syntax-Semantics duality</li>
<li>Isbell duality</li>
</ul>
<h3 id="philosophy-of-science">Philosophy of Science</h3>
<h4 id="scientific-methods-and-representations">Scientific Methods and Representations</h4>
<ul>
<li><del>Paul Feyerabend - Against method</del>. A reasonably good book, but the next item is much better.</li>
<li>Bas van Fraassen - The Empirical Stance.</li>
<li>Bas van Fraassen - Scientific Representation.</li>
</ul>
<h4 id="philosophy-of-science-1">Philosophy of Science</h4>
<ul>
<li>Elsevier Handbook of the Philosophy of Science. Especially the first volume on physics.</li>
<li>Ilya Prigogine - Order out of Chaos.</li>
</ul>
<h3 id="soft">“Soft”</h3>
<ul>
<li><em>Paul Veyne - Did the Greeks Believe in Their Myths? An Essay on the Constitutive Imagination</em> <a href="https://files.geistlib.xyz/sharing/rec/Did%20the%20Greeks%20Believe%20in%20Their%20Myths%20An%20Essay%20on%20the%20Constitutive%20Imagination%20-%20Paul%20Veyne.pdf">URL</a></li>
<li><em>Pierre Hadot - Philosophy as a Way of Life. Spiritual Exercises from Socrates to Foucault</em></li>
<li><em>Pierre Hadot - The Veil of Isis</em></li>
<li>Gilles Deleuze, Felix Guattari - What is Philosophy</li>
<li>Gottfried Herder - On the Origin of Language</li>
</ul>
<h2 id="psychoanalysis-psychology-cognitive-science">Psychoanalysis, Psychology, Cognitive Science</h2>
<p>Cognitive science and modern metaphysics overlap in that both of them studies how th