mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-07-31 03:05:21 +00:00
25 lines
508 B
Text
25 lines
508 B
Text
/-
|
|
CanonicalInterval.lean - Fixed-Point Canonical Interval Arithmetic
|
|
-/
|
|
|
|
import Semantics.FixedPoint
|
|
|
|
set_option linter.dupNamespace false
|
|
|
|
namespace Semantics.CanonicalInterval
|
|
|
|
open Semantics.Q16_16
|
|
|
|
abbrev Scalar := Q16_16
|
|
|
|
structure CanonicalInterval where
|
|
width : Scalar
|
|
a : Scalar
|
|
b : Scalar
|
|
k : UInt32
|
|
deriving Repr, DecidableEq
|
|
|
|
def canonicalIntervalInvariant (interval : CanonicalInterval) : Prop :=
|
|
interval.width.val = (interval.a + interval.b).val
|
|
|
|
end Semantics.CanonicalInterval
|