TorchLean API

NN.MLTheory.CROWN.Lyapunov.Verification

Lyapunov certificate checking via CROWN bounds #

This module provides a small certificate-checking interface for Lyapunov stability arguments.

Design:

The bottom portion specializes to so that strict inequalities like V_lo > 0 ⟹ V(x) > 0 can be discharged by simple order transitivity (0 < V_lo and V_lo ≤ V(x)).

theorem NN.MLTheory.CROWN.Lyapunov.v_bounded_below {α : Type} [Context α] {n : } (lyap : NeuralLyapunov α n) (cert : LyapunovCert α n) (w : CrownOracleWitness lyap cert) (x : Spec.Tensor α (Spec.Shape.dim n Spec.Shape.scalar)) (hx : cert.region.contains x) :
lyap.V x cert.V_lo

V is bounded below on the certified region.

theorem NN.MLTheory.CROWN.Lyapunov.v_bounded_above {α : Type} [Context α] {n : } (lyap : NeuralLyapunov α n) (cert : LyapunovCert α n) (w : CrownOracleWitness lyap cert) (x : Spec.Tensor α (Spec.Shape.dim n Spec.Shape.scalar)) (hx : cert.region.contains x) :
lyap.V x cert.V_hi

V is bounded above on the certified region.

theorem NN.MLTheory.CROWN.Lyapunov.vdot_bounded_below {α : Type} [Context α] {n : } (lyap : NeuralLyapunov α n) (cert : LyapunovCert α n) (w : CrownOracleWitness lyap cert) (x : Spec.Tensor α (Spec.Shape.dim n Spec.Shape.scalar)) (hx : cert.region.contains x) :
lyap.Vdot x cert.Vdot_lo

is bounded below on the certified region.

theorem NN.MLTheory.CROWN.Lyapunov.vdot_bounded_above {α : Type} [Context α] {n : } (lyap : NeuralLyapunov α n) (cert : LyapunovCert α n) (w : CrownOracleWitness lyap cert) (x : Spec.Tensor α (Spec.Shape.dim n Spec.Shape.scalar)) (hx : cert.region.contains x) :
lyap.Vdot x cert.Vdot_hi

is bounded above on the certified region.

theorem NN.MLTheory.CROWN.Lyapunov.V_bounded_below {α : Type} [Context α] {n : } (lyap : NeuralLyapunov α n) (cert : LyapunovCert α n) (w : CrownOracleWitness lyap cert) (x : Spec.Tensor α (Spec.Shape.dim n Spec.Shape.scalar)) (hx : cert.region.contains x) :
lyap.V x cert.V_lo
theorem NN.MLTheory.CROWN.Lyapunov.V_bounded_above {α : Type} [Context α] {n : } (lyap : NeuralLyapunov α n) (cert : LyapunovCert α n) (w : CrownOracleWitness lyap cert) (x : Spec.Tensor α (Spec.Shape.dim n Spec.Shape.scalar)) (hx : cert.region.contains x) :
lyap.V x cert.V_hi
theorem NN.MLTheory.CROWN.Lyapunov.Vdot_bounded_below {α : Type} [Context α] {n : } (lyap : NeuralLyapunov α n) (cert : LyapunovCert α n) (w : CrownOracleWitness lyap cert) (x : Spec.Tensor α (Spec.Shape.dim n Spec.Shape.scalar)) (hx : cert.region.contains x) :
lyap.Vdot x cert.Vdot_lo
theorem NN.MLTheory.CROWN.Lyapunov.Vdot_bounded_above {α : Type} [Context α] {n : } (lyap : NeuralLyapunov α n) (cert : LyapunovCert α n) (w : CrownOracleWitness lyap cert) (x : Spec.Tensor α (Spec.Shape.dim n Spec.Shape.scalar)) (hx : cert.region.contains x) :
lyap.Vdot x cert.Vdot_hi
theorem NN.MLTheory.CROWN.Lyapunov.quantitative_bounds {α : Type} [Context α] {n : } (lyap : NeuralLyapunov α n) (cert : LyapunovCert α n) (w : CrownOracleWitness lyap cert) :
(∀ (x : Spec.Tensor α (Spec.Shape.dim n Spec.Shape.scalar)), cert.region.contains xcert.V_lo lyap.V x lyap.V x cert.V_hi) ∀ (x : Spec.Tensor α (Spec.Shape.dim n Spec.Shape.scalar)), cert.region.contains xcert.Vdot_lo lyap.Vdot x lyap.Vdot x cert.Vdot_hi

Quantitative bounds on V and Vdot over the certified region.

Specialization to ℝ #

For proofs involving transitivity (V_lo > 0 implies V > 0), we specialize to ℝ which has the full Preorder/LinearOrder structure.

structure RealCert (n : ) :

Concrete real-valued certificate format for JSON/importer-facing workflows.

  • V_lo :

    Lower bound for the Lyapunov candidate V.

  • V_hi :

    Upper bound for the Lyapunov candidate V.

  • Vdot_lo :

    Lower bound for the orbital derivative Vdot.

  • Vdot_hi :

    Upper bound for the orbital derivative Vdot.

  • region_lo : Fin n

    Lower endpoint of the certified input region, componentwise.

  • region_hi : Fin n

    Upper endpoint of the certified input region, componentwise.

Instances For
    noncomputable def mkCert {n : } (rc : RealCert n) :

    Convert the importer-friendly RealCert record into the canonical LyapunovCert.

    Instances For
      theorem NN.MLTheory.CROWN.Lyapunov.Real.v_positive {n : } (lyap : NeuralLyapunov n) (cert : LyapunovCert n) (w : CrownOracleWitness lyap cert) (h_pos : cert.V_lo > 0) (x : Spec.Tensor (Spec.Shape.dim n Spec.Shape.scalar)) (hx : cert.region.contains x) :
      lyap.V x > 0

      For : V is positive when V_lo > 0.

      theorem NN.MLTheory.CROWN.Lyapunov.Real.vdot_negative {n : } (lyap : NeuralLyapunov n) (cert : LyapunovCert n) (w : CrownOracleWitness lyap cert) (h_neg : cert.Vdot_hi < 0) (x : Spec.Tensor (Spec.Shape.dim n Spec.Shape.scalar)) (hx : cert.region.contains x) :
      lyap.Vdot x < 0

      For : is negative when Vdot_hi < 0.

      theorem NN.MLTheory.CROWN.Lyapunov.Real.V_positive {n : } (lyap : NeuralLyapunov n) (cert : LyapunovCert n) (w : CrownOracleWitness lyap cert) (h_pos : cert.V_lo > 0) (x : Spec.Tensor (Spec.Shape.dim n Spec.Shape.scalar)) (hx : cert.region.contains x) :
      lyap.V x > 0
      theorem NN.MLTheory.CROWN.Lyapunov.Real.Vdot_negative {n : } (lyap : NeuralLyapunov n) (cert : LyapunovCert n) (w : CrownOracleWitness lyap cert) (h_neg : cert.Vdot_hi < 0) (x : Spec.Tensor (Spec.Shape.dim n Spec.Shape.scalar)) (hx : cert.region.contains x) :
      lyap.Vdot x < 0
      theorem NN.MLTheory.CROWN.Lyapunov.Real.lyapunov_conditions {n : } (lyap : NeuralLyapunov n) (cert : LyapunovCert n) (w : CrownOracleWitness lyap cert) (h_V_pos : cert.V_lo > 0) (h_Vdot_neg : cert.Vdot_hi < 0) :
      (∀ (x : Spec.Tensor (Spec.Shape.dim n Spec.Shape.scalar)), cert.region.contains xlyap.V x > 0) ∀ (x : Spec.Tensor (Spec.Shape.dim n Spec.Shape.scalar)), cert.region.contains xlyap.Vdot x < 0

      For ℝ: Main Lyapunov conditions