Section sqrt2_decrease.
Variables (p q : nat) (pos_q : 0 < q) (hyp_sqrt : p * p = 2 * (q * q)).
generalize pos_q; case q.
intros H; elim (lt_n_O 0); auto.
intros n H.
simpl in |- *; discriminate.
Qed.
Hint Resolve sqrt_q_non_zero.
Ltac solve_comparison :=
apply root_monotonic; repeat rewrite square_recompose; rewrite hyp_sqrt;
rewrite mult2_recompose; apply mult_lt; auto with arith.
replace q with (1 * q); try ring.
replace p with (1 * p); try ring.
solve_comparison.
Qed.
solve_comparison.
Qed.
solve_comparison.
Qed.
Hint Resolve comparison1 comparison2 comparison3: arith.

Theorem comparison4 : 3 * q - 2 * p < q.