A linearly dependent pair of opposite slopes: and the middle hyperplane settles one of them
ProvedMegiddoLP.FixedDim.dependent_pairLet , let have nonnegative slope and nonpositive slope, and suppose the two are linearly dependent: for a real . Then:
- ;
- let be the hyperplane midway between them,
There is a rule , depending only on the data, that maps the oracle's answer for to one of , and a position, such that for every the position is the true position of relative to that hyperplane.
Part 1 holds because a dependent pair has a common slope, which must be both nonnegative and nonpositive, hence . Part 2 shows that in the dependent case a single hyperplane with zero -coefficient replaces the pair , . So the recursion into dimension also covers this case.
Formalization Note The dimension is in Lean and is index 0. is written lam.
import Mathlib import Definitions.Def_MegiddoLP_FixedDim_Pairing
/-!
Megiddo, J. ACM 31 (1984), §3.2 p. 120 (Figure 2): a linearly dependent pair of hyperplanes of
opposite slopes has zero `x₁`-coefficients, and the hyperplane midway between them settles
the position of `x*` relative to one of the two. The paper's `x₁, x₂` are the indices `0, 1`
of `Fin (d + 2)`.
-/
namespace MegiddoLP.FixedDim
/-- **The linearly dependent pair.** Let `Hᵢ = {aᵢ ⬝ᵥ x = bᵢ}` have nonnegative slope and
`H_k = {a_k ⬝ᵥ x = b_k}` nonpositive slope, with `aᵢ = λ a_k` for a real `λ ≠ 0`. Then
`a_i1 = a_k1 = 0`, and there is a rule `F`, depending only on the data, mapping the oracle's
answer for the middle hyperplane `H⁽¹⁾_ik = {aᵢ ⬝ᵥ x = (bᵢ + λ b_k)/2}` to a choice of `Hᵢ`
(`true`) or `H_k` (`false`) and the correct position of `x` relative to it, for every `x`. -/
theorem dependent_pair {d : ℕ} (ai ak : Fin (d + 2) → ℝ) (bi bk lam : ℝ)
(hlam : lam ≠ 0) (hdep : ai = lam • ak)
(hi : HasNonnegSlope ai) (hk : HasNonposSlope ak) :
(ai 0 = 0 ∧ ak 0 = 0) ∧
∃ F : Ordering → Bool × Ordering, ∀ x : Fin (d + 2) → ℝ,
let r := F (compare (ai ⬝ᵥ x) ((bi + lam * bk) / 2))
(r.1 = true → compare (ai ⬝ᵥ x) bi = r.2) ∧
(r.1 = false → compare (ak ⬝ᵥ x) bk = r.2) := by sorry
end MegiddoLP.FixedDim
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Let , let , and let . Write for the first two coordinates of a vector.
Hypotheses.
- .
- coordinatewise.
- has nonnegative slope: , or .
- has nonpositive slope: and .
Claim, part 1. and .
Claim, part 2. There exists a function from to pairs , where is true or false and . It is chosen depending only on the data. For every , let be the relation of to
and put . Then:
- if is true, stands in relation to ;
- if is false, stands in relation to .
The single query used is the hyperplane with normal and right-hand side .
Degenerate cases.
- The hypotheses are satisfiable, for example with and .
- They force , and hence . So no division by zero enters the slope conditions.
- The division by is ordinary real division.
- . Everything is in .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.