proposition: Lemma square_bound_equality_case : forall a M, -M <= a < M -> M * M <= a * a -> a = - M.
proof: Proof. intros a M Bounds Bsqr. destruct (Z_le_dec 0 M); [ | lia ]. cut (Z.abs M <= Z.abs a). intro; lia. rewrite <- (Z.abs_square M), <- (Z.abs_square a) in Bsqr. apply sqrt_le_compat; auto with *. Qed.
imports: ZArith Lia Znumtheory Natsets MyNat Ztools Zeqm Znumfacts