Documentation

LeanForControl.Systems.Continuous

Systems.Continuous — the general continuous-time system #

The most general continuous-time system the library considers,

with state space E, input space U and output space Y. The linear systems of LinearSystems.Continuous are special cases. Its discrete-time counterpart is DiscreteSystem in Systems.Discrete, which carries the same API under the same names.

Special cases #

Each special case is a constructor building the general object from the special data, together with a predicate recognising it inside a general system and a lemma relating the two:

The two combine: timeInvariant applied to input-free data gives ẋ = f(x).

"Autonomous" here means without input, the control-theory convention. Much of the dynamical-systems literature, including Khalil, uses it for time-invariant instead.

Trajectories #

A trajectory is a solution in the sense of Carathéodory. IsTrajectoryOn s u x I says that for every segment [a, b] ⊆ I, τ ↦ F(τ, x(τ), u(τ)) is integrable on it and x(b) - x(a) = ∫ₐᵇ F(τ, x(τ), u(τ)) dτ. It needs E complete but not x differentiable, so it admits the solutions produced by piecewise-constant, sampled-data, bang-bang and merely measurable inputs, which have corners where the input jumps. A trajectory is continuous on an interval and has derivative F(t, x(t), u(t)) almost everywhere.

The classical notion is Mathlib's IsIntegralCurveOn x (s.vectorField u) I. A classical solution along which the field is integrable on every segment of I is a trajectory (isTrajectoryOn_of_isIntegralCurveOn), and on an interval a trajectory along which the field is continuous is classical (IsTrajectoryOn.isIntegralCurveOn). On an interval the two notions therefore agree when the field is continuous along x (isTrajectoryOn_iff_isIntegralCurveOn), in particular when it is jointly continuous (isTrajectoryOn_iff_isIntegralCurveOn_of_continuous). On a segment, a trajectory is exactly an integral solution (isTrajectoryOn_Icc_iff_isIntegralSolution), so the integral-form tools of Analysis.IntegralCurves and ODEs.ODE_properties (re-anchoring, time reflection, Grönwall) apply to trajectories with no continuity assumption. Neither notion handles discontinuity in the state, such as discontinuous feedback, which needs Filippov solutions.

A trajectory is absolutely continuous on the segments of its set (IsTrajectoryOn.absolutelyContinuousOnInterval), and a function V(t, x) has derivative s.lieDerivative V t (x t) (u t) along it at almost every time at which V is differentiable (IsTrajectoryOn.ae_hasDerivAt_lieDerivative). The Lyapunov arguments built on this, for V locally Lipschitz near the graph of the trajectory — integrated bound, monotonicity, level bound, exponential decay — are IsTrajectoryOn.sub_le_integral_of_lieDerivative_le and its neighbours; IsTrajectoryOn.sub_le_integral_of_fderiv_le and IsTrajectoryOn.antitoneOn_of_fderiv_nonpos are the forms for a time-invariant V(x).

Why separate continuous- and discrete-time objects #

The same reasons as for ContinuousLTV and DiscreteLTV: the data is the same shape, but its reading is not. A continuous trajectory is an integral curve and needs a normed space; a discrete one is a recursion and needs nothing. A change of coordinates picks up a time-derivative term in continuous time and none in discrete time. Separate files also keep the analysis imports out of discrete-time developments, and leave room for further classes, such as hybrid systems, as files of their own.

Conventions #

structure ContinuousSystem (E : Type u_1) (U : Type u_2) (Y : Type u_3) :
Type (max (max u_1 u_2) u_3)

A continuous-time system: the data (F, h) of

ẋ(t) = F(t, x(t), u(t)), y(t) = h(t, x(t), u(t))

with states in E, inputs in U and outputs in Y. The structure is only the data.

  • F : ℝ → E → U → E

    State equation: ẋ = F(t, x, u).

  • h : ℝ → E → U → Y

    Output equation: y = h(t, x, u).

Instances For
    def ContinuousSystem.timeInvariant {E : Type u_1} {U : Type u_2} {Y : Type u_3} (f : E → U → E) (g : E → U → Y) :

    The time-invariant system ẋ = f(x, u), y = g(x, u).

    Equations
    Instances For
      @[simp]
      theorem ContinuousSystem.timeInvariant_F {E : Type u_1} {U : Type u_2} {Y : Type u_3} (f : E → U → E) (g : E → U → Y) (t : ℝ) :
      (timeInvariant f g).F t = f
      @[simp]
      theorem ContinuousSystem.timeInvariant_h {E : Type u_1} {U : Type u_2} {Y : Type u_3} (f : E → U → E) (g : E → U → Y) (t : ℝ) :
      (timeInvariant f g).h t = g
      def ContinuousSystem.IsTimeInvariant {E : Type u_1} {U : Type u_2} {Y : Type u_3} (s : ContinuousSystem E U Y) :

      The system is time-invariant: its equations take the same form at every time.

      Equations
      Instances For
        theorem ContinuousSystem.isTimeInvariant_timeInvariant {E : Type u_1} {U : Type u_2} {Y : Type u_3} (f : E → U → E) (g : E → U → Y) :

        A system built by timeInvariant is time-invariant.

        theorem ContinuousSystem.IsTimeInvariant.exists_eq {E : Type u_1} {U : Type u_2} {Y : Type u_3} {s : ContinuousSystem E U Y} (hs : s.IsTimeInvariant) :
        ∃ (f : E → U → E) (g : E → U → Y), s = timeInvariant f g

        A time-invariant system is built by timeInvariant.

        def ContinuousSystem.autonomous {E : Type u_1} {Y : Type u_3} (f : ℝ → E → E) (g : ℝ → E → Y) :

        The autonomous (input-free) system ẋ = f(t, x), y = g(t, x), with input space Unit.

        Equations
        Instances For
          @[simp]
          theorem ContinuousSystem.autonomous_F {E : Type u_1} {Y : Type u_3} (f : ℝ → E → E) (g : ℝ → E → Y) (t : ℝ) (x : E) (u : Unit) :
          (autonomous f g).F t x u = f t x
          @[simp]
          theorem ContinuousSystem.autonomous_h {E : Type u_1} {Y : Type u_3} (f : ℝ → E → E) (g : ℝ → E → Y) (t : ℝ) (x : E) (u : Unit) :
          (autonomous f g).h t x u = g t x
          def ContinuousSystem.IsAutonomous {E : Type u_1} {U : Type u_2} {Y : Type u_3} (s : ContinuousSystem E U Y) :

          The system is autonomous: its equations do not depend on the input.

          Equations
          Instances For
            theorem ContinuousSystem.isAutonomous_autonomous {E : Type u_1} {Y : Type u_3} (f : ℝ → E → E) (g : ℝ → E → Y) :

            A system built by autonomous is autonomous.

            theorem ContinuousSystem.IsAutonomous.exists_eq {E : Type u_1} {U : Type u_2} {Y : Type u_3} [Nonempty U] {s : ContinuousSystem E U Y} (hs : s.IsAutonomous) :
            ∃ (f : ℝ → E → E) (g : ℝ → E → Y), ∀ (t : ℝ) (x : E) (u : U), s.F t x u = f t x ∧ s.h t x u = g t x

            An autonomous system is input-free data in disguise: its equations are those of some f and g that do not take an input. It equals autonomous f g only up to the input space, which is U rather than Unit.

            Semantics #

            def ContinuousSystem.vectorField {E : Type u_1} {U : Type u_2} {Y : Type u_3} (s : ContinuousSystem E U Y) (u : ℝ → U) :
            ℝ → E → E

            The right-hand side of the state equation under the input signal u, (t, x) ↦ F(t, x, u(t)): a time-dependent vector field on the state space, the shape the ODE machinery consumes.

            Equations
            Instances For
              def ContinuousSystem.outputMap {E : Type u_1} {U : Type u_2} {Y : Type u_3} (s : ContinuousSystem E U Y) (u : ℝ → U) :
              ℝ → E → Y

              The output equation under the input signal u, (t, x) ↦ h(t, x, u(t)).

              Equations
              Instances For
                @[simp]
                theorem ContinuousSystem.vectorField_apply {E : Type u_1} {U : Type u_2} {Y : Type u_3} (s : ContinuousSystem E U Y) (u : ℝ → U) (t : ℝ) (x : E) :
                s.vectorField u t x = s.F t x (u t)
                @[simp]
                theorem ContinuousSystem.outputMap_apply {E : Type u_1} {U : Type u_2} {Y : Type u_3} (s : ContinuousSystem E U Y) (u : ℝ → U) (t : ℝ) (x : E) :
                s.outputMap u t x = s.h t x (u t)
                def ContinuousSystem.IsTrajectoryOn {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] (s : ContinuousSystem E U Y) (u : ℝ → U) (x : ℝ → E) (I : Set ℝ) :

                x is a trajectory of s under the input u on the set I: on every segment [a, b] ⊆ I, the map τ ↦ F(τ, x(τ), u(τ)) is integrable and x(b) - x(a) = ∫ₐᵇ F(τ, x(τ), u(τ)) dτ. This is the Carathéodory notion of solution.

                It does not ask x to be differentiable, so it admits the solutions produced by discontinuous inputs (piecewise-constant, sampled-data, bang-bang, or merely measurable and bounded), which have corners where the input jumps. A trajectory is continuous on an interval (IsTrajectoryOn.continuousOn) and has derivative F(t, x(t), u(t)) at almost every time (IsTrajectoryOn.ae_hasDerivAt). When τ ↦ F(τ, x(τ), u(τ)) is continuous it is exactly a classical solution, Mathlib's IsIntegralCurveOn (isTrajectoryOn_iff_isIntegralCurveOn).

                Stated on a set rather than on all of ℝ, because a map can satisfy the equation on an interval without being defined for all time. Only segments inside I are used, so the predicate depends only on x on I: on an interval it links every two of its times, and on a set with gaps it says that x is a trajectory on each piece separately, with no relation across a gap. The output is s.outputMap u t (x t); it is not part of this predicate, because the output equation constrains nothing about x.

                Integrability is part of the definition, and E is complete: without completeness the Bochner integral is 0 by convention, and the definition would silently say that x is constant.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  def ContinuousSystem.IsTrajectory {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] (s : ContinuousSystem E U Y) (u : ℝ → U) (x : ℝ → E) :

                  x is a trajectory of s under the input u for all time.

                  Equations
                  Instances For
                    theorem ContinuousSystem.isTrajectoryOn_univ {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} :
                    theorem ContinuousSystem.IsTrajectoryOn.mono {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {I J : Set ℝ} (h : s.IsTrajectoryOn u x I) (hJI : J ⊆ I) :

                    A trajectory on I is one on every subset of I.

                    theorem ContinuousSystem.IsTrajectory.isTrajectoryOn {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} (h : s.IsTrajectory u x) (I : Set ℝ) :
                    theorem ContinuousSystem.isTrajectoryOn_of_subsingleton {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {I : Set ℝ} (hI : I.Subsingleton) :

                    On a set with at most one point every map is a trajectory: the equation only relates a time to itself. In particular every map is a trajectory on [t, t].

                    theorem ContinuousSystem.isTrajectoryOn_Icc_iff_isIntegralSolution {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {t₀ t₁ : ℝ} (hle : t₀ ≤ t₁) :
                    s.IsTrajectoryOn u x (Set.Icc t₀ t₁) ↔ IsIntegralSolution t₀ t₁ x (x t₀) (s.vectorField u)

                    On a segment, a trajectory is an integral solution, anchored at its own initial value: the equation between any two times is the equation from the left end, re-anchored. No continuity is needed, so the integral-form tools of Analysis.IntegralCurves (re-anchoring, time reflection, continuous dependence) apply to trajectories directly.

                    theorem ContinuousSystem.IsTrajectoryOn.continuousOn {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {I : Set ℝ} (h : s.IsTrajectoryOn u x I) (hI : I.OrdConnected) :

                    A trajectory is continuous on an interval.

                    theorem ContinuousSystem.IsTrajectoryOn.ae_hasDerivAt {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {I : Set ℝ} (h : s.IsTrajectoryOn u x I) :
                    ∀ᵐ (t : ℝ), t ∈ interior I → HasDerivAt x (s.vectorField u t (x t)) t

                    A trajectory has derivative F(t, x(t), u(t)) at almost every time of the interior of its set. This is the sense in which a trajectory solves ẋ = F(t, x, u).

                    theorem ContinuousSystem.IsTrajectoryOn.absolutelyContinuousOnInterval {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {I : Set ℝ} {a b : ℝ} (h : s.IsTrajectoryOn u x I) (hI : Set.uIcc a b ⊆ I) :

                    Trajectories are absolutely continuous on every segment of the set on which they are trajectories.

                    theorem ContinuousSystem.IsTrajectoryOn.congr {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x y : ℝ → E} {I : Set ℝ} (h : s.IsTrajectoryOn u x I) (hxy : Set.EqOn x y I) :

                    Trajectories are determined by their values on I: a map agreeing on I with a trajectory on I is one.

                    theorem ContinuousSystem.IsTrajectoryOn.congr_vectorField {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {I : Set ℝ} {U' : Type u_4} {Y' : Type u_5} {s' : ContinuousSystem E U' Y'} {u' : ℝ → U'} (h : s.IsTrajectoryOn u x I) (hF : ∀ τ ∈ I, s.vectorField u τ (x τ) = s'.vectorField u' τ (x τ)) :
                    s'.IsTrajectoryOn u' x I

                    A trajectory only sees the field along itself: if the field of s' under u' agrees with the field of s under u along x on I, a trajectory of s under u on I is one of s' under u'. The two systems may have different input and output spaces.

                    theorem ContinuousSystem.IsTrajectoryOn.glue_Icc {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {a b c : ℝ} (h₁ : s.IsTrajectoryOn u x (Set.Icc a b)) (h₂ : s.IsTrajectoryOn u x (Set.Icc b c)) :

                    Gluing. Trajectories on [a, b] and on [b, c] make one on [a, c].

                    theorem ContinuousSystem.isTrajectoryOn_Ici_iff {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {t₀ : ℝ} :
                    s.IsTrajectoryOn u x (Set.Ici t₀) ↔ ∀ (t : ℝ), s.IsTrajectoryOn u x (Set.Icc t₀ t)

                    A trajectory on [t₀, ∞) is one on every segment [t₀, t], and conversely.

                    theorem ContinuousSystem.IsTrajectoryOn.comp_add {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {I : Set ℝ} (hs : ∀ (t t' : ℝ), s.F t = s.F t') (h : s.IsTrajectoryOn u x I) (d : ℝ) :
                    s.IsTrajectoryOn (fun (t : ℝ) => u (t + d)) (fun (t : ℝ) => x (t + d)) (-d +ᵥ I)

                    Time invariance. If the state equation does not depend on time, shifting a trajectory and its input in time gives a trajectory on the shifted set. This holds in particular for a time-invariant system (IsTimeInvariant), whose output equation is constrained as well.

                    theorem ContinuousSystem.IsTrajectoryOn.semiconj {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {I : Set ℝ} {E' : Type u_4} {U' : Type u_5} {Y' : Type u_6} [NormedAddCommGroup E'] [NormedSpace ℝ E'] [CompleteSpace E'] {s' : ContinuousSystem E' U' Y'} {u' : ℝ → U'} (e : E →L[ℝ] E') (c : E') (he : ∀ (t : ℝ) (x : E), s'.F t (c + e x) (u' t) = e (s.F t x (u t))) (h : s.IsTrajectoryOn u x I) :
                    s'.IsTrajectoryOn u' (fun (t : ℝ) => c + e (x t)) I

                    Change of coordinates. An affine map x ↦ c + e x, with e linear and continuous, that carries the field of s under u to the field of s' under u' carries the trajectories of s to trajectories of s'.

                    theorem ContinuousSystem.isTrajectoryOn_const {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {I : Set ℝ} {p : E} (h : ∀ (t : ℝ), s.vectorField u t p = 0) :
                    s.IsTrajectoryOn u (fun (x : ℝ) => p) I

                    An equilibrium is a constant trajectory: if F(t, p, u(t)) = 0 for all t, the constant map at p is a trajectory on every set.

                    theorem ContinuousSystem.IsTrajectoryOn.norm_sub_le {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {I : Set ℝ} (h : s.IsTrajectoryOn u x I) {a b B : ℝ} (hab : a ≤ b) (hJ : Set.Icc a b ⊆ I) (hB : ∀ τ ∈ Set.Icc a b, ‖s.vectorField u τ (x τ)‖ ≤ B) :
                    ‖x b - x a‖ ≤ B * (b - a)

                    Bounded speed: along a trajectory whose field is bounded by B on [a, b], the state moves at most B (b - a) between a and b.

                    Classical solutions #

                    theorem ContinuousSystem.isTrajectoryOn_of_isIntegralCurveOn {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {I : Set ℝ} (h : IsIntegralCurveOn x (s.vectorField u) I) (h_int : ∀ (a b : ℝ), a ≤ b → Set.Icc a b ⊆ I → IntervalIntegrable (fun (τ : ℝ) => s.vectorField u τ (x τ)) MeasureTheory.volume a b) :

                    Classical solutions are trajectories: an integral curve of (t, x) ↦ F(t, x, u(t)) along which the field is integrable is a trajectory. Integrability holds in particular when the field is continuous along x (isTrajectoryOn_iff_isIntegralCurveOn).

                    theorem ContinuousSystem.IsTrajectoryOn.isIntegralCurveOn {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {I : Set ℝ} (h : s.IsTrajectoryOn u x I) (hI : I.OrdConnected) (hg : ContinuousOn (fun (τ : ℝ) => s.vectorField u τ (x τ)) I) :

                    Trajectories with a continuous field are classical solutions: on an interval, if τ ↦ F(τ, x(τ), u(τ)) is continuous, a trajectory is differentiable within the interval with ẋ(t) = F(t, x(t), u(t)).

                    theorem ContinuousSystem.isTrajectoryOn_iff_isIntegralCurveOn {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {I : Set ℝ} (hI : I.OrdConnected) (hg : ContinuousOn (fun (τ : ℝ) => s.vectorField u τ (x τ)) I) :

                    On an interval, trajectories and classical solutions agree when τ ↦ F(τ, x(τ), u(τ)) is continuous there.

                    The interval may be closed, open, half-open, a ray, all of ℝ, or a single point. Order-connectedness is what the proof needs: the integral form only sees segments inside I, while the derivative form looks near each point, and on a set containing no segment, such as the rationals, the integral form says nothing and the derivative form does not.

                    For a continuous field, trajectories on an interval are the classical solutions: if (t, x) ↦ F(t, x, u(t)) is jointly continuous, the field is continuous along every trajectory and along every classical solution, so isTrajectoryOn_iff_isIntegralCurveOn needs no hypothesis on x.

                    The derivative of a function along the system #

                    noncomputable def ContinuousSystem.lieDerivative {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] (s : ContinuousSystem E U Y) (V : ℝ → E → ℝ) (t : ℝ) (x : E) (u : U) :

                    The derivative of V(t, x) along the system at the input value u, ∂V/∂t + ∂V/∂x · F(t, x, u): the rate of change of V along a trajectory through x at time t while the input takes the value u. It is the Lie derivative (_root_.lieDerivative) of V along the field F(·, ·, u), so the lemmas of Analysis.LieDerivative apply to it directly: where the field is continuous along it, a trajectory is an integral curve of s.vectorField (IsTrajectoryOn.isIntegralCurveOn). Input-free notions such as Lyapunov stability use u = (); input-to-state notions use a general u.

                    Equations
                    Instances For

                      Functions along trajectories #

                      A trajectory is absolutely continuous, so a function V(t, x) that is locally Lipschitz on a set containing its graph is absolutely continuous along it, with derivative the derivative along the system s.lieDerivative V t (x t) (u t) at almost every time where V is differentiable. The consequences below are the Lyapunov arguments along trajectories: an almost-everywhere bound on the derivative along the system integrates to a bound on the increment of V, to monotonicity, to a level bound and to exponential decay. They hold with no continuity of the field in time, so they cover discontinuous and merely measurable inputs.

                      theorem ContinuousSystem.IsTrajectoryOn.ae_hasDerivAt_lieDerivative {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {I : Set ℝ} {V : ℝ → E → ℝ} (h : s.IsTrajectoryOn u x I) :
                      ∀ᵐ (t : ℝ), t ∈ interior I → DifferentiableAt ℝ (Function.uncurry V) (t, x t) → HasDerivAt (fun (τ : ℝ) => V τ (x τ)) (s.lieDerivative V t (x t) (u t)) t

                      Chain rule along a trajectory: at almost every time of the interior of I at which V is differentiable along the trajectory, t ↦ V(t, x(t)) has derivative s.lieDerivative V t (x t) (u t).

                      theorem ContinuousSystem.IsTrajectoryOn.ae_deriv_eq_lieDerivative {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {V : ℝ → E → ℝ} {a b : ℝ} (hx : s.IsTrajectoryOn u x (Set.Icc a b)) (hVd : ∀ᵐ (t : ℝ), t ∈ Set.Ioo a b → DifferentiableAt ℝ (Function.uncurry V) (t, x t)) :
                      ∀ᵐ (t : ℝ), t ∈ Set.Ioo a b → deriv (fun (τ : ℝ) => V τ (x τ)) t = s.lieDerivative V t (x t) (u t)

                      Derivative along a trajectory: on a segment, at almost every time at which V is differentiable along the trajectory, the derivative of t ↦ V(t, x(t)) is s.lieDerivative V t (x t) (u t). The form of the chain rule that the bounds below consume.

                      theorem ContinuousSystem.IsTrajectoryOn.absolutelyContinuousOnInterval_comp {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {V : ℝ → E → ℝ} {S : Set (ℝ × E)} {a b : ℝ} (hx : s.IsTrajectoryOn u x (Set.Icc a b)) (hab : a ≤ b) (hV : LocallyLipschitzOn S (Function.uncurry V)) (hxS : ∀ t ∈ Set.Icc a b, (t, x t) ∈ S) :
                      AbsolutelyContinuousOnInterval (fun (t : ℝ) => V t (x t)) a b

                      A function V(t, x) locally Lipschitz on a set containing the graph of a trajectory on [a, b] is absolutely continuous along it.

                      theorem ContinuousSystem.IsTrajectoryOn.sub_le_integral_of_lieDerivative_le {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {V : ℝ → E → ℝ} {S : Set (ℝ × E)} {a b : ℝ} (hx : s.IsTrajectoryOn u x (Set.Icc a b)) (hab : a ≤ b) (hV : LocallyLipschitzOn S (Function.uncurry V)) (hxS : ∀ t ∈ Set.Icc a b, (t, x t) ∈ S) (hVd : ∀ᵐ (t : ℝ), t ∈ Set.Ioo a b → DifferentiableAt ℝ (Function.uncurry V) (t, x t)) {h : ℝ → ℝ} (hh : IntervalIntegrable h MeasureTheory.volume a b) (h_le : ∀ᵐ (t : ℝ), t ∈ Set.Ioo a b → s.lieDerivative V t (x t) (u t) ≤ h t) :
                      V b (x b) - V a (x a) ≤ ∫ (t : ℝ) in a..b, h t

                      Integrated Lyapunov inequality along a trajectory. If the derivative along the system is at most h t at almost every time of (a, b), then V increases by at most ∫ₐᵇ h.

                      theorem ContinuousSystem.IsTrajectoryOn.antitoneOn_of_lieDerivative_nonpos {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {V : ℝ → E → ℝ} {S : Set (ℝ × E)} {a b : ℝ} (hx : s.IsTrajectoryOn u x (Set.Icc a b)) (hV : LocallyLipschitzOn S (Function.uncurry V)) (hxS : ∀ t ∈ Set.Icc a b, (t, x t) ∈ S) (hVd : ∀ᵐ (t : ℝ), t ∈ Set.Ioo a b → DifferentiableAt ℝ (Function.uncurry V) (t, x t)) (h_nonpos : ∀ᵐ (t : ℝ), t ∈ Set.Ioo a b → s.lieDerivative V t (x t) (u t) ≤ 0) :
                      AntitoneOn (fun (t : ℝ) => V t (x t)) (Set.Icc a b)

                      Nonpositive derivative along a trajectory: if the derivative along the system is nonpositive at almost every time of (a, b), then V does not increase along the trajectory on [a, b].

                      theorem ContinuousSystem.IsTrajectoryOn.le_max_of_lieDerivative_nonpos {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {V : ℝ → E → ℝ} {S : Set (ℝ × E)} {a b : ℝ} (hx : s.IsTrajectoryOn u x (Set.Icc a b)) (hV : LocallyLipschitzOn S (Function.uncurry V)) (hxS : ∀ t ∈ Set.Icc a b, (t, x t) ∈ S) (hVd : ∀ᵐ (t : ℝ), t ∈ Set.Ioo a b → DifferentiableAt ℝ (Function.uncurry V) (t, x t)) {η : ℝ} (h_dec : ∀ᵐ (t : ℝ), t ∈ Set.Ioo a b → η < V t (x t) → s.lieDerivative V t (x t) (u t) ≤ 0) (t : ℝ) :
                      t ∈ Set.Icc a b → V t (x t) ≤ max (V a (x a)) η

                      Level form: if the derivative along the system is nonpositive at almost every time of (a, b) at which V exceeds the level η, then V never exceeds max (V a (x a)) η along the trajectory on [a, b].

                      theorem ContinuousSystem.IsTrajectoryOn.le_mul_exp_of_lieDerivative_le {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {V : ℝ → E → ℝ} {S : Set (ℝ × E)} {a b : ℝ} (hx : s.IsTrajectoryOn u x (Set.Icc a b)) (hV : LocallyLipschitzOn S (Function.uncurry V)) (hxS : ∀ t ∈ Set.Icc a b, (t, x t) ∈ S) (hVd : ∀ᵐ (t : ℝ), t ∈ Set.Ioo a b → DifferentiableAt ℝ (Function.uncurry V) (t, x t)) {c : ℝ} (h_rate : ∀ᵐ (t : ℝ), t ∈ Set.Ioo a b → s.lieDerivative V t (x t) (u t) ≤ -c * V t (x t)) (t : ℝ) :
                      t ∈ Set.Icc a b → V t (x t) ≤ V a (x a) * Real.exp (-c * (t - a))

                      Exponential decay along a trajectory: if the derivative along the system is at most -c V at almost every time of (a, b), then V(t, x(t)) ≤ V(a, x(a)) e^{-c(t - a)} on [a, b]. With c < 0 this is a growth bound.

                      theorem ContinuousSystem.IsTrajectoryOn.sub_le_integral_of_fderiv_le {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {a b : ℝ} {V : E → ℝ} {D : Set E} (hx : s.IsTrajectoryOn u x (Set.Icc a b)) (hab : a ≤ b) (hV : LocallyLipschitzOn D V) (hxD : ∀ t ∈ Set.Icc a b, x t ∈ D) (hVd : ∀ᵐ (t : ℝ), t ∈ Set.Ioo a b → DifferentiableAt ℝ V (x t)) {h : ℝ → ℝ} (hh : IntervalIntegrable h MeasureTheory.volume a b) (h_le : ∀ᵐ (t : ℝ), t ∈ Set.Ioo a b → (fderiv ℝ V (x t)) (s.vectorField u t (x t)) ≤ h t) :
                      V (x b) - V (x a) ≤ ∫ (t : ℝ) in a..b, h t

                      Integrated Lyapunov inequality, time-invariant form. For V : E → ℝ locally Lipschitz on a set containing the trajectory, a bound DV(x(t)) F(t, x(t), u(t)) ≤ h t at almost every time of (a, b) integrates to V(x(b)) - V(x(a)) ≤ ∫ₐᵇ h.

                      theorem ContinuousSystem.IsTrajectoryOn.antitoneOn_of_fderiv_nonpos {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {a b : ℝ} {V : E → ℝ} {D : Set E} (hx : s.IsTrajectoryOn u x (Set.Icc a b)) (hV : LocallyLipschitzOn D V) (hxD : ∀ t ∈ Set.Icc a b, x t ∈ D) (hVd : ∀ᵐ (t : ℝ), t ∈ Set.Ioo a b → DifferentiableAt ℝ V (x t)) (h_nonpos : ∀ᵐ (t : ℝ), t ∈ Set.Ioo a b → (fderiv ℝ V (x t)) (s.vectorField u t (x t)) ≤ 0) :
                      AntitoneOn (fun (t : ℝ) => V (x t)) (Set.Icc a b)

                      Nonpositive derivative along a trajectory, time-invariant form. For V : E → ℝ locally Lipschitz on a set containing the trajectory, if DV(x(t)) F(t, x(t), u(t)) ≤ 0 at almost every time of (a, b), then V does not increase along the trajectory on [a, b].

                      Well-posedness #

                      Solutions here are trajectories in the sense of Carathéodory (IsTrajectoryOn), so existence, uniqueness and completeness are statements about absolutely continuous solutions, classical or not.

                      def ContinuousSystem.IsForwardCompleteOn {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] (s : ContinuousSystem E U Y) (u : ℝ → U) (t₀ : ℝ) (S : Set E) :

                      Every solution segment starting at time t₀ in the set S extends to a solution on [t₀, ∞): such solutions do not escape in finite time.

                      Forward completeness is kept apart from the notions that need it. Statements about limits as t → ∞ quantify over solutions on [t₀, ∞), and without it a solution that escapes in finite time would be silently left out of them.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        def ContinuousSystem.IsForwardComplete {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] (s : ContinuousSystem E U Y) (u : ℝ → U) :

                        Every solution segment, from any initial time and state, extends to a solution on [t₀, ∞).

                        Equations
                        Instances For
                          def ContinuousSystem.HasUniqueSolutions {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] (s : ContinuousSystem E U Y) (u : ℝ → U) :

                          Solutions are unique forward in time: two solution segments on [t₀, t₁] that agree at t₀ agree on the whole segment.

                          Kept apart from the stability notions, which quantify over every solution and so need no uniqueness: theorems that use it assume it. Uniqueness is among all trajectories, classical or not: for a continuous field, a classical solution is then unique among all trajectories.

                          Equations
                          Instances For
                            theorem ContinuousSystem.IsTrajectoryOn.dist_le_mul_exp {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x y : ℝ → E} {K : NNReal} {t₀ t₁ : ℝ} (hx : s.IsTrajectoryOn u x (Set.Icc t₀ t₁)) (hy : s.IsTrajectoryOn u y (Set.Icc t₀ t₁)) (hL : ∀ t ∈ Set.Ioo t₀ t₁, LipschitzWith K (s.vectorField u t)) (t : ℝ) :
                            t ∈ Set.Icc t₀ t₁ → dist (x t) (y t) ≤ dist (x t₀) (y t₀) * Real.exp (↑K * (t - t₀))

                            Grönwall separation of trajectories. If x ↦ F(t, x, u(t)) is K-Lipschitz for every t ∈ (t₀, t₁), two trajectories on [t₀, t₁] separate at most exponentially: ‖x(t) - y(t)‖ ≤ ‖x(t₀) - y(t₀)‖ e^{K(t - t₀)}. No regularity in time is assumed.

                            Reference: Khalil, Nonlinear Systems (3rd ed.), continuous dependence on initial conditions, in the unperturbed case.

                            theorem ContinuousSystem.hasUniqueSolutions_of_lipschitz {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {K : NNReal} (hL : ∀ (t : ℝ), LipschitzWith K (s.vectorField u t)) :

                            Lipschitz right-hand sides have unique solutions. If x ↦ F(t, x, u(t)) is K-Lipschitz for every t, solutions are unique forward in time. No regularity in time is assumed.

                            theorem ContinuousSystem.isForwardComplete_of_lipschitz {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {K : NNReal} (hF : Continuous (Function.uncurry (s.vectorField u))) (hL : ∀ (t : ℝ), LipschitzWith K (s.vectorField u t)) :

                            Globally Lipschitz systems are forward complete. If (t, x) ↦ F(t, x, u(t)) is continuous and K-Lipschitz in x uniformly in t, every trajectory segment extends to [t₀, ∞).

                            Global Lipschitz is what rules out escape in finite time here; a local Lipschitz condition alone does not (ẋ = x²).

                            theorem ContinuousSystem.IsTrajectoryOn.norm_exp_bounds {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {x : ℝ → E} {x_c : E} {t₀ t₁ L : ℝ} (hx : s.IsTrajectoryOn u x (Set.Icc t₀ t₁)) (hL : ∀ᵐ (t : ℝ), t ∈ Set.Ioo t₀ t₁ → ‖s.vectorField u t (x t)‖ ≤ L * ‖x t - x_c‖) {t : ℝ} (ht : t ∈ Set.Icc t₀ t₁) :
                            ‖x t₀ - x_c‖ * Real.exp (-L * (t - t₀)) ≤ ‖x t - x_c‖ ∧ ‖x t - x_c‖ ≤ ‖x t₀ - x_c‖ * Real.exp (L * (t - t₀))

                            Exponential bounds on the distance of a trajectory to a point: if ‖F(t, x(t), u(t))‖ ≤ L ‖x(t) - x_c‖ at almost every time of a trajectory on [t₀, t₁], then ‖x(t₀) - x_c‖ e^{-L(t - t₀)} ≤ ‖x(t) - x_c‖ ≤ ‖x(t₀) - x_c‖ e^{L(t - t₀)} there. For a field L-Lipschitz in the state with an equilibrium at x_c, the hypothesis holds everywhere.

                            The bound is only needed along the trajectory, and the state space is any Banach space.

                            Reference: Khalil, Nonlinear Systems (3rd ed.), the exercise on exponential bounds for the solutions of a system with a Lipschitz right-hand side.

                            The state transition map #

                            def ContinuousSystem.existenceInterval {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] (s : ContinuousSystem E U Y) (u : ℝ → U) (t₀ : ℝ) (x₀ : E) :

                            The existence interval of the trajectory from x₀ at time t₀: the times t ≥ t₀ up to which a trajectory from x₀ exists, that is, the maximal interval of existence [t₀, T).

                            Equations
                            Instances For
                              noncomputable def ContinuousSystem.stateTransitionMap {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] (s : ContinuousSystem E U Y) (u : ℝ → U) (t t₀ : ℝ) (x₀ : E) :
                              E

                              The state transition map φ(t; t₀, x₀): the value at t of a trajectory from x₀ at time t₀ that exists up to t, and x₀ outside the existence interval (before t₀, or past a finite escape time).

                              It is meant for systems with unique solutions (HasUniqueSolutions), which the results about its trajectories assume. Without uniqueness the trajectory is chosen separately for each t, so t ↦ φ(t; t₀, x₀) may splice different solutions and need not be a trajectory; there the honest object is the set of solutions from x₀, which is how the stability definitions are stated.

                              Equations
                              Instances For
                                theorem ContinuousSystem.mem_existenceInterval_self {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} (t₀ : ℝ) (x₀ : E) :
                                t₀ ∈ s.existenceInterval u t₀ x₀

                                The initial time is in the existence interval: a trajectory on [t₀, t₀] is trivial.

                                theorem ContinuousSystem.mem_existenceInterval_of_le {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} {t₀ t τ : ℝ} {x₀ : E} (ht : t ∈ s.existenceInterval u t₀ x₀) (h₀ : t₀ ≤ τ) (h₁ : τ ≤ t) :
                                τ ∈ s.existenceInterval u t₀ x₀

                                The existence interval is an interval: with t, it contains every time between t₀ and t.

                                @[simp]
                                theorem ContinuousSystem.stateTransitionMap_self {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} (t₀ : ℝ) (x₀ : E) :
                                s.stateTransitionMap u t₀ t₀ x₀ = x₀

                                φ(t₀; t₀, x₀) = x₀.

                                theorem ContinuousSystem.existenceInterval_eq_Ici {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} (hfc : s.IsForwardComplete u) (t₀ : ℝ) (x₀ : E) :
                                s.existenceInterval u t₀ x₀ = Set.Ici t₀

                                Forward completeness means global existence: if every trajectory extends to [t₀, ∞), the existence interval is all of [t₀, ∞).

                                theorem ContinuousSystem.eq_stateTransitionMap {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} (hu : s.HasUniqueSolutions u) {t₀ t₁ : ℝ} {x : ℝ → E} (hx : s.IsTrajectoryOn u x (Set.Icc t₀ t₁)) (t : ℝ) :
                                t ∈ Set.Icc t₀ t₁ → x t = s.stateTransitionMap u t t₀ (x t₀)

                                Every trajectory is given by the state transition map: with unique solutions, a trajectory on [t₀, t₁] is t ↦ φ(t; t₀, x(t₀)) there.

                                theorem ContinuousSystem.isTrajectoryOn_stateTransitionMap {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} (hu : s.HasUniqueSolutions u) (t₀ : ℝ) (x₀ : E) :
                                s.IsTrajectoryOn u (fun (t : ℝ) => s.stateTransitionMap u t t₀ x₀) (s.existenceInterval u t₀ x₀)

                                The state transition map is a trajectory: with unique solutions, t ↦ φ(t; t₀, x₀) is a trajectory on the existence interval.

                                theorem ContinuousSystem.isTrajectoryOn_stateTransitionMap_Ici {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} (hfc : s.IsForwardComplete u) (hu : s.HasUniqueSolutions u) (t₀ : ℝ) (x₀ : E) :
                                s.IsTrajectoryOn u (fun (t : ℝ) => s.stateTransitionMap u t t₀ x₀) (Set.Ici t₀)

                                With forward completeness and unique solutions, t ↦ φ(t; t₀, x₀) is a trajectory on [t₀, ∞).

                                theorem ContinuousSystem.isIntegralCurveOn_stateTransitionMap_Ici {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} (hF : Continuous (Function.uncurry (s.vectorField u))) (hfc : s.IsForwardComplete u) (hu : s.HasUniqueSolutions u) (t₀ : ℝ) (x₀ : E) :
                                IsIntegralCurveOn (fun (t : ℝ) => s.stateTransitionMap u t t₀ x₀) (s.vectorField u) (Set.Ici t₀)

                                For a continuous field, the state transition map is a classical solution: with forward completeness, unique solutions and (t, x) ↦ F(t, x, u(t)) jointly continuous, t ↦ φ(t; t₀, x₀) is differentiable within [t₀, ∞) with derivative F(t, φ(t; t₀, x₀), u(t)).

                                theorem ContinuousSystem.stateTransitionMap_semigroup {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} (hu : s.HasUniqueSolutions u) {t₀ τ t : ℝ} {x₀ : E} (hτ : t₀ ≤ τ) (hτt : τ ≤ t) (ht : t ∈ s.existenceInterval u t₀ x₀) :
                                s.stateTransitionMap u t τ (s.stateTransitionMap u τ t₀ x₀) = s.stateTransitionMap u t t₀ x₀

                                The semigroup property: φ(t; τ, φ(τ; t₀, x₀)) = φ(t; t₀, x₀) for t₀ ≤ τ ≤ t in the existence interval. The state transition matrix satisfies the linear case, Φ(t, τ) Φ(τ, t₀) = Φ(t, t₀).

                                theorem ContinuousSystem.stateTransitionMap_of_equilibrium {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} (hu : s.HasUniqueSolutions u) {x_eq : E} (h_eq : ∀ (t : ℝ), s.vectorField u t x_eq = 0) {t₀ t : ℝ} (ht : t₀ ≤ t) :
                                s.stateTransitionMap u t t₀ x_eq = x_eq

                                An equilibrium stays put: if F(t, x_eq, u(t)) = 0 for all t, then φ(t; t₀, x_eq) = x_eq for t ≥ t₀.

                                theorem ContinuousSystem.dist_stateTransitionMap_le {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} (hfc : s.IsForwardComplete u) {L : NNReal} (hL : ∀ (t : ℝ), LipschitzWith L (s.vectorField u t)) {t₀ t : ℝ} (ht : t₀ ≤ t) (x₀ y₀ : E) :
                                dist (s.stateTransitionMap u t t₀ x₀) (s.stateTransitionMap u t t₀ y₀) ≤ dist x₀ y₀ * Real.exp (↑L * (t - t₀))

                                Solutions separate at most exponentially in the initial state: for a field L-Lipschitz in the state, uniformly in time, ‖φ(t; t₀, x₀) - φ(t; t₀, y₀)‖ ≤ ‖x₀ - y₀‖ e^{L(t - t₀)}.

                                Reference: Khalil, Nonlinear Systems (3rd ed.), continuous dependence on initial conditions, without perturbation.

                                theorem ContinuousSystem.norm_stateTransitionMap_sub_le {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {s : ContinuousSystem E U Y} {u : ℝ → U} (hfc : s.IsForwardComplete u) {L : NNReal} (hL : ∀ (t : ℝ), LipschitzWith L (s.vectorField u t)) {B : ℝ} (hB : ∀ (t : ℝ) (y : E), ‖s.vectorField u t y‖ ≤ B) (z z' : ℝ × E) {σ : ℝ} (hσ : 0 ≤ σ) :
                                ‖s.stateTransitionMap u (z.1 + σ) z.1 z.2 - s.stateTransitionMap u (z'.1 + σ) z'.1 z'.2‖ ≤ (2 * B + 1) * Real.exp (↑L * σ) * dist z z'

                                Solutions depend Lipschitz-continuously on the initial time and state: for a field L-Lipschitz in the state and bounded by B, the solutions from (t₀, x₀) and (t₀', x₀'), compared after the same elapsed time σ, differ by at most (2B + 1) e^{Lσ} times the distance between the initial data. Run the earlier one to the later initial time (speed B), then apply dist_stateTransitionMap_le.

                                Reference: Khalil, Nonlinear Systems (3rd ed.), continuous dependence on initial conditions and parameters.

                                Invariance #

                                def ContinuousSystem.IsForwardInvariant {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] (s : ContinuousSystem E U Y) (u : ℝ → U) (S : Set E) :

                                S is forward invariant (positively invariant) under the input u: every trajectory segment that starts in S stays in S for as long as it is defined. This is for the one input signal u; robust and controlled invariance quantify over u.

                                Stated on segments [t₀, t₁] and for every initial time, so it constrains solutions that escape in finite time up to their escape, and it makes sense for time-varying systems.

                                Equations
                                Instances For

                                  Holding the input constant #

                                  def ContinuousSystem.constInput {E : Type u_1} {U : Type u_2} {Y : Type u_3} (s : ContinuousSystem E U Y) (u₀ : U) :

                                  The system with its input held at u₀: the autonomous system ẋ = F(t, x, u₀), y = h(t, x, u₀). With u₀ = 0 this is the unforced system (zeroInput); a general u₀ is the operating point of a system whose equilibrium is not at the zero input.

                                  Equations
                                  Instances For
                                    @[simp]
                                    theorem ContinuousSystem.constInput_F {E : Type u_1} {U : Type u_2} {Y : Type u_3} (s : ContinuousSystem E U Y) (u₀ : U) (t : ℝ) (x : E) (v : Unit) :
                                    (s.constInput u₀).F t x v = s.F t x u₀
                                    @[simp]
                                    theorem ContinuousSystem.constInput_h {E : Type u_1} {U : Type u_2} {Y : Type u_3} (s : ContinuousSystem E U Y) (u₀ : U) (t : ℝ) (x : E) (v : Unit) :
                                    (s.constInput u₀).h t x v = s.h t x u₀
                                    theorem ContinuousSystem.isAutonomous_constInput {E : Type u_1} {U : Type u_2} {Y : Type u_3} (s : ContinuousSystem E U Y) (u₀ : U) :

                                    The system with its input held constant is autonomous.

                                    theorem ContinuousSystem.constInput_isTrajectoryOn_iff {E : Type u_1} {U : Type u_2} {Y : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] (s : ContinuousSystem E U Y) (u₀ : U) {x : ℝ → E} {I : Set ℝ} :
                                    (s.constInput u₀).IsTrajectoryOn (fun (x : ℝ) => ()) x I ↔ s.IsTrajectoryOn (fun (x : ℝ) => u₀) x I

                                    The trajectories of the system with its input held at u₀ are those of the system under the constant input u₀.

                                    def ContinuousSystem.zeroInput {E : Type u_1} {U : Type u_2} {Y : Type u_3} [Zero U] (s : ContinuousSystem E U Y) :

                                    The unforced system: the input held at 0 (constInput), as an autonomous system ẋ = F(t, x, 0), y = h(t, x, 0). Stability of a system with input is stability of this system; input–output notions such as input-to-state stability are stated on the system itself.

                                    Equations
                                    Instances For
                                      @[simp]
                                      theorem ContinuousSystem.zeroInput_F {E : Type u_1} {U : Type u_2} {Y : Type u_3} [Zero U] (s : ContinuousSystem E U Y) (t : ℝ) (x : E) (v : Unit) :
                                      s.zeroInput.F t x v = s.F t x 0
                                      @[simp]
                                      theorem ContinuousSystem.zeroInput_h {E : Type u_1} {U : Type u_2} {Y : Type u_3} [Zero U] (s : ContinuousSystem E U Y) (t : ℝ) (x : E) (v : Unit) :
                                      s.zeroInput.h t x v = s.h t x 0
                                      theorem ContinuousSystem.isAutonomous_zeroInput {E : Type u_1} {U : Type u_2} {Y : Type u_3} [Zero U] (s : ContinuousSystem E U Y) :

                                      The unforced system is autonomous.

                                      theorem ContinuousSystem.zeroInput_isTrajectoryOn_iff {E : Type u_1} {U : Type u_2} {Y : Type u_3} [Zero U] [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] (s : ContinuousSystem E U Y) {x : ℝ → E} {I : Set ℝ} :
                                      s.zeroInput.IsTrajectoryOn (fun (x : ℝ) => ()) x I ↔ s.IsTrajectoryOn 0 x I

                                      The trajectories of the unforced system are those of the system under the zero input.

                                      Cascades #

                                      def ContinuousSystem.cascade {E : Type u_1} {Y : Type u_3} {E₂ : Type u_4} {Y₂ : Type u_5} {W : Type u_6} (s₁ : ContinuousSystem E E₂ Y) (s₂ : ContinuousSystem E₂ W Y₂) :
                                      ContinuousSystem (E × E₂) W (Y × Y₂)

                                      The cascade of s₁, driven by the state of s₂, with s₂, driven by the external input: ẋ₁ = F₁(t, x₁, x₂), ẋ₂ = F₂(t, x₂, w), with output (h₁(t, x₁, x₂), h₂(t, x₂, w)). With W = Unit this is the cascade of s₁ with an autonomous system.

                                      Equations
                                      • s₁.cascade s₂ = { F := fun (t : ℝ) (x : E × E₂) (w : W) => (s₁.F t x.1 x.2, s₂.F t x.2 w), h := fun (t : ℝ) (x : E × E₂) (w : W) => (s₁.h t x.1 x.2, s₂.h t x.2 w) }
                                      Instances For
                                        theorem ContinuousSystem.cascade_isTrajectoryOn_iff {E : Type u_1} {Y : Type u_3} {E₂ : Type u_4} {Y₂ : Type u_5} {W : Type u_6} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] [NormedAddCommGroup E₂] [NormedSpace ℝ E₂] [CompleteSpace E₂] {s₁ : ContinuousSystem E E₂ Y} {s₂ : ContinuousSystem E₂ W Y₂} {u : ℝ → W} {x : ℝ → E × E₂} {I : Set ℝ} :
                                        (s₁.cascade s₂).IsTrajectoryOn u x I ↔ s₁.IsTrajectoryOn (fun (τ : ℝ) => (x τ).2) (fun (τ : ℝ) => (x τ).1) I ∧ s₂.IsTrajectoryOn u (fun (τ : ℝ) => (x τ).2) I

                                        A trajectory of the cascade is a pair of trajectories: of s₁ under the input x₂, and of s₂ under the external input.