# Re: [isabelle] need help with quantified ints

```Here is a proof:

lemma
fixes q qa n
assumes n0: "n > 0" and n12: "int n <= 12"
and nq: "int n * q = 12" and nqa: "int n * qa = 18"
shows "int n <= 6"
proof-
from nq nqa
have "int n dvd 12" "int n dvd 18" unfolding dvd_def by auto
hence th: "n dvd 12" "n dvd 18" unfolding int_dvd_iff by auto
from gcd_greatest[OF th] have "n dvd 6" by (simp add: gcd.simps)
(* This is actually stronger than the final conclusion *)
hence "n <= 6" by (rule dvd_imp_le, simp)
then show "int n <= 6" by simp
qed

```
Some parts of the proof should be done automatically by algebra, but apparently there is a bug (on my TODO).
```
Hope it helps,
Amine.

Perry James wrote:
```
```Hi,
I'm having trouble proving the lemma below.  My first idea was to "apply
(cases n)" since there are only 12 values of n that satisfy the assumption,
but that's not possible since n is bound. Also, applying arith, algebra, and
auto have no effect.
Is there any way to make progress?
```