A note on information theoretic characterizations of physical theories
Clifton, Bub, and Halvorson [{Foundations of Physics} 33, 1561--1591, (2003)] have recently argued that quantum theory is characterized by its satisfaction of three information-theoretic axioms. However, it is not difficult to construct apparent counterexamples to the CBH characterization theorem. In this paper, we discuss the limits of the characterization theorem, and we provide some technical tools for checking whether a theory (specified in terms of the convex structure of its state space) falls within these limits.
convex_revised.tex
\documentclass[11pt]{article}
\usepackage{pstricks}
\usepackage{pst-vue3d}
\usepackage{pst-3dplot}
\usepackage{apacite}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amsthm}
\newcommand{\ket}[1]{|#1\rangle}
\newcommand{\braket}[1]{|#1\rangle \langle #1|}
\newcommand{\sa}[1]{#1 _{\mathrm{sa}}}
\newcommand{\bhs}{\mathcal{B}(\mathcal{H})_{\mathrm{sa}}}
\newcommand{\bnorm}[1]{s_{K}(#1)}
\newcommand{\mb}[1]{\mathbf{#1}}
\newcommand{\nbit}{\mathcal{B}(\mathbb{C}^{n})}
\newcommand{\nstates}{\mathfrak{T}(\mathbb{C}^{n})}
\newcommand{\card}[1]{|#1|}
\newcommand{\tp}[2]{|\langle #1|#2\rangle |^{2}}
\newcommand{\ratio}[3]{\mathbf{p}_{#1}(#2/#3)}
\newcommand{\qubit}{\mathcal{B}(\mathbb{C}^{2})}
\newcommand{\twoqubit}{\mathcal{B}(\mathbb{C}^{2}\otimes \mathbb{C}^{2})}
\newcommand{\alg}[1]{\mathfrak{#1}}
\newcommand{\hil}[1]{\mathcal{#1}}
\newcommand{\bh}{\mathcal{B}(\mathcal{H})}
\newcommand{\norm}[1]{\|#1\|}
\newcommand{\trnorm}[1]{\|#1\| _{1}}
\newcommand{\hsnorm}[1]{\|#1\| _{2}}
\newcommand{\abs}[1]{|#1|}
\newcommand{\tr}[1]{\mathrm{Tr}(#1)}
\newcommand{\co}[1]{\mathrm{co}(#1)}
\newcommand{\extreme}[1]{\partial _{e}#1}
\newcommand{\ext}[1]{\partial _{e}#1}
\newcommand{\face}[2]{\mathrm{face(}#1,#2\mathrm{)}}
\newtheorem{lemma}{Lemma}
\newtheorem{prop}{Proposition}
\newtheorem*{thm*}{Theorem}
\newtheorem*{rt}{Root Theorem}
\newtheorem{result}{Result}
\renewcommand{\theresult}{\Alph{result}}
\newtheorem{thm}{Theorem}
\newtheorem{cor}[thm]{Corollary}
\theoremstyle{definition}
\newtheorem*{defn}{Definition}
\theoremstyle{remark}
\newtheorem*{example}{Example}
\title{A note on information theoretic characterizations of physical theories}
\author{Hans Halvorson\thanks{{\tt hhalvors@princeton.edu.} \ This is version 2.} \\ {\small Department of Philosophy,
  Princeton University} }
\date{ }
\begin{document}
\maketitle
\begin{abstract}
  Clifton, Bub, and Halvorson [{\it Foundations of Physics} 33,
  1561--1591, (2003)] have recently argued that quantum theory is
  characterized by its satisfaction of three information-theoretic
  axioms.  However, it is not difficult to construct apparent
  counterexamples to the CBH characterization theorem.  In this paper,
  we discuss the limits of the characterization theorem, and we
  provide some technical tools for checking whether a theory
  (specified in terms of the convex structure of its state space)
  falls within these limits.
\end{abstract}


\section{Introduction}
Some would like to argue that quantum information theory has
revolutionary implications for the philosophical foundations of QM
(see, e.g., \citeNP{bub,fuchs}).  Whether or not this claim is true,
there is no doubt that quantum information theory presents us with new
perspectives from which we can approach traditional questions about
the interpretation of QM.  One such question asks whether there are
natural physical postulates that capture the essence of QM ---
postulates that tell us what sets QM apart from other physical
theories, and in particular from its predecessor theories.  The advent
of quantum information theory suggests that we look for
\emph{information-theoretic} postulates that characterize (i.e., are
equivalent to) QM.

A positive answer to this question has been supplied by Clifton, Bub,
and Halvorson \citeyear{bch}.  Clifton, Bub and Halvorson (CBH) show
that, within the $C^{*}$-algebraic framework for physical theories,
quantum theories are singled out by their satisfaction of three
information-theoretic axioms: 1. no superluminal information transfer
via measurement; 2. no broadcasting;\footnote{For the case of pure
  states, broadcasting reduces to cloning.}  and 3.  no
unconditionally secure bit commitment.  Nonetheless, the creative
thinker will have little trouble concocting a ``theory'' that
satisfies these three axioms, but which does not entail QM (see
\citeNP{spekkens,smolin}).  Such toy theories might be thought to show
that the three information-theoretic axioms are not sufficient to
recover the full structure of QM.

Since the CBH characterization theorem is a valid mathematical result,
there is a problem of application here --- these apparent
counterexamples must not satisfy the premises of the theorem.  Besides
the three information-theoretic axioms, the only other premise of the
theorem is the $C^{*}$ assumption (i.e., the assumption that a
theory's observables be representable by the self-adjoint operators in
a $C^{*}$-algebra).  However, in specific cases, it may be difficult
to ascertain whether or not a theory satisfies the $C^{*}$ assumption.
In particular, since the axioms for $C^{*}$-algebras are rather
intricate, and some of these axioms have no direct physical
interpretation (e.g., the $C^{*}$-algebraic product of non-commuting
observables does not correspond to any physical operation on
observables), there is a prima facie difficulty in relating the
$C^{*}$ assumption to specific features of a physical theory.

In this paper, we address the difficulty in determining whether a toy
theory satisfies the $C^{*}$ assumption.  In particular, it is
sometimes easier to ascertain the convex structure of the state space
of a theory (i.e., which states are mixtures of which other states)
than to ascertain the algebraic structure of the observables of that
theory.  Furthermore, due to the deep mathematical results of Alfsen
et al. (detailed in \citeNP{geometry}), specifying the convex
structure of the state space of a theory is sufficient to determine
whether that theory can be formulated within the Jordan-Banach (JB)
algebraic framework.  Since a theory permits a $C^{*}$-algebraic
formulation only if it permits a JB algebraic formulation, showing
that a theory does not permit a JB algebraic formulation is sufficient
to show that it falls outside of the range of validity of the CBH
theorem.

The structure of this paper is as follows.  In Section~2, we review
the basics of the theory of JB algebras, and of the dual (but more
general) theory of convex sets.  We also prove a ``Root Theorem,''
which forms the basis for our results in subsequent sections.  In
Section 3, we address the worry that the three information-theoretic
axioms are not sufficient to entail QM.  In particular, we look at a
certain class of toy theories that satisfies the axioms, and we show
that these toy theories do not permit a JB algebraic formulation.  In
Section~4, we consider a class of theories that are locally
quantum-mechanical, but which, unlike QM, do not have nonlocally
entangled states.  We show that the simplest of these theories does
not permit a JB algebraic formulation; and we adduce considerations
which indicate that no such theory permits a JB algebraic formulation.

\section{The JB algebraic framework for physical theories}

\subsection{Jordan-Banach algebras}

The CBH theorem shows that among the theories within the
$C^{*}$-algebraic framework, quantum theories are precisely those that
satisfy the three information-theoretic axioms.  One limitation of
this result is that it excludes from consideration those theories that
employ real or quaternionic Hilbert spaces (and so the result does not
shed any light on the physical significance of the choice of the
underlying field for a Hilbert space).  We can get past this
limitation by moving to the broader JB algebraic framework.

Let $M_{n}(\mathbb{K})$ be the set of $n\times n$ matrices over
$\mathbb{K}$, where $\mathbb{K}=\mathbb{R},\mathbb{C}$, or
$\mathbb{H}$ (the quaternions).  The set $H_{n}(\mathbb{K})$ of
Hermitian matrices in $M_{n}(\mathbb{K})$ is a vector space over
$\mathbb{R}$.  If we set $A\circ B=\frac{1}{2}(AB+BA)$, where $AB$ is
the usual matrix product of $A$ and $B$, then it follows that
\begin{equation} ((A\circ A)\circ B)\circ A = (A\circ A)\circ (B\circ
  A) .\label{jordan} \end{equation}
The matrix algebra
$H_{n}(\mathbb{K})$ with product $\circ$ is the
prototype for the notion of a Jordan algebra: a Jordan algebra is any
real vector space equipped with a commutative (not necessarily
associative), bilinear product $\circ$ satisfying Eqn.~\ref{jordan}.    

For an element $A\in H_{n}(\mathbb{C})$, we define 
\begin{equation} \norm{A}=\sup \{ \norm{Ax}:x\in \mathbb{C}^{n},\;
  \norm{x}=1\}, \end{equation}
where the norm on the right is the vector norm on $\mathbb{C}^{n}$.  
This norm is complete in the sense that for any
Cauchy sequence $\{ A_{i} \}$ in $H_{n}(\mathbb{C})$, there is an
$A\in H_{n}(\mathbb{C})$ such that $\lim _{i}\norm{A_{i}-A}=0$.  That
is, $H_{n}(\mathbb{C})$ is a Banach space.  Furthermore, the norm
satisfies the inequalities:
\begin{equation} \norm{A\circ B}\leq \norm{A}\norm{B},\quad
  \norm{A\circ A}=\norm{A}^{2},\quad \norm{A\circ A}\leq
  \norm{(A\circ A)+(B\circ B)},\label{banach} \end{equation}
for all $A,B$ in $H_{n}(\mathbb{C})$.  In general, a Jordan-Banach
(JB) algebra is a Jordan algebra that is complete relative to some
norm satisfying Eqns.~\ref{banach}.  
  
States on $H_{n}(\mathbb{C})$ are given, in the first place, by
(equivalence classes of) unit vectors in $\mathbb{C}^{n}$.  In
particular, if $\ket{\alpha}$ is a unit vector in $\mathbb{C}^{n}$,
then $\langle \alpha |A|\alpha \rangle$ gives the expectation value of
$A$ in the state $\ket{\alpha}$.  Note that the map $A\mapsto \langle
\alpha |A|\alpha \rangle$ on $H_{n}(\mathbb{C})$ is linear and
continuous.  Furthermore, $\langle \alpha |I|\alpha \rangle =1$, where
$I$ is the identity matrix, and and $\langle \alpha |(A\circ A)|\alpha
\rangle \geq 0$ for any $A$.  Generally, we define a state of a JB
algebra $\alg{A}$ to be a linear and continuous mapping $\omega
:\alg{A}\rightarrow \mathbb{R}$ such that $\omega (I)=1$ and $\omega
(A\circ A)\geq 0$ for all $A$ in $\alg{A}$.

The state space $K$ of a JB algebra $\alg{A}$ is a convex set; that
is, if $x$ and $y$ are states, and $\lambda \in (0,1)$, then $\lambda
x+(1-\lambda)y$ defines a state in a natural way.  The set $K$ also
carries two standard topologies.  First, a net $\{ \omega _{a} \}$ of
states converges in the weak* topology to a state $\omega$ just in
case the numbers $\{ \omega _{a}(A):A\in \alg{A} \}$ converge
pointwise to the numbers $\{ \omega (A):A\in \alg{A} \}$.  Since $K$
is a weak* closed subset of the unit ball of the Banach space dual
$\alg{A}^{*}$ (all continuous linear functionals on $\alg{A}$), the
Alaoglu-Bourbaki theorem \cite[Thm.~1.6.5]{kr} entails that $K$ is
weak* compact.  Second, $K$ inherits the standard norm topology from
$\alg{A}^{*}$.  A net $\{ \omega _{a} \}$ converges in norm to
$\omega$ just in case the numbers $\{ \omega _{a}(A) :A\in \alg{A} \}$
converge uniformly to the numbers $\{ \omega (A):A\in \alg{A} \}$.
Thus, the norm topology on $K$ is always finer that the weak*
topology.  In the finite dimensional case, pointwise convergence
entails uniform convergence, and so the weak* and norm topologies are
equivalent.  But in the infinite dimensional case, $K$ will not
typically be compact in the norm topology.  (For example, the state
space of the JB algebra $\sa{\bh}$ of all self-adjoint operators on an
infinite dimensional Hilbert space $\hil{H}$ is not compact in the
norm topology.)

There is a canonical mapping from the category of $C^{*}$-algebras
into the category of JB algebras.  Indeed, if $\alg{A}$ is a
$C^{*}$-algebra, and $\sa{\alg{A}}$ is the real vector space of
self-adjoint operators in $\alg{A}$, then $\sa{\alg{A}}$ with the
symmetric product is a JB algebra (\citeNP[Thm.~1.1.9]{land}).
Furthermore, the state space of $\alg{A}$ is affinely isomorphic (see
the definition below) to the state space of $\sa{\alg{A}}$.  In
contrast, the nonassociative JB algebra $H_{2}(\mathbb{R})$ has linear
dimension $3$, whereas there is no $C^{*}$-algebra $\alg{A}$ such that
$\sa{\alg{A}}$ is a $3$-dimensional, nonassociative JB algebra.
($\sa{\alg{A}}$ is associative iff $\alg{A}$ is abelian.)  Therefore,
$H_{2}(\mathbb{R})$ is not isomorphic to the self-adjoint part of
$C^{*}$-algebra, and the JB algebraic framework is genuinely broader
than the $C^{*}$-algebraic framework.

\subsection{Convex sets}

All JB algebra state spaces are convex sets.  But the converse is not
true --- not all convex sets are JB algebra state spaces.  We now
briefly recall some of the main definitions in the theory of convex
sets.

A point $x$ in a convex set $K$ is {\it extreme} just in case for any
$y,z\in K$ and $\lambda \in (0,1)$, if $x=\lambda y+(1-\lambda )z$,
then $x=y=z$.  We let $\extreme{K}$ denote the set of extreme points
in $K$. If $K$ is the state space of an algebra, we also call extreme
points {\it pure states}.  A subset $F$ of a convex set $K$ is said to
be a {\it face} just in case $F$ is convex, and for any $x\in F$, if
$x=\lambda y+(1-\lambda )z$ with $\lambda \in (0,1)$, then $y\in F$.
Clearly the intersection of an arbitrary family of faces is again a
face. For $x,y\in K$, we let $\face{x}{y}$ denote the intersection of
all faces containing $\{ x,y \}$.  A pair of faces $F,G$ in $K$ is
said to be {\it split} if every point in $K$ can be expressed uniquely
as a convex combination of points in $F$ and $G$.  A convex set $K$ is
said to be a {\it simplex} if mixed states have unique decompositions
into pure states.  More precisely, $K$ is a simplex if for all
$w,x,y,z\in \ext{K}$, when
\begin{equation} \lambda w+(1-\lambda )x= \mu y+(1-\mu
  )z ,\end{equation} with $\lambda ,\mu \in (0,1)$, then either $w=y$ or
$w=z$.  (This definition differs slightly from the standard definition; see \cite[p.~8]{states}.)  
If $K$ and $L$ are convex sets, a mapping $\phi
:K\rightarrow L$ is an {\it affine isomorphism} just in
case $\phi$ is bijective, and 
\begin{equation} \phi (\lambda x+(1-\lambda)y)=\lambda \phi (x)+(1-\lambda)\phi
(y) , \end{equation} for all $x,y\in K$ and $\lambda \in (0,1)$.  If there is an affine
isomorphism $\phi$ from $K$ onto $L$, then $K$ and $L$ are said to be
{\it affinely isomorphic}. 

\subsection{The root theorem}

Drawing on the results of Alfsen et al., we now derive some easily
checked necessary conditions for a theory to admit a JB algebraic
formulation.  (In this theorem and subsequently, we let $B^{n}$ denote
the closed unit ball in $\mathbb{R}^{n}$.)
 
\begin{rt} Let $K$ be a convex set.  If $K$ is affinely
  isomorphic to the state space of a JB algebra, then:
\begin{enumerate}
\item For any distinct $x,y\in \ext{K}$, $\face{x}{y}=B^{n}$ for some
  $n\geq 1$.
\item If $K$ is not a simplex, then for any distinct $x,y\in \ext{K}$,
  $\face{x}{y}=B^{n}$ for some $n\geq 2$.
\item If $x,y\in \ext{K}$ are connected by a norm-continuous path,
  then $\face{x}{y}=B^{n}$ for some $n\geq 2$. \label{path}
\end{enumerate}
\end{rt}

The statement of (3) could use some clarification: since we have not
made any assumptions about a topology on $K$, saying that $\ext{K}$ is
connected does not really make sense.  However, if $K$ is affinely
isomorphic to the state space $K'$ of a JB algebra, then there is a
map $\phi :K\rightarrow K'$.  Thus, (3) should be understood as
referring to the topology on $K$ that is induced, via the mapping
$\phi$, by the norm topology on $K'$.

\begin{proof} (1.) The first statement is a non-trivial result (Corollary 5.56 in
  \citeNP{geometry}) that depends on a number of lemmas.  Due to space
  constraints, we just sketch the structure of the proof for the
  simple case where $K$ is a subset of a finite-dimensional vector
  space.
  
  Suppose that $K$ is the state space of a JB algebra $\alg{A}$.
  Since $x,y$ are pure states, they correspond to minimal projection
  operators $P,Q\in \alg{A}$, and $\face{x}{y}$ is the state space of
  the ``projected'' algebra
\begin{equation} \alg{A}_{P\vee Q}=\{ (P\vee Q)A(P\vee Q):A\in \alg{A} \}
  .\end{equation}  The identity of
$\alg{A}_{P\vee Q}$ (namely, $P\vee Q$) is the sum of two
  orthogonal projections $P$ and $R=(P\vee
  Q)-P$.  We now consider the two cases where this projected
algebra is associative or nonassociative.  If $\alg{A}_{P\vee Q}$ is associative, then it is
isomorphic to the algebra of real valued functions on a two-point set,
and its state space consists of two pure states and their convex
combinations.  That is, the state space of $\alg{A}_{P\vee Q}$, and
therefore $\face{x}{y}$, is isomorphic to $B^{1}$.  If
$\alg{A}_{P\vee Q}$ is nonassociative, then in fact the center of
$\alg{A}_{P\vee Q}$ is trivial.  By the comparison theorem for
projections, there is a symmetry $U\in
\alg{A}_{P\vee Q}$ (that is, $U\circ U=I$) such that \begin{equation}
2(U\circ (P\circ U))-P = Q.
\end{equation}
Thus, the identity in $\alg{A}_{P\vee Q}$ is the sum of two
``exchangeable'' minimal projections.  Finite dimensional JB algebras
with this property have been completely classified (see
\citeNP[Prop.~3.37]{geometry}), and their state spaces are isomorphic
to $B^{n}$, for some $n\geq 2$.
  
  (2.) If $K$ is not a simplex, then there are $w,x,y,z\in \ext{K}$
  such that
\begin{equation} \lambda w+(1-\lambda )x=\mu y+(1-\mu )z ,\end{equation}
where $\lambda ,\mu \in (0,1)$, $w\neq y$ and $w\neq z$.  But then $w$
is an extreme point in $\face{y}{z}$.  We know from part 1 that
$\face{y}{z}=B^{n}$, for some $n\geq 1$.  Since there are three
distinct extreme points of $\face{y}{z}$, it follows that $n\geq 2$.

(3.) We prove the contrapositive.  Suppose that $x,y\in \ext{K}$, and
$\face{x}{y}=B^{1}$.  Then there are split faces $F,G$ of $K$ such
that $x\in F$ and $y\in G$ \cite[Lemma 5.54]{geometry}.  Let $U=F\cap
\ext{K}$ and let $V=G\cap \ext{K}$.  Since $F$ and $G$ are closed in
the norm topology \cite[Prop.~1.29]{states}, $U$ and $V$ are closed in
$\ext{K}$.  Since $\ext{K}\subseteq F\cup G$, it follows that
$\ext{K}=U\cup V$, and $U$ and $V$ are open in $\ext{K}$.  Since $x\in
U$ and $y\in V$, there is no continuous path in $\ext{K}$ connecting
$x$ and $y$.
\end{proof}

\section{Sufficiency of the axioms}

The state space of a quantum system has {\it ambiguous mixtures} ---
i.e., mixed states with more than one decomposition into pure states
--- and this fact is responsible for some of the interesting
information-theoretic features of QM.  For example, the BB84
\cite{bb84} bit commitment protocol is perfectly concealing because
two distinct ensembles can be absolutely identical relative to a local
observer (since these ensembles correspond to the same quantum state).
Thus, in order to find a toy theory that simulates some of the
information-theoretic features of QM, it would be natural to look for
simple theories with ambiguous mixtures.

One such theory has been recently described by \citeA{spekkens}.
(\citeA{smolin} proposes a different sort of theory that satisfies the
three axioms.  We look at Smolin's theory in \cite{hb}.)  The state
space $S$ of Spekkens' theory (for a local system) has exactly seven
points: the pure states correspond to the unit vectors $\{
e_{i},-e_{i}:i=1,2,3 \}$ in $\mathbb{R}^{3}$, and the mixed state
corresponds to the origin $\mathbf{0}$ in $\mathbb{R}^{3}$.  In order
to equip $S$ with partial binary operations corresponding to
superposition and mixture, we identify $S$ with a subset of the Bloch
sphere.  That is, $\bf{0}$ is an equal mixture of $e_{i}$ and
$-e_{i}$, for $i=1,2,3$.  However, $S$ does not contain unequal
mixtures of $e_{i}$ and $-e_{i}$, nor does $S$ contain mixtures of
$e_{i}$ and $e_{j}$ when $i\neq j$.  Similarly, $e_{i}$ and $-e_{i}$
can be superposed with equal weights to obtain any of the states in
$\{ e_{j},-e_{j}:j\neq i \}$.  However, $e_{i}$ and $-e_{i}$ cannot be
superposed with unequal weights, nor can $e_{i}$ be superposed with
$e_{j}$ when $i\neq j$.

Since $S$ is not convex, it is obviously not the state space of a JB
algebra.  However, the failure of convexity can be easily remedied by
passing to the modified theory that allows arbitrary mixtures of
Spekkens' states --- i.e., the theory whose state space is the convex
hull $K=\co{S}$ of $S$.\footnote{Presumably, Spekkens would want to
  say that the ``transition probability'' between $e_{1}$ and $e_{2}$
  is $\frac{1}{2}$, since $e_{2}$ is supposed to be an equally
  weighted superposition of the orthogonal states $e_{1}$ and
  $-e_{1}$.  However, the natural geometric transition probability of
  $e_{1}$ and $e_{2}$, relative to the convex set $K$, is $0$.  (See
  the definition of affine ratio below.)  In particular, if every
  affine function from $K$ into $\mathbb{R}$ corresponds to an
  observable (as is usually assumed in the convex sets approach), then
  there is a measurement that can distinguish with certainty between
  $e_{1}$ and $e_{2}$; for example, the measurement corresponding to
  the function $f(x)=\frac{1}{2}(1+(e_{1}-e_{2}+e_{3})\cdot x)$.
  Presumably, then, Spekkens would wish to impose some restriction on
  the set of observables.}  Clearly, $K$ has ambiguous mixtures, and
has exactly six pure states.  We now show that convex sets of this
sort are not state spaces of JB algebras.

\begin{thm} Let $K$ be a convex set, and suppose that $K$ is affinely
  isomorphic to the state space of a JB algebra.  If $K$ is not a
  simplex, then $\card{\ext{K}}\geq \card{\mathbb{R}}$. \label{finite}
\end{thm}

\begin{proof}  Suppose that $K$ is not a simplex.  Then part 1 of the
  Root Theorem entails that there are $x,y\in \ext{K}$ such that
  $\face{x}{y}=B^{n}$, with $n\geq 2$.  Since every extreme point in
  $\face{x}{y}$ is an extreme point in $K$, we have
  $\card{\ext{K}}\geq \card{\ext{B^{n}}}=\card{\mathbb{R}}$.
\end{proof}

Spekkens' theory does not permit a JB algebraic formulation, and {\it
  a fortiori}, does not not permit a $C^{*}$-algebraic formulation.
So, this theory falls outside the range of validity of the CBH
theorem.  Nonetheless, since Spekkens' theory has no obvious physical
pathologies, it would be a interesting test case for the claim that
physical theories should permit, at the very least, a JB algebraic
formulation.  

\section{Independence of the axioms}

All parties agree that, in the presence of the $C^{*}$ assumption
(i.e., the assumption that theories permit a $C^{*}$-algebraic
formulation), the three information-theoretic axioms entail QM.  It
seems, then, that the real question is whether the $C^{*}$ assumption
is true, warranted, reasonable, or something like that.
Unfortunately, it seems that it would be extremely difficult to give a
decisive answer to this question.

However, there is reason to think that the $C^{*}$ assumption is doing
too much work in the CBH theorem.  In particular, given the $C^{*}$
assumption, QM is a logical consequence of the first two axioms alone.
In fact, given the $C^{*}$ assumption, the no bit commitment axiom is
a logical consequence of the no superluminal signaling and no cloning
axioms.  We prove this fact here with the one simplifying assumption
that the relevant algebras are actually von Neumann algebras (i.e.,
the algebras act on some concrete Hilbert space $\hil{H}$, and are
closed in the weak-operator topology).

\begin{thm} Suppose that $\alg{A}$ and $\alg{B}$ are von Neumann algebras.  If
  the composite system $(\alg{A},\alg{B})$ satisfies the no
  superluminal signaling and no cloning axioms, then:
\begin{enumerate}
\item $(\alg{A},\alg{B})$ has nonlocally entangled states; and
\item $(\alg{A},\alg{B})$ satisfies the no bit commitment axiom.
\end{enumerate}
  \label{independence}
\end{thm}

\begin{proof} 
  Suppose that the pair $(\alg{A},\alg{B})$ satisfies the no
  superluminal signaling and no cloning axioms.  On the one hand, the
  no superluminal signaling axiom entails that observables in
  $\alg{A}$ commute with observables in $\alg{B}$ \cite[Thm.~1]{bch}.
  On the other hand, the no cloning axiom entails that $\alg{A}$ and
  $\alg{B}$ are nonabelian \cite[Thm.~2]{bch}.
  
  (1.) When $\alg{A}$ and $\alg{B}$ are nonabelian, a theorem by
  Landau \citeyear{landau} shows that there are nonlocally entangled
  (indeed, Bell correlated) states across $(\alg{A},\alg{B})$.
  
  (2.) By the generalized HJW theorem \cite{halvorson}, for any two
  equivalent measures $\mu ,\nu$ on the state space of $\alg{B}$
  (i.e., these measures correspond to the same quantum state), there
  is an entangled state $\psi$ of $(\alg{A},\alg{B})$ such that either
  $\mu$ or $\nu$ can be prepared from $\psi$ by local operations on
  $\alg{A}$.  So, for any bit commitment protocol for
  $(\alg{A},\alg{B})$, if the protocol is concealing, then it is not
  binding. \end{proof}

\subsection{The Schr*dinger theory}

Theorem~\ref{independence} is somewhat surprising.  From an apparently
local axiom (no cloning), it follows that there are nonlocally
entangled states.  In slogan form: {\it any locally quantum mechanical
  theory is nonlocal}.  We may contrast this result with
Schr{\"o}dinger's claim that there should be a locally quantum
mechanical theory without entangled states.  Schr{\"o}dinger says:

\begin{quote}
  Indubitably, the situation described here [in which there are
  nonlocally entangled states] is, in present QM, a
  necessary and indispensable feature.  The question arises, whether
  it is so in Nature too.  I am not satisfied about there being
  sufficient experimental evidence for that\dots
  
  It seems worth noticing that the paradox could be avoided by a very
  simple assumption, namely if the situation after [two systems]
  separating were described by the expansion
\begin{equation} c_{1}|01\rangle +c_{2}|10\rangle , \label{phase} \end{equation} 
but with the additional statement that the knowledge of the
\emph{phase relations} between the complex constants $c_{1}$ and
$c_{2}$ has been entirely lost in consequence of the process of
separation.  This would mean that not only the parts, but the whole
system, would be in the situation of a mixture, not of a pure state.
\dots it would utterly eliminate the experimenter's influence on the
state of that system which he does not touch.
  
This is a very incomplete description and I would not stand for its
adequateness.  But I would call it a possible one, until I am told,
either why it is devoid of meaning or with which experiments it
disagrees.

(\citeNP[pp.~451--452]{schro}.  Eqn.~\ref{phase} has been adapted to
the present discussion.)
\end{quote}

When Schr{\"o}dinger speaks of the state in Eqn.~\ref{phase}, but with
``the knowledge of the phase relations'' lost, he presumably means the
mixed state
\begin{equation} \abs{c_{1}}^{2} |01\rangle \langle
  01|+\abs{c_{2}}^{2}|10\rangle \langle 10|  .\end{equation}
Thus, Schr{\"o}dinger's hope is that the true theory will
turn out to be locally quantum mechanical, but with some sort of
selection rule that prohibits superposition of product states for
systems that are spacelike separated.

We now know --- due to experimental verification of the violation of
Bell's inequality --- that Schr{\"o}dinger's hoped-for theory
disagrees with experiment.  But, Theorem~\ref{independence} shows that
Schr{\"o}dinger's hoped-for theory is ``devoid of meaning'' --- well,
at least if all meaningful theories admit a $C^{*}$-algebraic
formulation.  But can Schr{\"o}dinger's hope be realized within the
broader JB algebraic framework?  While we do not currently know the
answer to this question, we will proceed to show that the answer is
negative in one particularly simple case.

Consider the simplest composite quantum system, a pair of qubits.  Of
course, we cannot simply throw away the nonlocally entangled states
without doing violence to the linear structure of
$\mathbb{C}^{2}\otimes \mathbb{C}^{2}$.  But since the complement of
the set of nonlocally entangled states is a convex set, we can throw
away the entangled states and still end up with a theory with a convex
state space.  More precisely, recall that a density operator $D\in
\twoqubit$ is a {\it pure product state} just in case $D=E\otimes F$,
where $E,F$ are projections onto rays in $\mathbb{C}^{2}$.  The set of
pure product states is a closed subset of the pure state space of
$\twoqubit$; as such, it is a closed, bounded subset of
$\mathbb{R}^{15}$.  (The set of $4\times 4$ Hermitian complex matrices
has real dimension 16, and the subset of positive, trace-1 matrices
has real dimension 15.)  Let $K$ denote the set of convex combinations
of pure product states; in other words, $K$ is the space of
\emph{separable states} of $\twoqubit$, and corresponds to a compact
convex subset of $\mathbb{R}^{15}$.  (For some results on the geometry
of $K$, see \cite{thirring}.)

Since $K$ is a convex set, it gives a genuine theory in the convex
sets approach; we call this theory the {\it Schr*dinger theory}.
(This ad hoc construction is for conceptual purposes only; we do not
think that Schr{\"o}dinger really had this theory in mind when he
expressed his hope for an alternative to QM.)  The
observables of the Schr*dinger theory are the elements of the real
vector space $A(K)$ of affine functions from $K$ to $\mathbb{R}$.  The
expectation value of observable $f\in A(K)$ in state $x\in K$ is
$f(x)$.  Clearly, each self-adjoint operator $A\in \twoqubit$ gives an
observable for the Schr*dinger theory via the mapping $x\mapsto
\tr{xA}$.

In order to clarify the information-theoretic properties of the
Schr*dinger theory, we need to define a notion of transition
probability for arbitrary convex sets (see \citeNP{mielnik};
\citeNP[Prop.~2.8.1]{land}).

\begin{defn} Let $K$ be a convex set, and let $A(K)$ be the
  set of affine functions from $K$ into $\mathbb{R}$.  If $x,y\in
  \ext{K}$, then the affine ratio (or transition probability) of $x$
  and $y$ relative to $K$ is given by
\[ \ratio{K}{x}{y}\: =_{\mathrm{def}} \: \inf \{
f(y); f \in A(K),\; \mathrm{range}(f)\subseteq [0,1],\; \text{and} \;
f(x)=1 \, \} .\] \end{defn}

The affine ratio has a natural geometrical interpretation.  In
particular, if $K$ is a contained in the vector space $V$, then each
affine function $f:V\rightarrow \mathbb{R}$ foliates $V$ into a family
of hyperplanes $\{ f^{-1}(t)\} _{t\in \mathbb{R}}$.  Now consider
those $f$'s where $K$ lies between the $0$ and $1$ hyperplanes, and
where $x$ lies in the intersection of $K$ with the $1$ hyperplane.
Then any $y\in \ext{K}$ falls within a unique $t\in [0,1]$ hyperplane.
Finally, consider all such foliations, and take the infimum of the $t$
such that $f(y)=t$.

In some nice cases, there is a unique affine function $f$ such that
$f(x)=1$ and $\min \{ f(y):y\in K\} =0$; thus, $\ratio{K}{x}{y}=f(y)$.
For example, when $K$ is the unit sphere in $\mathbb{R}^{3}$, and
$x,y$ are points on the surface of the sphere, then
$\ratio{K}{x}{y}=\frac{1}{2}(1+x\cdot y)$.  That is, the transition
probability is given by the (normalized) tangent function to $K$ at
$x$.

\begin{figure}[center]
\begin{pspicture}(-6,-2.25)(3,3)
\psset{Beta=5,Alpha=105,linewidth=0.01mm,unit=1.5}
%% Tangent plane at point (0,1/sqrt{2},-1/sqrt{2})
\newrgbcolor{lightblue}{0.68 0.85 0.9}
%%
\pstThreeDSquare[linecolor=lightgray,fillstyle=solid,fillcolor=lightgray](0,0.7071,-0.7071)(+1,0,0)(0,0.7071,0.7071)
\pstThreeDSquare[linecolor=lightgray,fillstyle=solid,fillcolor=lightgray](0,0.7071,-0.7071)(-1,0,0)(0,0.7071,0.7071)
\pstThreeDSquare[linecolor=lightgray,fillstyle=solid,fillcolor=lightgray](0,0.7071,-0.7071)(+1,0,0)(0,-0.7071,-0.7071)
\pstThreeDSquare[linecolor=lightgray,fillstyle=solid,fillcolor=lightgray](0,0.7071,-0.7071)(-1,0,0)(0,-0.7071,-0.7071)
%
% Sphere with radius 1, centered at (0,0,0)
\pstThreeDSphere(0,0,0){1.5}
%%
%%
%% Tangent plane at point (0,-1/sqrt{2},1/sqrt{2})
%%
\pstThreeDSquare[linecolor=lightgray,fillstyle=solid,fillcolor=lightgray](0,-0.7071,0.7071)(+1,0,0)(0,0.7071,0.7071)
\pstThreeDSquare[linecolor=lightgray,fillstyle=solid,fillcolor=lightgray](0,-0.7071,0.7071)(-1,0,0)(0,0.7071,0.7071)
\pstThreeDSquare[linecolor=lightgray,fillstyle=solid,fillcolor=lightgray](0,-0.7071,0.7071)(+1,0,0)(0,-0.7071,-0.7071)
\pstThreeDSquare[linecolor=lightgray,fillstyle=solid,fillcolor=lightgray](0,-0.7071,0.7071)(-1,0,0)(0,-0.7071,-0.7071)
%%
\pstThreeDPut(0,-0.7071,0.7071){$\bullet$}
\pstThreeDPut(0,0.7071,-0.7071){$\bullet$}
\pstThreeDPut(0,0.82,-0.82){$x$}
\pstThreeDPut(0,0.7071,0.7071){$\bullet$}
\pstThreeDPut(0,0.82,0.82){$y$}
\pstThreeDPut(0,2.3,-1){$f^{-1}(1)$ hyperplane}
\pstThreeDPut(0,-2.3,1){$f^{-1}(0)$ hyperplane}
\end{pspicture}
\caption{The Bloch sphere}
\label{bloch}
\end{figure}

In fact, the sphere is a familiar case from QM: it is affinely
isomorphic to the set of density operators on $\mathbb{C}^{2}$, and
the affine ratio corresponds to the standard quantum-mechanical
transition probability.  Indeed, the equivalence between the two
notions holds quite generally.

\begin{lemma} Let $\hil{H}$ be a complex Hilbert space, and let $K$ be
  the convex set of density operators on $\hil{H}$.  Then for any
  projection operators $E,F\in \ext{K}$, $\ratio{K}{E}{F}=\tr{EF}$.
  \label{transition}
\end{lemma}

\begin{proof} 
  Consider the affine function $f:K\rightarrow [0,1]$ given by
  $f(D)=\tr{ED}$, for all $D\in K$.  We claim that
  $f(F)=\ratio{K}{E}{F}$, for all $F\in \ext{K}$.  For this it will
  suffice to show that for any $g\in A(K)$, if
  $\mathrm{range}(g)\subseteq [0,1]$ and $g(E)=1$, then $g \geq f$.
  Let $g$ be such a function.  Since $A(K)$ is order-isomorphic to
  $\bhs$, there is a self-adjoint operator $A$ on $\hil{H}$ such that
  $A$ has spectrum in $[0,1]$, and $g(F)=\tr{AF}$, for all $F\in
  \ext{K}$.  Let $\ket{\alpha}$ be a unit vector in the range of $E$,
  and let $\ket{\beta}$ be a unit vector in the range of $F$.  Then
  $\langle \alpha |A|\alpha \rangle =g(E)=1$, and it follows that
  $A\ket{\alpha}=\ket{\alpha}$.  By the spectral theorem, $EA=AE=E$,
  and so $\langle \beta |(I-E)A|\beta \rangle \geq 0$.  Therefore,
  \begin{equation} \langle \beta |A|\beta \rangle =\langle \beta
      |EA|\beta \rangle +\langle \beta |(I-E)A|\beta \rangle \geq
      \langle \beta |E|\beta \rangle .\end{equation}
That is, $g(F)\geq f(F)$, for all $F\in \ext{K}$.
\end{proof}

We can now show that the Schr*dinger theory satisfies the no cloning
axiom, but violates the no bit commitment axiom.  First, we claim that
the permissible state transformations of a theory with state space $L$
correspond to affine endomorphisms of $L$.  (A transformation is
reversible iff it is one-to-one.)  If $\eta$ is an affine endomorphism
of $L$, and if $L'=\eta (L)$, then
\begin{equation} \ratio{L'}{\eta (x)}{\eta (y)}\geq \ratio{L}{x}{y}
  ,\qquad \forall x,y\in L .\end{equation}  In the Schr*dinger theory, we have two
subsystems $A,B$ (each qubits) combined in a nonstandard way into a
composite system $AB$.  Suppose for reductio ad absurdum that states
of system $A$ can be cloned by using system $B$ as a cloning machine.  That is, there is a
ready state $x_{0}$ of $B$ and a state transformation $\eta$ on $AB$
such that $\eta (x\otimes x_{0})=x\otimes x$ for all pure states $x$ of
$A$.  Let $x$ and $y$ be non-orthogonal pure states; that is, $0<\ratio{A}{x}{y}<1$.  It then follows that
\begin{equation} \ratio{A}{x}{y}\leq \ratio{AB}{x\otimes x_{0} }{y\otimes
    x_{0} }\leq \ratio{AB}{x\otimes x}{y\otimes
    y}\leq \ratio{A}{x}{y}^{2}, \label{square} \end{equation}  
in contradiction with the assumption $x$ and $y$ are non-orthogonal.  (The first
inequality follows from the fact that $x\mapsto x\otimes
x_{0}$ is an affine embedding of $A$ into $AB$.  The second inequality follows from the fact that the cloning map cannot
decrease transition probabilities.  The final inequality follows
from the fact that $\ratio{AB}{x\otimes x}{y\otimes y}\leq T$, where
    $T$ is the transition probability of $x\otimes x$ and $y\otimes y$
    relative to the full state space of $\twoqubit$; and 
$T=\tp{x\otimes x}{y\otimes y}=|\langle x|y\rangle |^{4}=\ratio{A}{x}{y}^{2}$.) 
Therefore, the cloning map $\eta$ does not exist.
    
In order to see that the Schr*dinger theory allows an unconditionally
secure bit commitment protocol, consider the direct analogue of the
BB84 protocol \cite{bb84}.  In this protocol, Alice encodes bit $0$
into the mixed state $D_{0}=\frac{1}{2}(|01\rangle \langle
01|+|10\rangle \langle 10|)$, and she encodes bit $1$ into the mixed
state $D_{1}=\frac{1}{2}(\braket{\alpha \beta}+\braket{\beta \alpha }
)$, where $\ket{\alpha}=2^{-1/2}(\ket{0}+\ket{1})$ and
$\ket{\beta}=2^{-1/2}(\ket{0}-\ket{1})$.  Since
$\mathrm{Tr}_{A}(D_{0})=\mathrm{Tr}_{A}(D_{1})$, this protocol is
perfectly concealing.  If Alice could prepare the EPR-Bohm state $E$,
i.e., the projection onto the vector $2^{-1/2}(\ket{01}-\ket{10})$,
then this protocol would not be binding; because $E$ can be
transformed by local nonselective operations into either $D_{0}$ or
$D_{1}$.  However, in the Schr*dinger theory, there are no such
entangled states; indeed, there is no state that Alice can transform
into either $D_{0}$ or $D_{1}$.  Therefore, this protocol is perfectly
binding.

Since the Schr*dinger theory prohibits cloning, but allows
unconditionally secure bit commitment, it follows from
Theorem~\ref{independence} that it does not admit a $C^{*}$-algebraic
formulation.  We devote the next section to establishing a stronger
claim: the Schr*dinger theory does not admit a JB algebraic
formulation.

\subsection{Pathology of the Schr*dinger theory}

By using the generalized definition of transition probability for
arbitrary convex sets, we can see classical transition probabilities
are always in $\{ 0,1\}$, whereas quantum mechanical transition
probabilities can lie anywhere in the unit interval.  We will use the
transition probability to define a generalized notion of the
superposition of two pure states.

\begin{defn} Pure states $x,y\in \ext{K}$ are said to be {\it orthogonal} just in case
  $\ratio{K}{x}{y}=0$.  Two orthogonal states $x,y\in \ext{K}$ are
  said to be \emph{superposable in} $K$ just in case there is a $z\in
  \ext{K}$ such that $\ratio{K}{x}{z}=\frac{1}{2}=\ratio{K}{y}{z}$.
\end{defn}

This definition is motivated by the following considerations.  If
observables correspond to affine functions on $K$ (as is usually
assumed in the convex sets approach), a measurement designed to
distinguish $x$ from $y$ can be represented by an affine function
$f:K\rightarrow [0,1]$, where $f(x)=1$ and $f(y)=0$.  If there is such
a function $f$, then $\ratio{K}{x}{z}=\frac{1}{2}=\ratio{K}{y}{z}$ iff
$f(z)=\frac{1}{2}$.  That is, when the system is in state $z$, the $x$
and $y$ outcomes of an $f$-measurement are equally likely.

For the case of JB algebra state spaces, if two pure states can be
connected by a continuous path, then they can be coherently
superposed.\footnote{According to \citeA{hardy}, QM is differentiated
  from classical probability theory by the assumption that there is a
  continuous transition between any two pure states.  Hardy's claim is
  true in the JB algebraic framework (if we take the relevant topology
  to be the norm topology), if we think of ``quantum'' systems as
  those systems that have a single non-trivial superselection sector,
  and ``classical'' systems as those systems whose superselection
  sectors are singletons.}

\begin{lemma} 
  Let $K$ be the state space of a JB algebra, and let $x,y$ be
  orthogonal states in $\ext{K}$.  If $x$ and $y$ are connected by a
  norm-continuous path in $\ext{K}$, then $x$ and $y$ are superposable
  in $K$.
  \label{super}
\end{lemma}

\begin{proof} 
  Suppose that $x,y\in \ext{K}$ are orthogonal, and that $x$ and $y$
  are connected by a norm-continuous path in $\ext{K}$.  Let
  $F=\face{x}{y}$.  By part~\ref{path} of the Root Theorem, there is
  an affine isomorphism $\phi$ from $F$ onto $B^{n}$, with $n\geq 2$.
  Let $\{ e_{1},e_{2},\dots ,e_{n}\}$ be the canonical orthonormal
  basis for $\mathbb{R}^{n}$.  Since there is an affine automorphism
  of $B^{n}$ that maps $\phi (x)$ to $e_{1}$, we may suppose that
  $\phi (x)=e_{1}$.  An exercise in elementary geometry shows that
  $\phi (y)=-e_{1}$.  ($\phi$ preserves affine ratios, and $-e_{1}$ is
  the unique $r\in B^{n}$ such that $\ratio{B^{n}}{e_{1}}{r}=0$.)
  Furthermore,
  $\ratio{B^{n}}{e_{1}}{e_{2}}=\ratio{B^{n}}{-e_{1}}{e_{2}}=\frac{1}{2}$.
  Thus, if we choose $z=\phi ^{-1}(e_{2})$, then $\ratio{K}{x}{z}\geq
  \ratio{F}{x}{z}=\frac{1}{2}$ and $\ratio{K}{y}{z}\geq
  \ratio{F}{y}{z}=\frac{1}{2}$.
\end{proof}

The Schr*dinger theory seems to have some non-trivial superselection
rule, because it does not seem to allow coherent superpositions of,
say, $\ket{01}$ and $\ket{10}$.  We begin by confirming that such
states are not superposable.

\begin{lemma} Let $K$ be the set of separable states of
  \mbox{$\twoqubit$}.  Then $\ket{01}$ and $\ket{10}$ are not
  superposable in $K$.
  \label{specific} \end{lemma}

\begin{proof} 
  Let $x=\braket{01}$, let $y=\braket{10}$, and suppose for reductio
  ad absurdum that there is a $z=\ket{\alpha \beta}=\ket{\alpha
  }\ket{\beta }\in \ext{K}$ such that
  $\ratio{K}{x}{z}=\frac{1}{2}=\ratio{K}{y}{z}$.  If $L$ is the full
  state space of $\twoqubit$, then $\ratio{K}{v}{w}\leq
  \ratio{L}{v}{w}$ for any $v,w\in \ext{K}$ (since $\ext{K}\subseteq
  \ext{L}$).  Thus, Lemma~\ref{transition} entails that
\begin{eqnarray} 1&=&\ratio{K}{x}{z}+\ratio{K}{y}{z} \\
&\leq & \ratio{L}{x}{z}+\ratio{L}{y}{z} \\
&=& |\langle 01|\alpha \beta \rangle |^{2}+|\langle 10|\alpha \beta \rangle |^{2}\: \leq \:
  1 .\label{burb} \end{eqnarray}
We now show that either $\tp{01}{\alpha \beta }=0$ or
$\tp{10}{\alpha \beta }=0$.  For this, let
  \begin{equation} a=\tp{0}{\alpha},\quad b=\tp{1}{\beta},\quad
    c=\tp{0}{\beta},\quad d=\tp{1}{\alpha} .\end{equation}
  Thus, Eqn.~\ref{burb} becomes $ab+cd=1$.  Since $\{
  \ket{0},\ket{1}\}$ is an orthonormal basis for $\mathbb{C}^{2}$, we
  also have $b=1-c$ and $d=1-a$.  Hence, $a+c-2ac=1$.  The functions
  $[0,1]\ni a\mapsto a+c-2ac$ (for fixed $c\in [0,1]$) and $[0,1]\ni
  c\mapsto a+c-2ac$ (for fixed $a\in [0,1]$) are affine.  Thus,
  $a+c-2ac$ achieves its maximum value only at extreme points of the
  convex set $[0,1]\times [0,1]$.  Checking these points, we find that
  $a+c-2ac\leq 1$, with equality achieved only when $(a,c)=(1,0)$ or
  $(a,c)=(0,1)$.  If $c=0$, then $\tp{10}{\alpha \beta }=cd=0$.
  Similarly, if $a=0$, then $\tp{01}{\alpha \beta }=ab=0$.  Applying
  Lemma~1 again, it follows that either
\begin{equation}
\ratio{K}{x}{z} \leq \ratio{L}{x}{z} =\tp{01}{\alpha \beta}=0 ,\end{equation} or
\begin{equation}
\ratio{K}{y}{z} \leq \ratio{L}{y}{z} =\tp{10}{\alpha \beta}=0
,\end{equation}  
both of which
  contradict our assumption that $z$ is an equally weighted 
superposition of $x$ and $y$.  Therefore, $\ket{01}$ and $\ket{10}$
are not superposable in~$K$.  \end{proof}

The previous Lemma shows that if the Schr*dinger theory permits a JB
algebraic formulation, then the states $\ket{01}$ and $\ket{10}$ must
lie in different superselection sectors.  However, $\ket{01}$ and
$\ket{10}$ are connected by a continuous path of pure product
states.\footnote{Since $K$ is not a topological space, this statement
  doesn't really make sense.  However, since $K$ is a subset of
  $\mathbb{R}^{n}, (n<\infty )$, there is a unique topology $\tau$ on
  $K$ that is compatible with its affine structure; namely, the
  relative topology from $\mathbb{R}^{n}$.  So, if $K$ were isomorphic
  to a JB algebra state space, the transported norm topology would be
  equivalent to $\tau$.}

\begin{lemma} Let $K$ be the set of separable states of
  \mbox{$\twoqubit$}.  Then there is a continuous path in $\ext{K}$
  between $\ket{01}$ and $\ket{10}$.  \label{connected}
\end{lemma}

\begin{proof} 
  By symmetry, and since path-connectedness of points is transitive,
  it will suffice to show that there is a norm-continuous path in
  $\ext{K}$ between $\ket{01}$ and $\ket{11}$.  Let $\hsnorm{\cdot}$
  denote the Hilbert-Schmidt norm on $\nbit$; i.e.,
  $\hsnorm{A}=\tr{A^{*}A}^{1/2}$.  There is a
  $\hsnorm{\cdot}$-continuous function $f$ from $[0,1]$ into the set
  of one-dimensional projections on $\mathbb{C}^{2}$ such that
  $f(0)=\braket{0}$ and $f(1)=\braket{1}$.  Define a function
  $g:[0,1]\rightarrow \ext{K}$ by setting $g(t)=f(t)\otimes
  \braket{1}$.  Since $\hsnorm{A\otimes B}=\hsnorm{A}\hsnorm{B}$ for
  all operators $A,B$ on $\mathbb{C}^{2}$, it follows that
  \begin{equation} \hsnorm{g(t)-g(t')} =
  \hsnorm{(f(t)-f(t'))\otimes \braket{1} \, } 
=\hsnorm{f(t)-f(t')} ,\end{equation} for all $t,t'\in
  [0,1]$.  Therefore, $g$ is $\hsnorm{\cdot}$-continuous as a mapping into
  $\ext{K}$ with the relative topology inherited from the state space
  of $\twoqubit$.
\end{proof}

The previous two Lemmas show that the topology and affine structure of
the separable state space do not mesh in the way that these structures
mesh in JB algebra state spaces.

\begin{thm} 
  The set of separable states of $\twoqubit$ is not affinely
  isomorphic to the state space of a JB algebra.
  \label{schro}
\end{thm}

\begin{proof} 
  Suppose for reductio ad absurdum that $K$ is affinely isomorphic to
  the state space of a JB algebra.  Let $x=\braket{10}$ and let
  $y=\braket{01}$.  By Lemma~\ref{connected}, there is a continuous
  path between $x$ and $y$, and so Lemma~\ref{super} entails that $x$
  and $y$ are superposable in $K$.  But this contradicts
  Lemma~\ref{specific}.  Therefore, $K$ is not affinely isomorphic to
  the state space of a JB algebra.
\end{proof}

This result shows that the simplest Schr{\"o}dinger-like theory ---
viz., the Schr*dinger theory --- does not admit a JB algebraic
formulation.  Thus, it provides some evidence for the claim that even
within the JB algebraic framework, locally quantum mechanical theories
have nonlocally entangled states; and it suggests that even within the
JB algebraic framework, the no cloning axiom entails the no bit
commitment axiom.

The upshot, then, of this section is to confirm worries that the
$C^{*}$ assumption is doing too much work in the CBH theorem; and,
furthermore, it probably wouldn't help matters if we were to derive a
generalized CBH theorem for JB algebras.  But, of course, there is
still hope that within a suitably broader mathematical framework
(e.g., Segal-algebras (see \citeNP{segal}), and the dual theory of
spectral convex sets), the three axioms are independent, and together
entail QM. 

\section{Conclusion}

This note attempts to clarify the limits of recent
information-theoretic characterizations of QM.
However, in doing so, it has raised a number of further questions,
both of a technical and a philosophical nature.  

First, we conjecture that the three information-theoretic axioms are
independent in the Segal-algebraic framework, and that the conjunction
of the axioms entails QM.  This generalized version of the CBH theorem
would not only address the worries raised in the previous section, but
might also help shed light on traditional questions, such as physical
reasons for using complex coefficients rather than reals or
quaternions.
 
Second, the considerations in this paper suggest that we take a closer
look at different ways of putting together composite systems, where
all systems are assumed to have convex state spaces.  It is known that
there are several different notions of the ``tensor product'' of
compact convex sets (see, e.g., \citeNP{namioka}).  Thus, it would be
interesting to see which of these products preserve which
information-theoretic properties of the component systems.  More
specifically, suppose that $\otimes$ is a tensor product of compact
convex sets that preserves the defining properties of JB algebra state
spaces.  Then does it follow that $K\otimes L$ has nonlocally
entangled states whenever $K$ and $L$ are not simplexes?  Or does the
JB algebraic framework permit the existence of a Schr{\"o}dinger-like
theory?  If the JB algebraic framework does not, does the broader
Segal-algebraic framework permit the existence of a
Schr{\"o}dinger-like theory?

Finally, our discussion has raised the question of the role of
constraints (either {\it a priori} or operational) on theory
construction.  On the one hand, if there are no constraints on theory
construction --- i.e., if there is no minimum amount of mathematical
structure shared by all theories, and if any fairy tale can count as a
legitimate ``toy theory'' --- then it would be hopeless to try to {\it
  derive} QM from information theoretic principles, or
from any other sort of principles for that matter.  (E.g., why assume
that the results of measurements are real numbers?  Why assume that
measurements have single outcomes?  Why assume that the laws of
physics are the same from one moment to the next?)  On the other hand,
the idea that it is legitimate to assume a fixed background framework
for physical theories seems to come into tension with the empiricist
attitude that drove the two major revolutions in physics in the 20th
century; and the last thing we want is to impede the search for a
future theory that would generalize QM. 

\newpage
\begin{center} {\bf Acknowledgments} \end{center}

Many of the ideas in this paper originated from conversations with
Jeff Bub.  Thanks also to Rob Spekkens and to an anonymous referee for
comments on an earlier draft.

\nocite{hardy}
\bibliographystyle{apacite}
\bibliography{bib}

\end{document}





In attempting to derive quantum theory from information-theoretic
axioms, it might seem that there are essentially two type of theories:
classical theories, whose algebras of observables are commutative, and
quantum theories, whose algebras of observables are non-commutative.
As long as we work within the $C^{*}$-algebraic framework, this
dichotomy is essentially valid.  In particular, the Gelfand
representation theorem \cite[Thm.~4.4.3]{kr} entails that commutative
$C^{*}$-algebras have a phase space representation, and the GNS
representation theorem \cite[Thm.~4.5.2]{kr} entails that
non-commutative $C^{*}$-algebras carry copies of the qubit.  (More
precisely, if the algebra is non-commutative, then there are a pair of
states that generate a face that is affinely isomorphic to the Bloch
sphere.)  But it would be surprising to find that this dichotomy is
\emph{logically} necessary --- i.e., that our world is necessarily
either classical or quantum-mechanical.  Motivated by a comment of
Schr{\"o}dinger's, we now consider the possibility of a theory that is
locally like QM, but which lacks non-locally entangled states.


We claim that the $C^{*}$-algebraic representation of physical
theories is broad enough to cover any successful theory from the
mature period of physical science (roughly from the time of Newton).
Whether this breadth of applicability indicates that there is
something {\it a priori} about the $C^{*}$-algebraic representation of
theories is a deep question, which we will not attempt to answer here.
(\citeA{lan-simple}, for one, suggests that JB algebraic structure is
not contingent.)






Then
\begin{equation} \ratio{K}{\sigma}{\tau} \leq \ratio{L}{P_{x}\otimes
    P_{y}}{P_{y}\otimes P_{x}} =\tp{x\otimes y}{y\otimes x}=0 .\end{equation}

pst-3dplot.tex
%%
%% This is file `pst-3dplot.tex',
%%
%% IMPORTANT NOTICE:
%%
%% Package `pst-3dplot.tex'
%%
%% Herbert Voss <voss@perce.de>
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN archives
%% in directory macros/latex/base/lppl.txt.
%%
%% DESCRIPTION:
%%   `pst-3dplot' is a PSTricks package to draw 3d curves and graphical objects
%%
\def\fileversion{1.2b}
\def\filedate{2003/11/03}
\message{`PST-3dplot' v\fileversion, \filedate\space (Herbert Voss)}
\csname PSTThreeDplotLoaded\endcsname
\let\PSTThreeDplotLoaded\endinput
% Requires PSTricks, pst-node, pst-plot, multido packages
%\usepackage{pstcol}
\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi
\ifx\PSTnodesLoaded\endinput\else\input pst-node.tex\fi
\ifx\PSTplotLoaded\endinput\else\input pst-plot.tex\fi% plotpoints
\ifx\PSTNewThreeDLoaded\endinput\else\input pst-vue3d.tex\fi
\ifx\PSTMultidoLoaded\endinput\else\input multido.tex\fi
%
% DPC interface to the `keyval' package (until keyval based version of PSTricks)
\input pst-key
%
\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax
\SpecialCoor
%
%%%%%%%%%%%%%%%%%% Macrolist %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \def\variablesThreeD
% \def\pstThreeDPut
% \def\pstThreeDLine
% \def\pstThreeDDot
% \def\pstThreeDNode
% \def\pstUThreeDPut
% \def\pstThreeDSquare
% \def\pstThreeDBox
% \def\pstThreeDSphere
% \def\pstThreeDEllipse
% \def\pstThreeDPlotFunc
% \def\psplotThreeD
% \def\parametricplotThreeD
% \def\psThreeDPlot
% \def\pstThreeDCoor
% \def\fileplotThreeD
% \def\dataplotThreeD
% \def\listplotThreeD
%
%
\newdimen\pst@dimf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% ---------------- the if's -----------------
%
\newif\ifPst@drawing%			draw the coordinates?
\define@key{psset}{drawing}[true]{%
	\@nameuse{Pst@drawing#1}%
}
\newif\ifPst@drawCoor%		draw the coordinates of a dot?
\define@key{psset}{drawCoor}[false]{%
	\@nameuse{Pst@drawCoor#1}%
}
\newif\ifPst@hiddenLine%	emulate hidden line surface?
\define@key{psset}{hiddenLine}[false]{%
	\@nameuse{Pst@hiddenLine#1}%
}
%
% ------- the global definitions for the pspicture frame ------
%
\define@key{psset}{xMin}{\edef\psk@ThreeDplot@xMin{#1}}
\define@key{psset}{xMax}{\edef\psk@ThreeDplot@xMax{#1}}
\define@key{psset}{yMin}{\edef\psk@ThreeDplot@yMin{#1}}
\define@key{psset}{yMax}{\edef\psk@ThreeDplot@yMax{#1}}
\define@key{psset}{zMin}{\edef\psk@ThreeDplot@zMin{#1}}
\define@key{psset}{zMax}{\edef\psk@ThreeDplot@zMax{#1}}
\define@key{psset}{xThreeDunit}{\edef\psk@ThreeDplot@xThreeDunit{#1}}
\define@key{psset}{yThreeDunit}{\edef\psk@ThreeDplot@yThreeDunit{#1}}
\define@key{psset}{zThreeDunit}{\edef\psk@ThreeDplot@zThreeDunit{#1}}
%
% -------------- the angles and the plotpoints -------------
%
\define@key{psset}{Alpha}{%			Horizontal turn
	\edef\psk@ThreeDplot@Alpha{#1}%
}
\define@key{psset}{Beta}{%			Vertical turn
	\edef\psk@ThreeDplot@Beta{#1}%
}
\define@key{psset}{drawStyle}{%			how to draw 3D functions
	\edef\psk@ThreeDplot@drawStyle{#1}%
}
\def\drawStyle@xLines{xLines}
\def\drawStyle@yLines{yLines}
\def\drawStyle@xyLines{xyLines}
\def\drawStyle@yxLines{yxLines}
%
\define@key{psset}{xPlotpoints}{%		points in x direction
	\edef\psk@ThreeDplot@xPlotpoints{#1}%
}
\define@key{psset}{yPlotpoints}{%		points in y direction
	\edef\psk@ThreeDplot@yPlotpoints{#1}%
}
\define@key{psset}{beginAngle}{%		for ellipse/circle arc
	\edef\psk@ThreeDplot@beginAngle{#1}%
}
\define@key{psset}{endAngle}{%			for ellipse/circle arc
	\edef\psk@ThreeDplot@endAngle{#1}%
}
\define@key{psset}{linejoin}{%		how lines come together 0,1,2
	\edef\psk@ThreeDplot@linejoin{#1}%
}
\define@key{psset}{plane}{%			xy,xz,yz
	\edef\psk@ThreeDplot@plane{#1}%
}
\define@key{psset}{origin}{%			combination of (lr)(tBb)
	\edef\psk@ThreeDplot@origin{#1}%
}
\def\ThreeDplot@planeXY{xy}
\def\ThreeDplot@planeXZ{xz}
\def\ThreeDplot@planeYZ{yz}
%
% -------------- the length and node definitions -------------
%
\define@key{psset}{XO}{%			the X-offset
	\edef\psk@ThreeDplot@XO{#1}%
}
\define@key{psset}{YO}{%			the y-offset
	\edef\psk@ThreeDplot@YO{#1}%
}
\define@key{psset}{angleStep}{%		for circles
	\edef\psk@ThreeDplot@angleStep{#1}%
}
\define@key{psset}{posStart}{%		where the arrows start
	\edef\psk@ThreeDplot@posStart{#1}%
}
\define@key{psset}{length}{%		the length of the before|outlines
	\edef\psk@ThreeDplot@length{#1}%
}
\define@key{psset}{arrowOffset}{%	offset for \arrowLine
	\edef\psk@ThreeDplot@arrowOffset{#1}%
}
\define@key{psset}{visibleLineStyle}{%	offset for \arrowLine
	\edef\psk@ThreeDplot@visibleLineStyle{#1}%
}
\define@key{psset}{invisibleLineStyle}{%	offset for \arrowLine
	\edef\psk@ThreeDplot@invisibleLineStyle{#1}%
}
%
\define@key{psset}{nameX}{%		start of the object arrow
	\edef\psk@ThreeDplot@nameX{#1}%
}
\define@key{psset}{spotX}{%		where to draw the label
	\edef\psk@ThreeDplot@spotX{#1}%
}
\define@key{psset}{nameY}{%
	\edef\psk@ThreeDplot@nameY{#1}%
}
\define@key{psset}{spotY}{%
	\edef\psk@ThreeDplot@spotY{#1}%
}
\define@key{psset}{nameZ}{%
	\edef\psk@ThreeDplot@nameZ{#1}%
}
\define@key{psset}{spotZ}{%
	\edef\psk@ThreeDplot@spotZ{#1}%
}
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                              %
%                        B A S I C S	                       %
%                                                              %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\def\setDefaults{%
    \setkeys{psset}{%
	drawing=true,hiddenLine=false,%
	xMin=-1,xMax=4,yMin=-1,yMax=4,zMin=-1,zMax=4,%
	xThreeDunit=1,yThreeDunit=1,zThreeDunit=1,%
	Alpha=45,Beta=30,%
	drawStyle=xLines,%
	xPlotpoints=25,yPlotpoints=25,%
	beginAngle=0,endAngle=360,%
	linejoin=1,%
	XO=0,YO=0,%
	angleStep=1,%
	posStart=0,length=2,%
	arrowOffset=0,%
	visibleLineStyle=solid,%
	invisibleLineStyle=dashed,%
	nameX=x,spotX=180,%
	nameY=y,spotY=0,%
	nameZ=z,spotZ=90,%
	plane=xy,origin=c%
    }%
}
\setDefaults
%
% (#1) -> #1 #2 #3
%
\def\getThreeDCoor#1#2{\pst@getThreeDcoor(#1)\let#2\pst@coorIIID}
\def\pst@getThreeDcoor(#1,#2,#3){%
	\edef\pst@coorIIID{#1\space #2\space #3\space}
}
\def\variablesThreeD{%
	/Alpha \psk@ThreeDplot@Alpha\space def
	/Beta \psk@ThreeDplot@Beta\space def
	/Convert {			% now we have x y z
		3 -1 roll		% y z x
		dup			% y z x x
		neg Alpha cos mul	% y z x (x)
		4 -1 roll		% z x (x) y
		dup			% z x (x) y y
		5 1 roll		% y z x (x) y
		Alpha sin mul add 	% y z x (x2)
		4 1 roll		% (x2) y z x
		Alpha sin mul		% (x2) y z (x)
		3 -1 roll		% (x2) z (x) y
		Alpha cos mul add neg Beta sin mul % (x2) z (x)
		exch			% (x2) (x) z
		Beta cos mul add 	% (x2) (y2)
	} def
	\pst@tempa\space Convert
	/y2DA exch def
	/x2DA exch def
	\pst@tempb\space Convert
	/y2DB exch def
	/x2DB exch def
	\pst@tempc\space Convert
	/y2DC exch def
	/x2DC exch def
}
\def\pst@addThreeDVec(#1)(#2)#3#4#5{%
	\pst@calcThreeDVec(#1)(#2)%
	\let#3\pst@getValueX%
	\let#4\pst@getValueY%
	\let#5\pst@getValueZ%
}
\def\pst@subThreeDVec(#1)(#2,#3,#4)#5#6#7{%
	\pst@calcThreeDVec(#1)(-#2,-#3,-#4)%
	\let#5\pst@getValueX%
	\let#6\pst@getValueY%
	\let#7\pst@getValueZ%
}
\def\pst@calcThreeDVec(#1,#2,#3)(#4,#5,#6){%
  \begingroup
    \pst@dima=#1 pt%
    \pst@dimb=#2 pt%
    \pst@dimc=#3 pt%
	\pst@dimf=#4 pt%
	\pst@dimg=#5 pt%
	\pst@dimh=#6 pt%
	\advance\pst@dima by \pst@dimf%
	\advance\pst@dimb by \pst@dimg%
	\advance\pst@dimc by \pst@dimh%
	\xdef\pst@getValueX{\pst@number\pst@dima}%
	\xdef\pst@getValueY{\pst@number\pst@dimb}%
	\xdef\pst@getValueZ{\pst@number\pst@dimc}%
  \endgroup
}%
%
% the ThreeD coordinate system
%
\def\pstThreeDCoor{\@ifnextchar[{\pst@ThreeDCoor}{\pst@ThreeDCoor[]}}
\def\pst@ThreeDCoor[#1]{{%
	\pst@killglue
	\setkeys{psset}{linewidth=0.5pt,linecolor=red,arrows=->,dotstyle=|}
	\setkeys{psset}{#1}
	\pstThreeDNode(\psk@ThreeDplot@xMin,0,0){xMin}
	\pstThreeDNode(\psk@ThreeDplot@xMax,0,0){xMax}
	\pstThreeDNode(0,\psk@ThreeDplot@yMin,0){yMin}
	\pstThreeDNode(0,\psk@ThreeDplot@yMax,0){yMax}
	\pstThreeDNode(0,0,\psk@ThreeDplot@zMin){zMin}
	\pstThreeDNode(0,0,\psk@ThreeDplot@zMax){zMax}
	\ifPst@drawing
	    % ThreeDplot axes
	    \psline(xMin)(xMax)
	    \psline(yMin)(yMax)
	    \psline(zMin)(zMax)
	    \uput[\psk@ThreeDplot@spotX](xMax){$\mathbf{\psk@ThreeDplot@nameX}$}
	    \uput[\psk@ThreeDplot@spotY](yMax){$\mathbf{\psk@ThreeDplot@nameY}$}
	    \uput[\psk@ThreeDplot@spotZ](zMax){$\mathbf{\psk@ThreeDplot@nameZ}$}
	\fi% ifdrawing
}}
%
% put anything at (#2,#3,#4)
%
\def\pstThreeDPut{\@ifnextchar[{\pst@ThreeDPut}{\pst@ThreeDPut[]}}
\def\pst@ThreeDPut[#1](#2,#3,#4)#5{{%
	\pst@killglue%
	\setkeys{psset}{#1}
	\pstThreeDNode(#2,#3,#4){temp@pstNode}%
%	\def\@tempa{c}
%	\ifx\pst@ThreeDplot@origin\@tempa%
%	    \rput(temp@pstNode){#5}%
%	\else%
	    \rput[\psk@ThreeDplot@origin](temp@pstNode){#5}%
%	\fi%
}}
%
% draws a 3d line
%
\def\pstThreeDLine{\@ifnextchar[{\pst@ThreeDLine}{\pst@ThreeDLine[]}}
\def\pst@ThreeDLine[#1](#2,#3,#4)(#5,#6,#7){{%
	\pst@killglue
	\setkeys{psset}{#1}
	\def\pst@ThreeDplot@x{#2}	% x coordinate
	\def\pst@ThreeDplot@y{#3}	% y coordinate
	\def\pst@ThreeDplot@z{#4}	% z coordinate
	\def\pst@ThreeDplot@xB{#5}	% x coordinate
	\def\pst@ThreeDplot@yB{#6}	% y coordinate
	\def\pst@ThreeDplot@zB{#7}	% z coordinate
	\psline(!%
%		/Alpha \psk@ThreeDplot@Alpha\space def
%		/Beta \psk@ThreeDplot@Beta\space def
		/x \pst@ThreeDplot@x\space def
		/y \pst@ThreeDplot@y\space def
		/z \pst@ThreeDplot@z\space def
		/x2D x neg Alpha cos mul y Alpha sin mul add def
		/y2D x Alpha sin mul y Alpha cos mul add neg Beta sin mul
			z Beta cos mul add def
		x2D y2D)(!%
		/xB \pst@ThreeDplot@xB\space def
		/yB \pst@ThreeDplot@yB\space def
		/zB \pst@ThreeDplot@zB\space def
		/x2DB xB neg Alpha cos mul yB Alpha sin mul add def
		/y2DB xB Alpha sin mul yB Alpha cos mul add neg Beta sin mul
			zB Beta cos mul add def
		x2DB y2DB)
}}
%
% set a 3d dot
%
\def\pstThreeDDot{\@ifnextchar[{\pst@ThreeDDot}{\pst@ThreeDDot[]}}
\def\pst@ThreeDDot[#1](#2,#3,#4){{%
%	\pst@killglue
	\setkeys{psset}{linestyle=dashed,linewidth=0.5pt}% default
	\setkeys{psset}{#1}
	\pstThreeDNode(#2,#3,#4){A}
	\psdots(A)
	\ifPst@drawCoor
		\pstThreeDNode(#2,#3,0){B}
		\psline[#1](A)(B)
		\pstThreeDNode(#2,0,0){A}
		\psline[#1](B)(A)
		\pstThreeDNode(0,#3,0){A}
		\psline[#1](B)(A)
	\fi
}}
%
% transform the 3d coordinates of the node (#1,#2,#3)
% into a 2d node with the name #4
%
\def\pstThreeDNode(#1,#2,#3)#4{%
	\def\pst@ThreeDplot@x{#1}	% x coordinate
	\def\pst@ThreeDplot@y{#2}	% y coordinate
	\def\pst@ThreeDplot@z{#3}	% z coordinate
	\pnode(!%
		/Alpha \psk@ThreeDplot@Alpha\space def
		/Beta \psk@ThreeDplot@Beta\space def
		/x \pst@ThreeDplot@x\space def
		/y \pst@ThreeDplot@y\space def
		/z \pst@ThreeDplot@z\space def
		x neg Alpha cos mul y Alpha sin mul add 
		x Alpha sin mul y Alpha cos mul add neg Beta sin mul
		    z Beta cos mul add ){#4}%
}
%
% a 3d uput[](){}
%
\def\pstUThreeDPut{\@ifnextchar[{\pst@UThreeDPut}{\pst@UThreeDPut[]}}
\def\pst@UThreeDPut[#1](#2,#3,#4)#5{{%
	\def\pst@ThreeDplot@x{#2}	% x coordinate
	\def\pst@ThreeDplot@y{#3}	% y coordinate
	\def\pst@ThreeDplot@z{#4}	% z coordinate
	\uput[#1](!%
		/Alpha \psk@ThreeDplot@Alpha\space def
		/Beta \psk@ThreeDplot@Beta\space def
		/x \pst@ThreeDplot@x\space def
		/y \pst@ThreeDplot@y\space def
		/z \pst@ThreeDplot@z\space def
		/x2D x neg Alpha cos mul y Alpha sin mul add def
		/y2D x Alpha sin mul y Alpha cos mul add neg Beta sin mul 
			z Beta cos mul add def
	 	x2D y2D){#5}
}}
%
% Trangle [options](Point1)(Point2)(Point3)
%
\def\pstThreeDTriangle{%
	\@ifnextchar[%
		{\do@ThreeDTriangle}%
		{\do@ThreeDTriangle[]}%
}
\def\do@ThreeDTriangle[#1](#2)(#3)(#4){{%
	\ifx#1\empty\else\setkeys{psset}{#1}\fi%
	\ifPst@drawCoor
		\pstThreeDDot[drawCoor=true](#2)%
		\pstThreeDDot[drawCoor=true](#3)%
		\pstThreeDDot[drawCoor=true](#4)%
	\fi
	\pstThreeDNode(#2){A}
	\pstThreeDNode(#3){B}
	\pstThreeDNode(#4){C}
	\def\@tempa{none}%
	\ifx\psk@fillstyle\@tempa
	\else
		\pscustom{%
			\code{\psk@ThreeDplot@linejoin\space setlinejoin}%
	\fi%
		\psline[#1](A)(B)(C)(A)
	\ifx\psk@fillstyle\@tempa\else}\fi%
}}
%
% draws a threeD square as a polygon 
%
% [#1] options
% (#2) starting vector ax,ay,az
% (#3) first direction vector ux,uy,uz
% (#4) second direction vector wx,wy,wz
%
\def\pstThreeDSquare{\@ifnextchar[{\doThreeDSquare}{\doThreeDSquare[]}}
\def\doThreeDSquare[#1](#2)(#3)(#4){{%
	\psset{#1}
	\getThreeDCoor{#2}\pst@tempa	% 1. point 
	\getThreeDCoor{#3}\pst@tempb	% 2. point
	\getThreeDCoor{#4}\pst@tempc	% 3. point
	\addto@pscode{%
		\variablesThreeD
	}% end code ps
	\psline(! x2DA y2DA)(! x2DA x2DB add y2DA y2DB add)% A -> B
		(! x2DA x2DB add x2DC add y2DA y2DB add y2DC add)%  -> C
		(! x2DA x2DC add y2DA y2DC add)%  -> D
		(! x2DA y2DA)% -> A
	\ifPst@drawCoor%
		{%
		\psset{linestyle=dashed,linewidth=0.5pt}%
		\pstThreeDDot(#2)%
		\pst@addThreeDVec(#2)(#3)\pst@tempa\pst@tempb\pst@tempc
		\pstThreeDDot(\pst@tempa,\pst@tempb,\pst@tempc)
		\pst@addThreeDVec(#2)(#4)\pst@tempa\pst@tempb\pst@tempc
		\pstThreeDDot(\pst@tempa,\pst@tempb,\pst@tempc)
		\pst@addThreeDVec(\pst@tempa,\pst@tempb,\pst@tempc)%
			(#3)\pst@tempa\pst@tempb\pst@tempc
		\pstThreeDDot(\pst@tempa,\pst@tempb,\pst@tempc)%
		}%
	\fi%
}}

%
% draws a threeD Box
% [#1] options
% (#2) first direction vector ux,uy,uz
% (#3) second direction vector vx,vy,vz
% (#4) third direction vector wx,wy,wz
%
\def\pstThreeDBox{\@ifnextchar[{\doThreeDBox}{\doThreeDBox[]}}
\def\doThreeDBox[#1](#2)(#3)(#4)(#5){{%
	\psset{#1}
	{%	
	\psset{linestyle=\psk@ThreeDplot@invisibleLineStyle}
	\pstThreeDSquare(#2)(#4)(#5)% 	lower square
	\pstThreeDSquare(#2)(#3)(#4)% 	back square
	}{%
	\psset{linestyle=\psk@ThreeDplot@visibleLineStyle}
	\pst@addThreeDVec(#2)(#4)\pst@tempa\pst@tempb\pst@tempc
	\pstThreeDSquare(\pst@tempa,\pst@tempb,\pst@tempc)(#3)(#5)% left square
	\pst@addThreeDVec(#2)(#3)\pst@tempa\pst@tempb\pst@tempc
	\pstThreeDSquare(\pst@tempa,\pst@tempb,\pst@tempc)(#4)(#5)% top square
	\pst@addThreeDVec(#2)(#5)\pst@tempa\pst@tempb\pst@tempc
	\pstThreeDSquare(\pst@tempa,\pst@tempb,\pst@tempc)(#3)(#4)% front square
	}%
}}
%
% Sphere
%
\def\pstThreeDSphere{\@ifnextchar[{\pst@ThreeDSphere}{\pst@ThreeDSphere[]}}
\def\pst@ThreeDSphere[#1](#2,#3,#4)#5{{%
	\psset{CX=0,CZ=0,CY=0,%
		THETA=\psk@ThreeDplot@Beta,PHI=\psk@ThreeDplot@Beta,%
		Dobs=10,Decran=10}
	\psset{#1}
	\pstThreeDNode(#2,#3,#4){SphereCenter}
	\rput(SphereCenter){\SphereThreeD{#5}}
}}
%
% set a 3d ellipse/circle
%
% #1 options
% #2 center cx,cy,cz
% #3 radius ax,ay,az
% #4 radius bx,by,bz
%
\def\pstThreeDEllipse{\@ifnextchar[{\doThreeDEllipse}{\doThreeDEllipse[]}}
\def\doThreeDEllipse[#1](#2)(#3)(#4){{%
	\psset{plotstyle=curve,xPlotpoints=\psk@plotpoints}
	\psset{#1}		
	\getThreeDCoor{#2}\pst@tempc%	 center 
	\getThreeDCoor{#3}\pst@tempa%	 a 
	\getThreeDCoor{#4}\pst@tempb%	 b 
	\parametricplotThreeD(\psk@ThreeDplot@beginAngle,\psk@ThreeDplot@endAngle){%
		\pst@tempc\space \pst@tempa\space \pst@tempb\space 
		9 -1 roll t cos 8 -1 roll neg mul add t sin 5 -1 roll mul add
		7 -1 roll t cos 7 -1 roll neg mul add t sin 5 -1 roll mul add
		5 -1 roll t cos 6 -1 roll neg mul add t sin 5 -1 roll mul add
	}
}}
%
\def\pstThreeDCircle{\pstThreeDEllipse}
\def\pstThreeDPlotFunc{\psplotThreeD}%	only for compatibility
%
\def\pstRotPoint{\@ifnextchar[{\pstRotPointi}{\pstRotPointi[]}}
\def\pstRotPointi[#1](#2,#3,#4)(#5,#6,#7)#8{{%
	\setkeys{psset}{#1}
	\def\pst@ThreeDplot@x{#2}	% x coordinate
	\def\pst@ThreeDplot@y{#3}	% y coordinate
	\def\pst@ThreeDplot@z{#4}	% z coordinate
	\def\pst@ThreeDplot@ThetaX{#5}	% rotating angle
	\def\pst@ThreeDplot@ThetaY{#6}	% rotating angle
	\def\pst@ThreeDplot@ThetaZ{#7}	% rotating angle
	\pnode(!%
		/x \pst@ThreeDplot@x\space def
		/y \pst@ThreeDplot@y\space def
		/z \pst@ThreeDplot@z\space def
% rotating on the z-Axes
		/Theta \pst@ThreeDplot@ThetaZ\space def
		/x0 x Theta cos mul y Theta sin mul sub def
		/y x Theta sin mul y Theta cos mul add def
		/x x0 def
% rotating on the y-Axes
		/Theta \pst@ThreeDplot@ThetaY\space def
		/x0 x Theta cos mul z Theta sin mul add def
		/z x neg Theta sin mul z Theta cos mul add def
		/x x0 def
% rotating on the x-Axes
		/Theta \pst@ThreeDplot@ThetaX\space def
		/y0 y Theta cos mul z Theta sin mul sub def
		/z y Theta sin mul z Theta cos mul add def
		/y y0 def
%
		/Alpha \psk@ThreeDplot@Alpha\space def
		/Beta \psk@ThreeDplot@Beta\space def
		/x2D x neg Alpha cos mul y Alpha sin mul add def
		/y2D x Alpha sin mul y Alpha cos mul add neg Beta sin mul z Beta cos mul add def
		x2D y2D){#8}%
}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\def\psplotinit#1{\xdef\psplot@init{#1 }}
\def\psplot@init{}
%
\def\psplotThreeD{\@ifnextchar[{\ps@plotThreeD}{\ps@plotThreeD[]}}
\def\ps@plotThreeD[#1](#2,#3)(#4,#5)#6{%
    \setkeys{psset}{hiddenLine=false,drawStyle=xLines}% default
    \setkeys{psset}{#1}
    \ifx\psk@ThreeDplot@drawStyle\drawStyle@xyLines
	\doPlotThreeD@xLines(#2,#3)(#4,#5){#6}
	\doPlotThreeD@yLines(#2,#3)(#4,#5){#6}
    \else
	\ifx\psk@ThreeDplot@drawStyle\drawStyle@yxLines
	    \doPlotThreeD@yLines(#2,#3)(#4,#5){#6}
	    \doPlotThreeD@xLines(#2,#3)(#4,#5){#6}
	\else
	    \ifx\psk@ThreeDplot@drawStyle\drawStyle@xLines
		\doPlotThreeD@xLines(#2,#3)(#4,#5){#6}
	    \fi
	    \ifx\psk@ThreeDplot@drawStyle\drawStyle@yLines
		\doPlotThreeD@yLines(#2,#3)(#4,#5){#6}
	    \fi
	\fi
    \fi
}
\def\doPlotThreeD@xLines{%
	\def\pst@par{}
	\pst@object{psplotThreeD@xLines}%
}
\def\doPlotThreeD@yLines{%
	\def\pst@par{}
	\pst@object{psplotThreeD@yLines}%
}
\def\psplotThreeD@xLines@i(#1,#2)(#3,#4)#5{%
    \pst@killglue
    \begingroup
	\use@par%
	\@pstfalse
	\@nameuse{beginplot@\psplotstyle}%
	\gdef\psplot@init{}%
	\@nameuse{testqp@\psplotstyle}%
	\if@pst%	lines and dots
	    \addto@pscode{%
		/Alpha \psk@ThreeDplot@Alpha\space def
		/Beta \psk@ThreeDplot@Beta\space def
		/xMin #1 def
		/x xMin def
		/x1 #2 def
		/y #3 def
		/y1 #4 def
		/dx x1 x sub \psk@ThreeDplot@xPlotpoints\space div def
		/dy y1 y sub \psk@ThreeDplot@yPlotpoints\space div def
		/func {#5} def
		/xyz {
		    x neg Alpha cos mul y Alpha sin mul add \pst@number\psxunit mul
		    x Alpha sin mul y Alpha cos mul add neg Beta sin mul
			func Beta cos mul add \pst@number\psyunit mul} def
	    }%
	    \psplotThreeD@xLines@ii
	\else%	curves
	    \endgroup
	    \multido{\n@Y=0+1}{\psk@ThreeDplot@yPlotpoints}{%
		\ifPst@hiddenLine\pscustom[fillcolor=white,fillstyle=solid]{\fi
		    \@nameuse{beginplot@\psplotstyle}%
			\addto@pscode{%
			    /Alpha \psk@ThreeDplot@Alpha\space def
			    /Beta \psk@ThreeDplot@Beta\space def
			    /xMin #1 def
			    /x xMin def
			    /x1 #2 def
			    /dx x1 x sub \psk@ThreeDplot@xPlotpoints\space div def
			    /dy #4\space #3\space sub \psk@ThreeDplot@yPlotpoints\space div def
			    /y #3\space \n@Y\space dy mul add def
			    /func {#5} def
			    /xyz {
				x neg Alpha cos mul y Alpha sin mul add \pst@number\psxunit mul
				x Alpha sin mul y Alpha cos mul add neg Beta sin mul
				    func Beta cos mul add \pst@number\psyunit mul} def
			}%
		    \psplotThreeD@xLines@iii%
		\ifPst@hiddenLine }\fi%
	    }%
	\fi
    \endgroup
    \ignorespaces%
}
\def\psplotThreeD@xLines@ii{%
    \addto@pscode{%
	xyz \@nameuse{beginqp@\psplotstyle}
	\psk@ThreeDplot@yPlotpoints\space 1 add {
	    /x xMin def
	    xyz moveto
	    \psk@ThreeDplot@xPlotpoints\space 1 add {
		xyz \@nameuse{doqp@\psplotstyle}
		/x x dx add def
	    } repeat
	    /y y dy add def
	} repeat
	/x x1 def
	/y y1 def
	xyz \@nameuse{doqp@\psplotstyle}
    }%
    \@nameuse{endqp@\psplotstyle}%
}
\def\psplotThreeD@xLines@iii{%    curves
    \addto@pscode{%
	    /x xMin def
	    mark
	    /n 2 def
		\psk@ThreeDplot@xPlotpoints {
	    	    xyz
    		    n 2 roll
    		    /n n 2 add def
    		    /x x dx add def
    		} repeat
        /x x1 def
        xyz
        n 2 roll
    }%
    \@nameuse{endplot@\psplotstyle}%
}
%
\def\psplotThreeD@yLines@i(#1,#2)(#3,#4)#5{%
    \pst@killglue
    \begingroup
	\use@par%
	\@pstfalse
	\@nameuse{beginplot@\psplotstyle}%
	\gdef\psplot@init{}%
	\@nameuse{testqp@\psplotstyle}%
	\if@pst%	lines and dots
	    \addto@pscode{%
		/Alpha \psk@ThreeDplot@Alpha\space def
		/Beta \psk@ThreeDplot@Beta\space def
    		/x #1 def
		/x1 #2 def
		/yMin #3 def
		/y yMin def
		/y1 #4 def
		/dx x1 x sub \psk@ThreeDplot@xPlotpoints\space div def
		/dy y1 y sub \psk@ThreeDplot@yPlotpoints\space div def
		/func {#5} def
		/xyz {
		    x neg Alpha cos mul y Alpha sin mul add \pst@number\psxunit mul
		    x Alpha sin mul y Alpha cos mul add neg Beta sin mul
			func Beta cos mul add \pst@number\psyunit mul} def
	    }%
	    \psplotThreeD@yLines@ii
	\else%	curves
	    \endgroup
	    \multido{\n@X=0+1}{\psk@ThreeDplot@xPlotpoints}{%
		\ifPst@hiddenLine\pscustom[fillcolor=white,fillstyle=solid]{\fi
		    \@nameuse{beginplot@\psplotstyle}%
			\addto@pscode{%
			    /Alpha \psk@ThreeDplot@Alpha\space def
			    /Beta \psk@ThreeDplot@Beta\space def
			    /yMin #3 def
			    /y yMin def
			    /y1 #4 def
			    /dy y1 y sub \psk@ThreeDplot@yPlotpoints\space div def
			    /dx #2\space #1\space sub \psk@ThreeDplot@xPlotpoints\space div def
			    /x #1\space \n@X\space dx mul add def
			    /func {#5} def
			    /xyz {
				x neg Alpha cos mul y Alpha sin mul add \pst@number\psxunit mul
				x Alpha sin mul y Alpha cos mul add neg Beta sin mul
				    func Beta cos mul add \pst@number\psyunit mul} def
			}%
		    \psplotThreeD@yLines@iii%
		\ifPst@hiddenLine }\fi%
	    }%
	\fi
    \endgroup
    \ignorespaces%
}
\def\psplotThreeD@yLines@ii{%
    \addto@pscode{%
	xyz \@nameuse{beginqp@\psplotstyle}
	\psk@ThreeDplot@xPlotpoints\space 1 add {
	    /y yMin def
	    xyz moveto
	    \psk@ThreeDplot@yPlotpoints\space 1 add {
		xyz \@nameuse{doqp@\psplotstyle}
		/y y dy add def
	    } repeat
	    /x x dx add def
	} repeat
	/x x1 def
	/y y1 def
	xyz \@nameuse{doqp@\psplotstyle}
    }%
    \@nameuse{endqp@\psplotstyle}%
}
\def\psplotThreeD@yLines@iii{%    curves
    \addto@pscode{%
	    /y yMin def
	    mark
	    /n 2 def
		\psk@ThreeDplot@yPlotpoints {
	    	    xyz
    		    n 2 roll
    		    /n n 2 add def
    		    /y y dy add def
    		} repeat
        /y y1 def
        xyz
        n 2 roll
    }%
    \@nameuse{endplot@\psplotstyle}%
}
%
% parametricplot ----------------------------------------------------------------
%
\def\parametricplotThreeD{%
	\@ifnextchar[%
		{\doParametricPlotThreeD}%
		{\doParametricPlotThreeD[]}%
}
\def\doParametricPlotThreeD[#1]{%
	\setkeys{psset}{#1}%
	\def\pst@par{}%
	\pst@object{psParamPlotThreeD}%
}
\def\psParamPlotThreeD@i(#1){%
	\@ifnextchar(%
		{\psParamPlotThreeD@ii(#1)}%
		{\psParamPlotThreeD@ii(#1)(0,0)}%
}
\def\psParamPlotThreeD@ii(#1,#2)(#3,#4)#5 {%
    \pst@killglue
    \begingroup
	\use@par%
	\@pstfalse
	\@nameuse{beginplot@\psplotstyle}%
	\gdef\parametricII@init{}%
	\@nameuse{testqp@\psplotstyle}%
	\if@pst
	    \addto@pscode{%
	    	/Alpha \psk@ThreeDplot@Alpha\space def
	    	/Beta \psk@ThreeDplot@Beta\space def
		/tMin #1 def
		/t tMin def
		/t1 #2 def
		/u #3 def
		/u1 #4 def
		/dt t1 t sub \psk@ThreeDplot@xPlotpoints\space div def
		/du u1 u sub \psk@ThreeDplot@yPlotpoints\space div def
		/xyz {
		    #5
		    3 -1 roll               % y z x
		    \psk@ThreeDplot@xThreeDunit\space div
		    dup                     % y z x x
		    neg Alpha cos mul       % y z x (x)
		    4 -1 roll               % z x (x) y
		    \psk@ThreeDplot@yThreeDunit\space div
		    dup                     % z x (x) y y
		    5 1 roll                % y z x (x) y
		    Alpha sin mul add \pst@number\psxunit mul       % y z x (x2)
		    4 1 roll                % (x2) y z x
		    Alpha sin mul           % (x2) y z (x)
		    3 -1 roll               % (x2) z (x) y
		    Alpha cos mul add neg Beta sin mul % (x2) z (x)
		    exch                    % (x2) (x) z
		    \psk@ThreeDplot@zThreeDunit\space div
		    Beta cos mul add \pst@number\psyunit mul        % (x2) (y2)
		} def
	    }%
	    \psParamPlotThreeD@iii%
	\else
	    \endgroup
	    \ifx#3#4\psset{yPlotpoints=1}\fi% do we have two different parameters or #3=#4
	    \multido{\n@Y=0+1}{\psk@ThreeDplot@yPlotpoints}{%
		\@nameuse{beginplot@\psplotstyle}%
		\addto@pscode{%
		    /Alpha \psk@ThreeDplot@Alpha\space def
		    /Beta \psk@ThreeDplot@Beta\space def
		    /tMin #1 def
		    /t tMin def
		    /t1 #2 def
		    /dt t1 t sub \psk@ThreeDplot@xPlotpoints\space div def
		    /du #4\space #3\space sub \psk@ThreeDplot@yPlotpoints\space div def
		    /u #3\space \n@Y\space du mul add def
		    /xyz {
			#5
			3 -1 roll               % y z x
			\psk@ThreeDplot@xThreeDunit\space div
			dup                     % y z x x
			neg Alpha cos mul       % y z x (x)
			4 -1 roll               % z x (x) y
			\psk@ThreeDplot@yThreeDunit\space div
			dup                     % z x (x) y y
			5 1 roll                % y z x (x) y
			Alpha sin mul add \pst@number\psxunit mul       % y z x (x2)
			4 1 roll                % (x2) y z x
			Alpha sin mul           % (x2) y z (x)
			3 -1 roll               % (x2) z (x) y
			Alpha cos mul add neg Beta sin mul % (x2) z (x)
			exch                    % (x2) (x) z
			\psk@ThreeDplot@zThreeDunit\space div
			Beta cos mul add \pst@number\psyunit mul        % (x2) (y2)
		    } def
		}%
		\psParamPlotThreeD@iv%
	    }%
	\fi
    \endgroup
    \ignorespaces%
}
\def\psParamPlotThreeD@iii{%
    \addto@pscode{%
	xyz \@nameuse{beginqp@\psplotstyle}
	\psk@ThreeDplot@yPlotpoints\space 1 add {
	    /t tMin def
	    xyz moveto
	    \psk@ThreeDplot@xPlotpoints\space 1 add {
		xyz \@nameuse{doqp@\psplotstyle}
		/t t dt add def
	    } repeat
	    /u u du add def
	} repeat
	/t u1 def
	/u u1 def
	xyz \@nameuse{doqp@\psplotstyle}
    }%
    \@nameuse{endqp@\psplotstyle}%
}
\def\psParamPlotThreeD@iv{%
	\addto@pscode{%
%	    /t tMin def
		mark
	    /n 2 def
		\psk@ThreeDplot@xPlotpoints {
			xyz
    		n 2 roll
    		/n n 2 add def
    		/t t dt add def
		} repeat
		/t t1 def
		xyz
		n 2 roll
    }%
	\@nameuse{endplot@\psplotstyle}%
}
%
% Plot 3D data
%
\def\fileplotThreeD{\def\pst@par{}\pst@object{fileplotThreeD}}
\def\fileplotThreeD@i#1{%
    \pst@killglue
    \begingroup
	\use@par
	\@pstfalse
	\@nameuse{testqp@\psplotstyle}%
	\if@pst
	    \dataplotThreeD@ii{\pst@readfile{#1}}%
	\else
	    \listplotThreeD@ii{\pst@altreadfile{#1}}%
	\fi
    \endgroup
    \ignorespaces%
}
%
% dataplot
%
\def\dataplotThreeD{\def\pst@par{}\pst@object{dataplotThreeD}}
\def\dataplotThreeD@i#1{%
  \pst@killglue
  \begingroup
    \use@par
    \@pstfalse
    \@nameuse{testqp@\psplotstyle}%
    \if@pst
      \dataplotThreeD@ii{\addto@pscode{#1}}%
    \else
      \listplot@ii{\addto@pscode{#1}}%
    \fi
  \endgroup
  \ignorespaces%
}
\def\dataplotThreeD@ii#1{%
  \@nameuse{beginplot@\psplotstyle}%
    \addto@pscode{%
      /Alpha \psk@ThreeDplot@Alpha\space def
      /Beta \psk@ThreeDplot@Beta\space def
      /Dx { /D { Dy } def } def
      /Dy { /D { Dz } def } def
      /Dz { 			% now we have x y z
	3 -1 roll		% y z x
        \psk@ThreeDplot@xThreeDunit\space div
	dup			% y z x x
	neg Alpha cos mul	% y z x (x)
	4 -1 roll		% z x (x) y
	\psk@ThreeDplot@yThreeDunit\space div
	dup			% z x (x) y y
	5 1 roll		% y z x (x) y
	Alpha sin mul add \pst@number\psxunit mul % y z x (x2)
	4 1 roll		% (x2) y z x
	Alpha sin mul		% (x2) y z (x)
	3 -1 roll		% (x2) z (x) y
	Alpha cos mul add neg Beta sin mul % (x2) z (x)
	exch			% (x2) (x) z
	\psk@ThreeDplot@zThreeDunit\space div
	Beta cos mul add \pst@number\psyunit mul % (x2) (y2)
	Do /D { Dx } def } def
      /D { /D { Dx } def } def
      /Do {
        \@nameuse{beginqp@\psplotstyle}%
        /Do { \@nameuse{doqp@\psplotstyle}} def
      } def}%
    #1%
    \addto@pscode{D}%
  \@nameuse{endqp@\psplotstyle}%
}
%
%
\pst@def{ScalePointsThreeD}<%
	counttomark dup dup cvi eq not { exch pop } if
	/m exch def /n m 3 div cvi def
	n { 				% now we have x y z
		3 -1 roll		% y z x
		\psk@ThreeDplot@xThreeDunit\space div
		dup			% y z x x
		neg Alpha cos mul	% y z x (x)
		4 -1 roll		% z x (x) y
		\psk@ThreeDplot@yThreeDunit\space div
		dup			% z x (x) y y
		5 1 roll		% y z x (x) y
		Alpha sin mul add \pst@number\psxunit mul	% y z x (x2)
		4 1 roll		% (x2) y z x
		Alpha sin mul		% (x2) y z (x)
		3 -1 roll		% (x2) z (x) y
		Alpha cos mul add neg Beta sin mul % (x2) z (x)
		exch			% (x2) (x) z
		\psk@ThreeDplot@zThreeDunit\space div
		Beta cos mul add \pst@number\psyunit mul 	% (x2) (y2)
		m 1 sub 1 roll m 1 sub 1 roll /m m 3 sub def } repeat>
%
% listplotThreeD
%
\def\listplotThreeD{\def\pst@par{}\pst@object{listplotThreeD}}
\def\listplotThreeD@i#1{\listplotThreeD@ii{\addto@pscode{#1}}}
\def\listplotThreeD@ii#1{%
	\@nameuse{beginplot@\psplotstyle}%
	\addto@pscode{%
		/Alpha \psk@ThreeDplot@Alpha\space def
		/Beta \psk@ThreeDplot@Beta\space def
		/D {} def mark %
	}%
	#1%
	\addto@pscode{\tx@ScalePointsThreeD}%
	\@nameuse{endplot@\psplotstyle}%
}
%
% adopted from pst-3d
%
\pst@def{TMSave}<%  
  tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if
  /TMatrix [ TMatrix CM ] cvx def>
%
\pst@def{TMRestore}<%
  CP /TMatrix [ TMatrix setmatrix ] cvx def moveto>
%
\pst@def{TMChange}<%
  \tx@TMSave
  /cp [ currentpoint ] cvx def
  CM
  CP T \tx@STV
  CM matrix invertmatrix 
  matrix concatmatrix 
  exch exec
  concat cp moveto>
%
\def\pstPlanePut{\@ifnextchar[{\pst@PlanePut}{\pst@PlanePut[]}}
\def\pst@PlanePut[#1](#2)#3{{%
	\pst@killglue%
	\setkeys{psset}{origin=lB}%
	\setkeys{psset}{#1}%
	\pstThreeDPut[#1](#2){\ps@Plane{#3}}%
}}
%
\def\ps@Plane{\pst@makebox{\psPlane@}}
\def\psPlane@{%
    \begingroup
	\leavevmode%
    	\hbox{%
%	    \kern\wd\pst@hbox%
	    \pst@Verb{%
		{ [ 1 0
		    /Alpha \psk@ThreeDplot@Alpha\space def
		    /Beta \psk@ThreeDplot@Beta\space def
		    /Delta Beta sin Alpha sin mul Alpha cos atan neg 90 add def 
		    /Gamma Beta sin Alpha cos mul neg Alpha sin atan def 
		    \ifx\psk@ThreeDplot@plane\ThreeDplot@planeXY
			270 Delta sub rotate
			/Rho 90 Gamma add Delta add def
		    \else%
			\ifx\psk@ThreeDplot@plane\ThreeDplot@planeXZ
		    	    270 Delta sub rotate
 			    /Rho 180 Delta add def
			\else%
		    	    Gamma rotate
			    /Rho 90 Gamma sub def
			\fi%
		    \fi%
		    Rho cos Rho sin 0 0 ] concat} \tx@TMChange%
	    }%
	    \box\pst@hbox%
	    \pst@Verb{\tx@TMRestore}%
%	    \kern\ht\pst@hbox%
	}%
    \endgroup%
}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Utility stuff
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% posStart=Starting point
% length=  Arrow length.
\def\Arrows{\@ifnextchar[{\pst@Arrows}{\pst@Arrows[]}}
\def\pst@Arrows[#1](#2)(#3){{%
	\setkeys{psset}{#1}%
	\pst@getcoor{#2}\pst@tempa
	\pst@getcoor{#3}\pst@tempb
	\pnode(!%
		/StartArrow \psk@ThreeDplot@posStart\space def
		/LengthArrow \psk@ThreeDplot@length\space def
		\pst@tempa /YA exch \pst@number\psyunit div def
		/XA exch \pst@number\psxunit div def
		\pst@tempb /YB exch \pst@number\psyunit div def
		/XB exch \pst@number\psxunit div def
		/denominateur XB XA sub def
		/numerateur YB YA sub def
		/angleDirectionAB numerateur denominateur Atan def
		/XD StartArrow angleDirectionAB cos mul XA add def
		/YD StartArrow angleDirectionAB sin mul YA add def
		/XF XD LengthArrow angleDirectionAB cos mul add def
		/YF YD LengthArrow angleDirectionAB sin mul add def
		XD YD ){ArrowStart}
	\pnode(! XF YF){ArrowEnd}
	\psset{arrows=->}
	\psline[#1](ArrowStart)(ArrowEnd)%
}}
%
% draw a line (===) outside: #2-----#3=======#4
%
\def\psOutLine{\@ifnextchar[{\pst@ToDrawOut}{\pst@ToDrawOut[]}}
\def\pst@ToDrawOut[#1](#2)(#3)#4{{%
	\setkeys{psset}{#1}%
	\pst@getcoor{#2}\pst@tempa
	\pst@getcoor{#3}\pst@tempb
	\pnode(!%
		/LengthArrow \psk@ThreeDplot@length\space def
		\pst@tempa /YA exch \pst@number\psyunit div def
		/XA exch \pst@number\psxunit div def
		\pst@tempb /YB exch \pst@number\psyunit div def
		/XB exch \pst@number\psxunit div def
		/denominateur XB XA sub def
		/numerateur YB YA sub def
		/angleDirectionAB numerateur denominateur Atan def
		/Xend XB LengthArrow angleDirectionAB cos mul add def
		/Yend YB LengthArrow angleDirectionAB sin mul add def
		Xend Yend){#4}
	\psline[#1](#3)(#4)
}}
%
% draw a line (===) before: #4========#2-----#3
%
\def\psBeforeLine{\@ifnextchar[{\pst@BeforeLine}{\pst@BeforeLine[]}}
\def\pst@BeforeLine[#1](#2)(#3)#4{{%
	\setkeys{psset}{#1}%
	\pst@getcoor{#2}\pst@tempa
	\pst@getcoor{#3}\pst@tempb
	\pnode(!%
		/LengthArrow \psk@ThreeDplot@length\space def
		\pst@tempa /YA exch \pst@number\psyunit div def
		/XA exch \pst@number\psxunit div def
		\pst@tempb /YB exch \pst@number\psyunit div def
		/XB exch \pst@number\psxunit div def
		/denominateur XB XA sub def
		/numerateur YB YA sub def
		/angleDirectionAB numerateur denominateur Atan def
		/Xstart XA LengthArrow angleDirectionAB cos mul sub def
		/Ystart YA LengthArrow angleDirectionAB sin mul sub def
		Xstart Ystart){#4}
	\psline[#1](#4)(#2)%
}}
%
% intersection de deux droites
% 2 juillet 2001/ rewritten 2003-01-27 Herbert
%
\def\ABinterCD(#1)(#2)(#3)(#4)#5{%
    \pst@getcoor{#1}\pst@tempa
    \pst@getcoor{#2}\pst@tempb
    \pst@getcoor{#3}\pst@tempc
    \pst@getcoor{#4}\pst@tempd
\pnode(!%
    /YA \pst@tempa exch pop \pst@number\psyunit div def
    /XA \pst@tempa pop \pst@number\psxunit div def
    /YB \pst@tempb exch pop \pst@number\psyunit div def
    /XB \pst@tempb pop \pst@number\psxunit div def
    /YC \pst@tempc exch pop \pst@number\psyunit div def
    /XC \pst@tempc pop \pst@number\psxunit div def
    /YD \pst@tempd exch pop \pst@number\psyunit div def
    /XD \pst@tempd pop \pst@number\psxunit div def
    /dY1 YB YA sub def
    /dX1 XB XA sub def
    /dY2 YD YC sub def
    /dX2 XD XC sub def
    dX1 abs 0.01 lt {
	/m2 dY2 dX2 div def
	XA dup XC sub m2 mul YC add 
    }{
	dX2 abs 0.01 lt {
	    /m1 dY1 dX1 div def
	    XC dup XA sub m1 mul YA add 
	}{%
	    /m1 dY1 dX1 div def
	    /m2 dY2 dX2 div def
	    m1 XA mul m2 XC mul sub YA sub YC add m1 m2 sub div dup
	    XA sub m1 mul YA add 
	} ifelse
    } ifelse ){#5}
}
%
% draw a parallel line
%     #2---------#3
%         #4----------#5(new)  
\def\Parallel{\@ifnextchar[{\pst@Parallel}{\pst@Parallel[]}}
\def\pst@Parallel[#1](#2)(#3)(#4)#5{{%
	\setkeys{psset}{#1}%
	\pst@getcoor{#2}\pst@tempa
	\pst@getcoor{#3}\pst@tempb
	\pst@getcoor{#4}\pst@tempc
	\pnode(!%
		/LengthArrow \psk@ThreeDplot@length\space def
		\pst@tempa /YA exch \pst@number\psyunit div def
		/XA exch \pst@number\psxunit div def
		\pst@tempb /YB exch \pst@number\psyunit div def
		/XB exch \pst@number\psxunit div def
		\pst@tempc /YC exch \pst@number\psyunit div def
		/XC exch \pst@number\psxunit div def
		/denominateur XB XA sub def
		/numerateur YB YA sub def
		/angleDirectionAB numerateur denominateur Atan def
		/XstartParallel XC LengthArrow angleDirectionAB cos mul add def
		/YstartParallel YC LengthArrow angleDirectionAB sin mul add def
		XstartParallel YstartParallel){#5}
	\psline[#1](#4)(#5)
}}
%
% arrowLine[options](A)(B){n}
% #2---->---->---->---->----#3  #4-arrows inside
\def\arrowLine{\@ifnextchar[{\pst@arrowLine}{\pst@arrowLine[]}}
\def\pst@arrowLine[#1](#2)(#3)#4{{%
	\setkeys{psset}{arrowsize=4pt,arrows=->}% the defaults
	\setkeys{psset}{#1}%
	\def\pst@ThreeDplot@n{#4}
	\pst@getcoor{#2}\pst@tempa
	\pst@getcoor{#3}\pst@tempb
	\pnode(!%
	    	/YA \pst@tempa exch pop \pst@number\psyunit div def
		/XA \pst@tempa pop \pst@number\psxunit div def
		/YB \pst@tempb exch pop \pst@number\psyunit div def
		/XB \pst@tempb pop \pst@number\psxunit div def
		/dY YB YA sub \pst@ThreeDplot@n\space 1 add div def
		/dX XB XA sub \pst@ThreeDplot@n\space 1 add div def
		/Alpha dY dX atan def
		/dYOffset \psk@ThreeDplot@arrowOffset\space Alpha sin mul def
		/dXOffset \psk@ThreeDplot@arrowOffset\space Alpha cos mul def
		XA YA ){tempArrowC}
	\multido{\i=1+1}{#4}{%
		\pnode(!%
			XA dX \i\space mul add dXOffset add
			YA dY \i\space mul add dYOffset add){tempArrowB}
		\psline(tempArrowC)(tempArrowB)
		\pnode(tempArrowB){tempArrowC}
    	}
	\psline[arrows=-](tempArrowB)(#3)
}}
%
%   #1------#3------#2
\def\nodeBetween(#1)(#2)#3{%    Herbert 2003/01/05
    \pst@getcoor{#1}\pst@tempa
    \pst@getcoor{#2}\pst@tempb
    \pnode(!%
	/XA \pst@tempa pop \pst@number\psxunit div def
	/YA \pst@tempa exch pop \pst@number\psyunit div def
	/XB \pst@tempb pop \pst@number\psxunit div def
	/YB \pst@tempb exch pop \pst@number\psyunit div def
	XB XA add 2 div YB YA add 2 div){#3}
}
%
% rotateNode(A)
% (A) the node
% #2  the angle
% Herbert Voss <voss@perce.de> 2003-01-26
\def\rotateNode{\pst@rotateNode}
\def\pst@rotateNode(#1)#2{{%
    \pst@getcoor{#1}\pst@tempa
    \def\pst@ThreeDplot@angle{#2}	% the rotating angle
    \pnode(!%
    	/YA \pst@tempa exch pop \pst@number\psyunit div def
	/XA \pst@tempa pop \pst@number\psxunit div def
	YA 0 eq XA 0 eq and {0 0}{
	    /r XA dup mul YA dup mul add sqrt def
	    /AlphaOld YA XA atan def
	    /AlphaNew AlphaOld \pst@ThreeDplot@angle\space add def
	    r AlphaNew cos mul r AlphaNew sin mul
	} ifelse ){temp}
    \pnode(temp){#1}
}}
%
\def\rotateTriangle{\pst@rotateTriangle}
\def\pst@rotateTriangle(#1)(#2)(#3)#4{{%
    \rotateNode(#1){#4}
    \rotateNode(#2){#4}
    \rotateNode(#3){#4}
}}
%
\def\rotateFrame{\pst@rotateFrame}
\def\pst@rotateFrame(#1)(#2)(#3)(#4)#5{{%
    \rotateNode(#1){#5}
    \rotateNode(#2){#5}
    \rotateNode(#3){#5}
    \rotateNode(#4){#5}
}}
\catcode`\@=\PstAtCode\relax
%
%% END: pst-3dplot.tex
\endinput

%% CHANGE LOG %%
%
% 1.2b	bugfix for adding vectors with decinmal length
% 1.2a	disable the loading of pstcol.sty

pst-vue3d.tex
%%
%% This is file `pst-vue3d.tex',
%% 
%% IMPORTANT NOTICE:
%% 
%% Package `pst-vue3d.tex'
%%
%% Manuel Luque <Mluque5130@aol.com> (France)
%%
%% 2003/10/17
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN archives
%% in directory macros/latex/base/lppl.txt.
%%
%% DESCRIPTION:
%%   `pst-vue3d' is a PSTricks package to define 3d views
%%
\def\fileversion{0.4}%
\def\filedate{2003/10/17}%
\message{`PST-VUE3D v\fileversion, \filedate\space (Manuel LUQUE)}%
\csname PSTVueTroisDLoaded\endcsname
\let\PSTVueTroisDLoaded\endinput
% Require PSTricks and pst-node packages
\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi
\ifx\PSTnodesLoaded\endinput\else\input pst-node.tex\fi
% DPC interface to the `keyval' package (until keyval based version of PSTricks)
\input pst-key.tex
%
\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax
\SpecialCoor

\pstheader{3D.pro}
%%%%
\SpecialCoor
\makeatletter
\define@key{psset}{scale}{\edef\psk@TroisD@scale{#1}} % echelle
\define@key{psset}{RotX}{\edef\psk@TroisD@RotX{#1}} % rotation autour de Ox en degr�s
\define@key{psset}{RotY}{\edef\psk@TroisD@RotY{#1}} % rotation autour de Oy en degr�s
\define@key{psset}{RotZ}{\edef\psk@TroisD@RotZ{#1}} % rotation autour de OZ en degr�s
\define@key{psset}{A}{\edef\psk@TroisD@A{#1}} % double  d'une ar�te du parall�l�pip�de
\define@key{psset}{B}{\edef\psk@TroisD@B{#1}} % double  d'une ar�te du parall�l�pip�de
\define@key{psset}{C}{\edef\psk@TroisD@C{#1}} % double  de l'ar�te du parall�l�pip�de
\define@key{psset}{CX}{\edef\psk@TroisD@Xc{#1}} % abscisse du centre du paarall�l�pip�de
\define@key{psset}{CY}{\edef\psk@TroisD@Yc{#1}} % ordonn�e centre du cube
\define@key{psset}{CZ}{\edef\psk@TroisD@Zc{#1}} % cote centre du cube
\define@key{psset}{Rtetraedre}{\edef\psk@TroisD@Rtetraedre{#1}} % Rayon du cercle t�tra�dre
\define@key{psset}{ColorFaceA}{\edef\psk@TroisD@TetraedreColorFaceA{#1}} % couleur de la face A du t�tra�dre
\define@key{psset}{ColorFaceB}{\edef\psk@TroisD@TetraedreColorFaceB{#1}} % couleur de la face B du t�tra�dre
\define@key{psset}{ColorFaceC}{\edef\psk@TroisD@TetraedreColorFaceC{#1}} % couleur de la face C du t�tra�dre
\define@key{psset}{ColorFaceD}{\edef\psk@TroisD@TetraedreColorFaceD{#1}} % couleur de la face D du t�tra�dre
\define@key{psset}{ColorFaceE}{\edef\psk@TroisD@TetraedreColorFaceE{#1}} % couleur de la face D du t�tra�dre
\define@key{psset}{fracHcone}{\edef\psk@TroisD@fracHcone{#1}} % fraction de la hauteur du cone
\define@key{psset}{Hpyramide}{\edef\psk@TroisD@Hpyramide{#1}} % hauteur pyramide
%
\define@key{psset}{normaleLongitude}{\edef\psk@TroisD@normaleLongitude{#1}} % coordonn�es angulaires de la normale
\define@key{psset}{normaleLatitude}{\edef\psk@TroisD@normaleLatitude{#1}} % coordonn�es angulaires de la normale
\define@key{psset}{Xorigine}{\edef\psk@TroisD@Xorigine{#1}} % coordonn�es de la nouvelle origine
\define@key{psset}{Yorigine}{\edef\psk@TroisD@Yorigine{#1}} % coordonn�es de la nouvelle origine
\define@key{psset}{Zorigine}{\edef\psk@TroisD@Zorigine{#1}} % coordonn�es de la nouvelle origine
\define@key{psset}{Xmax}{\edef\psk@TroisD@Xmax{#1}} % en cm
\define@key{psset}{Xmin}{\edef\psk@TroisD@Xmin{#1}} % en cm
\define@key{psset}{Ymax}{\edef\psk@TroisD@Ymax{#1}} % en cm
\define@key{psset}{Ymin}{\edef\psk@TroisD@Ymin{#1}} % en cm
\define@key{psset}{pas}{\edef\psk@TroisD@pas{#1}} % en cm r�solution du trac�
\define@key{psset}{grille}{\edef\psk@TroisD@grille{#1}} % Pas de la grille en cm
%
\define@key{psset}{THETA}{\edef\psk@TroisD@Theta{#1}}
\define@key{psset}{PHI}{\edef\psk@TroisD@Phi{#1}}
\define@key{psset}{DeltaTHETA}{\edef\psk@TroisD@DeltaTheta{#1}}
\define@key{psset}{DeltaPHI}{\edef\psk@TroisD@DeltaPhi{#1}}
\define@key{psset}{PortionSphereTHETA}{\edef\psk@TroisD@PortionSphereTHETA{#1}}
\define@key{psset}{PortionSpherePHI}{\edef\psk@TroisD@PortionSpherePHI{#1}}
\define@key{psset}{PhiCercle}{\edef\psk@TroisD@PhiCercle{#1}}
\define@key{psset}{ThetaMeridien}{\edef\psk@TroisD@ThetaMeridien{#1}}
\define@key{psset}{Dobs}{\edef\psk@TroisD@Dobs{#1}}
\define@key{psset}{Decran}{\edef\psk@TroisD@Ecran{#1}}
\setkeys{psset}{THETA=30,PHI=10,Dobs=100,Decran=10}
%
\setkeys{psset}{normaleLongitude=45,%
                normaleLatitude=45,%
                PhiCercle=0,%
                ThetaMeridien=0,%
                Xorigine=0,%
                Yorigine=0,%
                Zorigine=0,%
                Xmax=50,%
                Ymax=50,%
                Xmin=-50,%
                Ymin=-50,%
                pas=1,%
                grille=10,%
                normaleLongitude=45,%
                normaleLatitude=45,%
                scale=1,%
                RotX=0,RotY=0,RotZ=0,%
                A=10,B=10,C=10,%
                CX=0,CY=0,CZ=0,%
                Rtetraedre=5,%
                ColorFaceD=cyan,ColorFaceA=magenta,ColorFaceB=red,ColorFaceC=blue,ColorFaceE=yellow,%
                fracHcone=1,Hpyramide=5,%
                DeltaTHETA=10,DeltaPHI=10,%
                PortionSphereTHETA=0,PortionSpherePHI=0}
% ajout du 28 ao�t 2003
% colorier au choix les faces du cube
\define@key{psset}{CubeColorFaceOne}{\edef\psk@TroisD@CubeColorFaceOne{#1}} % couleur de la face 1 du cube
\define@key{psset}{CubeColorFaceTwo}{\edef\psk@TroisD@CubeColorFaceTwo{#1}} % couleur de la face 2 du cube
\define@key{psset}{CubeColorFaceThree}{\edef\psk@TroisD@CubeColorFaceThree{#1}} % couleur de la face 3 du cube
\define@key{psset}{CubeColorFaceFour}{\edef\psk@TroisD@CubeColorFaceFour{#1}} % couleur de la face 4 du cube
\define@key{psset}{CubeColorFaceFive}{\edef\psk@TroisD@CubeColorFaceFive{#1}} % couleur de la face 5 du cube
\define@key{psset}{CubeColorFaceSix}{\edef\psk@TroisD@CubeColorFaceSix{#1}} % couleur de la face 6 du cube
\psset{CubeColorFaceOne=1 1 0,%
       CubeColorFaceTwo=0.9 0.9 0,%
       CubeColorFaceThree=0.8 0.8 0,%
       CubeColorFaceFour=0.7 0.7 0,%
       CubeColorFaceFive=0.65 0.65 0,%
       CubeColorFaceSix=0.75 0.75 0}
% fin 28 ao�t 2003
%
\def\variablesTroisD{%
 0 0 translate
    /reduction \psk@TroisD@scale\space def
    /RotX \psk@TroisD@RotX\space def
    /RotY \psk@TroisD@RotY\space def
    /RotZ \psk@TroisD@RotZ\space def
    /CX \psk@TroisD@Xc\space def
    /CY \psk@TroisD@Yc\space def
    /CZ \psk@TroisD@Zc\space def
    /A \psk@TroisD@A\space def
    /B \psk@TroisD@B\space def
    /C \psk@TroisD@C\space def
    /RayonBaseTetraedre \psk@TroisD@Rtetraedre\space def
    /Hpyramide \psk@TroisD@Hpyramide\space def
    /Rpoint A 4 div def
    /nTheta \psk@TroisD@normaleLongitude\space def
    /nPhi \psk@TroisD@normaleLatitude\space def
    /S1 \psk@TroisD@normaleLongitude\space sin def
    /C1 \psk@TroisD@normaleLongitude\space cos def
    /S2 \psk@TroisD@normaleLatitude\space sin def
    /C2 \psk@TroisD@normaleLatitude\space cos def
    /THETA \psk@TroisD@Theta\space def
    /PHI \psk@TroisD@Phi\space def
    /dTHETA \psk@TroisD@DeltaTheta\space def
    /dPHI \psk@TroisD@DeltaPhi\space def
    /psTHETA \psk@TroisD@PortionSphereTHETA\space def
    /psPHI \psk@TroisD@PortionSpherePHI\space def
    /PhiCercle \psk@TroisD@PhiCercle\space def
    /ThetaMeridien \psk@TroisD@ThetaMeridien\space def
    /Dobs \psk@TroisD@Dobs\space def
    /DScreen \psk@TroisD@Ecran\space def
    /Sin1 THETA sin def
    /Sin2 PHI sin def
    /Cos1 THETA cos def
    /Cos2 PHI cos def
    /Cos1Sin2 Cos1 Sin2 mul def
    /Sin1Sin2 Sin1 Sin2 mul def
    /Cos1Cos2 Cos1 Cos2 mul def
    /Sin1Cos2 Sin1 Cos2 mul def
    /XpointVue Dobs Cos1Cos2 mul def
    /YpointVue Dobs Sin1Cos2 mul def
    /ZpointVue Dobs Sin2 mul def
    /M11 RotZ cos RotY cos mul def
    /M12 RotZ cos RotY sin mul RotX sin mul
         RotZ sin RotX cos mul sub def
    /M13 RotZ cos RotY sin mul RotX cos mul
         RotZ sin RotX sin mul add def
    /M21 RotZ sin RotY cos mul def
    /M22 RotZ sin RotY sin RotX sin mul mul
         RotZ cos RotX cos mul add def
    /M23 RotZ sin RotY sin mul RotX cos mul
         RotZ cos RotX sin mul sub def
    /M31 RotY sin neg def
    /M32 RotX sin RotY cos mul def
    /M33 RotX cos RotY cos mul def
 }%

\def\Cube{\pst@object{Cube}}
\def\Cube@i{\@ifnextchar[{\Cube@do}{\Cube@do[]}}
\def\Cube@do[#1]{{%
\pst@killglue
\setkeys{psset}{#1}%
\begin@ClosedObj
\addto@pscode{%
\variablesTroisD
/CubeColorFaceOne {\psk@TroisD@CubeColorFaceOne} def
/CubeColorFaceTwo {\psk@TroisD@CubeColorFaceTwo} def
/CubeColorFaceThree {\psk@TroisD@CubeColorFaceThree} def
/CubeColorFaceFive {\psk@TroisD@CubeColorFaceFive} def
/CubeColorFaceFour {\psk@TroisD@CubeColorFaceFour} def
/CubeColorFaceSix {\psk@TroisD@CubeColorFaceSix} def
tx@3DDict begin
Cube
end
}% fin du code ps
\end@ClosedObj
}}
%
\def\Die{\pst@object{Die}}
\def\Die@i{\@ifnextchar[{\Die@do}{\Die@do[]}}
\def\Die@do[#1]{{%
\pst@killglue
\setkeys{psset}{#1}%
\begin@ClosedObj
\addto@pscode{%
\variablesTroisD
/CubeColorFaceOne {\psk@TroisD@CubeColorFaceOne} def
/CubeColorFaceTwo {\psk@TroisD@CubeColorFaceTwo} def
/CubeColorFaceThree {\psk@TroisD@CubeColorFaceThree} def
/CubeColorFaceFive {\psk@TroisD@CubeColorFaceFive} def
/CubeColorFaceFour {\psk@TroisD@CubeColorFaceFour} def
/CubeColorFaceSix {\psk@TroisD@CubeColorFaceSix} def
tx@3DDict begin
Cube
PointsDie
end
}% fin du code ps
\end@ClosedObj}}
%
\def\SphereThreeD{\pst@object{SphereThreeD}}
\def\SphereThreeD@i{\@ifnextchar[{\SphereThreeD@do}{\SphereThreeD@do[]}}
\def\SphereThreeD@do[#1]#2{{%
% (#2,#3,#4) coordonn�es du centre
% #5 rayon
%
\pst@killglue
\setkeys{psset}{#1}%
\begin@ClosedObj
\addto@pscode{%
\variablesTroisD
reduction reduction scale
    /Rsphere #2 def
    /increment 10 def
tx@3DDict begin
/condition {PSfacette 0 le} def
/departPhi -90 def
MaillageSphere
end
 }% fin du code ps
\showpointsfalse
\end@ClosedObj}}
% % fin de la commande PSTricks
%
% 2d�cembre 2002
%
\def\SphereInverse{\pst@object{SphereInverse}}
\def\SphereInverse@i{\@ifnextchar[{\SphereInverse@do}{\SphereInverse@do[]}}
\def\SphereInverse@do[#1]#2{{%
% (#2,#3,#4) coordonn�es du centre
% #5 rayon
%
\pst@killglue
\setkeys{psset}{#1}%
\begin@ClosedObj
\addto@pscode{%
\variablesTroisD
reduction reduction scale
    /Rsphere #2 def
    /increment 10 def
tx@3DDict begin
/condition {PSfacette 0 ge} def
/departPhi -90 def
MaillageSphere
end
 }% fin du code ps
\showpointsfalse
\end@ClosedObj}}
% % fin de la commande PSTricks
% fin 2 d�cembre 2002
%
\def\SphereCercle{\pst@object{SphereCercle}}
\def\SphereCercle@i{\@ifnextchar[{\SphereCercle@do}{\SphereCercle@do[]}}
\def\SphereCercle@do[#1]#2{{%
% (#2,#3,#4) coordonn�es du centre
% #5 rayon
\pst@killglue
\setkeys{psset}{#1}%
\begin@ClosedObj
\addto@pscode{%
\variablesTroisD
reduction reduction scale
    /Rsphere #2 def
tx@3DDict begin
0 2 360 {
    /ThetaEquateur exch def
    /Xpoint Rsphere ThetaEquateur cos mul PhiCercle cos mul def
    /Ypoint Rsphere ThetaEquateur sin mul PhiCercle cos mul def
    /Zpoint Rsphere PhiCercle sin mul def
CalculsPointsAfterTransformations
% rayon de las sph�re (normale)
    /nXfacette Xabscisse CX sub def
    /nYfacette Yordonnee CY sub def
    /nZfacette Zcote CZ sub def
% rayon vers point de vue
    /RXvue Xabscisse XpointVue sub def
    /RYvue Yordonnee YpointVue sub def
    /RZvue Zcote ZpointVue sub def
% test de visibilit�
    /PSPoint RXvue nXfacette mul
    RYvue nYfacette mul add
    RZvue nZfacette mul add
    def
PSPoint 0 le{
newpath
    CalcCoordinates
0.5 0 360 arc
closepath
fill
} if
%lineto
} for
end
 }% fin du code ps
\showpointsfalse
\end@ClosedObj
}}
%
%
\def\SphereMeridien{\pst@object{SphereMeridien}}
\def\SphereMeridien@i{\@ifnextchar[{\SphereMeridien@do}{\SphereMeridien@do[]}}
\def\SphereMeridien@do[#1]#2{{%
% (#2,#3,#4) coordonn�es du centre
% #5 rayon
\pst@killglue
\setkeys{psset}{#1}%
\begin@ClosedObj
\addto@pscode{%
\variablesTroisD
reduction reduction scale
    /Rsphere #2 def
tx@3DDict begin
0 2 360 {
    /PhiCercle exch def
    /Xpoint Rsphere ThetaMeridien cos mul PhiCercle cos mul def
    /Ypoint Rsphere ThetaMeridien sin mul PhiCercle cos mul def
    /Zpoint Rsphere PhiCercle sin mul def
CalculsPointsAfterTransformations
% rayon de las sph�re (normale)
    /nXfacette Xabscisse CX sub def
    /nYfacette Yordonnee CY sub def
    /nZfacette Zcote CZ sub def
% rayon vers point de vue
    /RXvue Xabscisse XpointVue sub def
    /RYvue Yordonnee YpointVue sub def
    /RZvue Zcote ZpointVue sub def
% test de visibilit�
    /PSPoint RXvue nXfacette mul
    RYvue nYfacette mul add
    RZvue nZfacette mul add
    def
PSPoint 0 le{
newpath
    CalcCoordinates
0.5 0 360 arc
closepath
fill
} if
%lineto
} for
end
 }% fin du code ps
\showpointsfalse
\end@ClosedObj
}}
%
\def\CylindreThreeD{\pst@object{CylindreThreeD}}
\def\CylindreThreeD@i{\@ifnextchar[{\CylindreThreeD@do}{\CylindreThreeD@do[]}}
\def\CylindreThreeD@do[#1]#2#3{{%
% Le centre de la base sera plac� avec
% les param�tres CX,CY et CZ
% #2 rayon
% #3 hauteur
% on peut ensuite faire tourner le cylindre
% avec RotX, RotY et RotZ
\pst@killglue
\setkeys{psset}{#1}%
\begin@ClosedObj
\addto@pscode{%
\variablesTroisD
reduction reduction scale
    /Rcylindre #2 def
    /Hcylindre #3 def
    /incrementANGLE 10 def
    /incrementHAUTEUR Hcylindre 5 div def
tx@3DDict begin
CylinderThreeD
end
 }% fin du code ps
\showpointsfalse
\end@ClosedObj
 }}% % fin de la commande PSTricks
%
%
\def\LineThreeD{\pst@object{LineThreeD}}
\def\LineThreeD@i{\@ifnextchar[{\LineThreeD@do}{\LineThreeD@do[]}}
\def\LineThreeD@do[#1](#2,#3,#4)(#5,#6,#7){{%
% (#2,#3,#4) coordonn�es du point1
% (#5,#6,#7) coordonn�es du point2
\pst@killglue
\setkeys{psset}{#1}%
\begin@OpenObj
\addto@pscode{%
\variablesTroisD
reduction reduction scale
/X1 #2 def
/Y1 #3 def
/Z1 #4 def
/X2 #5 def
/Y2 #6 def
/Z2 #7 def
tx@3DDict begin
/TableauxPoints [
0 0.01 1.01 { % k
    /K exch def
    [
    /Zcote K Z2 mul 1 K sub Z1 mul add def
    /Xabscisse K X2 mul 1 K sub X1 mul add def
    /Yordonnee K Y2 mul 1 K sub Y1 mul add def
    CalcCoordinates ]
    } for
 ] def
 TableauxPoints 0 get aload pop moveto
 0 1 100 {
    /compteur exch def
    TableauxPoints compteur get aload pop
    lineto } for
% fin du trac� de la ligne
end
 }% fin du code ps
 \end@OpenObj
 }}% % fin de la commande PSTricks
%
%
%
% transformation d'un point
\def\PointThreeD{\@ifnextchar[{\pst@PointThreeD}{\pst@PointThreeD[]}}
%
\def\pst@PointThreeD[#1](#2,#3,#4)#5{{%
%(#2,#3,#4) coordonn�es
% #5 nom attribu� au point
\setkeys{psset}{#1}
\pnode(!
\variablesTroisD
 /Zcote #4 def
 /Xabscisse #2 def
 /Yordonnee #3 def
tx@3DDict begin
  formulesTroisD
 Xi reduction mul Yi reduction mul
 end){#5}}}
%
% transformation d'un point
\def\PointLongitudeLatitude{\@ifnextchar[{\pst@PointLongitudeLatitude}{\pst@PointLongitudeLatitude[]}}
%
\def\pst@PointLongitudeLatitude[#1]#2#3#4#5{{%
% #2 radius
% #3 longitude
% #4 latitude
% #5 nom attribu� au point
\pst@killglue
\setkeys{psset}{#1}%
\pnode(!
\variablesTroisD
/Radius #2 def
/longitude #3 def
/latitude #4 def
 /Zcote Radius latitude sin mul def
 /Xabscisse Radius longitude cos mul latitude cos mul def
 /Yordonnee Radius longitude sin mul latitude cos mul def
tx@3DDict begin
formulesTroisD
 Xi reduction mul Yi reduction mul
 end){#5}
}}
%
\def\Tetraedre{\pst@object{Tetraedre}}
\def\Tetraedre@i{\@ifnextchar[{\Tetraedre@do}{\Tetraedre@do[]}}
\def\Tetraedre@do[#1]{{%
\pst@killglue
\setkeys{psset}{#1}%
\begin@ClosedObj
\addto@pscode{%
\variablesTroisD
tx@3DDict begin
Tetraedre
end
}% fin du code ps
\end@ClosedObj
}}
%
%
% pyramide
%
\def\FaceSAB{\pst@object{FaceSAB}}
\def\FaceSAB@i{\@ifnextchar[{\FaceSABC@do}{\FaceSAB@do[]}}
\def\FaceSAB@do[#1]{{%
\pst@killglue
\setkeys{psset}{#1}%
\begin@ClosedObj
\addto@pscode{%
\variablesTroisD
tx@3DDict begin
SommetsPyramide
 PSAB 0 le { %
reduction reduction scale
newpath
1 setlinejoin
    /Xabscisse XS def
    /Yordonnee YS def
    /Zcote ZS def
    CalcCoordinates
     moveto
    /Xabscisse XA def
    /Yordonnee YA def
    /Zcote ZA def
    CalcCoordinates
    lineto
    /Xabscisse XB def
    /Yordonnee YB def
    /Zcote ZB def
    CalcCoordinates
    lineto
closepath
} if
end
}% fin du code ps
\end@ClosedObj
}}
%
\def\FaceSBC{\pst@object{FaceSBC}}
\def\FaceSBC@i{\@ifnextchar[{\FaceSBC@do}{\FaceSBC@do[]}}
\def\FaceSBC@do[#1]{{%
\pst@killglue
\setkeys{psset}{#1}%
\begin@ClosedObj
\addto@pscode{%
\variablesTroisD
tx@3DDict begin
SommetsPyramide
 PSBC 0 le { %
reduction reduction scale
newpath
1 setlinejoin
    /Xabscisse XS def
    /Yordonnee YS def
    /Zcote ZS def
    CalcCoordinates
     moveto
    /Xabscisse XB def
    /Yordonnee YB def
    /Zcote ZB def
    CalcCoordinates
    lineto
     /Xabscisse XC def
    /Yordonnee YC def
    /Zcote ZC def
    CalcCoordinates
    lineto
closepath
} if
end
}% fin du code ps
\end@ClosedObj
}}
%
%
\def\FaceSCD{\pst@object{FaceSCD}}
\def\FaceSCD@i{\@ifnextchar[{\FaceSCD@do}{\FaceSCD@do[]}}
\def\FaceSCD@do[#1]{{%
\pst@killglue
\setkeys{psset}{#1}%
\begin@ClosedObj
\addto@pscode{%
\variablesTroisD
tx@3DDict begin
SommetsPyramide
PSCD 0 le { %
reduction reduction scale
newpath
1 setlinejoin
    /Xabscisse XS def
    /Yordonnee YS def
    /Zcote ZS def
    CalcCoordinates
     moveto
    /Xabscisse XC def
    /Yordonnee YC def
    /Zcote ZC def
    CalcCoordinates
    lineto
    /Xabscisse XD def
    /Yordonnee YD def
    /Zcote ZD def
    CalcCoordinates
    lineto
closepath
} if
end
}% fin du code ps
\end@ClosedObj
}}
%
\def\FaceSDA{\pst@object{FaceSDA}}
\def\FaceSDA@i{\@ifnextchar[{\FaceSDA@do}{\FaceSDA@do[]}}
\def\FaceSDA@do[#1]{{%
\pst@killglue
\setkeys{psset}{#1}%
\begin@ClosedObj
\addto@pscode{%
\variablesTroisD
tx@3DDict begin
SommetsPyramide
 PSDA 0 le { %
reduction reduction scale
newpath
1 setlinejoin
    /Xabscisse XS def
    /Yordonnee YS def
    /Zcote ZS def
    CalcCoordinates
     moveto
    /Xabscisse XD def
    /Yordonnee YD def
    /Zcote ZD def
    CalcCoordinates
    lineto
    /Xabscisse XA def
    /Yordonnee YA def
    /Zcote ZA def
    CalcCoordinates
    lineto
closepath
} if
end
}% fin du code ps
\end@ClosedObj
}}
%
\def\FaceABCD{\pst@object{FaceABCD}}
\def\FaceABCD@i{\@ifnextchar[{\FaceABCD@do}{\FaceABCD@do[]}}
\def\FaceABCD@do[#1]{{%
\pst@killglue
\setkeys{psset}{#1}%
\begin@ClosedObj
\addto@pscode{%
\variablesTroisD
tx@3DDict begin
SommetsPyramide
 PSABCD 0 le { %
reduction reduction scale
newpath
1 setlinejoin
    /Xabscisse XA def
    /Yordonnee YA def
    /Zcote ZA def
    CalcCoordinates
     moveto
    /Xabscisse XB def
    /Yordonnee YB def
    /Zcote ZB def
    CalcCoordinates
    lineto
    /Xabscisse XC def
    /Yordonnee YC def
    /Zcote ZC def
    CalcCoordinates
    lineto
    /Xabscisse XD def
    /Yordonnee YD def
    /Zcote ZD def
    CalcCoordinates
    lineto
closepath
} if
end
}% fin du code ps
\end@ClosedObj
}}
%
\def\Pyramide{\pst@object{Pyramide}}
\def\Pyramide@i{\@ifnextchar[{\Pyramide@do}{\Pyramide@do[]}}
\def\Pyramide@do[#1]{{%
\FaceSAB[fillcolor=\psk@TroisD@TetraedreColorFaceA]%
\FaceSBC[fillcolor=\psk@TroisD@TetraedreColorFaceB]%
\FaceSCD[fillcolor=\psk@TroisD@TetraedreColorFaceC]%
\FaceSDA[fillcolor=\psk@TroisD@TetraedreColorFaceD]%
\FaceABCD[fillcolor=\psk@TroisD@TetraedreColorFaceE]%
}}
%
%
\def\ConeThreeD{\pst@object{ConeThreeD}}
\def\ConeThreeD@i{\@ifnextchar[{\ConeThreeD@do}{\ConeThreeD@do[]}}
\def\ConeThreeD@do[#1]#2#3{{%
% Le centre de la base sera plac� avec
% les param�tres CX,CY et CZ
% #2 rayon
% #3 hauteur
% on peut ensuite faire tourner le cylindre
% avec RotX, RotY et RotZ
\pst@killglue
\setkeys{psset}{#1}%
\begin@ClosedObj
\addto@pscode{%
\variablesTroisD
    /fracHcone \psk@TroisD@fracHcone\space def
% fraction de la hauteur du cone 0<fracHcone<1
reduction reduction scale
    /Rcone #2 def
    /Hcone #3 def
    /AngleCone Rcone Hcone atan def
    /TanAngleCone AngleCone dup sin exch cos div def
    /incrementANGLE 10 def
    /incrementHAUTEUR Hcone fracHcone mul  5 div def
tx@3DDict begin
newpath
0 incrementANGLE 360 {%
    /theta exch def
 0 incrementHAUTEUR Hcone fracHcone mul incrementHAUTEUR sub {%
    /H exch def
 % normale � la facette
    /nXfacette Hcone AngleCone dup sin exch cos mul theta incrementANGLE 2 div add cos mul
    mul def
    /nYfacette Hcone AngleCone dup sin exch cos mul theta incrementANGLE 2 div add sin mul
    mul def
    /nZfacette Hcone AngleCone sin dup mul mul def
    /Xpoint nXfacette def
    /Ypoint nYfacette def
    /Zpoint nZfacette def
CalculsPointsAfterTransformations
    /nXfacette Xabscisse CX sub def
    /nYfacette Yordonnee CY sub def
    /nZfacette Zcote CZ sub def
%
    /OK Hcone H sub TanAngleCone mul def
    /Xpoint OK theta cos mul def
    /Ypoint OK theta sin mul def
    /Zpoint H def
CalculsPointsAfterTransformations
    /Xfacette Xabscisse  def
    /Yfacette Yordonnee  def
    /Zfacette Zcote def
    CalcCoordinates
     moveto
% coordonn�es du centre de la facette
    /OK Hcone H incrementHAUTEUR 2 div add sub TanAngleCone mul def
    /Xpoint OK theta incrementANGLE 2 div add cos mul def
    /Ypoint OK theta incrementANGLE 2 div add sin mul def
    /Zpoint H incrementHAUTEUR 2 div add def
CalculsPointsAfterTransformations
    /XcentreFacette Xabscisse  def
    /YcentreFacette Yordonnee  def
    /ZcentreFacette Zcote def
% rayon vers point de vue
    /RXvue XcentreFacette XpointVue sub def
    /RYvue YcentreFacette YpointVue sub def
    /RZvue ZcentreFacette ZpointVue sub def
% test de visibilit�
    /PSfacette nXfacette RXvue mul
    nYfacette RYvue mul add
    nZfacette RZvue mul add
    def
PSfacette 0 le {
theta 1 theta incrementANGLE add {%
    /theta1 exch def
    /OK Hcone H sub TanAngleCone mul def
    /Xpoint OK theta1 cos mul def
    /Ypoint OK theta1 sin mul def
    /Zpoint H def
CalculsPointsAfterTransformations
    CalcCoordinates
    lineto
    } for
H 1 H incrementHAUTEUR add {
    /H1 exch def
    /OK Hcone H1 sub TanAngleCone mul def
    /Xpoint OK theta incrementANGLE add cos mul def
    /Ypoint OK theta incrementANGLE add sin mul def
    /Zpoint H1 def
CalculsPointsAfterTransformations
    CalcCoordinates
    lineto
    } for
theta incrementANGLE add -1 theta {%
    /theta1 exch def
    /OK Hcone H incrementHAUTEUR add sub TanAngleCone mul def
    /Xpoint OK theta1 cos mul def
    /Ypoint OK theta1 sin mul def
    /Zpoint H incrementHAUTEUR add def
CalculsPointsAfterTransformations
    CalcCoordinates
    lineto
    } for
H incrementHAUTEUR add -1 H {
    /H1 exch def
    /OK Hcone H1 sub TanAngleCone mul def
    /Xpoint OK theta cos mul def
    /Ypoint OK theta sin mul def
    /Zpoint H1 def
CalculsPointsAfterTransformations
    CalcCoordinates
    lineto
    } for
} if
} for
} for
% centre de la base inf�rieure apr�s transformations
    /CxFaceInf CX def
    /CyFaceInf CY def
    /CzFaceInf CZ def
% modification du 16/11/2002
%    /Xpoint CxFaceInf def
%    /Ypoint CyFaceInf def
%    /Zpoint CzFaceInf def
    /Xpoint 0 def
    /Ypoint 0 def
    /Zpoint 0 def
% fin modification du 16/11/2002
CalculsPointsAfterTransformations
    /CxBaseInf Xabscisse def
    /CyBaseInf Yordonnee def
    /CzBaseInf Zcote def
% centre de la base sup�rieure avant transformations
    /CxFaceSup 0 def
    /CyFaceSup 0 def
    /CzFaceSup Hcone fracHcone mul def
% Sommet du cone
    /Xpoint 0 def
    /Ypoint 0 def
    /Zpoint Hcone def
CalculsPointsAfterTransformations
    /XsommetCone Xabscisse def
    /YsommetCone Yordonnee def
    /ZsommetCone Zcote def
% Normale ext�rieure � la base inf�rieure
    /nXBaseInf CxFaceInf XsommetCone sub def
    /nYBaseInf CyFaceInf YsommetCone sub def
    /nZBaseInf CzFaceInf ZsommetCone sub def
% centre de la base sup�rieure
    /Xpoint CxFaceSup def
    /Ypoint CyFaceSup def
    /Zpoint CzFaceSup def
CalculsPointsAfterTransformations
    /CxBaseSup Xabscisse def
    /CyBaseSup Yordonnee def
    /CzBaseSup Zcote def
% Normale ext�rieure � la base sup�rieure
    /nXBaseSup XsommetCone CxFaceSup sub def
    /nYBaseSup YsommetCone CyFaceSup sub def
    /nZBaseSup ZsommetCone CzFaceSup sub def
% rayon vers point de vue
    /RXvueSup CxBaseSup XpointVue sub def
    /RYvueSup CyBaseSup YpointVue sub def
    /RZvueSup CzBaseSup ZpointVue sub def
    /RXvueInf CxBaseInf XpointVue sub def
    /RYvueInf CyBaseInf YpointVue sub def
    /RZvueInf CzBaseInf ZpointVue sub def
% Visibilit� de la base inf�rieure
    /PSbaseInfCone nXBaseInf RXvueInf mul
                nYBaseInf RYvueInf mul add
                nZBaseInf RZvueInf mul add def
% Visibilit� de la base sup�rieure
    /PSbaseSupCone nXBaseSup RXvueSup mul
                nYBaseSup RYvueSup mul add
                nZBaseSup RZvueSup mul add def
PSbaseInfCone 0 le {
/TableauxPoints [
0 1 359 {% on d�crit le cercle
    /theta exch def [
    /Xpoint Rcone theta cos mul def
    /Ypoint Rcone theta sin mul def
    /Zpoint 0 def
CalculsPointsAfterTransformations
    CalcCoordinates ]
    } for
    ] def
gsave
newpath
 TableauxPoints 0 get aload pop moveto
0 1 359 {
    /compteur exch def
    TableauxPoints compteur get aload pop
    lineto } for
0.7 setgray
closepath
fill
grestore
 } if
PSbaseSupCone 0 le {
/TableauxPoints [
0 1 359 {% on d�crit le cercle
    /theta exch def [
    /OK Hcone 1 fracHcone sub mul TanAngleCone mul def
    /Xpoint OK theta cos mul def
    /Ypoint OK theta sin mul def
    /Zpoint Hcone fracHcone mul def
CalculsPointsAfterTransformations
    CalcCoordinates ]
    } for
    ] def
gsave
newpath
 TableauxPoints 0 get aload pop moveto
0 1 359 {
    /compteur exch def
    TableauxPoints compteur get aload pop
    lineto } for
0.7 setgray
closepath
fill
grestore
 } if
end
 }% fin du code ps
\showpointsfalse
\end@ClosedObj
 }}%
%
\def\CircleThreeD{\pst@object{CircleThreeD}}
\def\CircleThreeD@i{\@ifnextchar[{\CircleThreeD@do}{\CircleThreeD@do[]}}
\def\CircleThreeD@do[#1]#2{{%
% #2 rayon du cercle
\pst@killglue
\setkeys{psset}{#1}%
\begin@ClosedObj
\addto@pscode{%
/Rcercle #2 def
\variablesTroisD
/XO' \psk@TroisD@Xorigine\space def
/YO' \psk@TroisD@Yorigine\space def
/ZO' \psk@TroisD@Zorigine\space def
tx@3DDict begin
reduction reduction scale
/TableauxPoints [
0 1 359 {% on d�crit le cercle
    /Angle exch def [
    /Xcercle Rcercle Angle cos mul def
    /Ycercle Rcercle Angle sin mul def
    /Xabscisse Xcercle S1 mul Ycercle S2 C1 mul mul add XO' add
    def
    /Yordonnee Xcercle C1 mul neg Ycercle S2 S1 mul mul add YO' add
    def
    /Zcote Ycercle C2 mul neg ZO' add def
    CalcCoordinates ]
    } for
    ] def
 TableauxPoints 0 get aload pop moveto
 0 1 359 {
    /compteur exch def
    TableauxPoints compteur get aload pop
    lineto } for
 end
}% fin du code ps
\showpointsfalse
\end@ClosedObj
}}
%
%
\def\FrameThreeD{\pst@object{FrameThreeD}}
\def\FrameThreeD@i{\@ifnextchar[{\FrameThreeD@do}{\FrameThreeD@do[]}}
\def\FrameThreeD@do[#1](#2,#3)(#4,#5){{%
% (#2,#3) d'un sommet
% (#4,#5) du sommet oppos�
% rectangle ABCD
\pst@killglue
\setkeys{psset}{#1}%
\begin@ClosedObj
\addto@pscode{%
/XA #2 def
/YA #3 def
/XC #4 def
/YC #5 def
% on en d�duit les autres sommets
/XB XC def
/YB YA def
/XD XA def
/YD YC def
\variablesTroisD
/XO' \psk@TroisD@Xorigine\space def
/YO' \psk@TroisD@Yorigine\space def
/ZO' \psk@TroisD@Zorigine\space def
tx@3DDict begin
reduction reduction scale
newpath
    /Xframe XA def
    /Yframe YA def
    /Xabscisse Xframe S1 mul Yframe S2 C1 mul mul add XO' add
    def
    /Yordonnee Xframe C1 mul neg Yframe S2 S1 mul mul add YO' add
    def
    /Zcote Yframe C2 mul neg ZO' add def
    CalcCoordinates
     moveto
    /Xframe XB def
    /Yframe YB def
    /Xabscisse Xframe S1 mul Yframe S2 C1 mul mul add XO' add
    def
    /Yordonnee Xframe C1 mul neg Yframe S2 S1 mul mul add YO' add
    def
    /Zcote Yframe C2 mul neg ZO' add def
    CalcCoordinates
    lineto
    /Xframe XC def
    /Yframe YC def
    /Xabscisse Xframe S1 mul Yframe S2 C1 mul mul add XO' add
    def
    /Yordonnee Xframe C1 mul neg Yframe S2 S1 mul mul add YO' add
    def
    /Zcote Yframe C2 mul neg ZO' add def
    CalcCoordinates
    lineto
    /Xframe XD def
    /Yframe YD def
    /Xabscisse Xframe S1 mul Yframe S2 C1 mul mul add XO' add
    def
    /Yordonnee Xframe C1 mul neg Yframe S2 S1 mul mul add YO' add
    def
    /Zcote Yframe C2 mul neg ZO' add def
    CalcCoordinates
    lineto
    /Xframe XA def
    /Yframe YA def
    /Xabscisse Xframe S1 mul Yframe S2 C1 mul mul add XO' add
    def
    /Yordonnee Xframe C1 mul neg Yframe S2 S1 mul mul add YO' add
    def
    /Zcote Yframe C2 mul neg ZO' add def
    CalcCoordinates
    lineto
closepath
end
 }% fin du code ps
\showpointsfalse
\end@ClosedObj
 }}% % fin de la commande PSTricks
%
%
\def\QuadrillageThreeD{\pst@object{QuadrillageThreeD}}
\def\QuadrillageThreeD@i{\@ifnextchar[{\QuadrillageThreeD@do}{\QuadrillageThreeD@do[]}}
\def\QuadrillageThreeD@do[#1]{{%
\pst@killglue
\setkeys{psset}{#1}%
\begin@OpenObj
\addto@pscode{%
\variablesTroisD
/XO' \psk@TroisD@Xorigine\space def
/YO' \psk@TroisD@Yorigine\space def
/ZO' \psk@TroisD@Zorigine\space def
/Xmax \psk@TroisD@Xmax\space def
/Ymax \psk@TroisD@Ymax\space def
/Xmin \psk@TroisD@Xmin\space def
/Ymin \psk@TroisD@Ymin\space def
/pas \psk@TroisD@pas\space def
/grille \psk@TroisD@grille\space def
tx@3DDict begin
reduction reduction scale
Ymin grille Ymax {% balayage suivant Oy
    /Ygrille exch def
/TableauxPoints [
    Xmin pas Xmax { % balayage suivant Ox
    /Xgrille exch def
    /Xabscisse Xgrille S1 mul Ygrille S2 C1 mul mul add XO' add
    def
    /Yordonnee Xgrille C1 mul neg Ygrille S2 S1 mul mul add YO' add
    def
    /Zcote Ygrille C2 mul neg ZO' add def
    formulesTroisD
        [
         Xi 28.45 mul Yi 28.45 mul %
        ]
        } for
    ] def
 TableauxPoints 0 get aload pop moveto
 0 1 Xmax Xmin sub pas div {
    /compteur exch def
    TableauxPoints compteur get aload pop
   lineto } for
% stroke
    } for
%
Xmin grille Xmax {% balayage suivant Ox
    /Xgrille exch def
/TableauxPoints [
    Ymin pas Ymax { % balayage suivant Ox
    /Ygrille exch def
    /Xabscisse Xgrille S1 mul Ygrille S2 C1 mul mul add XO' add
    def
    /Yordonnee Xgrille C1 mul neg Ygrille S2 S1 mul mul add YO' add
    def
    /Zcote Ygrille C2 mul neg ZO' add def
    formulesTroisD
        [
         Xi 28.45 mul Yi 28.45 mul %
        ]
        } for
    ] def
 TableauxPoints 0 get aload pop moveto
  0 1 Ymax Ymin sub pas div {
    /compteur exch def
    TableauxPoints compteur get aload pop
   lineto } for
  \pst@number\pslinewidth SLW
  \pst@usecolor\pslinecolor
  \@nameuse{psls@\pslinestyle}
% stroke
    } for
% fin du trac�
end
 }% fin du code ps
 \end@OpenObj
 }}% % fin de la commande PSTricks
%
%
% 11 novembre
\def\DemiSphereThreeD{\pst@object{DemiSphereThreeD}}
\def\DemiSphereThreeD@i{\@ifnextchar[{\DemiSphereThreeD@do}{\DemiSphereThreeD@do[]}}
\def\DemiSphereThreeD@do[#1]#2{{%
% (#2,#3,#4) coordonn�es du centre
% #5 rayon
\pst@killglue
\setkeys{psset}{#1}%
\begin@ClosedObj
\addto@pscode{%
\variablesTroisD
reduction reduction scale
    /Rsphere #2 def
    /increment 10 def
tx@3DDict begin
/condition {PSfacette 0 le} def
/departPhi 0 def
MaillageSphere
% centre de la base inf�rieure apr�s transformations
    /CxFaceInf CX def
    /CyFaceInf CY def
    /CzFaceInf CZ def
% correction 16 novembre 2002
%    /Xpoint CxFaceInf def
%    /Ypoint CyFaceInf def
%    /Zpoint CzFaceInf def
    /Xpoint 0 def
    /Ypoint 0 def
    /Zpoint 0 def
% fin correction 16/11/2002
CalculsPointsAfterTransformations
    /CxBaseInf Xabscisse def
    /CyBaseInf Yordonnee def
    /CzBaseInf Zcote def
    /RXvueInf CxBaseInf XpointVue sub def
    /RYvueInf CyBaseInf YpointVue sub def
    /RZvueInf CzBaseInf ZpointVue sub def
% Sommet de la sph�re
    /Xpoint 0 def
    /Ypoint 0 def
    /Zpoint Rsphere def
CalculsPointsAfterTransformations
    /XsommetSphere Xabscisse def
    /YsommetSphere Yordonnee def
    /ZsommetSphere Zcote def
% Normale ext�rieure � la base inf�rieure
    /nXBaseInf CxFaceInf XsommetSphere sub def
    /nYBaseInf CyFaceInf YsommetSphere sub def
    /nZBaseInf CzFaceInf ZsommetSphere sub def
% Visibilit� de la base inf�rieure
    /PSbaseSphere nXBaseInf RXvueInf mul
                  nYBaseInf RYvueInf mul add
                  nZBaseInf RZvueInf mul add def
PSbaseSphere 0 le {
/TableauxPoints [
0 1 359 {% on d�crit le cercle
    /theta exch def [
    /Xpoint Rsphere theta cos mul def
    /Ypoint Rsphere theta sin mul def
    /Zpoint 0 def
CalculsPointsAfterTransformations
    CalcCoordinates ]
    } for
    ] def
gsave
newpath
 TableauxPoints 0 get aload pop moveto
0 1 359 {
    /compteur exch def
    TableauxPoints compteur get aload pop
    lineto } for
0.7 setgray
closepath
fill
grestore
 } if
end
 }% fin du code ps
\showpointsfalse
\end@ClosedObj
 }}% % fin de la commande PSTricks
%
%
\def\SphereCreuse{\pst@object{SphereCreuse}}
\def\SphereCreuse@i{\@ifnextchar[{\SphereCreuse@do}{\SphereCreuse@do[]}}
\def\SphereCreuse@do[#1]#2{{%
% (#2,#3,#4) coordonn�es du centre
% #5 rayon
\pst@killglue
\setkeys{psset}{#1}%
\begin@ClosedObj
\addto@pscode{%
\variablesTroisD
reduction reduction scale
    /Rsphere #2 def
    /increment 10 def
tx@3DDict begin
/SphereInside {
/condition {PSfacette 0 ge} def
/departPhi 0 def
MaillageSphere
} def
%
% centre de la base inf�rieure apr�s transformations
    /CxFaceInf CX def
    /CyFaceInf CY def
    /CzFaceInf CZ def
    /Xpoint CxFaceInf def
    /Ypoint CyFaceInf def
    /Zpoint CzFaceInf def
CalculsPointsAfterTransformations
    /CxBaseInf Xabscisse def
    /CyBaseInf Yordonnee def
    /CzBaseInf Zcote def
    /RXvueInf CxBaseInf XpointVue sub def
    /RYvueInf CyBaseInf YpointVue sub def
    /RZvueInf CzBaseInf ZpointVue sub def
% Sommet de la sph�re
    /Xpoint 0 def
    /Ypoint 0 def
    /Zpoint Rsphere def
CalculsPointsAfterTransformations
    /XsommetSphere Xabscisse def
    /YsommetSphere Yordonnee def
    /ZsommetSphere Zcote def
% Normale ext�rieure � la base inf�rieure
    /nXBaseInf CxFaceInf XsommetSphere sub def
    /nYBaseInf CyFaceInf YsommetSphere sub def
    /nZBaseInf CzFaceInf ZsommetSphere sub def
% Visibilit� de la base inf�rieure
    /PSbaseSphere nXBaseInf RXvueInf mul
                  nYBaseInf RYvueInf mul add
                  nZBaseInf RZvueInf mul add def
/base {
/TableauxPoints [
0 1 359 {% on d�crit le cercle
    /theta exch def [
    /Xpoint Rsphere theta cos mul def
    /Ypoint Rsphere theta sin mul def
    /Zpoint 0 def
CalculsPointsAfterTransformations
    CalcCoordinates ]
    } for
    ] def
% gsave
newpath
 TableauxPoints 0 get aload pop moveto
0 1 359 {
    /compteur exch def
    TableauxPoints compteur get aload pop
    lineto } for
0.7 setgray
closepath
% stroke
%grestore
} def
PSbaseSphere 0 le {
base
clip
SphereInside
 } { 0 0 0.01 0 360 arc } ifelse
end
 }% fin du code ps
\showpointsfalse
\end@ClosedObj
 }}% % fin de la commande PSTricks
%
% 30 novembre
\def\PortionSphere{\pst@object{PortionSphere}}
\def\PortionSphere@i{\@ifnextchar[{\PortionSphere@do}{\PortionSphere@do[]}}
\def\PortionSphere@do[#1]#2{{%
% #2 rayon
\pst@killglue
\setkeys{psset}{#1}%
\begin@ClosedObj
\addto@pscode{%
\variablesTroisD
reduction reduction scale
    /Rsphere #2 def
    /increment 1 def
tx@3DDict begin
    /Xpoint Rsphere psTHETA dTHETA neg add cos mul psPHI dPHI sub cos mul def
    /Ypoint Rsphere psTHETA dTHETA neg add sin mul psPHI dPHI sub cos mul def
    /Zpoint Rsphere psPHI dPHI sub sin mul def
CalculsPointsAfterTransformations
CalcCoordinates
newpath
     moveto
psTHETA dTHETA sub 1 psTHETA dTHETA add {
    /Theta exch def
    /Xpoint Rsphere Theta cos psPHI dPHI sub cos mul mul def
    /Ypoint Rsphere Theta sin psPHI dPHI sub cos mul mul def
    /Zpoint Rsphere psPHI dPHI sub sin mul def
    CalculsPointsAfterTransformations
    CalcCoordinates
     lineto
     } for
psPHI dPHI sub 1 psPHI dPHI add {
    /Phi exch def
    /Xpoint Rsphere psTHETA dTHETA add cos Phi cos mul mul def
    /Ypoint Rsphere psTHETA dTHETA add sin Phi cos mul mul def
    /Zpoint Rsphere Phi sin mul def
    CalculsPointsAfterTransformations
    CalcCoordinates
     lineto
     } for
psTHETA dTHETA add -1 psTHETA dTHETA sub {
    /Theta exch def
    /Xpoint Rsphere Theta cos psPHI dPHI add cos mul mul def
    /Ypoint Rsphere Theta sin psPHI dPHI add cos mul mul def
    /Zpoint Rsphere psPHI dPHI add sin mul def
    CalculsPointsAfterTransformations
    CalcCoordinates
     lineto
     } for
psPHI dPHI add -1 psPHI dPHI sub {
    /Phi exch def
    /Xpoint Rsphere psTHETA dTHETA sub cos Phi cos mul mul def
    /Ypoint Rsphere psTHETA dTHETA sub sin Phi cos mul mul def
    /Zpoint Rsphere Phi sin mul def
    CalculsPointsAfterTransformations
    CalcCoordinates
     lineto
     } for
closepath
end
 }% fin du code ps
\showpointsfalse
\end@ClosedObj
 }}% % fin de la commande PSTricks
%
%% END: pst-3DNew.tex

convex_revised.bbl
\begin{thebibliography}{}

\bibitem[\protect\citeauthoryear{%
Alfsen \BBA{} Shultz}{%
Alfsen \BBA{} Shultz}{%
2001}]{%
states}%
Alfsen, E.\BCBT{} \BBA{} Shultz, F.
\newblock{}\BBOP{}2001\BBCP{}.
\newblock{}\Bem{State spaces of operator algebras}.
\newblock{}Boston: Birkh{\"a}user.

\bibitem[\protect\citeauthoryear{%
Alfsen \BBA{} Shultz}{%
Alfsen \BBA{} Shultz}{%
2003}]{%
geometry}%
Alfsen, E.\BCBT{} \BBA{} Shultz, F.
\newblock{}\BBOP{}2003\BBCP{}.
\newblock{}\Bem{Geometry of state spaces of operator algebras}.
\newblock{}Boston: Birkh{\"a}user.

\bibitem[\protect\citeauthoryear{%
Bennett \BBA{} Brassard}{%
Bennett \BBA{} Brassard}{%
1984}]{%
bb84}%
Bennett, C.\BCBT{} \BBA{} Brassard, G.
\newblock{}\BBOP{}1984\BBCP{}.
\newblock{}\BBOQ{}Quantum cryptography: Public key distribution and coin
  tossing.\BBCQ{}
\newblock{}\BIn{} \Bem{Proceedings of {IEEE} international conference on
  computers, systems, and signal processing}\ (\BPGS\ 175--179).
\newblock{}IEEE.

\bibitem[\protect\citeauthoryear{%
Bertlmann, Narnhofer\BCBL{} \BBA{} Thirring}{%
Bertlmann \BOthers{.}}{%
2002}]{%
thirring}%
Bertlmann, R., Narnhofer, H.\BCBL{} \BBA{} Thirring, W.
\newblock{}\BBOP{}2002\BBCP{}.
\newblock{}\BBOQ{}A geometric picture of entanglement and {B}ell
  inequalities.\BBCQ{}
\newblock{}\Bem{Physical Review A}, \Bem{66}, 032319.

\bibitem[\protect\citeauthoryear{%
Bub}{%
Bub}{%
2004}]{%
bub}%
Bub, J.
\newblock{}\BBOP{}2004\BBCP{}.
\newblock{}\BBOQ{}Why the quantum?\BBCQ{}
\newblock{}
\newblock{}(This volume)

\bibitem[\protect\citeauthoryear{%
Clifton, Bub\BCBL{} \BBA{} Halvorson}{%
Clifton \BOthers{.}}{%
2003}]{%
bch}%
Clifton, R., Bub, J.\BCBL{} \BBA{} Halvorson, H.
\newblock{}\BBOP{}2003\BBCP{}.
\newblock{}\BBOQ{}Characterizing quantum theory in terms of information
  theoretic constraints.\BBCQ{}
\newblock{}\Bem{Foundations of Physics}, \Bem{33}, 1561--1591.

\bibitem[\protect\citeauthoryear{%
Fuchs}{%
Fuchs}{%
2003}]{%
fuchs}%
Fuchs, C.
\newblock{}\BBOP{}2003\BBCP{}.
\newblock{}\BBOQ{}Quantum mechanics as quantum information, mostly.\BBCQ{}
\newblock{}\Bem{Journal of Modern Optics}, \Bem{50}, 987--1023.

\bibitem[\protect\citeauthoryear{%
Halvorson}{%
Halvorson}{%
2003}]{%
halvorson}%
Halvorson, H.
\newblock{}\BBOP{}2003\BBCP{}.
\newblock{}\BBOQ{}Generalization of the {H}ughston-{J}ozsa-{W}ootters theorem
  to hyperfinite von {N}eumann algebras.\BBCQ{}
\newblock{}
\newblock{}(arXiv.org: quant-ph/0310001)

\bibitem[\protect\citeauthoryear{%
Halvorson \BBA{} Bub}{%
Halvorson \BBA{} Bub}{%
2003}]{%
hb}%
Halvorson, H.\BCBT{} \BBA{} Bub, J.
\newblock{}\BBOP{}2003\BBCP{}.
\newblock{}\BBOQ{}Can quantum cryptography imply quantum mechanics? {R}eply to
  {S}molin.\BBCQ{}
\newblock{}
\newblock{}(arXiv.org: quant-ph/0311065)

\bibitem[\protect\citeauthoryear{%
Hardy}{%
Hardy}{%
2001}]{%
hardy}%
Hardy, L.
\newblock{}\BBOP{}2001\BBCP{}.
\newblock{}\BBOQ{}Quantum theory from five reasonable axioms.\BBCQ{}
\newblock{}
\newblock{}(arXiv.org: quant-ph/0101012)

\bibitem[\protect\citeauthoryear{%
Kadison \BBA{} Ringrose}{%
Kadison \BBA{} Ringrose}{%
1997}]{%
kr}%
Kadison, R.\BCBT{} \BBA{} Ringrose, J.
\newblock{}\BBOP{}1997\BBCP{}.
\newblock{}\Bem{Fundamentals of the theory of operator algebras}.
\newblock{}Providence, RI: American Mathematical Society.

\bibitem[\protect\citeauthoryear{%
Landau}{%
Landau}{%
1987}]{%
landau}%
Landau, L.
\newblock{}\BBOP{}1987\BBCP{}.
\newblock{}\BBOQ{}On the violation of {B}ell's inequality in quantum
  theory.\BBCQ{}
\newblock{}\Bem{Physics Letters A}, \Bem{120}, 54--56.

\bibitem[\protect\citeauthoryear{%
Landsman}{%
Landsman}{%
1998}]{%
land}%
Landsman, N.
\newblock{}\BBOP{}1998\BBCP{}.
\newblock{}\Bem{Mathematical topics between classical and quantum mechanics}.
\newblock{}New York: Springer.

\bibitem[\protect\citeauthoryear{%
Mielnik}{%
Mielnik}{%
1969}]{%
mielnik}%
Mielnik, B.
\newblock{}\BBOP{}1969\BBCP{}.
\newblock{}\BBOQ{}Theory of filters.\BBCQ{}
\newblock{}\Bem{Communications in Mathematical Physics}, \Bem{15}, 1--46.

\bibitem[\protect\citeauthoryear{%
Namioka \BBA{} Phelps}{%
Namioka \BBA{} Phelps}{%
1969}]{%
namioka}%
Namioka, I.\BCBT{} \BBA{} Phelps, R.
\newblock{}\BBOP{}1969\BBCP{}.
\newblock{}\BBOQ{}Tensor products of compact convex sets.\BBCQ{}
\newblock{}\Bem{Pacific Journal of Mathematics}, \Bem{31}, 469--480.

\bibitem[\protect\citeauthoryear{%
Schr\"{o}dinger}{%
Schr\"{o}dinger}{%
1936}]{%
schro}%
Schr\"{o}dinger, E.
\newblock{}\BBOP{}1936\BBCP{}.
\newblock{}\BBOQ{}Probability relations between separated systems.\BBCQ{}
\newblock{}\Bem{Proceedings of the Cambridge Philosophical Society}, \Bem{32},
  446--452.

\bibitem[\protect\citeauthoryear{%
Segal}{%
Segal}{%
1947}]{%
segal}%
Segal, I.~E.
\newblock{}\BBOP{}1947\BBCP{}.
\newblock{}\BBOQ{}Postulates for general quantum mechanics.\BBCQ{}
\newblock{}\Bem{Annals of Mathematics}, \Bem{48}, 930--948.

\bibitem[\protect\citeauthoryear{%
Smolin}{%
Smolin}{%
2003}]{%
smolin}%
Smolin, J.
\newblock{}\BBOP{}2003\BBCP{}.
\newblock{}\BBOQ{}Can quantum cryptography imply quantum mechanics?\BBCQ{}
\newblock{}
\newblock{}(arXiv.org: quant-ph/0310067)

\bibitem[\protect\citeauthoryear{%
Spekkens}{%
Spekkens}{%
2003}]{%
spekkens}%
Spekkens, R.
\newblock{}\BBOP{}2003\BBCP{}.
\newblock{}\BBOQ{}In defense of the epistemic view of quantum states.\BBCQ{}
\newblock{}
\newblock{}(Unpublished talk, New Directions in the Foundations of Physics,
  University of Maryland)

\end{thebibliography}
