MindFormal v1.0.0One Mind

MindFormal.Tools.LikelihoodCalculus.Rest

theorem MindFormal.LikelihoodCalculus.clipped_derivative {f : ℝ → ℝ} {f' t : ℝ} (hf : HasDerivAt f f' t) (hne : f t ≠ 0) :
HasDerivAt (fun (y : ℝ) => max (f y) 0) (if 0 < f t then f' else 0) t
noncomputable def MindFormal.LikelihoodCalculus.targetMask {C : Type u_1} (P g : ℝ) (Z : C → ℝ) (i : C) :
Equations
Instances For
    noncomputable def MindFormal.LikelihoodCalculus.restJacobian {C : Type u_1} [DecidableEq C] (P g : ℝ) (Z ψ' : C → ℝ) :

    A (I/P-z1ᵀ/P²) Ψ', with the actual complete pool and branch mask.

    Equations
    Instances For
      theorem MindFormal.LikelihoodCalculus.restJacobian_action {C : Type u_1} [Fintype C] [DecidableEq C] (P g : ℝ) (Z ψ' v : C → ℝ) (i : C) :
      (restJacobian P g Z ψ').mulVec v i = targetMask P g Z i * (ψ' i * v i / P - (Z i * ∑ j : C, ψ' j * v j) / P ^ 2)
      theorem MindFormal.LikelihoodCalculus.solve_regular_rest {C : Type u_1} [Fintype C] [DecidableEq C] (B A : Matrix C C ℝ) (e' X' : C → ℝ) (h : X' = B.mulVec (e' + A.mulVec X')) (hr : IsUnit (1 - B * A).det) :
      X' = (1 - B * A)⁻¹.mulVec (B.mulVec e')

      Invertibility is used only after differentiating the complete rest equation.