Exact Interval Images for Rounded Targets #
Structured theorem statements for exact interval images of rounded floating-point targets,
specialized to ExecFloat.Binary 8 23.
This file defines correctly-rounded activation assumptions, separating-activation assumptions, finite σ-networks, exact interval semantics, and the pipeline theorem:
correctly rounded activation + separating construction + exact semantics construction
implies exact interval images for every finite rounded target on [-1,1]^d.
Separating activation condition, specialized to ExecFloat.Binary 8 23 #
Source: Hwang et al. (arXiv:2506.16065), Condition 1 and its correctly-rounded sufficient
conditions.
Float-format constants for IEEE binary32 #
Mantissa bitwidth M for IEEE binary32 (excluding the hidden leading bit).
Instances For
Minimum normal exponent emin for IEEE binary32.
Instances For
Maximum normal exponent emax for IEEE binary32.
Instances For
Machine epsilon 2⁻²³, the spacing of binary32 just above 1. The unit roundoff for
round-to-nearest is half of this.
Instances For
Smallest positive subnormal 2⁻¹⁴⁹, as a real number.
Instances For
Real power of two, abbreviated because the error bounds below are dense with them.
Instances For
Basic helpers #
Propositional form of finiteness, so hypotheses read finite x rather than _ = true.
Instances For
Real absolute value of a float, used in the magnitude side conditions.
Instances For
x lies between a and b, in either order.
Order-agnostic on purpose: the interval endpoints coming out of the abstract operations are not
sorted, and minimum/maximum also give the IEEE 754 treatment of signed zeros for free.
Instances For
Separating activation condition #
Two finite inputs at which σ separates: one pinned to zero, one to a nonzero value.
This is the executable form of the separating condition; CorrectlyRounded plus real hypotheses is
how the theorems below actually produce one.
- c1 : FloatLib.Floats.ExecFloat.Binary 8 23 FloatLib.Floats.Formats.BinaryInterchange.FloatFormat.Encoding.ieee (FloatLib.Floats.Formats.BinaryInterchange.FloatFormat.Encoding.ieee.defaultBias 8) finite._proof_1 finite._proof_2 finite._proof_3 finite._proof_4
First finite input witnessing the zero anchor in the separating condition.
- c2 : FloatLib.Floats.ExecFloat.Binary 8 23 FloatLib.Floats.Formats.BinaryInterchange.FloatFormat.Encoding.ieee (FloatLib.Floats.Formats.BinaryInterchange.FloatFormat.Encoding.ieee.defaultBias 8) finite._proof_1 finite._proof_2 finite._proof_3 finite._proof_4
Second finite input used to create a nonzero separated activation value.
The first witness input is finite.
The second witness input is finite.
The activation sends the first witness to zero.
The activation value at the second witness is finite.
The second activation value has the magnitude required by the binary32 separation bound.
At least one witness input is not too close to underflow.
- sigma_between_on_Icc (x : FloatLib.Floats.ExecFloat.Binary 8 23 FloatLib.Floats.Formats.BinaryInterchange.FloatFormat.Encoding.ieee (FloatLib.Floats.Formats.BinaryInterchange.FloatFormat.Encoding.ieee.defaultBias 8) finite._proof_1 finite._proof_2 finite._proof_3 finite._proof_4) : self.c1 ≤ x → x ≤ self.c2 → between (σ self.c1) (σ self.c2) (σ x)
- η : FloatLib.Floats.ExecFloat.Binary 8 23 FloatLib.Floats.Formats.BinaryInterchange.FloatFormat.Encoding.ieee (FloatLib.Floats.Formats.BinaryInterchange.FloatFormat.Encoding.ieee.defaultBias 8) finite._proof_1 finite._proof_2 finite._proof_3 finite._proof_4
Threshold witness for the local binary32 separation step.
The threshold witness is finite.
The threshold witness lies in the binary32 magnitude window required by the theorem.
The activation value at the threshold is finite.
- sigma_etaPlus_finite : finite (σ (FloatLib.Floats.ExecFloat.Binary.nextUp self.η))
The activation value at the next float above the threshold is finite.
The threshold activation magnitude is bounded in the required binary32 window.
- sigma_etaPlus_abs_mem : rabs (σ (FloatLib.Floats.ExecFloat.Binary.nextUp self.η)) ∈ Set.Icc (pow2 (emin + 5)) (pow2 (emax - 6) * rabs self.η)
The next-up activation magnitude is bounded in the required binary32 window.
- threshold_separates (x y : FloatLib.Floats.ExecFloat.Binary 8 23 FloatLib.Floats.Formats.BinaryInterchange.FloatFormat.Encoding.ieee (FloatLib.Floats.Formats.BinaryInterchange.FloatFormat.Encoding.ieee.defaultBias 8) finite._proof_1 finite._proof_2 finite._proof_3 finite._proof_4) : x ≤ self.η → self.η < FloatLib.Floats.ExecFloat.Binary.nextUp self.η → FloatLib.Floats.ExecFloat.Binary.nextUp self.η ≤ y → σ x ≤ σ self.η ∧ σ self.η < σ (FloatLib.Floats.ExecFloat.Binary.nextUp self.η) ∧ σ (FloatLib.Floats.ExecFloat.Binary.nextUp self.η) ≤ σ y ∨ σ x ≥ σ self.η ∧ σ self.η > σ (FloatLib.Floats.ExecFloat.Binary.nextUp self.η) ∧ σ (FloatLib.Floats.ExecFloat.Binary.nextUp self.η) ≥ σ y
The activation separates values below and above the threshold interval.
- lam : ℝ
Real Lipschitz envelope around the threshold.
The envelope constant is in the paper's binary32-safe range.
- lipschitz_around_threshold (x y : FloatLib.Floats.ExecFloat.Binary 8 23 FloatLib.Floats.Formats.BinaryInterchange.FloatFormat.Encoding.ieee (FloatLib.Floats.Formats.BinaryInterchange.FloatFormat.Encoding.ieee.defaultBias 8) finite._proof_1 finite._proof_2 finite._proof_3 finite._proof_4) : x ≤ self.η → self.η < FloatLib.Floats.ExecFloat.Binary.nextUp self.η → FloatLib.Floats.ExecFloat.Binary.nextUp self.η ≤ y → |(FloatLib.Floats.ExecFloat.Binary.toModel (σ x)).toReal - (FloatLib.Floats.ExecFloat.Binary.toModel (σ self.η)).toReal| ≤ self.lam * |(FloatLib.Floats.ExecFloat.Binary.toModel x).toReal - (FloatLib.Floats.ExecFloat.Binary.toModel self.η).toReal| ∧ |(FloatLib.Floats.ExecFloat.Binary.toModel (σ y)).toReal - (FloatLib.Floats.ExecFloat.Binary.toModel (σ (FloatLib.Floats.ExecFloat.Binary.nextUp self.η))).toReal| ≤ self.lam * |(FloatLib.Floats.ExecFloat.Binary.toModel y).toReal - (FloatLib.Floats.ExecFloat.Binary.toModel (FloatLib.Floats.ExecFloat.Binary.nextUp self.η)).toReal|
Activation values obey the Lipschitz envelope on both sides of the threshold gap.
Instances For
Separating activation condition for σ, packaged as existence of a Witness.
Instances For
Correctly-rounded activations and real sufficient conditions #
σ is the correctly-rounded binary32 implementation of the real function ρ.
- finite_input_implies (x : FloatLib.Floats.ExecFloat.Binary 8 23 FloatLib.Floats.Formats.BinaryInterchange.FloatFormat.Encoding.ieee (FloatLib.Floats.Formats.BinaryInterchange.FloatFormat.Encoding.ieee.defaultBias 8) finite._proof_1 finite._proof_2 finite._proof_3 finite._proof_4) : finite x → finite (σ x) ∧ (FloatLib.Floats.ExecFloat.Binary.toModel (σ x)).toReal = TorchLean.Floats.IEEE754.IEEE32Exec.fp32Round (ρ (FloatLib.Floats.ExecFloat.Binary.toModel x).toReal)
Finite executable inputs evaluate to finite executable outputs with the declared rounding law.
Instances For
Real-valued sufficient conditions used to prove that a correctly-rounded activation satisfies the separating activation condition.
This is a “real” analogue of Witness that talks about a target function ρ : ℝ → ℝ.
- c1' : FloatLib.Floats.ExecFloat.Binary 8 23 FloatLib.Floats.Formats.BinaryInterchange.FloatFormat.Encoding.ieee (FloatLib.Floats.Formats.BinaryInterchange.FloatFormat.Encoding.ieee.defaultBias 8) finite._proof_1 finite._proof_2 finite._proof_3 finite._proof_4
First binary32 input used by the real sufficient conditions.
- c2' : FloatLib.Floats.ExecFloat.Binary 8 23 FloatLib.Floats.Formats.BinaryInterchange.FloatFormat.Encoding.ieee (FloatLib.Floats.Formats.BinaryInterchange.FloatFormat.Encoding.ieee.defaultBias 8) finite._proof_1 finite._proof_2 finite._proof_3 finite._proof_4
Second binary32 input used by the real sufficient conditions.
The first input is finite.
The second input is finite.
The real activation is close to zero at the first witness.
- rho_c2'_range : |ρ (FloatLib.Floats.ExecFloat.Binary.toModel self.c2').toReal| ∈ Set.Icc (ε / 2 + 2 * ε ^ 2) (5 / 4 - 2 * ε)
The real activation has the required magnitude at the second witness.
At least one real witness input has magnitude safely above underflow.
- rho_between_on_Icc (x : ℝ) : (FloatLib.Floats.ExecFloat.Binary.toModel self.c1').toReal ≤ x → x ≤ (FloatLib.Floats.ExecFloat.Binary.toModel self.c2').toReal → min (ρ (FloatLib.Floats.ExecFloat.Binary.toModel self.c1').toReal) (ρ (FloatLib.Floats.ExecFloat.Binary.toModel self.c2').toReal) ≤ ρ x ∧ ρ x ≤ max (ρ (FloatLib.Floats.ExecFloat.Binary.toModel self.c1').toReal) (ρ (FloatLib.Floats.ExecFloat.Binary.toModel self.c2').toReal)
On the witness interval,
ρstays between its endpoint values. - δ : ℝ
Real-valued threshold location used by the sufficient conditions.
The threshold lies in the specified central window.
- rho_threshold_properties : (∀ (x y : ℝ), x ≤ self.δ - 1 / 8 → self.δ + 1 / 8 ≤ y → ρ x ≤ ρ (self.δ - 1 / 8) ∧ ρ (self.δ - 1 / 8) < ρ (self.δ + 1 / 8) ∧ ρ (self.δ + 1 / 8) ≤ ρ y ∨ ρ x ≥ ρ (self.δ - 1 / 8) ∧ ρ (self.δ - 1 / 8) > ρ (self.δ + 1 / 8) ∧ ρ (self.δ + 1 / 8) ≥ ρ y) ∧ ∀ (x y : ℝ), x ∈ Set.Icc (self.δ - 1 / 8) (self.δ + 1 / 8) → y ∈ Set.Icc (self.δ - 1 / 8) (self.δ + 1 / 8) → |ρ x| ∈ Set.Icc (1 / 4) 1 ∧ |ρ x - ρ y| > 1 / 8 * |x - y|
Threshold separation and local growth conditions for the real activation.
- lam : ℝ
Lipschitz constant for the real activation.
The Lipschitz constant is in the binary32-safe range required by the theorem.
Global Lipschitz bound for the real activation.
Instances For
Existence of a RealWitness for ρ.
Instances For
Correct-rounding bridge: a real activation satisfying the sufficient conditions induces a rounded floating-point activation satisfying the separating activation condition.
Instances For
Finite σ-network model #
Parameters of an affine layer din → dout over ExecFloat.Binary 8 23 scalars.
Weight matrix, indexed row (output) then column (input).
Bias vector, one entry per output.
Instances For
A feedforward σ-network: affine layers with σ between them, no σ after the final affine.
- last {din dout : ℕ} (A : Affine din dout) : Net din dout
- step {din mid dout : ℕ} (A : Affine din mid) (n : Net mid dout) : Net din dout
Instances For
Interval semantics using OpsExact #
Interval semantics of the activation: the hull of its exact image on the interval.
Taking the image over the finite set of representable points in J is what makes this the exact
direct image rather than a relaxation, and it is only affordable because J is a float interval.
Instances For
Interval semantics for a network: apply affSharp and then push the activation through
sigmaSharp.
Instances For
Bounded interval domains and direct-image hulls #
Every point of J lies in [a, b].
Instances For
The canonical cube domain [-1,1]^d.
Instances For
Indicator functions and separability #
Strict-threshold indicator ι_{>a} on F.
Instances For
Non-strict threshold indicator ι_{≥a} on F.
Instances For
Strict-threshold indicator ι_{<a} on F.
Instances For
Non-strict threshold indicator ι_{≤a} on F.
Instances For
We model “there exists a σ-network implementing a scaled threshold-indicator exactly under interval
semantics on I[a,b]” using our SigmaNet.Net interval interpreter evalSharpScalar.
The intervals contained in [a, b], the domain the separability statements quantify over.
Instances For
Separability of σ on I[a,b] with threshold η and scale K.
Informally, this asserts existence of σ-networks whose interval semantics coincides with the
ideal abstraction of scaled threshold indicators (ι_{≤z}, ι_{≥z}, and ι_{>η}).
Instances For
Finite min/max witnesses for ideal hulls #
chooseMin is below every element of the finset (under the no-NaN side condition).
chooseMax is above every element of the finset (under the no-NaN side condition).
Existence of min/max witnesses for idealSharp on a nonempty box domain.
This packages the interval hull characterization of idealSharp as an Icc m M.
Exact interval images from separating threshold networks #
Separability and exact-semantics premises #
Separating activation condition specialized to ExecFloat.Binary 8 23.
Instances For
Premise: the separating activation condition yields exact threshold-indicator networks on
[-1,1].
Premise: separability yields a σ-network whose interval semantics equals the direct-image hull.
Instances For
For any NaN-free rounded target h, there exists a σ-network with exact interval semantics.
Instances For
Separating activations and threshold-network composition imply exact interval semantics.
Exact interval-image theorem for rounded targets: for every NaN-free rounded target fHat, there is
a σ-network whose interval semantics is exactly the min/max hull of fHat '' γ(B) on every cube
box.
Instances For
Derive exact interval images from exact interval semantics by choosing finite min/max witnesses.
Correct rounding to exact interval images #
Pipeline theorem: correctly-rounded real activations plus separating-threshold constructions imply exact interval images for rounded targets.