Consider the optimization problem
\begin{align} \max ~~ &x && \label{f}\\ \text{subject to}\ & \sum_{i=1}^{x} y_{i} = a && \label{s}\\ & y_{i} + y_{j} \ge b && \forall i,j \in \{1,\dots,x\} \text{ and } i \ne j \label{fd}\\ & y_{i} \in \{\ell,\dots,u\} && \forall i \in \{1,\dots,x\} \label{ad}\\ & x \in\{0,1,2,\dots\}. && \label{d} \end{align}
in which $x$ and $y_i$ are decision variables (unknowns) and $a$ and $b$ are given parameters. As can be seen, the decision variable $x$ is used in the $\sum$ notation. It is not hard to formulate this optimization problem as an integer linear programming formulation. The current form is good as it is more compact.
Question 1. Is it all right to write the formulation in such a form (using a decision variable in the $\sum$ notation)? Is it consistent with the common notation used in optimization community? Are you aware of possible optimization problems written similarly?
Question 2. According to INFORMS, a Semi-infinite program is "a mathematical program with a finite number of variables or constraints, but an infinite number of constraints or variables, respectively." I am wondering if the above problem could be called an "infinite program"?
Edit
As per comments, I modify the formulation by changing the domain of $y_i$ from $\{1,\dots,100\}$ to $\{\ell,\dots,u\}$ where $\ell$ and $u$ can take any non-negative integer values with $\ell < u$. I also add the following integer linear programming formulation of the problem. This is only one of different possible formulations.
\begin{align} \max \ &\sum_{k\in K} z_{k} && \label{A1_0}\\ \text{s.t.}\ &\sum_{k\in K}y_{k} = a && \forall k \in K \label{A1_1}\\ &y_{k} \le u\,z_{k} && \forall k\in K \label{A1_5}\\ &\ell\,z_{k} \le y_k && \forall k\in K \label{fggf} \\ &z_{k} \le y_k && \forall k\in K \label{fgf} \\ &y_{k} + y_{l} \ge b\,(z_{k}+z_{l}-1) && \forall k\in K, \, l\in K\setminus\{k\} \label{A1_6}\\ & y_{k} \in \{0,\dots,u\} && \forall k\in K \label{A1_7}\\ & z_{k} \in \{0,1\} && \forall k\in K \label{A1_8} \end{align}
In this formulation, $K:= \{1,\dots,v\}$ in which $v$ is an upper bound on the number of $y_i$ variables. In order for the problem to be a standard integer linear program, $v$ must be a given number. For example, if $\ell=1$ then we can simply set $v=a$. Note that for $\ell \ge 1$ the constraint $z_{k} \le y_k$ is redundant and can be eliminated from the model.
You can of course write it like this if you want as it is convenient and clearly shows what you want to optimize, but in the end you have to solve it, and the most likely way to do this is by a MILP solver, and thus you need to write it as a MILP
There is a finite number of constraints and variables (as the length of $y$ is bounded), so calling it a (semi)-infinite dimensional problem would be weird.