Binary height bounds for rational arithmetic
DefinitionInfoLossLAR_Native_AFT_RationalHeightinfo-loss-lar-native-5c3becbrational-arithmeticstoc-2027
For a rational number and an integer , means that the absolute numerator and positive denominator of in reduced form are both at most . This predicate tracks operand sizes in the constructive Gaussian affine sampler.
Definition code
import Mathlib /-! # Explicit binary height bounds for executable rational arithmetic -/ namespace AFT.RationalNumerics open scoped BigOperators /-- The reduced numerator and denominator each fit below a binary power. -/ def HeightBound (value : ℚ) (bits : ℕ) : Prop := value.num.natAbs ≤ 2^bits ∧ value.den ≤ 2^bits namespace HeightBound end HeightBound end AFT.RationalNumerics
Source
Local manuscript repository commit 5c3becb254daaa8738368b474349766c1769c2a0; lean/AFT/RationalHeight.lean, lines 7–9; Lean 4.33.1 migration snapshot b36d23aa37fbb4858aa450c39ac4667286ed70f7f49a16d03f77dbe27782e103