Which Heyting algbras arise out of some elementary topos which satisfies the ultrafilter principle?

I think your formulation of the ultrafilter principle implies the de Morgan law.

Let $U$ be any proposition, consider the boolean algebra $A$ freely generated by an element $v$.

so $A = \{ 0,1,v,\neg v \}$.

Consider the following equivalence relation on $A$:

$$ \{(0,0),(1,1),(v,v),(\neg v, \neg v) \} \cup U \times \{ (0,v),(1,\neg v) \} \cup (\neg U) \times \{ (1,v),(0,\neg v) \} $$

(I didn't write it, but of course, as soon as you have an element $(x,y)$ in the relation you also add the element $(y,x)$ in the relation)

A long and uninteresting case by case treatment shows that it is an equivalence relation compatible to the boolean algebra structure and hence the quotient is again a boolean algebra $B$.

$0$ and $1$ are different in $B$, so by the ultrafilter principle there should exist a morphism $B \rightarrow 2$. the image of $v$ is either $0$ or $1$.

If it is zero, then as $\neg U \Rightarrow v=1$ one has $\neg \neg U$ and if it is one then $\neg U$ for the same reason hence $\neg U $ or $\neg \neg U$ which is an equivalent form of De Morgan's law.

If you want to avoid this kind of problem you need to restrict to decidable boolean algebra, that is those which satisfies $\forall v \in B,v=0$ or $v \neq 0$ (this also prevent the example in François G dorsais's answer)


Yes, plenty! But this is subtle since it's hard to define what an ultrafilter is in constructive settings.

An ultrafilter $\mathcal{U}$ on $\mathbb{N}$, in the classical sense, easily allows the Limited Principle of Omniscience (LPO). That principle says that if $\alpha(n)$ is decidable (either true or false for every $n$) then either $\forall n \alpha(n)$ or $\exists n \lnot \alpha(n)$. Given an ultrafiler $\mathcal{U}$, just check whether $\{n \in \mathbb{N} : (\exists m < n)\lnot\alpha(m)\} \in \mathcal{U}$ to decide this.

Note that I needed the decidability of $\alpha(n)$ to make this work. It is not true in a constructive setting that every reasonable $\alpha$ is so decidable, so an ultrafilter might not help immediately. However, in most constructive settings, primitive recursive $\alpha(n)$ are decidable and this is already nontrivial. By induction, every arithmetical statement is decidable in this way given an ultrafilter $\mathcal{U}$. On the other hand, nothing else is since an ultrafilter predicate over second-order logic is conservative over arithmetic comprehension.