MindFormal v1.0.0One Mind

MindFormal.Tools.A617Judgment.EpisodeClippedLog

Exact positive-part integration of an affine numerator over an affine positive denominator. The active interval is computed for every slope.

noncomputable def MindFormal.A617Judgment.Episodes.logPrimitive (C E D B g z : ℝ) :
Equations
Instances For
    theorem MindFormal.A617Judgment.Episodes.logPrimitive_derivative {C E D B g z : ℝ} (hD : 0 < D) (hz : 0 < D * z + B) :
    HasDerivAt (logPrimitive C E D B g) ((C * z + E) / (D * z + B) - g) z
    theorem MindFormal.A617Judgment.Episodes.clipped_fraction_eq {C E D B g z : ℝ} (hz : 0 < D * z + B) :
    (C * z + E) / (D * z + B) - g = ((C - g * D) * z + (E - g * B)) / (D * z + B)
    theorem MindFormal.A617Judgment.Episodes.clipped_log_integral {C E D B g v : ℝ} (hv : 1 ≤ v) (hD : 0 < D) (hden : ∀ z ∈ Set.Icc 1 v, 0 < D * z + B) :
    have W := linearWindow v (C - g * D) (E - g * B) hv; ∫ (z : ℝ) in 1..v, max ((C * z + E) / (D * z + B) - g) 0 = logPrimitive C E D B g W.hi - logPrimitive C E D B g W.lo