MindFormal v1.0.0One Mind

MindFormal.Run.RationalRun

02.12, 02.20: a mind given as rational data, run. Its admitted experiment at constant noise of a chosen size: the data's instance and admission, a world that delivers the schedule's input and ignores actions, the data's start. The data's own reference, with a checked certificate, gives the held corridor's controls: the reference's bounds from the certificate, no input or start mismatch, and the native focus margins from a rational check of the certificate's ranges. The noise's size is chosen, from the drift's proved Lipschitz constant, so that the corridor's error is a given number.

theorem MindFormal.mul_near {y1 y2 a1 a2 r : ℝ} (h1 : |y1 - a1| ≤ r) (h2 : |y2 - a2| ≤ r) :
|y1 * y2 - a1 * a2| ≤ r * (|a1| + |a2|) + r * r

02.20: a product of two numbers each within r of a1, a2 lies within r(|a1|+|a2|)+r² of a1·a2.

noncomputable def MindFormal.RationalMind.scheduleInput {N n : ℕ} {T Λ J : Type} (D : RationalMind N n T Λ J) :
ℝ → Fin N → ℝ

02.20: the schedule's input as a function of real time.

Equations
Instances For
    def MindFormal.RationalMind.loadMax {N n : ℕ} {T Λ J : Type} [Fintype J] (D : RationalMind N n T Λ J) :

    02.20: the largest absolute row sum of the loading.

    Equations
    Instances For
      def MindFormal.RationalMind.certNorm {N n : ℕ} {T Λ J : Type} (D : RationalMind N n T Λ J) (C : Certificate N n T Λ) :

      02.20: a bound on the certificate's state norm over all its pieces.

      Equations
      Instances For
        theorem MindFormal.RationalMind.reference_certified {N n : ℕ} {T Λ J : Type} [Fintype T] [Fintype Λ] (D : RationalMind N n T Λ J) (hD : D.Admissible) (hW : D.WellPosed) {C : Certificate N n T Λ} (hC : D.check C = true) :
        D.Certified C (D.reference hD hW)

        02.20: the data's own reference meets the certificate's conditions.

        theorem MindFormal.RationalMind.reference_norm_le {N n : ℕ} {T Λ J : Type} [Fintype T] [Fintype Λ] (D : RationalMind N n T Λ J) (hD : D.Admissible) (hW : D.WellPosed) {C : Certificate N n T Λ} (hC : D.check C = true) (t : ↑(HorizonTime ↑(D.horizon hW))) :
        ‖(D.reference hD hW).path t‖ ≤ ↑(D.certNorm C)

        02.20: the data's own reference stays within the certificate's norm bound.

        def MindFormal.RationalMind.attentionRange {N n : ℕ} {T Λ J : Type} [Fintype T] (D : RationalMind N n T Λ J) (C : Certificate N n T Λ) (E : ℚ) (k : ℕ) (i : Fin N) :

        02.20: the low and high ends of a content's attention read over piece k of the certificate, every coordinate widened by E.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          def MindFormal.RationalMind.heldCheck {N n : ℕ} {T Λ J : Type} [Fintype T] (D : RationalMind N n T Λ J) (C : Certificate N n T Λ) (E : ℚ) (held : Option (Fin N)) :

          02.12, 02.20: THE HELD MARGIN CHECK, by rational arithmetic only: on every piece of the certificate, every state within E of the tube has the held content (if any) aware and its attention read at its bar, and every other content unaware or its attention read below its bar.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem MindFormal.RationalMind.attentionRange_sound {N n : ℕ} {T Λ J : Type} [Fintype T] (D : RationalMind N n T Λ J) (hD : D.Admissible) (C : Certificate N n T Λ) (E : ℚ) (k : ℕ) (i : Fin N) (y : PhysicalState N n T Λ) (hy : ∀ (v : CoordinateIndex (Fin N) n T Λ), ↑(D.lowerAt C k v) - ↑E ≤ ↑y v ∧ ↑y v ≤ ↑(D.upperAt C k v) + ↑E) :

            02.12: the attention read of a state whose coordinates lie in [lo, hi] lies in the range.

            theorem MindFormal.RationalMind.heldCheck_sound {N n : ℕ} {T Λ J : Type} [Fintype T] [Fintype Λ] (D : RationalMind N n T Λ J) (hD : D.Admissible) (hW : D.WellPosed) {C : Certificate N n T Λ} (hC : D.check C = true) {E : ℚ} (held : Option (Fin N)) (hh : D.heldCheck C E held = true) (e : ℝ) {t : ℝ} (ht : t ∈ Set.Icc 0 ↑(D.horizon hW)) (y : PhysicalState N n T Λ) (hy : ‖↑y - (ContinuousMap.IccExtend ⋯ (D.reference hD hW).path) t‖ ≤ ↑E) (i : Fin N) :
            0 ≤ ((D.toInstance hD e).reads.guards true) y i ↔ held = some i

            02.12, 02.20: THE HELD MARGINS FROM THE CHECK. If the certificate and the held check pass, then at every time of the schedule and every physical state within E of the data's own reference, a content's focus guard is nonnegative exactly when it is the held content.

            def MindFormal.RationalMind.endValue {N n : ℕ} {T Λ J : Type} (D : RationalMind N n T Λ J) (C : Certificate N n T Λ) (k : ℕ) (v : CoordinateIndex (Fin N) n T Λ) :

            02.20: the certificate path's value at the end of piece k.

            Equations
            Instances For
              theorem MindFormal.RationalMind.near_reference_coordinates {N n : ℕ} {T Λ J : Type} [Fintype T] [Fintype Λ] (D : RationalMind N n T Λ J) (hD : D.Admissible) (hW : D.WellPosed) {C : Certificate N n T Λ} (hC : D.check C = true) {E : ℝ} {k : ℕ} (hk : k < D.schedule.length) {t : ℝ} (y : MindState (Fin N) n T Λ) (hy : ‖y - (ContinuousMap.IccExtend ⋯ (D.reference hD hW).path) t‖ ≤ E) :
              (t ∈ Set.Icc ↑(D.breaks k) ↑(D.breaks (k + 1)) → ∀ (v : CoordinateIndex (Fin N) n T Λ), ↑(D.lowerAt C k v) - E ≤ y v ∧ y v ≤ ↑(D.upperAt C k v) + E) ∧ (t = ↑(D.breaks (k + 1)) → ∀ (v : CoordinateIndex (Fin N) n T Λ), |y v - ↑(D.endValue C k v)| ≤ ↑(C.at k).ρ + E)

              02.20: a state within E of the data's own reference lies, on each piece, in the piece's range widened by E, and at the piece's end within ρ_k + E of the end value.

              def MindFormal.RationalMind.endBox {N n : ℕ} {T Λ J : Type} (D : RationalMind N n T Λ J) (C : Certificate N n T Λ) (k : ℕ) (r : ℚ) (u q : Fin N → ℚ) :
              Var N n T Λ → ℚ × ℚ

              02.20: the box of states within r of the certificate's end of piece k, with the input u and focus q fixed.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                theorem MindFormal.RationalMind.target_endBox {N n : ℕ} {T Λ J : Type} [Fintype T] [Fintype Λ] (D : RationalMind N n T Λ J) (hD : D.Admissible) (C : Certificate N n T Λ) (k : ℕ) (r : ℚ) (u q : Fin N → ℚ) (i : Fin N) (hok : (RExpr.bound (D.endBox C k r u q) (D.targetE i)).ok = true) (y : MindState (Fin N) n T Λ) (hy : ∀ (v : CoordinateIndex (Fin N) n T Λ), |y v - ↑(D.endValue C k v)| ≤ ↑r) :
                ↑(RExpr.bound (D.endBox C k r u q) (D.targetE i)).lo ≤ normalizedTarget (D.drift hD).activity.σ (D.drift hD).activity.g (assembledInputs (D.drift hD) (fun (j : Fin N) => ↑(u j)) (fun (j : Fin N) => ↑(q j)) y) i ∧ normalizedTarget (D.drift hD).activity.σ (D.drift hD).activity.g (assembledInputs (D.drift hD) (fun (j : Fin N) => ↑(u j)) (fun (j : Fin N) => ↑(q j)) y) i ≤ ↑(RExpr.bound (D.endBox C k r u q) (D.targetE i)).hi

                02.12, 02.20: THE TARGET NEAR A PIECE'S END. If box arithmetic defines content i's target over the end box, then at every state within r of the end of piece k, under input u and focus q, the complete target of i lies in the box's range.

                theorem MindFormal.RationalMind.eight_source_failure {H : NNReal} (hH0 : 0 < ↑H) (hH : ↑H ≤ 9 / 4) :
                min 1 (sourceExcursionFailure H fun (x : Fin 8) => 8) ≤ 1 / 100

                02.20: eight-level excursions of eight sources over a positive horizon at most 9/4 fail with probability at most 16e^{-128/9} ≤ 1/100.

                theorem MindFormal.RationalMind.eight_source_bound {H : NNReal} {h b e : ℝ} (hH : ↑H = h) (hh : 0 < h) (he : 0 < e) :
                1 - 16 * Real.exp (-b ^ 2 / (2 * e ^ 2 * h)) ≤ 1 - min 1 (sourceExcursionFailure H fun (x : Fin 8) => b / e)

                02.20 (03.14 (D5)): eight sources at levels b/e over a horizon H > 0 fail with probability at most 16exp(−b²/(2e²H)), the sum over the sources of 2exp(−b²/(2G_d²H)) at amplitude G_d = e.

                theorem MindFormal.RationalMind.eight_source_limit {b h : ℝ} (hb : 0 < b) (hh : 0 < h) :
                Filter.Tendsto (fun (e : ℝ) => 1 - 16 * Real.exp (-b ^ 2 / (2 * e ^ 2 * h))) (nhdsWithin 0 (Set.Ioi 0)) (nhds 1)

                02.20 (03.14 (D5)): at a fixed allowance b > 0 and horizon h > 0, the bound 1 − 16exp(−b²/(2e²h)) tends to one as the amplitude e tends to zero.

                noncomputable def MindFormal.RationalMind.scheduleWorld {N n : ℕ} {T Λ J : Type} [Fintype T] [Fintype Λ] (D : RationalMind N n T Λ J) {Ω : Type u_1} [MeasurableSpace Ω] (hD : D.Admissible) (hW : D.WellPosed) (hs : D.sensed = Finset.univ) (e : ℝ) (G : EquationGround Ω J) :

                02.12: the schedule's world: it delivers the schedule's input and ignores actions.

                Equations
                Instances For
                  noncomputable def MindFormal.RationalMind.experiment {N n : ℕ} {T Λ J : Type} [Fintype T] [Fintype Λ] [Fintype J] (D : RationalMind N n T Λ J) {Ω : Type u_1} [MeasurableSpace Ω] (hD : D.Admissible) (hW : D.WellPosed) (hs : D.sensed = Finset.univ) {e : ℝ} (he : 0 < e) (G : EquationGround Ω J) (hG : CompletedEquationGround G) :
                  AdmittedExperiment Ω N n T Λ J

                  02.12, 02.20: THE DATA RUN AS AN ADMITTED EXPERIMENT: the data's instance and admission at constant noise e times the loading, the schedule's world and the data's start. Only a completed Brownian ground is supplied.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    theorem MindFormal.RationalMind.experiment_input {N n : ℕ} {T Λ J : Type} [Fintype T] [Fintype Λ] [Fintype J] (D : RationalMind N n T Λ J) {Ω : Type u_1} [MeasurableSpace Ω] (hD : D.Admissible) (hW : D.WellPosed) (hs : D.sensed = Finset.univ) {e : ℝ} (he : 0 < e) (G : EquationGround Ω J) (hG : CompletedEquationGround G) (z : Ω) (hz : (D.experiment hD hW hs he G hG).data.toPhysicalBrownianData.Good z) {t : ℝ} (ht : 0 ≤ t) :

                    02.20: on the solver's common event the actual input is the schedule's.

                    noncomputable def MindFormal.RationalMind.heldK {N n : ℕ} {T Λ J : Type} [Fintype T] [Fintype Λ] (D : RationalMind N n T Λ J) (hD : D.Admissible) (C : Certificate N n T Λ) :

                    02.20: the drift's proved Lipschitz constant on the box of the schedule's input and the certificate's state norm plus one.

                    Equations
                    Instances For
                      noncomputable def MindFormal.RationalMind.heldNoise {N n : ℕ} {T Λ J : Type} [Fintype T] [Fintype Λ] [Fintype J] (D : RationalMind N n T Λ J) (hD : D.Admissible) (hW : D.WellPosed) (C : Certificate N n T Λ) (E : ℚ) :

                      02.20: THE NOISE'S CHOSEN SIZE for a corridor error E: E/(16·loadMax·e^{2KH}).

                      Equations
                      Instances For
                        theorem MindFormal.RationalMind.heldNoise_pos {N n : ℕ} {T Λ J : Type} [Fintype T] [Fintype Λ] [Fintype J] (D : RationalMind N n T Λ J) (hD : D.Admissible) (hW : D.WellPosed) (C : Certificate N n T Λ) {E : ℚ} (hE : 0 < E) (hL : 0 < D.loadMax) :
                        0 < D.heldNoise hD hW C E
                        noncomputable def MindFormal.RationalMind.heldExperiment {N n : ℕ} {T Λ J : Type} [Fintype T] [Fintype Λ] [Fintype J] (D : RationalMind N n T Λ J) {Ω : Type u_1} [MeasurableSpace Ω] (hD : D.Admissible) (hW : D.WellPosed) (hs : D.sensed = Finset.univ) (C : Certificate N n T Λ) {E : ℚ} (hE : 0 < E) (hL : 0 < D.loadMax) (G : EquationGround Ω J) (hG : CompletedEquationGround G) :
                        AdmittedExperiment Ω N n T Λ J

                        02.20: the held run: the data's experiment at the chosen noise.

                        Equations
                        Instances For
                          noncomputable def MindFormal.RationalMind.heldControl {N n : ℕ} {T Λ J : Type} [Fintype T] [Fintype Λ] [Fintype J] (D : RationalMind N n T Λ J) {Ω : Type u_1} [MeasurableSpace Ω] (hD : D.Admissible) (hW : D.WellPosed) (hs : D.sensed = Finset.univ) {C : Certificate N n T Λ} (hC : D.check C = true) {E : ℚ} (hE : 0 < E) (hE1 : E < 1) (hL : 0 < D.loadMax) (held : Option (Fin N)) (hfocus : ∀ p ∈ D.schedule, ∀ (i : Fin N), p.focus i = if held = some i then 1 else 0) (hh : D.heldCheck C E held = true) {e : ℝ} (he : 0 < e) (G : EquationGround Ω J) (hG : CompletedEquationGround G) :
                          LearningHeldControl (D.experiment hD hW hs he G hG).data.toPhysicalBrownianData fun (x : Ω) => D.reference hD hW

                          02.20: THE HELD CONTROLS of the data's run at noise size e from a checked certificate: input radius the schedule's bound, reference radius the certificate's norm, clearance one, no start or input mismatch, source levels 8e_E/e, with e_E the chosen size for error E, so that the driver bound is 8·e_E·loadMax at every e; the held mode of the schedule's focus and the native margins from the held check at error E < 1.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            theorem MindFormal.RationalMind.noise_event {N n : ℕ} {T Λ J : Type} [Fintype T] [Fintype Λ] [Fintype J] (D : RationalMind N n T Λ J) {Ω : Type u_1} [MeasurableSpace Ω] (hD : D.Admissible) (hW : D.WellPosed) (hs : D.sensed = Finset.univ) {C : Certificate N n T Λ} (hC : D.check C = true) {E : ℚ} (hE : 0 < E) (hE1 : E < 1) (hL : 0 < D.loadMax) (held : Option (Fin N)) (hfocus : ∀ p ∈ D.schedule, ∀ (i : Fin N), p.focus i = if held = some i then 1 else 0) (hh : D.heldCheck C E held = true) {e : ℝ} (he : 0 < e) (G : EquationGround Ω J) (hG : CompletedEquationGround G) :
                            have S := (D.experiment hD hW hs he G hG).data.toPhysicalBrownianData; ∃ (good : Set Ω), MeasurableSet good ∧ 1 - min 1 (sourceExcursionFailure (D.horizon hW) fun (x : J) => 8 * D.heldNoise hD hW C E / e) ≤ G.μ.real good ∧ ∀ z ∈ good, ((S.globalData z).state 0 = fun (c : CoordinateIndex (Fin N) n T Λ) => ↑(D.start c)) ∧ ∀ t ∈ Set.Icc 0 ↑(D.horizon hW), ‖(S.globalData z).state t - (ContinuousMap.IccExtend ⋯ (D.reference hD hW).path) t‖ ≤ ↑E ∧ (S.globalData z).pulse t = heldMode held ∧ (S.globalData z).input t = D.scheduleInput t

                            02.12, 02.20: THE DATA RUN'S EVENT AT ANY NOISE SIZE. For admissible, well-posed data with every content sensed, a checked certificate, a schedule whose focus is the held mode throughout and a passing held check at error E < 1: the data's run at every noise size e > 0 has a measurable event of mass at least 1 − min(1, Σ_j 2exp(−b²/(2e²H))), b = 8e_E with e_E the chosen size for E, on which, at every time of the schedule, the actual state is within E of the data's own reference, its own native focus pulse is the held mode, and its input is the schedule's; it starts at the data's start.

                            theorem MindFormal.RationalMind.held_event {N n : ℕ} {T Λ J : Type} [Fintype T] [Fintype Λ] [Fintype J] (D : RationalMind N n T Λ J) {Ω : Type u_1} [MeasurableSpace Ω] (hD : D.Admissible) (hW : D.WellPosed) (hs : D.sensed = Finset.univ) {C : Certificate N n T Λ} (hC : D.check C = true) {E : ℚ} (hE : 0 < E) (hE1 : E < 1) (hL : 0 < D.loadMax) (held : Option (Fin N)) (hfocus : ∀ p ∈ D.schedule, ∀ (i : Fin N), p.focus i = if held = some i then 1 else 0) (hh : D.heldCheck C E held = true) (G : EquationGround Ω J) (hG : CompletedEquationGround G) :
                            have S := (D.heldExperiment hD hW hs C hE hL G hG).data.toPhysicalBrownianData; ∃ (good : Set Ω), MeasurableSet good ∧ 1 - min 1 (sourceExcursionFailure (D.horizon hW) fun (x : J) => 8) ≤ G.μ.real good ∧ ∀ z ∈ good, ((S.globalData z).state 0 = fun (c : CoordinateIndex (Fin N) n T Λ) => ↑(D.start c)) ∧ ∀ t ∈ Set.Icc 0 ↑(D.horizon hW), ‖(S.globalData z).state t - (ContinuousMap.IccExtend ⋯ (D.reference hD hW).path) t‖ ≤ ↑E ∧ (S.globalData z).pulse t = heldMode held ∧ (S.globalData z).input t = D.scheduleInput t

                            02.12, 02.20: THE HELD RUN'S EVENT: the event at the chosen noise size for E, where the source levels are eight, of mass at least 1 − min(1, the sources' eight-level excursion failure).