Understanding the justification for Troelstra's Uniformity Principle I'm trying to understand Troelstra's uniformity principle (UP), as laid out in McCarty's article ''Intuitionism in Mathematics'' from the Oxford Handbook of the Philosophy of Mathematics and Logic.
It is given there as saying, for an extensional relation $\mathrm{R}$:
$$ \forall X \, \exists n \ \mathrm{R}(X,n) \to \exists n\, \forall X\ \mathrm{R}(X,n),$$
where $X \in \mathcal{P}(\mathbb{N})$, and $n \in \mathbb{N}$.
I've taken this to mean ''if there's a binary relation which assigns a number to every set, it must assign the same number to every set.'' There are a few things which I'm not totally clear about which I'd appreciate explaining to me:


*

*What does it mean for a relation to be extensional? I've taken this to be along the lines of 'specified by its elements' à la $\textsf{ZFC}$, but it's not clear how or why this is necessary.


McCarty then gives an explanation of why he believes the UP emerges as intuitive (sorry this is quite a long extract but I thought it would be the most clear way of explaining my confusion):

To see how such a principle might be made plausible, let $\mathrm{R}$ be any extensional,
  binary relation between sets of natural numbers $X$ and natural numbers $n$ such that,
  for every $X$, there is an $n$ for which $\mathrm{R}(X, n)$. For this liaison between sets and numbers
  to subsist, there should be a discernible association in virtue of which $\mathrm{R}$ links sets to
  numbers. That association is expressible as a list of instructions $\alpha$ for determining,
  from sets $X$, suitable $n$ for which $\mathrm{R}(X, n)$. In contrast to the natural numbers and
  integers, the collection of all sets of natural numbers is not the trace of some recursive
  generation process. The relation $\mathrm{R}$ and the sets themselves are all extensional. Hence,
  the action of $\alpha$ should not depend upon the fine points of a set’s possible specification
  in language. Further, since $\alpha$ is a rule with which one can act on all sets $X$ of numbers,
  the action of $\alpha$ should not depend upon the membership conditions for any particular
  $X$. Those conditions might well be so complicated as to elude capture in
  anything one would rightly call a ‘‘rule.’’ The application of $\alpha$ to sets should therefore
  be uniform: what $\alpha$ does to one set, it does to all. The identity badge of intuitionism as
  a branch of constructive mathematics is the insistence that every rule underwriting an
  existential statement about numbers $\exists n\, P(n)$ must provide, if implicitly, an appropriate
  numerical term $t$ and the knowledge that $P(t)$ holds. Therefore, since $\alpha$ is
  constructive and labels each set $X$ uniformly with some number, $\alpha$ must yield a designation
  for some particular natural number $m$ uniformly in terms of the $X$s. Obviously,
  for this association to be uniform, $m$ must be the same for every set of numbers
  $X$. Hence, there is a number related by $\mathrm{R}$ to every set, and UP is seen to hold.

I don't follow entirely his reasoning, but the gist of what I think he means here is something along the lines of: since intuitionistically it makes no sense to talk of all of $\mathcal{P}(\mathbb{N})$, the only sensible relation we could define on it would be a uniform one, as we couldn't constructively give another relation which does this (for example: a candidate counter-example which came to me quickly was to say $\mathrm{R}(\varnothing,0)$ and $\mathrm{R}(X,1)$ for all other $X$; however this isn't (intuitionistically) a relation on all of $\mathcal{P}(\mathbb{N})$ as we can't list out its elements). 
My next question is then


*Is this a correct interpretation of McCarty's argument (or the intuition for the UP in general)?


and 


*If not, how am I to read the above (or else is there another intuitive explanation for UP)?


Sorry this is quite a long one, but thanks for any/all help/references!
 A: Question 1 has been answered in the comments. I'm not sure if anyone but McCarty can answer Question 2. However, I can offer a partial answer to Question 3 by giving an alternative, topological explanation for the uniformity principle.
The desire to make all (definable) operations continuous occurs as a common theme in intuitionistic mathematics; the same desire crops up in the recursive school of constructive mathematics, for subtly different reasons [2].
Constructively, one can think of each set as a space endowed with an "inherent" topology (one can find a beautiful exposition of this idea in e.g. Synthetic Topology [1]), where the topology controls the difficulty of "distinguishing two elements of the given set".
The set of natural numbers forms a discrete space under this interpretation. We have $\forall x, y \in \mathbb{N}. x = y \vee \neg x = y$: telling two natural numbers apart is in a sense as easy as possible.
In classical mathematics, excluded middle gives us "maximal omniscience", allowing us to distinguish between any two elements of any set; from a topological perspective, this amounts to saying that all sets inherently come equipped with the discrete topology.
Constructive mathematics and intuitionistic mathematics does not admit such omniscience principles. The fewer omniscience principles we have, the fewer elements we can distinguish: without omniscience, we cannot prove $\forall x, y \in \mathbb{R}. x = y \vee \neg x = y$, so we can't generally tell real numbers apart, and the operations we define have to respect this fact. Indeed, any operation on real numbers that we can define without invoking some kind of omniscience principle will be continuous, even in the usual Euclidean topology on $\mathbb{R}$.
Now, imagine that we have a set $S$ endowed with some kind of inherent topology. If we can assign elements of a discrete set $T$ to every element of $S$ in a non-trivial way, then we can extract information that allows us to distinguish elements of $S$ from each other, so the inherent topology of $S$ cannot be "too indiscrete".
For example, imagine we have a bona fide function $f: S \rightarrow T$ and two elements $x,y \in S$ that we cannot tell apart. Since we can distinguish any two different values in the discrete space $T$, our function better assign the same value to both $x$ and $y$. Topologically, this corresponds to the well-known result that continuous functions targeting a discrete space are locally constant!
Now, what kind of inherent topology should the set $\mathcal{P}(\mathbb{N})$ carry? Well, distinguishing between two elements of this set seems like an onerous task. If I have $G,H \in \mathcal{P}(\mathbb{N})$, then I can consider something like the set $$J = \{x \in \mathbb{N} \:|\: (x \in G \wedge \text{the Collatz conjecture holds}) \vee (x  \in H \wedge \text{the Collatz conjecture fails}) \}.$$ Let's just say that I would have a real hard time telling $J$ apart from either $G$ or $H$. Without omniscience, the topology of $\mathcal{P}(\mathbb{N})$ should definitely not have any nontrivial connected component (so all those locally constant functions to discrete spaces better be globally constant).
Troelstra's uniformity principle internalizes these observations. It ensures that the topology of $\mathcal{P}(\mathbb{N})$ lacks non-trivial connected components, so all operations assigning elements of the discrete set $\mathbb{N}$ to elements of $\mathcal{P}(\mathbb{N})$ are trivial.
The uniformity principle is an anti-classical, anti-omniscience principle. As you observed, you cannot define your candidate counterexample $R$ on all of $\mathcal{P}(\mathbb{N})$ without invoking a non-constructive omniscience principle (in this case LPO). If you admit the uniformity principle as an axiom, then you can use it prove that $R$ is not a relation (as opposed to "who knows, I can't define it"), and so the law of excluded middle and LPO fail.

[1] M. Escardó: "Synthetic Topology of Data Types and Classical Spaces" (https://www.sciencedirect.com/science/article/pii/S1571066104051357)
[2] I. Loeb: "Factoring Out Intuitionistic Theorems: Continuity Principles and the Uniform Continuity Theorem", CiE 2008: Logic and Theory of Algorithms pp 379-388, (https://link.springer.com/chapter/10.1007/978-3-540-69407-6_41)
