NLA-lib Explorer

NLAlib.Sign.LoopState.test_eq

Library · theorem

The actual equality query on the stored failure flag returns the negated matrix stopping test. Distinct zero/one decodings suffice; no successful-execution premise is introduced.

NLAlib.Sign.LoopState.test_eq {K Su Sg Op Tst : Type} [Ops.Has Ops.CmpTst Tst]
  {M : FloatMachine K Su Sg} {n : ℕ} {x w t : ℕ × ℕ} {η : K} {A : Matrix (Fin n) (Fin n) (K × K)}
  {s : Ops.Store K} (h : Sign.LoopState M x w t η A s) {dec : K → ℝ} {I : Ops.Interp Op Tst K}
  (hC : Ops.IsCmp dec I) (h01 : dec M.zero ≠ dec M.one) (pos : ℕ) :
  I.test (Ops.Has.inj Ops.CmpTst.eq) [] [(t.1, t.2 + 1), (t.1, t.2 + 3)]
      { store := s, pos := pos } =
    some !newtonSchulzTest M η A

Full source on GitHub

Import NLAlib.Eigensolvers.Sign.State.