TITLE: What is the status of the extreme value theorem in forms of constructive mathematics, such as Smooth Infinitesimal Analysis?
QUESTION [5 upvotes]: In certain intuitionistic frameworks the extreme value theorem cannot be proved. Depending on the exact framework, counterexamples can be constructed as well; see for example pp. 294-295 in
Troelstra, A. S.; van Dalen, D. Constructivism in mathematics. Vol. I. An introduction. Studies in Logic and the Foundations of Mathematics, 121. North-Holland Publishing Co., Amsterdam, 1988. xx+342+XIV pp. ISBN: 0-444-70266-0; 0-444-70506-6 
The Smooth Infinitesimal Analysis (SIA) following Lawvere, Kock, J. Bell, and others is based on a category-theoretic framework where the background logic is intuitionistic. What is the status of the extreme value theorem in SIA?

REPLY [4 votes]: 1) Yes, in SIA the maximum value $y$ exists.  Looking at $R^{[-1,1]}$, the space of all smooth maps, there is a smooth map $\max : R^{[-1,1]} \rightarrow R$ where $y \ge \max(f) \leftrightarrow \forall x\ f(x) \le y$ 
2) No, in SIA the maximum need not be attained.  Let $a,x,w$ range over $[-1,+1]$.
Suppose $\forall f\in R^{[-1,1]} \ \exists x \ \forall w\ \ f(x) \ge f(w)$.
Then $\forall a\ \exists x\ \forall w\ \ ax \ge aw$.
Then $\forall a\ \exists x\ \forall w\ \ a(x-w) \ge 0$.
If $x< 1$, then choose $w=1$, so $x-w<0$, and dividing by $x-w$ gives $a \le 0$.
If $x> -1$, then choose $w=-1$, so $x-w>0$, and dividing by $x-w$ gives $a \ge 0$.
Since $x< 1 \vee x>-1$, we conclude $a \le 0 \vee a \ge 0$.
Since this conclusion does not hold in SIA, the original claim that the maximum is attained can not hold in SIA either.