MindFormal v1.0.0One Mind

MindFormal.Example.PageFunctions

PG1.6/PG1.14a: the shared page primitives, at every allowed real parameter.

@[reducible, inline]
Equations
Instances For
    noncomputable def MindFormal.PageFamily.drive (a u q : ℝ) (v : Values) :

    The page drive retains focus and both saturating value magnitudes.

    Equations
    Instances For
      noncomputable def MindFormal.PageFamily.gain (m : ℝ) (z : Unit → Fin 2 → ℝ) :

      The page gain reads the sum of both nonnegative surprise elements.

      Equations
      Instances For
        noncomputable def MindFormal.PageFamily.score (a : ℝ) (z : ℝ × Values) :

        Both native reads use the same activity and two signed value elements.

        Equations
        Instances For
          noncomputable def MindFormal.PageFamily.presence (saturated : Bool) (r : Unit → ℝ) :

          False selects PG1.6's linear presence, true PG1.14a's saturating presence.

          Equations
          Instances For
            theorem MindFormal.PageFamily.drive_regular (a : ℝ) :
            LipschitzOnBalls (fun (z : ℝ × ℝ × Values) => drive a z.1 z.2.1 z.2.2) {z : ℝ × ℝ × Values | 0 ≤ z.1 ∧ z.2.1 ∈ {0, 1}}

            The drive is jointly Lipschitz on bounded physical input/focus/value sets.

            theorem MindFormal.PageFamily.drive_branch_regular (a q : ℝ) :
            LipschitzOnBalls (fun (z : ℝ × Values) => drive a z.1 q z.2) {z : ℝ × Values | 0 ≤ z.1}

            The fixed-focus branch has the required joint input/value regularity.

            Every value path is covered: the two value effects together are between zero and two.

            theorem MindFormal.PageFamily.drive_bounds {a u q : ℝ} (ha : 0 ≤ a) (hu : 0 ≤ u) (hq : q ∈ {0, 1}) (v : Values) :
            u ≤ drive a u q v ∧ drive a u q v ≤ u + 3 * a

            At nonnegative input and binary focus the drive lies between u and u+3a.

            theorem MindFormal.PageFamily.drive_input_mono {a : ℝ} (ha : 0 ≤ a) (q : ℝ) (v : Values) :
            MonotoneOn (fun (u : ℝ) => drive a u q v) (Set.Ici 0)

            Input monotonicity includes zero and is uniform over all learned values.

            theorem MindFormal.PageFamily.drive_focus (a u q q' : ℝ) (v : Values) :
            drive a u q' v - drive a u q v = a * (q' - q)

            Focus changes the drive by exactly its positive coefficient at every input and value.

            theorem MindFormal.PageFamily.drive_magnitude_mono {a u : ℝ} (ha : 0 ≤ a) (hu : 0 ≤ u) (q : ℝ) (v w : Values) (h : ∀ (b : Fin 2) (t : Unit), |v b t| ≤ |w b t|) :
            drive a u q v ≤ drive a u q w

            Value magnitude monotonicity follows from strict saturation monotonicity.

            theorem MindFormal.PageFamily.drive_value_strict {a u : ℝ} (ha : 0 < a) (hu : 0 < u) (q : ℝ) (v : Values) (b : Fin 2) {x y : ℝ} (hxy : |x| < |y|) :
            drive a u q (Function.update v b fun (x_1 : Unit) => x) < drive a u q (Function.update v b fun (x : Unit) => y)

            With positive input, increasing either value magnitude strictly increases the drive.

            theorem MindFormal.PageFamily.drive_zero_input (a q : ℝ) (v : Values) :
            drive a 0 q v = a * q

            Zero input removes every value contribution, as the entry explicitly requires.

            theorem MindFormal.PageFamily.gain_bounds {m : ℝ} (hm : 0 < m) (z : Unit → Fin 2 → ℝ) (hz : 0 ≤ z) :
            m ≤ gain m z ∧ gain m z < 2 * m

            The gain remains between its positive scale and twice that scale on every surprise.

            theorem MindFormal.PageFamily.gain_mono {m : ℝ} (hm : 0 ≤ m) :
            MonotoneOn (gain m) {z : Unit → Fin 2 → ℝ | 0 ≤ z}

            The gain is nondecreasing on the full nonnegative surprise domain.

            theorem MindFormal.PageFamily.gain_nonconstant {m : ℝ} (hm : 0 < m) :
            gain m 0 < gain m fun (x : Unit) (x_1 : Fin 2) => 1

            The gain is nonconstant whenever its scale is positive.

            Gain regularity is proved on its nonnegative domain, with no pole there.

            Both full-state score formulas are locally Lipschitz, including at every signed value.

            theorem MindFormal.PageFamily.score_error {a : ℝ} (ha : 0 < a) (z : ℝ × Values) :
            |score a z - z.1| < 2 * a

            Every value path perturbs either score by less than 2a, uniformly in activity.

            theorem MindFormal.PageFamily.presence_order (saturated : Bool) :
            (∀ (r : Unit → ℝ), 0 ≤ r → 0 ≤ presence saturated r) ∧ MonotoneOn (presence saturated) {r : Unit → ℝ | 0 ≤ r} ∧ presence saturated 0 = 0

            Either specified presence is nonnegative, nondecreasing and zero at zero.

            theorem MindFormal.PageFamily.presence_lipschitz (saturated : Bool) :
            LipschitzOnWith 1 (presence saturated) {r : Unit → ℝ | 0 ≤ r}

            Both presence choices have Lipschitz constant one on physical traces.

            theorem MindFormal.PageFamily.presence_deriv (saturated : Bool) (r : Unit → ℝ) (hr : 0 ≤ r) :
            HasFDerivAt (presence saturated) ((if saturated = true then 1 / (1 + r ()) ^ 2 else 1) • ContinuousLinearMap.proj ()) r

            Presence is differentiable at every physical trace, including the zero boundary.

            theorem MindFormal.PageFamily.presence_fderiv (saturated : Bool) (r : Unit → ℝ) (hr : 0 ≤ r) :
            fderivWithin ℝ (presence saturated) {r : Unit → ℝ | 0 ≤ r} r = (if saturated = true then 1 / (1 + r ()) ^ 2 else 1) • ContinuousLinearMap.proj ()

            The actual physical-domain presence derivative is computed, never supplied.

            The actual presence derivative is Lipschitz on every bounded part of its domain.

            theorem MindFormal.PageFamily.presence_growth (saturated : Bool) :
            PrimitiveGrowth (presence saturated) {r : Unit → ℝ | 0 ≤ r}

            Each presence grows no faster than the trace maximum norm.

            theorem MindFormal.PageFamily.score_first_strict {a : ℝ} (ha : 0 < a) (x : ℝ) (v : Values) :
            StrictMono fun (t : ℝ) => score a (x, Function.update v 0 fun (x : Unit) => t)

            Increasing the first signed value strictly increases either read, at every state.

            theorem MindFormal.PageFamily.score_second_strict {a : ℝ} (ha : 0 < a) (x : ℝ) (v : Values) :
            StrictAnti fun (t : ℝ) => score a (x, Function.update v 1 fun (x : Unit) => t)

            Increasing the second signed value strictly decreases either read, at every state.

            Both value coordinates have a fixed read direction, uniformly in activity and other values.

            theorem MindFormal.PageFamily.score_growth {a : ℝ} (ha : 0 < a) :
            ∃ (K : ℝ), 0 ≤ K ∧ ∀ (z : NativeReadState 2 Unit), |score a ↑z| ≤ K * (1 + ‖↑z‖)

            The score's physical read has at most linear growth, uniformly in both values.

            theorem MindFormal.PageFamily.score_bounded_regular (a R : ℝ) (hR : 0 ≤ R) :
            ∃ (K : NNReal), LipschitzOnWith K (fun (z : NativeReadState 2 Unit) => score a ↑z) {z : NativeReadState 2 Unit | ‖↑z‖ ≤ R}

            The physical score has bounded-set Lipschitz constants on the actual read domain.