% (find-angg "LATEX/2015oppositions.tex")
% (defun c () (interactive) (find-LATEXsh "lualatex 2015oppositions.tex"))
% (defun c () (interactive) (find-LATEXsh "lualatex --output-format=dvi 2015oppositions.tex"))
% (defun d () (interactive) (find-xpdfpage "~/LATEX/2015oppositions.pdf"))
% (defun d () (interactive) (find-xdvipage "~/LATEX/2015oppositions.dvi"))
% (defun e () (interactive) (find-LATEX "2015oppositions.tex"))
% (defun l () (interactive) (find-LATEX "2015oppositions.lua"))
% (find-pdf-page "~/LATEX/2015oppositions.pdf")
\documentclass[oneside]{book}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{tikz}
\usepackage{luacode}
\usepackage[colorlinks]{hyperref} % (find-es "tex" "hyperref")
% (find-dn5file "preamble6.lua" "preamble0 =")
\usepackage{proof}   % For derivation trees ("%:" lines)
\input diagxy        % For 2D diagrams ("%D" lines)
\xyoption{curve}     % For the ".curve=" feature in 2D diagrams
\usepackage{edrx15}  % (find-LATEX "edrx15.sty")
\input istanbuldefs  % (find-ist "defs.tex")
\begin{document}

\catcode`\^^J=10
\directlua{dofile "dednat6load.lua"}  % (find-LATEX "dednat6load.lua")

% http://angg.twu.net/LATEX/2015oppositions.pdf
% https://mail.google.com/mail/ca/u/0/#sent/14e7def7753d04c7



\par Notes on the Logical Hexagon (for children)
\par See: \url{http://en.wikipedia.org/wiki/Logical_hexagon}
\par and: \url{http://angg.twu.net/math-b.html\#istanbul}
\par Eduardo Ochs - eduardoochs@gmail.com - 2015jul11

\bsk

Main idea: the logical hexagon becomes more concrete if we look at the
behavior of the propositions at its vertices in a finite number of
cases (``worlds'').

For each proposition $P(x,y)$, our matrix representation shows the
values of:
%
$$\mat{P(0,2) & P(1,2) & P(2,2) \\
       P(0,1) & P(1,1) & P(2,1) \\
       P(0,0) & P(1,0) & P(2,0)}
$$

I don't know the conventions for drawing the arrows meaning
contrariety, subcontrariety, etc, so I am not drawing them.

\msk

A logical hexagon:


%\def\m#1#2#3#4#5#6#7#8#9{\mat{#1&#2&#3\\#4&#5&#6\\#7&#8&#9\\}}
%\def\m#1#2#3#4#5#6#7#8#9{\mat{#1#2#3\\#4#5#6\\#7#8#9\\}}
\def\m#1#2#3#4#5#6#7#8#9{\sm {#1#2#3\\#4#5#6\\#7#8#9\\}}





%D diagram hexagon
%D 2Dx     100 +30 +30   +30 +30 +30
%D 2D  100     x!=y          X!=Y    
%D 2D                                
%D 2D  +20 x<y     x>y   X<Y     X>Y 
%D 2D                                
%D 2D  +30 x<=y    x>=y  X<=Y    X>=Y
%D 2D                                
%D 2D  +20     x=y           X=Y     
%D 2D
%D (( x<=y .tex= x≤y
%D    x>=y .tex= x≥y
%D    x!=y .tex= x≠y 
%D ))
%D (( x=y x<=y x>=y x<y x>y x!=y
%D    @ 0 @ 1 ->  @ 0 @ 2 ->
%D    @ 1 @ 3 <-  @ 2 @ 4 <-
%D    @ 3 @ 5 ->  @ 4 @ 5 ->
%D ))
%D (( X=Y  .tex= \m001010100
%D    X<=Y .tex= \m111110100
%D    X>=Y .tex= \m001011111
%D    X<Y  .tex= \m110100000
%D    X>Y  .tex= \m000001011
%D    X!=Y .tex= \m110101011
%D ))
%D (( X=Y X<=Y X>=Y X<Y X>Y X!=Y
%D    @ 0 @ 1 ->  @ 0 @ 2 ->
%D    @ 1 @ 3 <-  @ 2 @ 4 <-
%D    @ 3 @ 5 ->  @ 4 @ 5 ->
%D ))
%D enddiagram
%D
\pu
$$\diag{hexagon}$$



% (find-ist "-july.tex" "dxyren")
%
%L forths["="] = function () pusharrow("=") end
%L
%L dxyren = function (li)
%L     local a, b = li:match("^(.*) =+> (.*)$")
%L     local A, B = split(a), split(b)
%L     for i=1,#A do nodes[A[i]].tex = B[i] end
%L   end
%L forths["ren"] = function () dxyren(getrestofline()) end



Modal hexagon on S5:

(We use this Kripke frame, $\sm{a{↔}b\\c{↔}d\\e{↔}f\\}$, and
$A=\sm{00\\01\\11}$)



%D diagram hexagon-modal
%D 2Dx     100  +30  +30   +30  +30  +30
%D 2D  100     BAvBNA          bavbna   
%D 2D                                   
%D 2D  +20 BA        BNA   ba        bna
%D 2D                                   
%D 2D  +30 DA        DNA   da        dna
%D 2D                                   
%D 2D  +20     DA&DNA          da&dna   
%D 2D
%D ren       BAvBNA        bavbna      =>    ◻A∨◻¬A             \sm{11\\00\\11}
%D ren     BA      BNA   ba      bna   =>  ◻A      ◻¬A   \sm{00\\00\\11}    \sm{11\\00\\00}
%D ren     DA      DNA   da      dna   =>  ⋄A      ⋄¬A    \sm{00\\11\\11}    \sm{11\\11\\00}
%D ren       DA&DNA        da&dna      =>    ⋄A∧⋄¬A               \sm{00\\11\\00}
%D
%D (( BAvBNA BA BNA DA DNA DA&DNA
%D    @ 0 @ 1 <-  @ 0 @ 2 <-
%D    @ 1 @ 3 ->  @ 2 @ 4 ->
%D    @ 3 @ 5 <-  @ 4 @ 5 <-
%D ))
%D (( bavbna ba bna da dna da&dna
%D    @ 0 @ 1 <-  @ 0 @ 2 <-
%D    @ 1 @ 3 ->  @ 2 @ 4 ->
%D    @ 3 @ 5 <-  @ 4 @ 5 <-
%D ))
%D enddiagram
%D
\pu
$$\diag{hexagon-modal}$$



% http://www.logicalgeometry.org/papers-published.htm
% https://perswww.kuleuven.be/~u0012115/Smessaert_Demey_Square2014_Bitstrings_slides.pdf
% https://en.wikipedia.org/wiki/Algebraic_logic
% https://en.wikipedia.org/wiki/Monadic_Boolean_algebra





\end{document}

