I had asked a question recently (A question on primes larger than a bound in an arithmetic progression) on primes contained in an arithmetic progression with an initial term as a prime and common difference as a prime greater than the initial term.
This got me thinking about a more general question given below:
Let $p, q \in \mathbb{P}$, the set of primes, $M = \{m : m \in \mathbb{P}, p < m < q \}$ and $L = \{l : l \in \mathbb{P}, l < p\}$. Assume $M \ne \emptyset$.
Let $S(a, d)$ denote an arithmetic progression with initial term $a$ and common difference $d$.
Let $T = \{ S(m, l) : m \in M, l \in L\}$. Can we construct $X$ a subset of $T$ that generates $M$? i.e., if we generated the terms of the AP $S(m, l)$ for a subset of arithmetic progressions $X \subset T$ and collect the generated terms into a set $G$, is $M \subset G$?
The trivial case of the singleton set $X = \{ S(r, 2) \}$ i.e., the AP of odd numbers starting with an odd prime $r$, the minimal element of $M$ may be excluded as $M$ is obviously a subset of the generated terms of $S(r,2)$.
Bonus question: Assuming multiple subsets can generate $M$, is there a minimal subset based on $|X|$ and if there is one, how to construct it?