Documentation

LeanCert.Engine.IntervalVector

Interval Vector Arithmetic #

This file provides vector and matrix operations for Dyadic intervals, enabling verified linear algebra computations.

Main definitions #

Main theorems #

@[reducible, inline]

A vector of intervals representing bounded real vectors

Equations
Instances For

    Scalar Operations #

    Multiply an interval by a rational scalar. Uses the existing interval multiplication by converting the scalar to a singleton.

    Equations
    Instances For
      theorem LeanCert.Engine.IntervalVector.mem_scalarMulInterval {w : } {x : } {I : Core.IntervalDyadic} (hx : x I) (prec : ) (hprec : prec 0 := by norm_num) :
      w * x scalarMulInterval w I prec

      Soundness of scalar-interval multiplication

      Dot Product #

      theorem LeanCert.Engine.IntervalVector.mem_dotProduct_aux (weights : List ) (xs : List ) (Is : IntervalVector) (hlen : weights.length = List.length Is) (hxlen : xs.length = List.length Is) (hmem : ∀ (i : ) (hi : i < List.length Is), xs[i] Is[i]) (prec : ) (hprec : prec 0) :
      realDotProduct weights xs dotProduct weights Is prec

      Soundness of dot product for matching-length lists

      theorem LeanCert.Engine.IntervalVector.mem_dotProduct {weights : List } {xs : List } {Is : IntervalVector} (hlen : weights.length = List.length Is) (hxlen : xs.length = List.length Is) (hmem : ∀ (i : ) (hi : i < List.length Is), xs[i] Is[i]) (prec : ) (hprec : prec 0 := by norm_num) :
      realDotProduct weights xs dotProduct weights Is prec

      Soundness of dot product: if each x_i ∈ I_i, then ∑ w_i * x_i ∈ dotProduct

      Vector Addition #

      Pointwise addition of two interval vectors

      Equations
      Instances For
        theorem LeanCert.Engine.IntervalVector.mem_add_component {x y : } {I J : Core.IntervalDyadic} (hx : x I) (hy : y J) :
        x + y I.add J

        Soundness of vector addition (component-wise)

        Membership in zero interval

        Matrix-Vector Operations #

        Matrix-vector multiplication: W · x where W is a matrix of rational weights and x is an interval vector. Each row of W is dotted with x.

        Equations
        Instances For
          theorem LeanCert.Engine.IntervalVector.mem_matVecMul {W : List (List )} {xs : List } {Is : IntervalVector} (hWcols : rowW, row.length = List.length Is) (hxlen : xs.length = List.length Is) (hmem : ∀ (i : ) (hi : i < List.length Is), xs[i] Is[i]) (prec : ) (hprec : prec 0 := by norm_num) (i : ) (hi : i < W.length) :
          (realMatVecMul W xs)[i] (matVecMul W Is prec)[i]

          Soundness of matrix-vector multiplication

          Add a rational bias vector to an interval vector

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            Real vector plus bias

            Equations
            Instances For
              theorem LeanCert.Engine.IntervalVector.mem_addBias {xs : List } {Is : IntervalVector} {bias : List } (hlen : xs.length = List.length Is) (hblen : bias.length = List.length Is) (hmem : ∀ (i : ) (hi : i < List.length Is), xs[i] Is[i]) (prec : ) (hprec : prec 0 := by norm_num) (i : ) (hi : i < List.length Is) :
              (realAddBias xs bias)[i] (Is.addBias bias prec)[i]

              Soundness of bias addition