Background on three-valued logic
Consider logic over three values $$ f<b<t, $$ where the third truth-value $b$ is interpreted as 'both' or 'could be either $t$ or $f$'.
We define conjunction $\land$ and disjunction $\lor$ as greatest lower bound and least upper bound respectively, and we define negation $\neg$ by $\neg t=f$ and $\neg b=b$ and $\neg f=t$. Define material implication $\phi\implies\phi'$ by $$ \phi\implies \phi' \quad=\quad \neg\phi\lor\phi' . $$ Importantly, note that we take a truth-value to be valid when it is either $t$ or $b$. In jargon, we would say that $t$ and $b$ are the designated truth-values.
Let's assume a domain of values $\mathsf{Val}$. To keep things simple and concrete we set $\mathsf{Val}=\mathbb N=\{0,1,2,\dots\}$. This has an equality function ${=} : \mathbb N^2 \to \{f,t\}$. Note that equality always returns $t$ or $f$, never $b$.
Background on affine existence
In predicate logic, $\exists a.\phi$ means 'there exists some value that makes $\phi$ valid' and $\exists! a.\phi$ means 'there exists a unique value that makes $\phi$ valid'.
Less well-known is the affine existence quantifier, which I will write $\exists_{01} a.\phi$ --- I'm not aware of a standard notation for this and am happy to be advised if there is --- which means 'there exist $0$ or $1$ (but no more) values that make $\phi$ valid'.
In two-valued logic, affine existence can be expressed as $$ \forall a.\forall a'.\phi(a) \implies \phi(a') \implies a=a' . $$
The question
How should we best define affine existence $\exists_{01} a.\phi(a)$ in a three-valued setting?
If we import the usual definition above, then we get arguably pathological behaviour in one corner case: if $\phi(v)$ returns $b$, and $\phi(v')$ returns $f$ on all $v'\neq v$, then with the definition above we get that $\exists_{01} a.\phi(a)$ returns $b$. Arguably this is not what we want; if we interpret $b$ as 'could be either true or false' then we already have enough information to know that $\exists_{01} a.\phi(a)$ returns $t$.
Fixing this is not technically difficult; we just write a longer predicate that detects this special case and adjusts accordingly.
My questions are:
- Has this been discussed in the literature, and if so can anyone provide references?
- Is there a canonical definition of affine existence in multi-valued predicate logic? (This is really a special case of Q1.)
Thank you.