Moser lower bounds

2 Rational planar geometry

All geometry in this project is carried out over \(\mathbb {Q}^2\) so that decidable computations can be used throughout. Real-valued errors enter only through explicit approximation bounds.

Definition 1 Rational point
#

A rational point is an element of \(\mathbb {Q}^2\), represented as a function \(\mathrm{Fin}\, 2 \to \mathbb {Q}\).

Definition 2 Cross product, dot product, squared length

For \(u, v \in \mathbb {Q}^2\) we define \(u \times v = u_0 v_1 - u_1 v_0\), \(u \cdot v = u_0 v_0 + u_1 v_1\), and \(\lVert v\rVert ^2 = v_0^2 + v_1^2\).

Lemma 3 Squared length is nonnegative, and positive on nonzero vectors

For all \(v \in \mathbb {Q}^2\), \(\lVert v\rVert ^2 \ge 0\), with strict inequality when \(v \ne 0\).

Definition 4 Counterclockwise rotation by a right angle
#

The map \(R : (x, y) \mapsto (-y, x)\) is a \(90^\circ \) counterclockwise rotation, and preserves squared length.

Definition 5 Closed / open half-spaces
#

A (closed, resp. open) half-space is specified by a basepoint \(b \in \mathbb {Q}^2\) and a nonzero inward normal \(n \in \mathbb {Q}^2\); a point \(p\) belongs to the half-space iff \(n \cdot (p - b) \ge 0\) (resp. \({\gt} 0\)).

Definition 6 Half-space to the left of a directed edge

Given distinct points \(p_1, p_2 \in \mathbb {Q}^2\), the half-space strictly (resp. weakly) to the left of the directed segment \(p_1 \to p_2\) uses basepoint \(p_1\) and normal \(R(p_2 - p_1)\).

Definition 7 Lines and intersection

A line is a basepoint together with a nonzero direction vector. Two nonparallel lines have a unique intersection point, computed by Cramer’s rule.

Definition 8 Moving a half-space inward
#

Given \(d, \tau {\gt} 0\), one may translate the basepoint of a half-space inward along its normal by an amount in \([d, d+\tau ]\), obtaining a new half-space contained in the original. The scaling factor is realised rationally via Lemma 10.

Definition 9 Rational root with square between bounds
#

Given \(0 \le \ell {\lt} u\) in \(\mathbb {Q}\), there is an explicit rational \(r {\gt} 0\) with \(\ell \le r^2 \le u\).

Lemma 10 Correctness of findRationalWithSquareBetween

The rational \(r\) returned by 9 satisfies \(r {\gt} 0\), \(\ell \le r^2\), and \(r^2 \le u\).