← venn-to-topos

Main_venn_topos.tex

\def\pgfsysdriver{pgfsys-dvipdfmx.def}
\PassOptionsToPackage{dvipdfmx}{graphicx}
\PassOptionsToPackage{dvipdfmx}{color}
\PassOptionsToPackage{dvipdfmx}{xcolor}
\PassOptionsToPackage{dvipdfmx}{hyperref}
\documentclass[14pt,notheorems,aspectratio=169]{beamer}

\usepackage{array,booktabs}
\usepackage{amsmath,amssymb,mathtools,amsthm}
\usepackage{mathrsfs}
\usepackage{etoolbox}
\usepackage{tikz}
\usepackage{graphicx}
\usetikzlibrary{positioning,arrows.meta,calc,shapes.geometric,fit,backgrounds}
\providecommand{\pgfsyspdfmark}[3]{}
\usepackage[utf8]{inputenc}
\usepackage{bxdpx-beamer}
\usepackage{pxjahyper}
\usepackage[backend=bibtex,style=alphabetic]{biblatex}
\addbibresource{venn-refs.bib}

\usetheme{Darmstadt}
\usecolortheme{seahorse}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{items}[default]
\usefonttheme{professionalfonts}

\definecolor{toposblue}{RGB}{0,72,165}
\definecolor{toposorange}{RGB}{236,120,0}
\definecolor{toposgreen}{RGB}{0,130,90}
\definecolor{toposred}{RGB}{190,45,45}
\definecolor{lightblue}{RGB}{225,238,255}
\definecolor{lightorange}{RGB}{255,240,220}
\definecolor{lightgreen}{RGB}{225,248,238}
\definecolor{lightred}{RGB}{255,229,229}
\definecolor{paper}{RGB}{250,250,247}
\definecolor{ink}{RGB}{31,35,38}
\definecolor{muted}{RGB}{112,118,125}
\definecolor{line}{RGB}{214,216,218}

% Color grammar: green = logic, orange = geometry/space. Bridges stay neutral.
\colorlet{logic}{toposgreen}
\colorlet{spacec}{toposorange}
\colorlet{toposc}{spacec}
\colorlet{bridge}{muted}
\colorlet{danger}{toposred}
\colorlet{logicLight}{lightgreen}
\colorlet{spaceLight}{lightorange}
\colorlet{bridgeLight}{line!30}
\colorlet{dangerLight}{lightred}

\setbeamercolor{title}{fg=ink}
\setbeamercolor{frametitle}{fg=ink}
\setbeamercolor{block title}{bg=line!45,fg=ink}
\setbeamercolor{block body}{bg=line!12,fg=black}
\setbeamercolor{alerted text}{fg=danger}

\newenvironment{definition}[1][]{%
  \begingroup
  \setbeamercolor{block title}{%
    use=section in head/foot,
    bg=section in head/foot.bg,
    fg=section in head/foot.fg
  }%
  \setbeamercolor{block body}{%
    use=section in head/foot,
    bg=section in head/foot.bg!35!paper,
    fg=black
  }%
  \begin{block}{Definition\ifblank{#1}{}{ (#1)}}%
}{%
  \end{block}%
  \endgroup
}
\newenvironment{theorem}[1][]{%
  \begin{block}{Theorem\ifblank{#1}{}{ (#1)}}%
}{%
  \end{block}%
}
\newenvironment{example}[1][]{%
  \begin{block}{Example\ifblank{#1}{}{ (#1)}}%
}{%
  \end{block}%
}

\newcommand{\Set}{\mathbf{Set}}
\newcommand{\BA}{\mathbf{Bool}}
\newcommand{\FinSet}{\mathbf{FinSet}}
\newcommand{\FinBool}{\mathbf{FinBool}}
\newcommand{\Sub}{\mathrm{Sub}}
\newcommand{\Clop}{\mathrm{Clop}}
\newcommand{\Stone}{\mathrm{Stone}}
\newcommand{\Hom}{\mathrm{Hom}}
\newcommand{\Sh}{\mathrm{Sh}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\sem}[1]{[\![#1]\!]}
\newcommand{\true}{\mathsf{true}}
\newcommand{\false}{\mathsf{false}}
\newcommand{\key}[1]{\textcolor{logic}{\textbf{#1}}}
\newcommand{\geom}[1]{\textcolor{spacec}{\textbf{#1}}}
\newcommand{\vocab}[1]{\textbf{#1}}
\AtBeginEnvironment{frame}{\small}

\newcommand{\onemessage}[1]{%
  \vfill
  \begin{center}
    {\large\bfseries\color{ink}#1}
  \end{center}
}
\newcommand{\propvar}[1]{%
  \mathord{\text{%
    \begingroup
    \setlength{\fboxsep}{2.2pt}%
    \fcolorbox{logic}{logicLight}{\strut #1}%
    \endgroup
  }}%
}

\newcount\lgtablelevel
\newcommand{\setlogicgeometrylevel}[1]{%
  \lgtablelevel=4
  \ifstrequal{#1}{intro}{\lgtablelevel=0}{}%
  \ifstrequal{#1}{venn}{\lgtablelevel=1}{}%
  \ifstrequal{#1}{stone}{\lgtablelevel=2}{}%
  \ifstrequal{#1}{locale}{\lgtablelevel=3}{}%
  \ifstrequal{#1}{topos}{\lgtablelevel=4}{}%
}
\newcommand{\lgrow}[3]{%
  \textcolor{logic}{#2} & \textcolor{spacec}{#3} \\
}
\newcommand{\lgdivider}{\specialrule{.45pt}{.2ex}{.2ex}}
\newcommand{\logicgeometrytable}[1]{%
  \begingroup
  \setlogicgeometrylevel{#1}%
  \vspace{-4mm}%
  \normalsize
  \renewcommand{\arraystretch}{0.62}
  \setlength{\tabcolsep}{4pt}
  \setlength{\aboverulesep}{0pt}
  \setlength{\belowrulesep}{0pt}
  \setlength{\extrarowheight}{0pt}
  \begin{tabular}{>{\raggedright\arraybackslash}p{0.52\textwidth}>{\raggedright\arraybackslash}p{0.36\textwidth}}
    \toprule
    \textcolor{logic}{\textbf{論理}} & \textcolor{spacec}{\textbf{幾何}} \\
    \midrule
    \lgrow{1}{\textcolor{logic}{命題}}{(開)部分(集合)}
    \lgrow{1}{\textcolor{logic}{論理}積}{共通部分}
    \lgrow{1}{\textcolor{logic}{可能世界}}{\textcolor{spacec}{点}}
    \lgrow{1}{\textcolor{logic}{論理}包含}{(\textcolor{spacec}{幾何}的)包含}
    \lgrow{1}{完全性}{\textcolor{spacec}{点}の存在}
    \lgdivider
    \lgrow{2}{\textcolor{logic}{ブール代数}}{\textcolor{spacec}{Stone空間}}
    \lgdivider
    \lgrow{3}{\textcolor{logic}{直観主義}(無限)\textcolor{logic}{命題}\textcolor{logic}{論理}}{\textcolor{spacec}{Locale}(滑らかな空間)}
    \lgdivider
    \lgrow{4}{\textcolor{logic}{量化子}}{層}
    \lgrow{4}{トポス(理論)}{{トポス}(空間)}
    \bottomrule
  \end{tabular}
  \endgroup
}

\tikzset{
  >={Latex[length=2.4mm,width=2.0mm]},
  world/.style={circle,draw=spacec,fill=spaceLight,very thick,minimum size=9mm,inner sep=0pt,font=\small\bfseries},
  worldgood/.style={circle,draw=bridge,fill=bridgeLight,very thick,minimum size=10mm,inner sep=0pt,font=\small\bfseries},
  logicbox/.style={rounded corners=2pt,draw=logic,fill=logicLight,very thick,inner sep=7pt,align=center},
  spacebox/.style={rounded corners=2pt,draw=spacec,fill=spaceLight,very thick,inner sep=7pt,align=center},
  bridgebox/.style={rounded corners=2pt,draw=bridge,fill=bridgeLight,very thick,inner sep=7pt,align=center},
  neutralbox/.style={rounded corners=2pt,draw=line,fill=paper,thick,inner sep=7pt,align=center},
  dangerbox/.style={rounded corners=2pt,draw=danger,fill=dangerLight,very thick,inner sep=7pt,align=center},
  tinylabel/.style={font=\scriptsize\color{muted},align=center},
  arrow/.style={->,very thick,draw=bridge},
  linearrow/.style={->,thick,draw=ink!70},
  dot/.style={circle,fill=ink,inner sep=1.8pt}
}

\title[\texorpdfstring{{ベン図}から{トポス}へ}{ベン図からトポスへ}]{\texorpdfstring{{ベン図}から{トポス}へ}{ベン図からトポスへ}}
\subtitle{\textcolor{logic}{論理}$\leftrightarrow${\textcolor{spacec}{幾何}}}
\author{洞龍弥}
\institute[]{\texorpdfstring{数理{\color{spacec}空間}{トポス} 新歓 2026}{数理空間トポス 新歓 2026}}
\date[2026年5月23日]{2026年5月23日}

\begin{document}

% 1
\begin{frame}{\inserttitle}
  \begin{tikzpicture}[remember picture,overlay]
    \node[anchor=center,inner sep=0pt] at (current page.center) {%
      \includegraphics[width=\paperwidth,height=\paperheight]{figures/title_logic_geometry_world.jpg}%
    };
    \fill[paper]
      (current page.south west) rectangle ([yshift=28mm]current page.south east);
    \draw[line width=.35pt,draw=line]
      ([yshift=28mm]current page.south west) -- ([yshift=28mm]current page.south east);
    \node[
      anchor=south west,
      align=left,
      text=ink,
      inner sep=0pt
    ] at ([xshift=9mm,yshift=7mm]current page.south west) {%
      {\LARGE\bfseries\inserttitle {\hfill \small \insertsubtitle}}\\[1.3mm]
      {\normalsize\insertauthor\quad \insertinstitute\quad \insertdate}%
    };
  \end{tikzpicture}
\end{frame}

\begin{frame}{オイラーの手紙}
\begin{columns}[T,onlytextwidth]
  \begin{column}{0.68\textwidth}

    これらの\textcolor{spacec}{丸い図形},いやむしろ\\
    (どのような形を与えようとも\\
    かまわないのですから)
    \textbf{\textcolor{spacec}{空間}}は,[...]\\
    \textbf{\textcolor{logic}{論理学}}の中で自慢げに語られ,\\
    多大な苦労をして証明される神秘の全てを,\\
    私たちに明らかにしてくれるのです.
  \end{column}

  \begin{column}{0.32\textwidth}
    \centering
    \includegraphics[height=5cm]{euler_letters/leonhard_euler_handmann_1753.jpg}
  \end{column}
\end{columns}
{\footnotesize ドイツ王女への手紙,引用者訳,強調} \hfill {\footnotesize 煽ってない?}
\end{frame}

% 2
\begin{frame}{目次}
\tableofcontents
\end{frame}

\section[ベン図]{ベン図 $\leftarrow$ 嘘つきパズル}

% 4
\begin{frame}{目次}
\tableofcontents[currentsection]
\end{frame}

% 5


% 6
\begin{frame}{{\color{logic}論理}パズル(1/2) 嘘つきは誰か?}
\begin{center}
\begin{tikzpicture}[x=1cm,y=1cm]
  \foreach \x/\name/\speech in {
    -4.1/A/{\color{logic}「B が嘘つき」},
     0.0/B/{\color{logic}「C が嘘つき」},
     4.1/C/{\color{logic}\mbox{「AもBも正直」}}
  }{
    \draw[very thick,draw=ink,fill=paper] (\x,1.05) circle (.33);
    \draw[very thick,draw=ink,fill=paper,rounded corners=8pt] (\x-.52,-0.05) rectangle (\x+.52,.72);
    \node[font=\large\bfseries] at (\x,.25) {\name};
    \node[font=\large,align=center,text width=4.05cm] at (\x,-1.18) {\speech};
  }
\end{tikzpicture}
\end{center}
\end{frame}

% 7
\begin{frame}{{\color{logic}論理}パズル(2/2) {\color{spacec}ベン図}で``{\color{spacec}視覚的}に"理解する}
\begin{center}
\begin{tikzpicture}[x=1cm,y=1cm]
  \foreach \x/\name/\speech in {
    -4.1/A/{\color{logic}「B は嘘つき」},
     0.0/B/{\color{logic}「C は嘘つき」},
     % 4.1/C/{\color{logic}「Bが正直ならAも正直」}
     4.1/C/{\color{logic}\mbox{「AもBも正直」}}
  }{
    \draw[very thick,draw=ink,fill=paper] (\x,1.05) circle (.33);
    \draw[very thick,draw=ink,fill=paper,rounded corners=8pt] (\x-.52,-0.05) rectangle (\x+.52,.72);
    \node[font=\large\bfseries] at (\x,.25) {\name};
    \node[font=\large,align=center,text width=4.05cm] at (\x,-1.18) {\speech};
  }
\end{tikzpicture}



\begin{tikzpicture}[scale=.88]
  \begin{scope}[xshift=-4.15cm]
    % \node[font=\bfseries\color{spacec}] at (0,1.22) {A $\leftrightarrow$ Bが嘘};
    \draw[very thick,rounded corners=2pt,draw=line,fill=white] (-1.45,-1.18) rectangle (1.45,1.02);
    \fill[spaceLight] (-.38,.12) circle (.72);
    \fill[spaceLight] (.38,.12) circle (.72);
    \begin{scope}
      \clip (-.38,.12) circle (.72);
      \fill[white] (.38,.12) circle (.72);
    \end{scope}
    \draw[very thick,spacec] (-.38,.12) circle (.72);
    \draw[very thick,spacec] (.38,.12) circle (.72);
    \draw[very thick,spacec] (0,-.48) circle (.72);
    \node at (-.78,.62) {A};
    \node at (.78,.62) {B};
    \node at (0,-.98) {C};
    \fill[black!50!spacec] (.72,.24) circle (2.6pt);
  \end{scope}

  \begin{scope}
    % \node[font=\bfseries\color{spacec}] at (0,1.22) {B $\leftrightarrow$ Cが嘘};
    \draw[very thick,rounded corners=2pt,draw=line,fill=white] (-1.45,-1.18) rectangle (1.45,1.02);
    \fill[spaceLight] (.38,.12) circle (.72);
    \fill[spaceLight] (0,-.48) circle (.72);
    \begin{scope}
      \clip (.38,.12) circle (.72);
      \fill[white] (0,-.48) circle (.72);
    \end{scope}
    \draw[very thick,spacec] (-.38,.12) circle (.72);
    \draw[very thick,spacec] (.38,.12) circle (.72);
    \draw[very thick,spacec] (0,-.48) circle (.72);
    \node at (-.78,.62) {A};
    \node at (.78,.62) {B};
    \node at (0,-.98) {C};
    \fill[black!50!spacec] (.72,.24) circle (2.6pt);
  \end{scope}

  \begin{scope}[xshift=4.15cm]
% C <-> (A \land B)

% 背景をまず真として塗る
\fill[spaceLight] (-1.45,-1.18) rectangle (1.45,1.02);

% C の中は一度抜く
\fill[white] (0,-.48) circle (.72);

% A \cap B は C の外では偽にしたいので抜く
\begin{scope}
  \clip (-.38,.12) circle (.72); % A の中
  \fill[white] (.38,.12) circle (.72); % A \cap B を白く抜く
\end{scope}

% C の中では A \cap B だけ真なので塗り戻す
\begin{scope}
  \clip (0,-.48) circle (.72); % C の中
  \begin{scope}
    \clip (-.38,.12) circle (.72); % A の中
    \fill[spaceLight] (.38,.12) circle (.72); % A \cap B \cap C
  \end{scope}
\end{scope}

% 枠線
\draw[very thick,rounded corners=2pt,draw=line]
  (-1.45,-1.18) rectangle (1.45,1.02);

% 円の輪郭
\draw[very thick,spacec] (-.38,.12) circle (.72);
\draw[very thick,spacec] (.38,.12) circle (.72);
\draw[very thick,spacec] (0,-.48) circle (.72);

% ラベル
\node at (-.78,.62) {A};
\node at (.78,.62) {B};
\node at (0,-.98) {C};
\fill[black!50!spacec] (.72,.24) circle (2.6pt);
\end{scope}
\end{tikzpicture}
\end{center}

% \hfill\vocab{答え: AとCが本当,Bが嘘}
\begin{center}
\vocab{答え: AとCが嘘,Bが正直}
\end{center}
\end{frame}

% 8
\begin{frame}{視点:{\color{logic}可能世界}$\leftrightarrow${\color{spacec}点}}
\textcolor{logic}{可能世界}の\textcolor{spacec}{配置空間}
% \begin{center}
% {\large\bfseries
% \textcolor{logic}{可能世界} $\leftrightarrow$ \textcolor{spacec}{点}
% }
% \end{center}

% \vspace{-3mm}
\begin{center}
\begin{tikzpicture}[x=1cm,y=1cm]

  % 左:人物と発言
  \begin{scope}[shift={(-3.7,0)}]
    \foreach \x/\name/\speech in {
      -1.55/A/{\color{logic}「B は正直」},
       1.55/B/{\color{logic}「A は正直」}
    }{
      % head
      \draw[very thick,draw=ink,fill=paper]
        (\x,0.72) circle (.33);

      % body
      \draw[very thick,draw=ink,fill=paper,rounded corners=8pt]
        (\x-.52,-0.4) rectangle (\x+.52,.38);

      % name
      \node[font=\large\bfseries\color{ink}] at (\x,-0.1) {\name};

      % speech
      \node[
        font=\large\bfseries,
        align=center,
        text width=3.3cm,
        text=logic
      ] at (\x,-1.05) {\speech};
    }
  \end{scope}

  % 中央:対応の矢印
  \node[
    font=\Large\bfseries,
    text=bridge
  ] at (0,0.1) {$\leftrightarrow$};

  % 右:ベン図
  \begin{scope}[shift={(3.7,0)},scale=1.15]

    % universe
    \fill[spaceLight] (-2.3,-1.25) rectangle (2.3,1.45);

    % A, B を一度白で抜く
    \fill[white] (-.55,.12) circle (.95);
    \fill[white] (.55,.12) circle (.95);

    % A \cap B を塗り戻す
    \begin{scope}
      \clip (-.55,.12) circle (.95);
      \fill[spaceLight] (.55,.12) circle (.95);
    \end{scope}

    % 枠線
    \draw[very thick,rounded corners=3pt,draw=line]
      (-2.3,-1.25) rectangle (2.3,1.45);

    % 円の輪郭
    \draw[very thick,spacec] (-.55,.12) circle (.95);
    \draw[very thick,spacec] (.55,.12) circle (.95);

    % ラベル
    \node[font=\bfseries] at (-1.15,.9) {$A$};
    \node[font=\bfseries] at (1.15,.9) {$B$};

    % model points
    \fill[black!65!spacec] (0,.12) circle (3pt);
    \node[font=\scriptsize,above] at (0,.22) {$M_1$};

    \fill[black!65!spacec] (1.55,-.85) circle (3pt);
    \node[font=\scriptsize,above] at (1.55,-.75) {$M_2$};

  \end{scope}

\end{tikzpicture}
\end{center}
{\footnotesize(注意: 可能世界とモデルを意図的に混同しているが,そこまで悪くない嘘である.)}
\end{frame}





% 10
\begin{frame}{視点:\textcolor{logic}{矛盾} $\iff$ \textcolor{spacec}{無}}
\begin{center}
\begin{tikzpicture}[x=1cm,y=1cm,scale=.98]
  \foreach \x/\name/\speech in {
    -4.0/A/{\color{logic}「B は嘘つき」},
     0.0/B/{\color{logic}「C は嘘つき」},
     4.0/C/{\color{logic}「A が正直なら B も正直」}
  }{
    \draw[very thick,draw=ink,fill=paper] (\x,0.72) circle (.33);
    \draw[very thick,draw=ink,fill=paper,rounded corners=8pt]
      (\x-.52,-0.4) rectangle (\x+.52,.38);
    \node[font=\large\bfseries] at (\x,-0.1) {\name};
    \node[font=\small,align=center,text width=3.35cm] at (\x,-1.15) {\speech};
  }
  \node[logic] at (7, -1.15) {矛盾};
\end{tikzpicture}

\vspace{-2mm}

\begin{tikzpicture}[scale=.86]

  % A <-> not B
  \begin{scope}[xshift=-4.15cm]
    \draw[very thick,rounded corners=2pt,draw=line,fill=white]
      (-1.45,-1.18) rectangle (1.45,1.02);

    \fill[spaceLight] (-.38,.12) circle (.72);
    \fill[spaceLight] (.38,.12) circle (.72);

    \begin{scope}
      \clip (-.38,.12) circle (.72);
      \fill[white] (.38,.12) circle (.72);
    \end{scope}

    \draw[very thick,spacec] (-.38,.12) circle (.72);
    \draw[very thick,spacec] (.38,.12) circle (.72);
    \draw[very thick,spacec] (0,-.48) circle (.72);

    \node at (-.78,.62) {A};
    \node at (.78,.62) {B};
    \node at (0,-.98) {C};
  \end{scope}

  % B <-> not C
  \begin{scope}
    \draw[very thick,rounded corners=2pt,draw=line,fill=white]
      (-1.45,-1.18) rectangle (1.45,1.02);

    \fill[spaceLight] (.38,.12) circle (.72);
    \fill[spaceLight] (0,-.48) circle (.72);

    \begin{scope}
      \clip (.38,.12) circle (.72);
      \fill[white] (0,-.48) circle (.72);
    \end{scope}

    \draw[very thick,spacec] (-.38,.12) circle (.72);
    \draw[very thick,spacec] (.38,.12) circle (.72);
    \draw[very thick,spacec] (0,-.48) circle (.72);

    \node at (-.78,.62) {A};
    \node at (.78,.62) {B};
    \node at (0,-.98) {C};
  \end{scope}

  % C <-> (A => B)
  \begin{scope}[xshift=4.15cm]
    \draw[very thick,rounded corners=2pt,draw=line,fill=white]
      (-1.45,-1.18) rectangle (1.45,1.02);

    % C の外では反転:
    % not(A => B) = A \cap B^c
    % したがって C^c \cap A \cap B^c を塗る
    \begin{scope}
      \clip (-.38,.12) circle (.72); % A の中

      \fill[spaceLight] (-1.45,-1.18) rectangle (1.45,1.02);
      \fill[white] (.38,.12) circle (.72);  % B の中を抜く
      \fill[white] (0,-.48) circle (.72);   % C の中を抜く
    \end{scope}

    % C の中では A => B:
    % C \cap (A^c \cup B) を塗る
    \begin{scope}
      \clip (0,-.48) circle (.72); % C の中

      \fill[spaceLight] (-1.45,-1.18) rectangle (1.45,1.02);

      % 反例 A \cap B^c だけ白で抜く
      \begin{scope}
        \clip (-.38,.12) circle (.72); % A の中
        \fill[white] (-1.45,-1.18) rectangle (1.45,1.02);
        \fill[spaceLight] (.38,.12) circle (.72); % A \cap B を塗り戻す
      \end{scope}
    \end{scope}

    \draw[very thick,rounded corners=2pt,draw=line]
      (-1.45,-1.18) rectangle (1.45,1.02);

    \draw[very thick,spacec] (-.38,.12) circle (.72);
    \draw[very thick,spacec] (.38,.12) circle (.72);
    \draw[very thick,spacec] (0,-.48) circle (.72);

    \node at (-.78,.62) {A};
    \node at (.78,.62) {B};
    \node at (0,-.98) {C};
  \end{scope}
  
  \node[spacec] at (8, 0) {無};
\end{tikzpicture}
\end{center}

\end{frame}

% 9
\begin{frame}{対応表: {\color{logic}論理}と{\color{spacec}幾何}}
\centering
\logicgeometrytable{venn}
\end{frame}

\section[Stone]{Stone双対$\leftarrow$ 1億円パズル}

% 11
\begin{frame}{目次}
\tableofcontents[currentsection]
\end{frame}

% 12
\begin{frame}{{\color{logic}論理}パズル: この人から1億円もらおう!}
絶対\textcolor{logic}{約束}守るマンがやってきて,言った.
\begin{center}
\begin{tikzpicture}[x=1cm,y=1cm]

  % 人
  \draw[very thick,draw=ink,fill=paper]
    (-5.15,0.65) circle (.42);
  \draw[very thick,draw=ink,fill=paper,rounded corners=9pt]
    (-5.8,-1.2) rectangle (-4.5,0.15);
  \node[font=\large\bfseries] at (-5.15,-.55) {絶};

  % 吹き出し本体
  \node[
    draw=ink,
    very thick,
    fill=paper,
    rounded corners=10pt,
    align=center,
    text width=9.2cm,
    inner sep=9pt,
    font=\Large\bfseries
  ] (speech) at (1.0,0.25)
  {\textcolor{logic}{正しい}ことを言ったら1000円あげるよ,\\
  けど\textcolor{logic}{間違った}ことを言ったら1000円あげない};

  % 吹き出しのしっぽ
  % \draw[very thick,draw=ink,fill=paper]
  %   (-3.55,0.05) -- (-2.95,0.22) -- (-3.45,-0.28) -- cycle;

\end{tikzpicture}

\end{center}
{\Large
どう\textcolor{logic}{発言}すれば\textbf{1億円をもらえるか?}} (メタ可)
\end{frame}

% 13
\begin{frame}{{\color{logic}論理}パズル: 普通の解法}
\textbf{答:「あなたは,私に1000円をくれず,かつ1億円もくれない.」}


\begin{center}
\begin{tikzpicture}[
  x=1cm,y=1cm,
  nom/.style={
    rounded corners=3pt,
    draw=ink,
    fill=paper,
    very thick,
    align=center,
    font=\small\bfseries,
    inner sep=6pt,
    minimum width=3.3cm
  },
  badleaf/.style={
    rounded corners=3pt,
    draw=danger,
    fill=dangerLight,
    very thick,
    align=center,
    font=\small\bfseries,
    inner sep=6pt,
    minimum width=2.7cm
  },
  arr/.style={->,very thick,draw=bridge}
]

\node[nom] (root) at (0,1.35) {\textcolor{logic}{発言}の\textcolor{logic}{真偽}};

\node[nom] (truecase) at (-3.9,-2.65)
  {\textcolor{logic}{約束}に矛盾};

\node[nom] (falsecase) at (2.0,-0.4)
  {1000円か1億円もらえる};

\node[nom] (false1000) at (0.0,-2.65)
  {\textcolor{logic}{約束}に矛盾};

\node[nom] (false100m) at (4.0,-2.65)
  {$1$億円 GET};

\draw[arr] (root) -- node[left,font=\small] {真} (truecase);
\draw[arr] (root) -- node[right,font=\small] {偽} (falsecase);

\draw[arr] (falsecase) -- node[left,font=\small] {$1000$円} (false1000);
\draw[arr] (falsecase) -- node[right,font=\small] {$1$億円} (false100m);
\end{tikzpicture}
\end{center}
\end{frame}

% 14
\begin{frame}{{\color{logic} 論理}の{\color{logic}代数}(1/2): \textcolor{logic}{ブール代数}の定義}
\begin{columns}
    \column{0.5\textwidth}
    パズルを方程式で解こう!
    \begin{definition}[\textcolor{logic}{ブール代数}(雑)]
\textcolor{logic}{ブール代数}とは,足し算と掛け算ができて\footnote{環},
\[x^2=x\]を満たすもの.
\end{definition}
\column{0.5\textwidth}

\begin{example}
    [\textcolor{logic}{命題}の\textcolor{logic}{ブール代数}]
\begin{center}
    \begin{tabular}{c|c}\hline
        0 & $\bot$ \\\hline 
        $p+q$ & $p \not\leftrightarrow q$ \\\hline
        1 & $\top$ \\\hline
        $\times$ & $p \land q$ \\ \hline
    \end{tabular}
\end{center}
\end{example}
\begin{center}
\begin{tabular}{c|c}\hline
        $1+p$ & $\lnot p$ \\\hline 
        $1+p+q$ & $p \leftrightarrow q$ \\\hline
    \end{tabular}
    \end{center}
\end{columns}

\end{frame}

% 15
\begin{frame}{{{\color{logic} 論理}の{\color{logic}代数}(2/2)}: \textcolor{logic}{ブール代数}は便利}
もらえる額$n$が満たしてほしい\textcolor{logic}{条件}:
\[
\left(
  \propvar{$n=10^3$}
  \leftrightarrow
  \propvar{\textcolor{logic}{発言}}
\right)
=
\propvar{$n=10^8$}
\]
\vspace{-10pt}
\begin{align*}
1+
\propvar{$n=10^3$}
+
\propvar{\textcolor{logic}{発言}}
&=
\propvar{$n=10^8$}
\\
\propvar{\textcolor{logic}{発言}}
&=
\propvar{$n=10^8$}
+
\propvar{$n=10^3$}
+1\\
&=
\propvar{$n=10^8$}
\leftrightarrow
\propvar{$n=10^3$}\\
&= \propvar{$n\neq10^3, 10^8$}
\end{align*}
{\footnotesize(cf. string)}
\end{frame}

% 16
\begin{frame}{\textcolor{spacec}{幾何}側:\textcolor{logic}{発言の無限選択} $\leftrightarrow$ \textcolor{spacec}{Cantor空間の点}}
\begin{center}
\begin{tikzpicture}[xscale=1.02,yscale=1.12,
  bit/.style={circle,draw=ink!65,fill=paper,inner sep=0pt,minimum size=3.6mm},
  chosen/.style={circle,draw=logic,fill=logicLight,very thick,inner sep=0pt,minimum size=5.0mm},
  edgelabel/.style={font=\scriptsize\color{ink},inner sep=1.2pt,fill=paper,fill opacity=.94,text opacity=1}
]
  \node[chosen] (r) at (0,2.45) {};
  \node[chosen] (a0) at (-3.20,1.30) {};
  \node[bit] (a1) at (3.20,1.30) {};
  \node[chosen] (b00) at (-4.80,0.15) {};
  \node[bit] (b01) at (-1.60,0.15) {};
  \node[bit] (b10) at (1.60,0.15) {};
  \node[bit] (b11) at (4.80,0.15) {};
  \node[bit] (c000) at (-5.60,-1.00) {};
  \node[chosen] (c001) at (-4.00,-1.00) {};
  \node[bit] (c010) at (-2.40,-1.00) {};
  \node[bit] (c011) at (-0.80,-1.00) {};
  \node[bit] (c100) at (0.80,-1.00) {};
  \node[bit] (c101) at (2.40,-1.00) {};
  \node[bit] (c110) at (4.00,-1.00) {};
  \node[bit] (c111) at (5.60,-1.00) {};
  \foreach \u/\v in {r/a0,r/a1,a0/b00,a0/b01,a1/b10,a1/b11,b00/c000,b00/c001,b01/c010,b01/c011,b10/c100,b10/c101,b11/c110,b11/c111}
    \draw[thick,line] (\u) -- (\v);
  \draw[very thick,logic] (r) -- (a0) -- (b00) -- (c001);
% the whole infinite binary tree continues downward
\foreach \x in {-5.60,-4.00,-2.40,-0.80,0.80,2.40,4.00,5.60}{
  \draw[thick,line,densely dashed] (\x,-1.00) -- (\x,-1.45);
}

% chosen cylinder continues inside the whole boundary
\draw[very thick,spacec,densely dashed] (c001) -- (-4.00,-1.45);

% chosen cylinder continues inside the whole boundary
\draw[very thick,logic,densely dashed] (c001) -- (-4.00,-1.54);

% Cantor space as the boundary/limit of the whole infinite binary tree
% upper stages match the leaves of the binary tree

% % outer guide box
% \draw[very thick,spacec,rounded corners=6pt, fill=spacec]
%   (-6.10,-1.64) rectangle (6.10,-1.52);

% label on the right
\node[
  anchor=west,
  font=\Large\bfseries,
  text=spacec
] at (6.28,-1.93) {$2^{\mathbb N}$};

% stage 3: closest to the finite leaves of the binary tree
% each small interval sits below one leaf
\draw[very thick,spacec] (-5.82,-1.66-0.5) -- (-5.38,-1.66-0.5);
\draw[very thick,spacec] (-4.22,-1.66-0.5) -- (-3.78,-1.66-0.5);
\draw[very thick,spacec] (-2.62,-1.66-0.5) -- (-2.18,-1.66-0.5);
\draw[very thick,spacec] (-1.02,-1.66-0.5) -- (-0.58,-1.66-0.5);
\draw[very thick,spacec] (0.58,-1.66-0.5) -- (1.02,-1.66-0.5);
\draw[very thick,spacec] (2.18,-1.66-0.5) -- (2.62,-1.66-0.5);
\draw[very thick,spacec] (3.78,-1.66-0.5) -- (4.22,-1.66-0.5);
\draw[very thick,spacec] (5.38,-1.66-0.5) -- (5.82,-1.66-0.5);

% stage 2
\draw[very thick,spacec] (-5.82,-1.84-0.5) -- (-3.78,-1.84-0.5);
\draw[very thick,spacec] (-2.62,-1.84-0.5) -- (-0.58,-1.84-0.5);
\draw[very thick,spacec] (0.58,-1.84-0.5) -- (2.62,-1.84-0.5);
\draw[very thick,spacec] (3.78,-1.84-0.5) -- (5.82,-1.84-0.5);

% stage 1
\draw[very thick,spacec] (-5.82,-2.02-0.5) -- (-0.58,-2.02-0.5);
\draw[very thick,spacec] (0.58,-2.02-0.5) -- (5.82,-2.02-0.5);

% stage 0: the original interval
\draw[very thick,spacec] (-5.82,-2.20-0.5) -- (5.82,-2.20-0.5);

% the point determined by the chosen infinite path
\fill[logic] (-4.00,-1.66-0.5) circle (2.4pt);
\draw[very thick,logic] (-4.00,-1.54) -- (-4.00,-1.66-0.5);
\end{tikzpicture}
\end{center}
\end{frame}





% 17
\begin{frame}{定理: Stone双対}
(\textcolor{spacec}{$2^\mathbb{N}$}のように)バラバラでパンパンな空間\footnote{totally disconnected compact Hausdorff topological spaceです,すみません}を\textcolor{spacec}{Stone空間}と呼ぶ.
\begin{center}
{\large\bfseries \textcolor{logic}{ブール代数} $\longleftrightarrow$ \textcolor{spacec}{Stone空間}}
\end{center}
\vspace{-2mm}
\begin{theorem}[Stone双対]
\textcolor{logic}{ブール代数}と\textcolor{spacec}{Stone空間}は等価\footnote{反変圏同値}.
\end{theorem}
{\footnotesize \cite{stone1936theory}, \cite{johnstone1982stone}}
\end{frame}

% 18
\begin{frame}{視点: {\color{logic}可能世界} = {\color{spacec}点},再び}
\begin{columns}[T,totalwidth=\textwidth]
\begin{column}{.5\textwidth}
\centering
\begin{tikzpicture}[scale=1]
  \node[logicbox,minimum width=3.1cm] (b) at (0,2.35) {\textcolor{logic}{ブール代数} $B$};
  \node[logicbox,minimum width=3.1cm] (two) at (0,-2.3) {$2=\{\bot,\top\}$};
  \draw[arrow] (b) -- node[right,font=\small\bfseries\color{logic}] {命題に真偽値を与える} (two);
\end{tikzpicture}
\end{column}

\begin{column}{.5\textwidth}
\centering
\begin{tikzpicture}[scale=1,
  bit/.style={circle,draw=ink!65,fill=white,inner sep=0pt,minimum size=3.0mm},
  chosen/.style={circle,draw=spacec,fill=spaceLight,very thick,inner sep=0pt,minimum size=4.2mm}
]
  \node[spacebox,minimum width=2.4cm] (cantor) at (4.40,2.35) {$2^{\mathbb N}$};
  \node[spacebox,minimum width=2.4cm] (one) at (4.40,-2.30) {$1$};
  \draw[arrow] (one) -- node[right,font=\small\bfseries\color{spacec}] {点を選ぶ} (cantor);
\end{tikzpicture}
\end{column}
\end{columns}
\end{frame}

% 19
\begin{frame}{対応表: {\color{logic}論理}と{\color{spacec}幾何}}
\centering
\logicgeometrytable{stone}
\end{frame}

\section[Locale]{Locale $\leftarrow$ 繋がった空間を扱いたい }

% 20
\begin{frame}{目次}
\tableofcontents[currentsection]
\end{frame}
\begin{frame}{{\color{logic}論理}の不満,{\color{spacec}幾何}の不満}
\begin{center}
{\large\bfseries Stone双対では{\color{logic}論理}も{\color{spacec}幾何}も,全然足りない!}
\end{center}
\vspace{-2mm}

\begin{columns}[T,totalwidth=.98\textwidth]

% left: logic
\begin{column}{.48\textwidth}
\centering

\setlength{\fboxsep}{6pt}%
\fcolorbox{logic}{logicLight}{%
\begin{minipage}{.90\linewidth}
\centering
\vspace{2mm}

{\Large\bfseries\color{logic}論理の不満}

\vspace{3mm}

{\large\bfseries
量化子$\exists, \forall$がない!
% \color{logic} $\exists, \forall$
}

\vspace{2mm}
\end{minipage}}

\vspace{4mm}

{\bfseries\color{logic} $\forall x, \exists y, x=y^2$}$\leftarrow$欲しい

\end{column}

% right: geometry
\begin{column}{.48\textwidth}
\centering

\setlength{\fboxsep}{6pt}%
\fcolorbox{spacec}{spaceLight}{%
\begin{minipage}{.90\linewidth}
\centering
\vspace{2mm}

{\Large\bfseries\color{spacec}幾何の不満}

\vspace{3mm}

{\large\bfseries
空間がバラバラ!
}

\vspace{2mm}
\end{minipage}}

\vspace{4mm}

\begin{tikzpicture}[x=1cm,y=1cm,line cap=round,line join=round,scale=.95]
  % outer body
  \draw[very thick,spacec,fill=spaceLight]
    (0,0) ellipse (1.55 and .78);

  % hole
  \draw[very thick,spacec,fill=paper]
    (0,0) ellipse (.62 and .28);

  % front outer edge
  \draw[very thick,spacec]
    (-1.55,0) arc[start angle=180,end angle=360,x radius=1.55,y radius=.78];

  % back inner edge
  \draw[thick,spacec!70]
    (-.62,0) arc[start angle=180,end angle=360,x radius=.62,y radius=.28];

  % % meridian curves
  % \draw[thick,spacec!75]
  %   (-.78,.54) .. controls (-.28,.20) and (-.28,-.20) .. (-.78,-.54);

  % \draw[thick,spacec!75]
  %   (.78,.54) .. controls (.28,.20) and (.28,-.20) .. (.78,-.54);
\end{tikzpicture}
$\leftarrow$欲しい
\end{column}

\end{columns}
\end{frame}
% 22
\begin{frame}{{\color{spacec}幾何}の不満: 空間がバラバラすぎる!}
\begin{center}
\begin{tikzpicture}[scale=.98]
  \node[logicbox,minimum width=3.8cm,minimum height=1.35cm,
    font=\Large\bfseries\color{logic}] (logic) at (-3.9,0.35)
    {\textcolor{logic}{直観主義}\textcolor{logic}{論理}};
  \node[spacebox,minimum width=4.6cm,minimum height=1.35cm,
    font=\Large\bfseries\color{spacec}] (smooth) at (3.8,0.35)
    {繋がった空間};
  \draw[arrow] (smooth.west) -- node[above,font=\small\bfseries\color{bridge}]{} (logic.east);
\end{tikzpicture}
\end{center}
\begin{center}
{\large\bfseries \textcolor{logic}{排中律$p\lor \lnot p$}が,\textcolor{spacec}{空間}をバラバラにする}
\end{center}
\vspace{-1mm}
\begin{center}
\begin{tikzpicture}[scale=1.0]
  \draw[->,very thick,spacec] (-4.8,0) -- (4.8,0) node[right] {$\mathbb{R}$};
  \draw[very thick,spacec] (0.15,0) -- (4.2,0);
  \draw[very thick,spacec] (-4.2,0) -- (-0.15,0);
  \fill[paper,draw=danger,very thick] (0,0) circle (4pt);
  \node[font=\large\color{logic}] at (2.2,0.55) {$\lnot U$};
  \node[font=\large\color{logic}] at (-2.3,0.55) {$U$};
  \node[font=\large\bfseries] at (0,-1.45) {$U\lor\neg U=\mathbb{R}\setminus\{0\}$};
\end{tikzpicture}
\end{center}
\end{frame}


% 23
\begin{frame}{空間を,\textcolor{spacec}{開集合}=\textcolor{logic}{命題}で再定義する}

\vspace{-5mm}
\begin{columns}[T,onlytextwidth]
\begin{column}{.58\textwidth}
  \begin{definition}[\textcolor{spacec}{Locale}]
  \textcolor{spacec}{Locale}とは,(点ではなく)開集合で定義される空間
  \footnote{厳密には任意 join と有限 meet を持ち,分配法則
  \[
    a\wedge\bigvee_i b_i=\bigvee_i(a\wedge b_i)
  \]
  を満たす順序構造の形式的双対.
  }
  \end{definition}
  \textcolor{spacec}{繋がった空間}にも\textcolor{logic}{論理}が対応する
\end{column}
\begin{column}{.38\textwidth}
\begin{figure}
    \centering
    \includegraphics[width=0.9\linewidth]{顕微鏡.jpg}
\end{figure}
\end{column}
\end{columns}
\end{frame}


% 26
\begin{frame}{対応表: {\color{logic}論理}と{\color{spacec}幾何}}
\centering
\logicgeometrytable{locale}
\end{frame}

\section[トポス]{トポス$\leftarrow$ 量化子$\exists, \forall$を扱いたい}

% 27
\begin{frame}{目次}
\tableofcontents[currentsection]
\end{frame}


% 28
\begin{frame}{{\color{logic}量化子}と {\color{spacec}層}:コト$(2)$からモノ$(\Set)$へ!}

\begin{table}
    \centering
    \begin{tabular}{l|c|c|}
          &\textcolor{logic}{論理}& \textcolor{spacec}{幾何}\\\hline
          コト&\textcolor{logic}{命題}& \textcolor{spacec}{開集合} \\\hline
          モノ&\textcolor{logic}{量化子}& \textcolor{spacec}{層} \\\hline
    \end{tabular}
\end{table}
\begin{columns}[T,totalwidth=.98\textwidth]
\begin{column}{.46\textwidth}
\centering
\begin{tikzpicture}[x=1cm,y=1cm]
  \path[use as bounding box] (-2.35,-2.00) rectangle (2.35,2.00);
  % \node[font=\Large\bfseries\color{logic}] at (0,1.46) {論理};
  \node[font=\Large\bfseries\color{logic}] at (0,-.58)
    {$\exists x\,\varphi(x), \forall x\,\varphi(x)$};
\end{tikzpicture}
\end{column}
\begin{column}{.50\textwidth}
\centering
\begin{tikzpicture}[x=1cm,y=1cm,line cap=round,line join=round]
  \path[use as bounding box] (-2.55,-2.00) rectangle (2.55,2.00);

  % covering space
  \draw[
    very thick,
    spacec,
    smooth,
    domain=-540:540,
    samples=210,
    variable=\t
  ]
    plot ({1+.9*cos(\t)}, {.85 + .0016*\t + .12*sin(\t)});

  % base space: tilted S^1
  \draw[very thick,spacec]
    (0,-1.05) ellipse (1.15 and .42);

  % % projection arrow: covering -> S^1
  \draw[->,spacec]
    (1.0,.32) -- (.50,-.82);

  % open subset U placed upper-left of S^1
  % a right-half-like open arc, drawn as a separate small curved piece
  \draw[very thick,spacec]
    (-1.45-0.92,-.35+1.02) .. controls (-1.05-0.92,-.08+1.02) and (-.52-0.92,-.10+1.02) .. (-.12-0.92,-.42+1.02);
      % .. controls (-.52,-.72) and (-1.05,-.73) .. (-1.45,-.48);

  % embedding arrow: U -> right half of S^1
  \draw[->, spacec]
    (-1,0.5) -- (-0.5,-.92);

  % % image of U: right-half open subset of S^1
  % \draw[very thick,spacec]
  %   (.72,-.92)
  %     arc[start angle=20,end angle=-70,x radius=1.15,y radius=.42];

  % % small endpoint gaps to suggest openness
  % \fill[paper] (.99,-.91) circle (2.4pt);
  % \fill[paper] (.39,-1.45) circle (2.4pt);
\end{tikzpicture}
\end{column}
\end{columns}
\end{frame}

% % 29
% \begin{frame}{トポス}
% \begin{center}
% {\Large\bfseries \textcolor{logic}{理論} $\longleftrightarrow$ \textcolor{spacec}{トポス}}
% \end{center}
% \vspace{-1mm}
% \begin{theorem}[\textcolor{spacec}{Classifying} トポス]
% Geometric \textcolor{logic}{theory} $T$ には \textcolor{spacec}{classifying} トポス $\mathcal E_T$ が対応し,
% $\mathcal E_T$ は $T$ の\textcolor{logic}{可能世界}を分類する.
% \end{theorem}
% \end{frame}

% 29
\begin{frame}{トポスは何者なのか}
\centering

\vspace{-2mm}

\begin{tikzpicture}[x=1cm,y=1cm]

  % 左:Lawvere(写真は出典不明のため公開版では外す,2026-08-22)
  \node[
    anchor=east,
    font=\large\bfseries,
    text=logic
  ] at (-2.4,0.95) {F. W. Lawvere};

  % 右:Grothendieck(同上)
  \node[
    anchor=west,
    font=\large\bfseries,
    text=spacec
  ] at (2.9,-3.21) {A. Grothendieck};

  % 中央上:Lawvere の発言
  \node[
    draw=logic,
    fill=logicLight,
    very thick,
    rounded corners=7pt,
    align=center,
    text width=4cm,
    inner sep=7pt,
    font=\bfseries
  ] at (0,0.95) {%
    \textcolor{logic}{トポス}は\\
    \textcolor{logic}{量化子}を\\
    扱える\textcolor{logic}{論理}だ
  };

  % 中央下:Grothendieck の発言
  \node[
    draw=spacec,
    fill=spaceLight,
    very thick,
    rounded corners=7pt,
    align=center,
    text width=4cm,
    inner sep=7pt,
    font=\bfseries
  ] at (0+0.51,-1.20-2.01) {%
    \textcolor{spacec}{トポス}は\\
    繋がった\textcolor{spacec}{空間}を\\
    扱える\textcolor{spacec}{幾何}だ
  };

\end{tikzpicture}

\end{frame}

% 30
\begin{frame}{対応表: {\color{logic}論理}と{\color{spacec}幾何}}
\centering
\logicgeometrytable{topos}
\end{frame}

% 31
\begin{frame}{視点:論理と幾何の対応は奇跡なのか?}
具体計算を知れば知るほど奇跡に見えてくるが...
\[
\vcenter{\hbox{\includegraphics[height=.3\textheight]{figures/png/yamaguchi_mikan_map_icon.svg.png}}}
\quad
\setminus
\quad
\vcenter{\hbox{\includegraphics[height=.3\textheight]{figures/png/yamaguchi_bear_map_icon.svg.png}}}
\quad
=
\quad
\vcenter{\hbox{\includegraphics[height=.3\textheight]{figures/png/yamaguchi_mikan_without_bear_map_icon.svg.png}}}
\]
\vfill
{\scriptsize 出典: 国土数値情報(国土交通省)・山口県オープンデータ「熊の目撃情報」,いずれも CC BY 4.0,加工して作成}
\end{frame}

\begin{frame}[allowframebreaks]{参考文献}
\printbibliography
\end{frame}

\end{document}