MindFormal v1.0.0One Mind

MindFormal.Chapters.Ch18.Feedforward

@[irreducible]
def MindFormal.LoadRegions.forward (g P : ℝ) (input : ℕ → ℝ) (W : (i : ℕ) → Fin i → ℝ) (i : ℕ) :

Forward substitution on a held ReLU graph in topological order. Only earlier vertices can feed a row; the first N rows form any declared finite graph. These are comparison activities, not a second native run.

Equations
Instances For
    noncomputable def MindFormal.LoadRegions.forwardSupport (g P : ℝ) (input : ℕ → ℝ) (W : (i : ℕ) → Fin i → ℝ) (i : ℕ) :

    The full transformed support of a forward-substituted row.

    Equations
    Instances For
      theorem MindFormal.LoadRegions.forward_target (g P : ℝ) (input : ℕ → ℝ) (W : (i : ℕ) → Fin i → ℝ) (i : ℕ) :
      forward g P input W i = max (forwardSupport g P input W i / P - g) 0

      Each row obeys the ordinary clipped target at the same proposed pool.

      theorem MindFormal.LoadRegions.forwardSupport_nonnegative (g P : ℝ) (input : ℕ → ℝ) (W : (i : ℕ) → Fin i → ℝ) (i : ℕ) :
      0 ≤ forwardSupport g P input W i

      Comparison support is nonnegative even for a signed external raw drive.

      theorem MindFormal.LoadRegions.forward_antitone (g : ℝ) (input : ℕ → ℝ) (W : (i : ℕ) → Fin i → ℝ) (hW : ∀ (i : ℕ) (j : Fin i), 0 ≤ W i j) (i : ℕ) :
      AntitoneOn (fun (P : ℝ) => forward g P input W i) (Set.Ioi 0)

      RM1.17: every forward activity is nonincreasing in the common pool, proved successively from all nonnegative incoming links.

      theorem MindFormal.LoadRegions.forwardSupport_antitone (g : ℝ) (input : ℕ → ℝ) (W : (i : ℕ) → Fin i → ℝ) (hW : ∀ (i : ℕ) (j : Fin i), 0 ≤ W i j) (i : ℕ) :
      AntitoneOn (fun (P : ℝ) => forwardSupport g P input W i) (Set.Ioi 0)

      Every complete raw/transformed support inherits that ordering.

      theorem MindFormal.LoadRegions.forward_continuous (g : ℝ) (input : ℕ → ℝ) (W : (i : ℕ) → Fin i → ℝ) (i : ℕ) :
      ContinuousOn (fun (P : ℝ) => forward g P input W i) (Set.Ioi 0)

      Finite forward substitution is continuous at every positive pool, including points where ReLU or activity changes branch.

      theorem MindFormal.LoadRegions.forwardSupport_continuous (g : ℝ) (input : ℕ → ℝ) (W : (i : ℕ) → Fin i → ℝ) (i : ℕ) :
      ContinuousOn (fun (P : ℝ) => forwardSupport g P input W i) (Set.Ioi 0)

      The full supports remain continuous through every clipping boundary.

      noncomputable def MindFormal.LoadRegions.poolResidual (N : ℕ) (σ g P : ℝ) (input : ℕ → ℝ) (W : (i : ℕ) → Fin i → ℝ) :

      Self-consistency uses every support in the finite graph once.

      Equations
      Instances For
        theorem MindFormal.LoadRegions.poolResidual_strict (N : ℕ) (σ g : ℝ) (input : ℕ → ℝ) (W : (i : ℕ) → Fin i → ℝ) (hW : ∀ (i : ℕ) (j : Fin i), 0 ≤ W i j) :
        StrictMonoOn (fun (P : ℝ) => poolResidual N σ g P input W) (Set.Ioi 0)

        The complete-pool residual is strictly increasing, although the individual activities can have flat zero branches.

        theorem MindFormal.LoadRegions.poolResidual_floor (N : ℕ) (σ g : ℝ) (input : ℕ → ℝ) (W : (i : ℕ) → Fin i → ℝ) :
        poolResidual N σ g σ input W ≤ 0

        The residual is nonpositive at the floor, with no assumption that any external drive or any balanced activity is positive.

        theorem MindFormal.LoadRegions.poolResidual_unbounded (N : ℕ) {σ : ℝ} (hσ : 0 < σ) (g : ℝ) (input : ℕ → ℝ) (W : (i : ℕ) → Fin i → ℝ) (hW : ∀ (i : ℕ) (j : Fin i), 0 ≤ W i j) (M : ℝ) :
        ∃ (P : ℝ), σ ≤ P ∧ ∀ (Q : ℝ), P ≤ Q → M < poolResidual N σ g Q input W

        The residual eventually exceeds every real level, uniformly for all larger proposed pools. This derives unboundedness from the finite graph.

        theorem MindFormal.LoadRegions.fullPool_exists_unique (N : ℕ) {σ : ℝ} (hσ : 0 < σ) (g : ℝ) (input : ℕ → ℝ) (W : (i : ℕ) → Fin i → ℝ) (hW : ∀ (i : ℕ) (j : Fin i), 0 ≤ W i j) :
        ∃! P : ℝ, σ ≤ P ∧ poolResidual N σ g P input W = 0

        RM1.17's self-consistent pool exists uniquely. Continuity and the opposite endpoint signs are proved from the same forward-substituted graph.

        noncomputable def MindFormal.LoadRegions.fullPool (N : ℕ) {σ : ℝ} (hσ : 0 < σ) (g : ℝ) (input : ℕ → ℝ) (W : (i : ℕ) → Fin i → ℝ) (hW : ∀ (i : ℕ) (j : Fin i), 0 ≤ W i j) :

        The unique pool computed by the preceding existence theorem.

        Equations
        Instances For
          theorem MindFormal.LoadRegions.fullPool_spec (N : ℕ) {σ : ℝ} (hσ : 0 < σ) (g : ℝ) (input : ℕ → ℝ) (W : (i : ℕ) → Fin i → ℝ) (hW : ∀ (i : ℕ) (j : Fin i), 0 ≤ W i j) :
          σ ≤ fullPool N hσ g input W hW ∧ fullPool N hσ g input W hW = σ + ∑ i : Fin N, forwardSupport g (fullPool N hσ g input W hW) input W ↑i

          The computed pool satisfies the complete finite support equation.

          theorem MindFormal.LoadRegions.fullPool_balanced (N : ℕ) {σ : ℝ} (hσ : 0 < σ) (g : ℝ) (input : ℕ → ℝ) (W : (i : ℕ) → Fin i → ℝ) (hW : ∀ (i : ℕ) (j : Fin i), 0 ≤ W i j) (i : Fin N) :
          forward g (fullPool N hσ g input W hW) input W ↑i = normalizedTarget σ g (fun (j : Fin N) => forwardSupport g (fullPool N hσ g input W hW) input W ↑j) i

          Every vertex of the declared finite graph is balanced at the computed pool, with precisely that graph's complete transformed supports.

          theorem MindFormal.LoadRegions.fullPool_strict (N : ℕ) {σ σ' : ℝ} (hσ : 0 < σ) (hσ' : 0 < σ') (increase : σ < σ') (g : ℝ) (input : ℕ → ℝ) (W : (i : ℕ) → Fin i → ℝ) (hW : ∀ (i : ℕ) (j : Fin i), 0 ≤ W i j) :
          fullPool N hσ g input W hW < fullPool N hσ' g input W hW

          Increasing the primitive floor strictly increases the unique self-consistent common pool, without holding its supports independent.

          theorem MindFormal.LoadRegions.balanced_forward_antitone (N : ℕ) {σ σ' : ℝ} (hσ : 0 < σ) (hσ' : 0 < σ') (increase : σ ≤ σ') (g : ℝ) (input : ℕ → ℝ) (W : (i : ℕ) → Fin i → ℝ) (hW : ∀ (i : ℕ) (j : Fin i), 0 ≤ W i j) (i : Fin N) :
          forward g (fullPool N hσ' g input W hW) input W ↑i ≤ forward g (fullPool N hσ g input W hW) input W ↑i

          Every balanced activity is nonincreasing as the floor rises. Together with the exact count and depth tests this proves the claimed loss ordering on the finite feedforward comparison.