TorchLean API

FloatLib.Floats.ExecFloat.Backends.Generic.Sqrt.Proof

Correctness of compact finite square root #

The executable descriptor-aware square-root kernels live in Sqrt.Runtime. This module proves their agreement with the exact dyadic and unpacked-model specifications and installs the verified compiler substitution.

For a conventional IEEE descriptor, exact-dyadic square root agrees with the established unpacked model applied to the original encoded value.

Compact positive square root preserves the exact-dyadic specification.

The scalar-field square-root entry point preserves sqrtPositive?.

On its positive finite contract, the optional scalar decoder returns the direct runtime result.

theorem FloatLib.Floats.Formats.BinaryInterchange.Model.FiniteSqrt.sqrtPositiveRuntime_eq_finiteDyadic {fmt : FloatFormat} (x : Model fmt) (hfinite : x.isFinite = true) (hnonzero : x.isZero = false) (hpositive : x.signBit = false) :
sqrtPositiveRuntime x hfinite hnonzero hpositive = have value := x.finiteDyadic hfinite; sqrtPositiveDyadic fmt value.significand value.exponent

The proof-guided runtime entry point computes square root from the exact dyadic represented by its finite input.