The reverse binary order #
This file formalizes the order ◁ introduced before Lemma 1 in the paper
“A 4AP-free permutation of the positive integers”. The least significant
unequal bit decides the comparison, with 1 preceding 0. Dividing by two
removes a common least significant bit. We use this recursive description
both for a computable comparison and for the elementary proofs in the paper.
The binary comparison from the paragraph defining ◁ in the paper.
It returns true precisely when the first argument precedes the second.
The special case (0, 0) ends the recursion after all bits have been removed.
Equations
Instances For
The paper's strict order ◁, the reverse order on binary strings when
compared at their first unequal bit starting from the least significant end.
Equations
- FourAP.bits a b = (FourAP.binaryCompare a b = true)
Instances For
Binary comparison is decidable by the recursion defining the paper's order.
Equations
- FourAP.bitsDecidable x✝¹ x✝ = FourAP.bitsDecidable._aux_1 x✝¹ x✝
At equal zero strings, there is no first unequal bit.
Irreflexivity verifies that the paper's binary comparison is strict.
Two entries compared strictly in ◁ are different.
Zero cannot precede any integer, as asserted just before the discussion of the literature in the paper.
Zero is the greatest element of ◁ (used in Lemma 2's base case).
The elementary 3AP-freeness proof preceding equation (1). If the low bits agree we divide all entries by two; otherwise the middle low bit differs from both endpoint low bits, and two consecutive comparisons are impossible. The equations include increasing and decreasing progressions alike.
Equation (1), labelled eq:pairs in the paper, in equation form.
For four consecutive AP terms, the first and third adjacent pairs compare
in the same direction. The proof removes common low bits until parity differs.
In particular the binary order itself is 4AP-free; this starts the construction with the empty safe prefix.
A strict binary comparison exhibits the first unequal bit, with the
first integer's bit equal to one and the second integer's bit equal to zero.
This is the forward direction of the paper's defining description of ◁.
Conversely, the least significant unequal bit determines the recursive comparison. This is the backward direction of the paper's definition.
The definition of ◁ in the paper, stated literally using binary digits.
There is a first differing digit, and its values are respectively 1 and 0.
Thus our executable recursion is exactly the order described in the text.