You're sort of on the right track in that you're trying to relate the position of array elements to their value, but your statement makes a serious error in directly comparing the value of an index, $j$, to the value of arbitrary data, $a[L]$ and $a[R-1]$.
I think you meant to say $L\leq j\leq R$ is a loop invariant. Observe that $L\leq i\leq j$ is as well, but neither are very interesting statements.
Remember, the motivation for identifying loop invariants is so that we can use them to verify that our code does what it's supposed to. Here, implementing the partition stage of Quicksort, our goal is to rearrange the elements of $a$ such that all the data to the left of the pivot will be less than or equal to the pivot, and all the data to the right of the pivot will be greater than or equal to the pivot.
One important loop invariant is $$\text{For all indices }k \text{ with } L\leq k<i, \text{ we have } a[k]\leq\text{pivot}=a[R]$$ We can see this in your code:
void partition(int a[], int L, int R) {
int i = L;
int pivot = a[R];
//a[k]<=pivot for all k with L<=k<L=i (true since there are no such k)
for (int j = L; j < R; j++) {
//a[k]<=pivot for all k with L<=k<i (inductive hypothesis)
if (a[j] <= pivot) {
swap(a[i], a[j]);
//we have now ensured a[i]<=pivot
//it is an invariant that i<=j
//so the elements a[L],...,a[i-1] are unchanged
//thus a[k]<=pivot for all k with L<=k<i+1
i++;
//now a[k]<=pivot for all k with L<=k<i
}
}
swap(a[i], a[R]);
}
Another important loop invariant is $$\text{For all k such that } i\leq k< j, \text{we have } a[k]\geq\text{pivot}=a[R]$$ Again we can see this looking at your code:
void partition(int a[], int L, int R) {
int i = L;
int pivot = a[R];
//a[k]>=pivot for all k with i=L<=k<L=j (true since there are no such k)
for (int j = L; j < R; j++) {
//a[k]>=pivot for all k with i<=k<j (inductive hypothesis)
if (a[j] <= pivot) {
//it is an invariant that i<=j. now either i<j or i=j
//if i=j, then there are no k such that i<=k<j, so assume i<j
//then i<=i<j, and consequently a[i]>=pivot
swap(a[i], a[j]);
//now a[j]>=pivot and a[i]<=pivot
//the other elements are unchanged
//so now a[k]>=pivot for k with i+1<=k<=j
i++;
//now a[k]>=pivot for k with i<=k<=j
}
}//after incrementing j by 1, now a[k]>=pivot for k with i<=k<j
swap(a[i], a[R]);
} 318