Stat.Recurrent­Event.Counting­Process.Finite­Jump

This directory provides a finite-horizon, finite-sample compensated-integral isometry for simple recurrent-event counting processes.

Basic 14 core · 0 supporting A path is a finite set of distinct event times in a fixed positive horizon.

Finite-jump counting processes and their compensated integrals

A path is a finite set of distinct event times in a fixed positive horizon. The intensity premise is a conditional increment identity against every bounded observation available at the left endpoint. The predictable compensator formula and the quadratic isometry are consequences to be proved in later modules.

def predictableCylinders reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump

Predictable cylinders pair a left-open time interval with an event observable at the left endpoint.

Definition (Lean source)
Ω :
ℱ :
ℝ → MeasurableSpace Ω
predictableCylinders ℱ :
Set (Set (ℝ × Ω))
{S | ∃ (a b : ℝ) (B : Set Ω), MeasurableSet[ℱ a] B ∧ S = (Ioc a b) ×ˢ B}
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.predictableCylinders · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Basic.lean:19
def predictableSpace reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump

The predictable σ-algebra is generated by left-endpoint cylinders.

Definition (Lean source)
Ω :
ℱ :
ℝ → MeasurableSpace Ω
predictableSpace ℱ :
MeasurableSpace (ℝ × Ω)
MeasurableSpace.generateFrom (predictableCylinders ℱ)
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.predictableSpace · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Basic.lean:26
structure Model reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump

A finite-horizon, simple counting process with an absolutely continuous intensity, the product of an at-risk process and an intensity process, relative to a filtration. Each sample path carries a finite set of distinct event times, all strictly after zero and at or before a positive horizon; the set is measurable in the sense that the presence of an event at each fixed time is a measurable event, and the count of events up to each time is measurable for the history at that time. The filtration is increasing and contained in the ambient σ-algebra. The at-risk and intensity processes are nonnegative, jointly measurable, and predictable; their product is Lebesgue integrable over the horizon on every path and bounded above on the horizon by one constant common to all paths. The total event count has a finite second moment. The intensity premise is a conditional increment identity: for times a ≤ b between zero and the horizon and every bounded test function measurable for the history at a, the expectation of the test function times the number of events in the interval from a (exclusive) to b (inclusive) equals the expectation of the test function times the integral of the at-risk intensity over that interval, whenever both products are integrable.

Definition (Lean source)
Ω :
μ :
horizon :
ℝ
horizon_pos :
0 < horizon
eventTimes :
Ω → Finset ℝ
eventTimes_measurable :
Measurable eventTimes
events_in_horizon :
∀ ω t
if
t ∈ eventTimes ω
then
0 < t ∧ t ≤ horizon
filtration :
ℝ → MeasurableSpace Ω
filtration_mono :
Monotone filtration
filtration_le :
∀ t, filtration t ≤ (inferInstance : MeasurableSpace Ω)
atRisk :
ℝ → Ω → ℝ
intensity :
ℝ → Ω → ℝ
atRisk_joint_measurable :
Measurable (fun p : ℝ × Ω => atRisk p.1 p.2)
intensity_joint_measurable :
Measurable (fun p : ℝ × Ω => intensity p.1 p.2)
atRisk_predictable :
Measurable[predictableSpace filtration] (fun p : ℝ × Ω => atRisk p.1 p.2)
intensity_predictable :
Measurable[predictableSpace filtration] (fun p : ℝ × Ω => intensity p.1 p.2)
atRisk_nonneg :
∀ t ω, 0 ≤ atRisk t ω
intensity_nonneg :
∀ t ω, 0 ≤ intensity t ω
rate_integrable :
∀ ω, IntegrableOn (fun t => atRisk t ω * intensity t ω) (Ioc 0 horizon) volume
rate_bounded :
∃ C : ℝ, ∀ t ω, 0 ≤ t → t ≤ horizon → atRisk t ω * intensity t ω ≤ C
count_square_integrable :
Integrable (fun ω => ((eventTimes ω).card : ℝ) ^ 2) μ
count_adapted :
∀ t, Measurable[filtration t] (fun ω => ((eventTimes ω).filter (fun s => s ≤ t)).card)
conditional_intensity_increment :
∀ (a b : ℝ) (F : Ω → ℝ)
if
0 ≤ a
and
a ≤ b
and
b ≤ horizon
and
Measurable[filtration a] F
and
(∃ C : ℝ, ∀ ω, |F ω| ≤ C)
and
Integrable (fun ω => F ω * (((eventTimes ω).filter (fun t => a < t ∧ t ≤ b)).card : ℝ)) μ
and
Integrable (fun ω => F ω * ∫ t in Ioc a b, atRisk t ω * intensity t ω ∂volume) μ
then
(∫ ω, F ω * (((eventTimes ω).filter (fun t => a < t ∧ t ≤ b)).card : ℝ) ∂μ)
= ∫ ω, F ω * (∫ t in Ioc a b, atRisk t ω * intensity t ω ∂volume) ∂μ
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Basic.lean:31
def count reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

The count up to time t is the number of event times at or before t.

Definition (Lean source)
Ω :
M :
Model Ω μ
t :
ℝ
ω :
Ω
count M t ω :
ℕ
((M.eventTimes ω).filter (fun s => s ≤ t)).card
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.count · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Basic.lean:87 · uses Model
def compensator reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

The pathwise compensator is the integrated at-risk intensity through t.

Definition (Lean source)
Ω :
M :
Model Ω μ
t :
ℝ
ω :
Ω
compensator M t ω :
ℝ
∫ s in Ioc 0 t, M.atRisk s ω * M.intensity s ω ∂volume
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.compensator · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Basic.lean:92 · uses Model
def Predictable reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

A predictable integrand is measurable on time and sample under the predictable σ-algebra generated by left-endpoint observations.

Definition (Lean source)
Ω :
M :
Model Ω μ
H :
ℝ → Ω → ℝ
Predictable M H :
Prop
Measurable[predictableSpace M.filtration] (fun p : ℝ × Ω => H p.1 p.2)
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.Predictable · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Basic.lean:97 · uses Model
def jumpIntegral reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

The event part of a finite-jump stochastic integral is the finite sum of the predictable integrand evaluated at event times up to t.

Definition (Lean source)
Ω :
M :
Model Ω μ
H :
ℝ → Ω → ℝ
t :
ℝ
ω :
Ω
jumpIntegral M H t ω :
ℝ
∑ s ∈ (M.eventTimes ω).filter (fun s => s ≤ t), H s ω
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.jumpIntegral · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Basic.lean:103 · uses Model
def energyIntegral reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

The compensator part of a stochastic integral integrates the predictable integrand against the pathwise absolutely continuous compensator.

Definition (Lean source)
Ω :
M :
Model Ω μ
H :
ℝ → Ω → ℝ
t :
ℝ
ω :
Ω
energyIntegral M H t ω :
ℝ
∫ s in Ioc 0 t, H s ω * (M.atRisk s ω * M.intensity s ω) ∂volume
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.energyIntegral · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Basic.lean:110 · uses Model
def stochasticIntegral reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

The compensated stochastic integral is its finite event sum minus its integral against the at-risk intensity.

Definition (Lean source)
Ω :
M :
Model Ω μ
H :
ℝ → Ω → ℝ
t :
ℝ
ω :
Ω
stochasticIntegral M H t ω :
ℝ
M.jumpIntegral H t ω - M.energyIntegral H t ω
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.stochasticIntegral · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Basic.lean:117 · uses Model
def prefixIntegral reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

The strict-past compensated integral uses only events before t; its continuous compensator has no atom at t.

Definition (Lean source)
Ω :
M :
Model Ω μ
H :
ℝ → Ω → ℝ
t :
ℝ
ω :
Ω
prefixIntegral M H t ω :
ℝ
(∑ s ∈ (M.eventTimes ω).filter (fun s => s < t), H s ω) - M.energyIntegral H t ω
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.prefixIntegral · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Basic.lean:124 · uses Model
def quadraticPayoff reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

The quadratic payoff evaluates the square of the predictable integrand at each time and sample.

Definition (Lean source)
Ω :
_M :
Model Ω μ
H :
ℝ → Ω → ℝ
quadraticPayoff _M H :
ℝ → Ω → ℝ
fun t ω => (H t ω) ^ 2
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.quadraticPayoff · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Basic.lean:132 · uses Model
def prefixPayoff reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

The mixed payoff is twice the current integrand times the strictly past compensated integral. It is the cross term in the pathwise square expansion.

Definition (Lean source)
Ω :
M :
Model Ω μ
H :
ℝ → Ω → ℝ
prefixPayoff M H :
ℝ → Ω → ℝ
fun t ω => 2 * H t ω * M.prefixIntegral H t ω
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.prefixPayoff · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Basic.lean:138 · uses Model
def copyLaw reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

The law of n independent copies of one counting-process subject is the product of the subject law.

Definition (Lean source)
Ω :
_M :
Model Ω μ
n :
ℕ
copyLaw _M n :
Measure (Fin n → Ω)
Measure.pi (fun _ : Fin n => μ)
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.copyLaw · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Basic.lean:144 · uses Model
def copyIntegral reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

A subject-specific integral in a finite independent sample evaluates the single-subject compensated integral of that subject's own integrand, over the whole horizon, at that subject's coordinate of the sample.

Definition (Lean source)
Ω :
M :
Model Ω μ
n :
ℕ
H :
Fin n → ℝ → Ω → ℝ
i :
Fin n
x :
Fin n → Ω
copyIntegral M H i x :
ℝ
M.stochasticIntegral (H i) M.horizon (x i)
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.copyIntegral · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Basic.lean:150 · uses Model
Full­Sample 11 core · 6 supporting This is the specialization boundary for a finite-horizon recurrent-event model. ★ subject_integral_isometry

Stopped finite recurrent-event subjects in a full iid sample

This is the specialization boundary for a finite-horizon recurrent-event model. A subject supplies finitely many distinct unit jumps and an exit time. A concrete model supplies the conditional-increment Model for each subject on the whole sample, with a common history filtration. Integrands can use every coordinate.

The proof chain follows the public counting-process API: compensate predictable payoffs, expand squares and cross products with strict-past prefixes, and sum subject energies. The public one-event definitions have fixed failure/censor sample types, so they cannot represent multiple jumps; they are imported for the established API and proof conventions, without duplicating their model.

structure FiniteJumpSubject reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump

A subject carries finitely many positive, distinct recurrent-event times and a measurable exit time. Every represented event has multiplicity one; repeated unit events at distinct times are retained. Batch jumps are outside this simple counting-process model, since their quadratic variation is the square of the batch size rather than the batch size.

Definition (Lean source)
Ω :
jumpTimes :
Ω → Finset ℝ
exitTime :
Ω → ℝ
jumpTimes_measurable :
Measurable jumpTimes
exitTime_measurable :
Measurable exitTime
jump_positive :
∀ ω t
if
t ∈ jumpTimes ω
then
0 < t
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.FiniteJumpSubject · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/FullSample.lean:26
def observedStoppedJumps reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.FiniteJumpSubject

Observed recurrent events occur within the horizon and strictly before exit. Events at exit are assigned to exit, matching the public stopping rule.

Definition (Lean source)
Ω :
T :
ℝ
ω :
Ω
observedStoppedJumps D T ω :
Finset ℝ
(D.jumpTimes ω).filter (fun t => t ≤ T ∧ t < D.exitTime ω)
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.FiniteJumpSubject.observedStoppedJumps · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/FullSample.lean:38 · uses FiniteJumpSubject
def finiteSampleLaw reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump

The finite sample law is the iid product of the subject law.

Definition (Lean source)
Ω :
n :
ℕ
μ :
finiteSampleLaw n μ :
Measure (Fin n → Ω)
Measure.pi (fun _ : Fin n => μ)
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.finiteSampleLaw · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/FullSample.lean:45
structure SampleModel reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump

A finite iid recurrent-event model supplies subject conditional intensities on a common full-sample filtration. Its component Models contain explicit measurability, predictable nonnegative rates, count adaptedness, bounded rates, count second moments, and the conditional increment premise. The consistency fields identify stopped coordinate events and the density Y_i * lambda_i; no moment equality or orthogonality is a field of this record.

Definition (Lean source)
n :
ℕ
Ω :
μ :
subject :
horizon :
ℝ
horizon_pos :
0 < horizon
filtration :
ℝ → MeasurableSpace (Fin n → Ω)
intensity :
ℝ → Ω → ℝ
process :
Fin n → Model (Fin n → Ω) (finiteSampleLaw n μ)
process_horizon :
∀ i, (process i).horizon = horizon
process_filtration :
∀ i, (process i).filtration = filtration
process_events :
∀ i x, (process i).eventTimes x = subject.observedStoppedJumps horizon (x i)
process_atRisk :
∀ i t x, (process i).atRisk t x = if 0 ≤ t ∧ t ≤ subject.exitTime (x i) then 1 else 0
process_intensity :
∀ i t x, (process i).intensity t x = intensity t (x i)
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/FullSample.lean:57
def LeftPredictable reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel

A full-sample integrand is left predictable when measurable for the σ-algebra generated by observations available at the left endpoint of time intervals. No restriction to the integrated subject's coordinate is imposed.

Definition (Lean source)
n :
ℕ
shared
Ω :
Type u_1
shared
S :
SampleModel n Ω μ
H :
ℝ → (Fin n → Ω) → ℝ
LeftPredictable S H :
Prop
Measurable[predictableSpace S.filtration] (fun p : ℝ × (Fin n → Ω) => H p.1 p.2)
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel.LeftPredictable · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/FullSample.lean:80 · uses SampleModel
def subjectIntegral reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel

A subject integral sums the full-sample predictable payoff over that subject's stopped recurrent-event times, then subtracts its intensity integral.

Definition (Lean source)
n :
ℕ
shared
Ω :
Type u_1
shared
S :
SampleModel n Ω μ
H :
ℝ → (Fin n → Ω) → ℝ
i :
Fin n
x :
Fin n → Ω
subjectIntegral S H i x :
ℝ
(S.process i).stochasticIntegral H (S.process i).horizon x
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel.subjectIntegral · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/FullSample.lean:96 · uses SampleModel
def aggregateIntegral reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel

The aggregate compensated integral is the finite sum of subject integrals.

Definition (Lean source)
n :
ℕ
shared
Ω :
Type u_1
shared
S :
SampleModel n Ω μ
H :
ℝ → (Fin n → Ω) → ℝ
x :
Fin n → Ω
aggregateIntegral S H x :
ℝ
∑ i : Fin n, S.subjectIntegral H i x
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel.aggregateIntegral · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/FullSample.lean:120 · uses SampleModel
def subjectEnergy reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel

The subject quadratic energy integrates the squared full-sample payoff against that subject's stopped at-risk intensity.

Definition (Lean source)
n :
ℕ
shared
Ω :
Type u_1
shared
S :
SampleModel n Ω μ
H :
ℝ → (Fin n → Ω) → ℝ
i :
Fin n
x :
Fin n → Ω
subjectEnergy S H i x :
ℝ
(S.process i).energyIntegral (fun t x => (H t x) ^ 2) (S.process i).horizon x
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel.subjectEnergy · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/FullSample.lean:125 · uses SampleModel
def predictableEnergy reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel

The aggregate predictable quadratic energy is the sum of subject energies.

Definition (Lean source)
n :
ℕ
shared
Ω :
Type u_1
shared
S :
SampleModel n Ω μ
H :
ℝ → (Fin n → Ω) → ℝ
x :
Fin n → Ω
predictableEnergy S H x :
ℝ
∑ i : Fin n, S.subjectEnergy H i x
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel.predictableEnergy · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/FullSample.lean:131 · uses SampleModel
def QuadraticEnergyFinite reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel

Quadratic-energy finiteness means the nonnegative time-sample integral of squared payoff times at-risk intensity is finite for every subject.

Definition (Lean source)
n :
ℕ
shared
Ω :
Type u_1
shared
S :
SampleModel n Ω μ
H :
ℝ → (Fin n → Ω) → ℝ
i :
Fin n
QuadraticEnergyFinite S H :
Prop
(∫⁻ p : ℝ × (Fin n → Ω), ofReal ((H p.1 p.2) ^ 2 * ((S.process i).atRisk p.1 p.2 * (S.process i).intensity p.1 p.2)) ∂((volume.restrict (Ioc 0 S.horizon)).prod (finiteSampleLaw n μ))) < ⊤
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel.QuadraticEnergyFinite · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/FullSample.lean:136 · uses SampleModel
theorem subject_integral_isometry reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel

A subject's second moment equals its expected quadratic energy for a bounded predictable payoff depending on the entire finite sample. The sample model and payoff, left predictability, boundedness, and the subject index give the subjectwise isometry.

Formal statement
n :
ℕ
shared
Ω :
Type u_1
shared
S :
SampleModel n Ω μ
H :
ℝ → (Fin n → Ω) → ℝ
hH :
S.LeftPredictable H
hbound :
∃ C : ℝ, ∀ t x, |H t x| ≤ C
i :
Fin n
(∫ x, (S.subjectIntegral H i x) ^ 2 ∂finiteSampleLaw n μ)
= ∫ x, S.subjectEnergy H i x ∂finiteSampleLaw n μ
Proof (Lean source)
theorem SampleModel.subject_integral_isometry (S : SampleModel n Ω μ) [IsProbabilityMeasure μ] (H : ℝ → (Fin n → Ω) → ℝ) (hH : S.LeftPredictable H) (hbound : ∃ C : ℝ, ∀ t x, |H t x| ≤ C) (i : Fin n) : (∫ x, (S.subjectIntegral H i x) ^ 2 ∂finiteSampleLaw n μ) = ∫ x, S.subjectEnergy H i x ∂finiteSampleLaw n μ := by exact (S.process i).stochasticIntegral_isometry H (S.process_predictable H hH i) hbound
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel.subject_integral_isometry · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/FullSample.lean:169 · uses SampleModel , LeftPredictable , subjectEnergy , subjectIntegral , finiteSampleLaw
6 supporting declarations (lemmas, instances)
  • finiteSampleLaw_isProbability instance — The iid product of a probability subject law is a probability law.
    Ω :
    n :
    ℕ
    finiteSampleLaw_isProbability n μ :
    by unfold finiteSampleLaw infer_instance
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.finiteSampleLaw_isProbability · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/FullSample.lean:50
  • process_predictable theorem — Common-filtration predictability is predictability for every subject's conditional-intensity process on the full sample space.
    n :
    ℕ
    shared
    Ω :
    Type u_1
    shared
    S :
    SampleModel n Ω μ
    H :
    ℝ → (Fin n → Ω) → ℝ
    hH :
    S.LeftPredictable H
    i :
    Fin n
    (S.process i).Predictable H
    Proof (Lean source)
    theorem SampleModel.process_predictable (S : SampleModel n Ω μ) (H : ℝ → (Fin n → Ω) → ℝ) (hH : S.LeftPredictable H) (i : Fin n) : (S.process i).Predictable H := by unfold Model.Predictable rw [S.process_filtration i] exact hH
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel.process_predictable · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/FullSample.lean:87
  • subjectIntegral_eq_stopped theorem — The subject integral is exactly the payoff sum over observed stopped recurrent events minus the absolutely continuous Y_i * lambda_i integral.
    n :
    ℕ
    shared
    Ω :
    Type u_1
    shared
    S :
    SampleModel n Ω μ
    H :
    ℝ → (Fin n → Ω) → ℝ
    i :
    Fin n
    x :
    Fin n → Ω
    S.subjectIntegral H i x
    = (∑ t ∈ S.subject.observedStoppedJumps S.horizon (x i), H t x)
    - ∫ t in Ioc 0 S.horizon, H t x * ((if 0 ≤ t ∧ t ≤ S.subject.exitTime (x i) then 1 else 0) * S.intensity t (x i)) ∂volume
    Proof (Lean source)
    theorem SampleModel.subjectIntegral_eq_stopped (S : SampleModel n Ω μ) (H : ℝ → (Fin n → Ω) → ℝ) (i : Fin n) (x : Fin n → Ω) : S.subjectIntegral H i x = (∑ t ∈ S.subject.observedStoppedJumps S.horizon (x i), H t x) - ∫ t in Ioc 0 S.horizon, H t x * ((if 0 ≤ t ∧ t ≤ S.subject.exitTime (x i) then 1 else 0) * S.intensity t (x i)) ∂volume := by classical unfold SampleModel.subjectIntegral Model.stochasticIntegral Model.jumpIntegral Model.energyIntegral rw [S.process_horizon i, S.process_events i x] have hf : (S.subject.observedStoppedJumps S.horizon (x i)).filter (fun t => t ≤ S.horizon) = S.subject.observedStoppedJumps S.horizon (x i) := Finset.filter_eq_self.mpr (fun t ht => (Finset.mem_filter.mp ht).2.1) simp_rw [hf, S.process_atRisk, S.process_intensity]
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel.subjectIntegral_eq_stopped · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/FullSample.lean:102
  • predictable_compensation theorem — A bounded left-predictable payoff on the full sample has equal expected subject jump sum and subject compensator integral, derived from the component conditional intensity/increment premise.
    n :
    ℕ
    shared
    Ω :
    Type u_1
    shared
    S :
    SampleModel n Ω μ
    H :
    ℝ → (Fin n → Ω) → ℝ
    hH :
    S.LeftPredictable H
    hbound :
    ∃ C : ℝ, ∀ t x, |H t x| ≤ C
    i :
    Fin n
    (∫ x, (S.process i).jumpIntegral H (S.process i).horizon x ∂finiteSampleLaw n μ)
    = ∫ x, (S.process i).energyIntegral H (S.process i).horizon x ∂finiteSampleLaw n μ
    Proof (Lean source)
    theorem SampleModel.predictable_compensation (S : SampleModel n Ω μ) [IsProbabilityMeasure μ] (H : ℝ → (Fin n → Ω) → ℝ) (hH : S.LeftPredictable H) (hbound : ∃ C : ℝ, ∀ t x, |H t x| ≤ C) (i : Fin n) : (∫ x, (S.process i).jumpIntegral H (S.process i).horizon x ∂finiteSampleLaw n μ) = ∫ x, (S.process i).energyIntegral H (S.process i).horizon x ∂finiteSampleLaw n μ := by have hp := S.process_predictable H hH i exact (S.process i).bounded_predictable_compensator H hp hbound
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel.predictable_compensation · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/FullSample.lean:146
  • subject_integral_centered theorem — Subject integrals are centered for a bounded full-sample predictable payoff, by conditional-intensity compensation.
    n :
    ℕ
    shared
    Ω :
    Type u_1
    shared
    S :
    SampleModel n Ω μ
    H :
    ℝ → (Fin n → Ω) → ℝ
    hH :
    S.LeftPredictable H
    hbound :
    ∃ C : ℝ, ∀ t x, |H t x| ≤ C
    i :
    Fin n
    (∫ x, S.subjectIntegral H i x ∂finiteSampleLaw n μ) = 0
    Proof (Lean source)
    theorem SampleModel.subject_integral_centered (S : SampleModel n Ω μ) [IsProbabilityMeasure μ] (H : ℝ → (Fin n → Ω) → ℝ) (hH : S.LeftPredictable H) (hbound : ∃ C : ℝ, ∀ t x, |H t x| ≤ C) (i : Fin n) : (∫ x, S.subjectIntegral H i x ∂finiteSampleLaw n μ) = 0 := by exact (S.process i).stochasticIntegral_centered H (S.process_predictable H hH i) hbound
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel.subject_integral_centered · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/FullSample.lean:160
  • subject_square_integrable theorem — Bounded full-sample predictable subject integrals have integrable squares; this supplies actual Bochner integrability independently of a moment equality.
    n :
    ℕ
    shared
    Ω :
    Type u_1
    shared
    S :
    SampleModel n Ω μ
    H :
    ℝ → (Fin n → Ω) → ℝ
    hH :
    S.LeftPredictable H
    hbound :
    ∃ C : ℝ, ∀ t x, |H t x| ≤ C
    i :
    Fin n
    Integrable (fun x => (S.subjectIntegral H i x) ^ 2) (finiteSampleLaw n μ)
    Proof (Lean source)
    theorem SampleModel.subject_square_integrable (S : SampleModel n Ω μ) [IsProbabilityMeasure μ] (H : ℝ → (Fin n → Ω) → ℝ) (hH : S.LeftPredictable H) (hbound : ∃ C : ℝ, ∀ t x, |H t x| ≤ C) (i : Fin n) : Integrable (fun x => (S.subjectIntegral H i x) ^ 2) (finiteSampleLaw n μ) := by exact (S.process i).integrable_stochastic_square H (S.process_predictable H hH i) hbound
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel.subject_square_integrable · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/FullSample.lean:181
Cross­Regularity 2 core · 3 supporting All subjects share the full-sample history filtration. ★ crossPayoff_integrable

Predictability and absolute integrability of cross-subject payoffs

All subjects share the full-sample history filtration. A bounded predictable payoff times another subject's strict-past integral is therefore predictable. The count second moments and bounded rates supply its jump and time envelopes. This analytic layer is independent of diffuse jumps and pathwise cross products.

def crossPayoff reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel

The oriented cross payoff is the current full-sample integrand times the other subject's strict-past compensated integral.

Definition (Lean source)
n :
ℕ
shared
Ω :
Type u_1
shared
S :
SampleModel n Ω μ
H :
ℝ → (Fin n → Ω) → ℝ
j :
Fin n
crossPayoff S H j :
ℝ → (Fin n → Ω) → ℝ
fun t x => H t x * (S.process j).prefixIntegral H t x
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel.crossPayoff · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/CrossRegularity.lean:21 · uses SampleModel
theorem crossPayoff_integrable reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel

The absolute jump sum and absolute intensity integral of an oriented cross payoff are Bochner integrable under count second moments and bounded rates. The sample model and payoff, left predictability, the uniform bound, and the two subject indices give both Bochner-integrability conclusions.

Formal statement
n :
ℕ
shared
Ω :
Type u_1
shared
S :
SampleModel n Ω μ
H :
ℝ → (Fin n → Ω) → ℝ
hH :
S.LeftPredictable H
hbound :
∃ C : ℝ, ∀ t x, |H t x| ≤ C
i j :
Fin n
conclusion 1
Integrable ((S.process i).jumpIntegral (fun t x => |S.crossPayoff H j t x|) (S.process i).horizon) (finiteSampleLaw n μ)
conclusion 2
Integrable ((S.process i).energyIntegral (fun t x => |S.crossPayoff H j t x|) (S.process i).horizon) (finiteSampleLaw n μ)
Proof (Lean source)
theorem SampleModel.crossPayoff_integrable (S : SampleModel n Ω μ) [IsProbabilityMeasure μ] (H : ℝ → (Fin n → Ω) → ℝ) (hH : S.LeftPredictable H) (hbound : ∃ C : ℝ, ∀ t x, |H t x| ≤ C) (i j : Fin n) : Integrable ((S.process i).jumpIntegral (fun t x => |S.crossPayoff H j t x|) (S.process i).horizon) (finiteSampleLaw n μ) ∧ Integrable ((S.process i).energyIntegral (fun t x => |S.crossPayoff H j t x|) (S.process i).horizon) (finiteSampleLaw n μ) := by exact ⟨S.crossPayoff_jump_abs_integrable H hH hbound i j, S.crossPayoff_energy_abs_integrable H hH hbound i j⟩
3 supporting declarations (lemmas, instances)
  • crossPayoff_predictable theorem — An oriented cross payoff remains predictable for any subject's process, since all component processes share the full-sample history filtration.
    n :
    ℕ
    shared
    Ω :
    Type u_1
    shared
    S :
    SampleModel n Ω μ
    H :
    ℝ → (Fin n → Ω) → ℝ
    hH :
    S.LeftPredictable H
    i j :
    Fin n
    (S.process i).Predictable (S.crossPayoff H j)
    Proof (Lean source)
    theorem SampleModel.crossPayoff_predictable (S : SampleModel n Ω μ) (H : ℝ → (Fin n → Ω) → ℝ) (hH : S.LeftPredictable H) (i j : Fin n) : (S.process i).Predictable (S.crossPayoff H j) := by have hp := (S.process j).predictable_prefix H (S.process_predictable H hH j) have hp' : (S.process i).Predictable ((S.process j).prefixIntegral H) := by unfold Model.Predictable at hp ⊢ rw [S.process_filtration j] at hp rw [S.process_filtration i] exact hp exact (S.process_predictable H hH i).mul hp'
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel.crossPayoff_predictable · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/CrossRegularity.lean:27
  • crossPayoff_jump_abs_integrable theorem — The sum over one subject's jumps of the absolute oriented cross payoff is Bochner integrable for a bounded full-sample predictable integrand.
    n :
    ℕ
    shared
    Ω :
    Type u_1
    shared
    S :
    SampleModel n Ω μ
    H :
    ℝ → (Fin n → Ω) → ℝ
    hH :
    S.LeftPredictable H
    hbound :
    ∃ C : ℝ, ∀ t x, |H t x| ≤ C
    i j :
    Fin n
    Integrable ((S.process i).jumpIntegral (fun t x => |S.crossPayoff H j t x|) (S.process i).horizon) (finiteSampleLaw n μ)
    Proof (Lean source)
    theorem SampleModel.crossPayoff_jump_abs_integrable (S : SampleModel n Ω μ) [IsProbabilityMeasure μ] (H : ℝ → (Fin n → Ω) → ℝ) (hH : S.LeftPredictable H) (hbound : ∃ C : ℝ, ∀ t x, |H t x| ≤ C) (i j : Fin n) : Integrable ((S.process i).jumpIntegral (fun t x => |S.crossPayoff H j t x|) (S.process i).horizon) (finiteSampleLaw n μ) := by /- Use Model.abs_prefixIntegral_le on the j process and the common horizon. The payoff envelope is C^2*(count_j + R_j*T). Its product with count_i is integrable by MemLp.integrable_mul and the supplied count squares; the remaining count_i term uses integrable_eventCount. Apply the closed Model.integrable_jump_of_envelope to the measurable absolute payoff. Counts need not be independent, and i=j is deliberately included. -/ obtain ⟨C₀, hC₀⟩ := hbound let C : ℝ := |C₀| have hC : 0 ≤ C := abs_nonneg C₀ have hb : ∀ t x, |H t x| ≤ C := fun t x => (hC₀ t x).trans (le_abs_self C₀) obtain ⟨R, hR, hr⟩ := (S.process j).rate_horizon_uniform_bound let B : (Fin n → Ω) → ℝ := fun x => C * (C * (((S.process j).eventTimes x).card : ℝ) + C * (R * (S.process j).horizon)) have hpay := (S.process i).predictable_joint_measurable _ (S.crossPayoff_predictable H hH i j) have hpaybound (t : ℝ) (x : Fin n → Ω) (ht : 0 < t) (hT : t ≤ (S.process i).horizon) : |S.crossPayoff H j t x| ≤ B x := by have hTj : t ≤ (S.process j).horizon := by simpa only [S.process_horizon] using hT have hp := (S.process j).abs_prefixIntegral_le H C R hC hR hb (fun s x hs hS => (hr s x hs hS).2) t ⟨ht.le, hTj⟩ x unfold SampleModel.crossPayoff rw [abs_mul] exact mul_le_mul (hb t x) hp (abs_nonneg _) hC have hi₂ : MemLp (fun x => (((S.process i).eventTimes x).card : ℝ)) 2 (finiteSampleLaw n μ) := (memLp_two_iff_integrable_sq (S.process i).integrable_eventCount.aestronglyMeasurable).2 (S.process i).count_square_integrable have hj₂ : MemLp (fun x => (((S.process j).eventTimes x).card : ℝ)) 2 (finiteSampleLaw n μ) := (memLp_two_iff_integrable_sq (S.process j).integrable_eventCount.aestronglyMeasurable).2 (S.process j).count_square_integrable have hi : Integrable (fun x => B x * (((S.process i).eventTimes x).card : ℝ)) (finiteSampleLaw n μ) := by have h := ((hj₂.integrable_mul hi₂).const_mul (C * C)).add ((S.process i).integrable_eventCount.const_mul (C * C * (R * (S.process j).horizon))) refine h.congr (Filter.Eventually.of_forall fun x => ?_) dsimp [B] ring exact (S.process i).integrable_jump_of_envelope _ hpay.abs B hi (fun t x ht hT => by simpa only [abs_abs] using hpaybound t x ht hT)
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel.crossPayoff_jump_abs_integrable · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/CrossRegularity.lean:40
  • crossPayoff_energy_abs_integrable theorem — The intensity integral for one subject of the absolute oriented cross payoff is Bochner integrable for a bounded full-sample predictable integrand.
    n :
    ℕ
    shared
    Ω :
    Type u_1
    shared
    S :
    SampleModel n Ω μ
    H :
    ℝ → (Fin n → Ω) → ℝ
    hH :
    S.LeftPredictable H
    hbound :
    ∃ C : ℝ, ∀ t x, |H t x| ≤ C
    i j :
    Fin n
    Integrable ((S.process i).energyIntegral (fun t x => |S.crossPayoff H j t x|) (S.process i).horizon) (finiteSampleLaw n μ)
    Proof (Lean source)
    theorem SampleModel.crossPayoff_energy_abs_integrable (S : SampleModel n Ω μ) [IsProbabilityMeasure μ] (H : ℝ → (Fin n → Ω) → ℝ) (hH : S.LeftPredictable H) (hbound : ∃ C : ℝ, ∀ t x, |H t x| ≤ C) (i j : Fin n) : Integrable ((S.process i).energyIntegral (fun t x => |S.crossPayoff H j t x|) (S.process i).horizon) (finiteSampleLaw n μ) := by /- The same prefix envelope C^2*(count_j + R_j*T) has a first moment. Use Model.integrable_energy_of_envelope with process i's rate bound, and predictable_joint_measurable applied to crossPayoff_predictable. Transfer the horizon with process_horizon. This does not depend on the jump-integrability lemma, no-common-jumps, or compensation. -/ obtain ⟨C₀, hC₀⟩ := hbound let C : ℝ := |C₀| have hC : 0 ≤ C := abs_nonneg C₀ have hb : ∀ t x, |H t x| ≤ C := fun t x => (hC₀ t x).trans (le_abs_self C₀) obtain ⟨R, hR, hr⟩ := (S.process j).rate_horizon_uniform_bound let B : (Fin n → Ω) → ℝ := fun x => C * (C * (((S.process j).eventTimes x).card : ℝ) + C * (R * (S.process j).horizon)) have hpay := (S.process i).predictable_joint_measurable _ (S.crossPayoff_predictable H hH i j) have hpaybound (t : ℝ) (x : Fin n → Ω) (ht : 0 < t) (hT : t ≤ (S.process i).horizon) : |S.crossPayoff H j t x| ≤ B x := by have hTj : t ≤ (S.process j).horizon := by simpa only [S.process_horizon] using hT have hp := (S.process j).abs_prefixIntegral_le H C R hC hR hb (fun s x hs hS => (hr s x hs hS).2) t ⟨ht.le, hTj⟩ x unfold SampleModel.crossPayoff rw [abs_mul] exact mul_le_mul (hb t x) hp (abs_nonneg _) hC have hi : Integrable B (finiteSampleLaw n μ) := (((S.process j).integrable_eventCount.const_mul C).add (integrable_const (C * (R * (S.process j).horizon)))).const_mul C have hnonneg (x : Fin n → Ω) : 0 ≤ B x := by dsimp [B] have hT := (S.process j).horizon_pos.le positivity obtain ⟨Ri, hRi, hri⟩ := (S.process i).rate_horizon_uniform_bound exact (S.process i).integrable_energy_of_envelope _ hpay.abs B hi hnonneg Ri (fun t x ht hT => (hri t x ht hT).2) (fun t x ht hT => by simpa only [abs_abs] using hpaybound t x ht hT)
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel.crossPayoff_energy_abs_integrable · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/CrossRegularity.lean:97
Energy­Occupation 2 core · 2 supporting The intensity occupation measure weights time-sample product measure by the nonnegative at-risk intensity on the finite horizon. ★ energyOccupation_indicator

The intensity occupation measure of a finite-jump model

The intensity occupation measure weights time-sample product measure by the nonnegative at-risk intensity on the finite horizon. Its mass is the expected compensator integral of an indicator.

def energyOccupation reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

The intensity occupation measure is the measure on time-sample pairs whose density is the nonnegative at-risk intensity, relative to the product of Lebesgue measure on the horizon interval (zero excluded, horizon included) and the sample law.

Definition (Lean source)
Ω :
Type u_1
shared
M :
Model Ω μ
energyOccupation M :
Measure (ℝ × Ω)
((volume.restrict (Ioc 0 M.horizon)).prod μ).withDensity (fun p => ofReal (M.atRisk p.1 p.2 * M.intensity p.1 p.2))
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.energyOccupation · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/EnergyOccupation.lean:20 · uses Model
theorem energyOccupation_indicator reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

The intensity occupation mass of a measurable time-sample set equals the expected integral of its indicator against at-risk intensity. The model and measurable set, together with integrability of its energy indicator, give the occupation-mass identity.

Formal statement
Ω :
Type u_1
shared
M :
Model Ω μ
S :
Set (ℝ × Ω)
hS :
henergy :
Integrable (M.energyIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon) μ
(M.energyOccupation S).toReal
= ∫ ω, M.energyIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon ω ∂μ
Proof (Lean source)
theorem Model.energyOccupation_indicator (M : Model Ω μ) [IsProbabilityMeasure μ] (S : Set (ℝ × Ω)) (hS : MeasurableSet S) (henergy : Integrable (M.energyIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon) μ) : (M.energyOccupation S).toReal = ∫ ω, M.energyIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon ω ∂μ := by let r : ℝ × Ω → ℝ := fun p => M.atRisk p.1 p.2 * M.intensity p.1 p.2 let f : ℝ × Ω → ℝ := fun p => S.indicator (fun _ => (1 : ℝ)) p * r p have hrmeas : Measurable r := M.atRisk_joint_measurable.mul M.intensity_joint_measurable have hfmeas : Measurable f := (measurable_const.indicator hS).mul hrmeas have hfnonneg : ∀ p, 0 ≤ f p := by intro p by_cases hp : p ∈ S <;> simp [f, r, indicator, hp, mul_nonneg (M.atRisk_nonneg p.1 p.2) (M.intensity_nonneg p.1 p.2)] have hsection (ω : Ω) : Integrable (fun t => f (t, ω)) (volume.restrict (Ioc 0 M.horizon)) := by have hs : MeasurableSet {t : ℝ | (t, ω) ∈ S} := hS.preimage measurable_prodMk_right have h := (M.rate_integrable ω).indicator hs change Integrable (indicator {t : ℝ | (t, ω) ∈ S} (fun t => M.atRisk t ω * M.intensity t ω)) (volume.restrict (Ioc 0 M.horizon)) at h convert h using 1 funext t by_cases ht : (t, ω) ∈ S <;> simp [f, r, indicator, ht] have htime (ω : Ω) : ∫⁻ t, ofReal (f (t, ω)) ∂(volume.restrict (Ioc 0 M.horizon)) = ofReal (M.energyIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon ω) := by rw [← ofReal_integral_eq_lintegral_ofReal (hsection ω) (Filter.Eventually.of_forall (fun t => hfnonneg (t, ω)))] rfl have hmass : M.energyOccupation S = ∫⁻ ω, ofReal (M.energyIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon ω) ∂μ := by rw [Model.energyOccupation, withDensity_apply _ hS] rw [← lintegral_indicator hS] have hpoint : S.indicator (fun p => ofReal (r p)) = fun p => ofReal (f p) := by funext p by_cases hp : p ∈ S <;> simp [f, indicator, hp] rw [hpoint, lintegral_prod_symm' _ hfmeas.ennreal_ofReal] simp_rw [htime] have hnonneg : ∀ ω, 0 ≤ M.energyIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon ω := by intro ω change 0 ≤ ∫ t in Ioc 0 M.horizon, f (t, ω) ∂volume exact integral_nonneg (fun t => hfnonneg (t, ω)) have hreal := ofReal_integral_eq_lintegral_ofReal henergy (Filter.Eventually.of_forall hnonneg) rw [← hmass] at hreal rw [← hreal] exact ENNReal.toReal_ofReal (integral_nonneg hnonneg)
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.energyOccupation_indicator · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/EnergyOccupation.lean:61 · uses Model , energyIntegral , energyOccupation
2 supporting declarations (lemmas, instances)
  • rate_horizon_uniform_bound theorem — On the observed horizon the at-risk intensity is nonnegative and has a common finite upper bound, uniformly over sample paths.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    ∃ C : ℝ,
    0 ≤ C
    conclusion 1
    t ω :
    0 ≤ t
    t ≤ M.horizon
    0 ≤ M.atRisk t ω * M.intensity t ω
    M.atRisk t ω * M.intensity t ω ≤ C
    Proof (Lean source)
    theorem Model.rate_horizon_uniform_bound (M : Model Ω μ) : ∃ C : ℝ, 0 ≤ C ∧ ∀ t ω, 0 ≤ t → t ≤ M.horizon → 0 ≤ M.atRisk t ω * M.intensity t ω ∧ M.atRisk t ω * M.intensity t ω ≤ C := by obtain ⟨C, hC⟩ := M.rate_bounded refine ⟨max C 0, le_max_right _ _, ?_⟩ intro t ω ht hT exact ⟨mul_nonneg (M.atRisk_nonneg t ω) (M.intensity_nonneg t ω), (hC t ω ht hT).trans (le_max_left _ _)⟩
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.rate_horizon_uniform_bound · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/EnergyOccupation.lean:28
  • energyOccupation_finite theorem — A uniformly bounded at-risk intensity on the finite horizon makes the intensity occupation measure finite under a probability law.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    M.energyOccupation univ < ⊤
    Proof (Lean source)
    theorem Model.energyOccupation_finite (M : Model Ω μ) [IsProbabilityMeasure μ] : M.energyOccupation univ < ⊤ := by obtain ⟨C, hC, hrate⟩ := M.rate_horizon_uniform_bound have : IsFiniteMeasure ((volume.restrict (Ioc 0 M.horizon)).prod μ) := inferInstance have hbound : ∀ᵐ p ∂(volume.restrict (Ioc 0 M.horizon)).prod μ, ofReal (M.atRisk p.1 p.2 * M.intensity p.1 p.2) ≤ ofReal C := by have h : ∀ᵐ p ∂(volume.prod μ).restrict (Ioc 0 M.horizon ×ˢ univ), ofReal (M.atRisk p.1 p.2 * M.intensity p.1 p.2) ≤ ofReal C := ae_restrict_of_forall_mem (measurableSet_Ioc.prod MeasurableSet.univ) (fun p hp => ENNReal.ofReal_le_ofReal (hrate p.1 p.2 (le_of_lt hp.1.1) hp.1.2).2) rw [← Measure.prod_restrict, Measure.restrict_univ] at h exact h rw [Model.energyOccupation, withDensity_apply _ MeasurableSet.univ] simpa using lt_of_le_of_lt (lintegral_mono_ae hbound) (lintegral_const_lt_top ENNReal.ofReal_ne_top)
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.energyOccupation_finite · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/EnergyOccupation.lean:40
Jump­Enumeration 2 core · 6 supporting The count process determines each ordered event time as a threshold-hitting time. ★ jumpIntegral_eq_sum_jumpTime

Measurable enumeration of finite counting-process jumps

The count process determines each ordered event time as a threshold-hitting time. This supplies a countable representation of the random finite jump sum, even though measurability of a finite set under its membership σ-algebra alone does not give measurability of its cardinality or of arbitrary weighted sums.

def jumpTime reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

The kth jump time is the first time by which at least k + 1 events have occurred. The value for an index beyond the last event is irrelevant.

Definition (Lean source)
Ω :
Type u_1
shared
M :
Model Ω μ
k :
ℕ
ω :
Ω
jumpTime M k ω :
ℝ
sInf {t : ℝ | k + 1 ≤ M.count t ω}
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.jumpTime · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/JumpEnumeration.lean:21 · uses Model
theorem jumpIntegral_eq_sum_jumpTime reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

A finite jump sum is the sum over the ordered threshold times below the event count. This is the pathwise enumeration used for measurability. The model, payoff, and path give the ordered-jump representation.

Formal statement
Ω :
Type u_1
shared
M :
Model Ω μ
H :
ℝ → Ω → ℝ
ω :
Ω
M.jumpIntegral H M.horizon ω
= ∑ k ∈ range (M.eventTimes ω).card, H (M.jumpTime k ω) ω
Proof (Lean source)
theorem Model.jumpIntegral_eq_sum_jumpTime (M : Model Ω μ) (H : ℝ → Ω → ℝ) (ω : Ω) : M.jumpIntegral H M.horizon ω = ∑ k ∈ range (M.eventTimes ω).card, H (M.jumpTime k ω) ω := by classical let s := M.eventTimes ω have hfilter : s.filter (· ≤ M.horizon) = s := Finset.filter_eq_self.mpr (fun t ht => (M.events_in_horizon ω t ht).2) have hsub : (range s.card).image (fun k => M.jumpTime k ω) ⊆ s := by intro t ht obtain ⟨k, hk, rfl⟩ := Finset.mem_image.mp ht exact M.jumpTime_mem k ω (Finset.mem_range.mp hk) have hinj : InjOn (fun k => M.jumpTime k ω) (range s.card) := by intro i hi j hj hij exact M.jumpTime_injective ω i j (Finset.mem_range.mp hi) (Finset.mem_range.mp hj) hij have himage : (range s.card).image (fun k => M.jumpTime k ω) = s := by apply Finset.eq_of_subset_of_card_le hsub rw [Finset.card_image_of_injOn hinj, Finset.card_range] change (∑ t ∈ s.filter (· ≤ M.horizon), H t ω) = _ rw [hfilter, ← himage, Finset.sum_image hinj]
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.jumpIntegral_eq_sum_jumpTime · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/JumpEnumeration.lean:166 · uses Model , jumpIntegral , jumpTime
6 supporting declarations (lemmas, instances)
  • measurable_eventCard theorem — The number of events by the horizon is measurable under the ambient sample σ-algebra, as a consequence of adaptedness of the count process.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    Measurable (fun ω => (M.eventTimes ω).card)
    Proof (Lean source)
    theorem Model.measurable_eventCard (M : Model Ω μ) : Measurable (fun ω => (M.eventTimes ω).card) := by have hEq : (fun ω => (M.eventTimes ω).card) = M.count M.horizon := by funext ω classical change (M.eventTimes ω).card = ((M.eventTimes ω).filter (fun t => t ≤ M.horizon)).card congr 1 exact (Finset.filter_eq_self.mpr (fun t ht => (M.events_in_horizon ω t ht).2)).symm rw [hEq] exact (M.count_adapted M.horizon).mono (M.filtration_le M.horizon) le_rfl
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.measurable_eventCard · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/JumpEnumeration.lean:26
  • jumpTime_mem theorem — Every in-range jump-time threshold is an event time in the finite path.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    k :
    ℕ
    ω :
    Ω
    hk :
    k < (M.eventTimes ω).card
    M.jumpTime k ω ∈ M.eventTimes ω
    Proof (Lean source)
    theorem Model.jumpTime_mem (M : Model Ω μ) (k : ℕ) (ω : Ω) (hk : k < (M.eventTimes ω).card) : M.jumpTime k ω ∈ M.eventTimes ω := (M.jumpTime_event k ω hk).1
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.jumpTime_mem · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/JumpEnumeration.lean:94
  • jumpTime_injective theorem — Distinct in-range threshold indices identify distinct event times.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    ω :
    Ω
    i j :
    ℕ
    hi :
    i < (M.eventTimes ω).card
    hj :
    j < (M.eventTimes ω).card
    hij :
    M.jumpTime i ω = M.jumpTime j ω
    i = j
    Proof (Lean source)
    theorem Model.jumpTime_injective (M : Model Ω μ) (ω : Ω) (i j : ℕ) (hi : i < (M.eventTimes ω).card) (hj : j < (M.eventTimes ω).card) (hij : M.jumpTime i ω = M.jumpTime j ω) : i = j := by have hci := M.count_jumpTime i ω hi have hcj := M.count_jumpTime j ω hj rw [hij] at hci omega
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.jumpTime_injective · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/JumpEnumeration.lean:156
  • measurable_jumpTime theorem — Each ordered event time is measurable because all count thresholds at fixed times are measurable with respect to the ambient sample σ-algebra.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    k :
    ℕ
    Measurable (M.jumpTime k)
    Proof (Lean source)
    theorem Model.measurable_jumpTime (M : Model Ω μ) (k : ℕ) : Measurable (M.jumpTime k) := by apply measurable_of_Iio intro a have hset : (M.jumpTime k) ⁻¹' Iio a = ({ω | (M.eventTimes ω).card ≤ k} ∩ {ω | (0 : ℝ) < a}) ∪ ⋃ q : ℚ, {ω | (q : ℝ) < a ∧ k + 1 ≤ M.count q ω} := by ext ω simp only [Set.mem_preimage, Set.mem_Iio, Set.mem_union, Set.mem_inter, Set.mem_setOf_eq, Set.mem_iUnion] constructor · intro h by_cases hk : (M.eventTimes ω).card ≤ k · left exact ⟨hk, by simpa [M.jumpTime_eq_zero_of_card_le k ω hk] using h⟩ · right have hki : k < (M.eventTimes ω).card := by omega obtain ⟨q, hqlo, hqhi⟩ := exists_rat_btwn h refine ⟨q, hqhi, ?_⟩ have hcount := (M.jumpTime_event k ω hki).2 have hmono : M.count (M.jumpTime k ω) ω ≤ M.count q ω := by unfold Model.count apply Finset.card_le_card intro v hv exact Finset.mem_filter.mpr ⟨(Finset.mem_filter.mp hv).1, le_trans (Finset.mem_filter.mp hv).2 (le_of_lt hqlo)⟩ omega · rintro (⟨hk, ha⟩ | ⟨q, hqa, hq⟩) · simpa [M.jumpTime_eq_zero_of_card_le k ω hk] using ha · exact lt_of_le_of_lt (M.jumpTime_le_of_count k ω q hq) hqa rw [hset] apply MeasurableSet.union · have ha : MeasurableSet {ω : Ω | (0 : ℝ) < a} := by by_cases h : (0 : ℝ) < a · simpa [h] using (measurableSet_univ : MeasurableSet (Set.univ : Set Ω)) · simpa [h] using (measurableSet_empty : MeasurableSet (∅ : Set Ω)) exact (M.measurable_eventCard measurableSet_Iic).inter ha · apply MeasurableSet.iUnion intro q have hc : Measurable (M.count q) := (M.count_adapted q).mono (M.filtration_le q) le_rfl have ha : MeasurableSet {ω : Ω | (q : ℝ) < a} := by by_cases h : (q : ℝ) < a · simpa [h] using (measurableSet_univ : MeasurableSet (Set.univ : Set Ω)) · simpa [h] using (measurableSet_empty : MeasurableSet (∅ : Set Ω)) exact ha.inter (hc measurableSet_Ici)
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.measurable_jumpTime · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/JumpEnumeration.lean:219
  • measurable_jumpIntegral theorem — Joint measurability of a payoff makes its sum over a random finite event set measurable when the count process is adapted.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    H :
    ℝ → Ω → ℝ
    hH :
    Measurable (fun p : ℝ × Ω => H p.1 p.2)
    Measurable (M.jumpIntegral H M.horizon)
    Proof (Lean source)
    theorem Model.measurable_jumpIntegral (M : Model Ω μ) (H : ℝ → Ω → ℝ) (hH : Measurable (fun p : ℝ × Ω => H p.1 p.2)) : Measurable (M.jumpIntegral H M.horizon) := by have hterm (k : ℕ) : Measurable (fun ω => H (M.jumpTime k ω) ω) := by exact hH.comp ((M.measurable_jumpTime k).prodMk measurable_id) have hsum (n : ℕ) : Measurable (fun ω => ∑ k ∈ range n, H (M.jumpTime k ω) ω) := by exact Finset.measurable_sum _ (fun k _ => hterm k) have hcard := M.measurable_eventCard apply measurable_of_Iio intro a have hset : (M.jumpIntegral H M.horizon) ⁻¹' Iio a = ⋃ n : ℕ, {ω | (M.eventTimes ω).card = n} ∩ (fun ω => ∑ k ∈ range n, H (M.jumpTime k ω) ω) ⁻¹' Iio a := by ext ω simp only [Set.mem_preimage, Set.mem_Iio, Set.mem_iUnion, Set.mem_inter, Set.mem_setOf_eq] constructor · intro h refine ⟨(M.eventTimes ω).card, rfl, ?_⟩ change (∑ k ∈ range (M.eventTimes ω).card, H (M.jumpTime k ω) ω) < a rwa [M.jumpIntegral_eq_sum_jumpTime H ω] at h · rintro ⟨n, hn, h⟩ change (∑ k ∈ range n, H (M.jumpTime k ω) ω) < a at h change M.jumpIntegral H M.horizon ω < a rw [M.jumpIntegral_eq_sum_jumpTime H ω, hn] exact h rw [hset] apply MeasurableSet.iUnion intro n exact (hcard (measurableSet_singleton n)).inter (hsum n measurableSet_Iio)
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.measurable_jumpIntegral · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/JumpEnumeration.lean:268
  • measurable_energyIntegral theorem — Joint measurability of the payoff makes its pathwise integral against the jointly measurable at-risk intensity measurable in the sample.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    H :
    ℝ → Ω → ℝ
    hH :
    Measurable (fun p : ℝ × Ω => H p.1 p.2)
    Measurable (M.energyIntegral H M.horizon)
    Proof (Lean source)
    theorem Model.measurable_energyIntegral (M : Model Ω μ) (H : ℝ → Ω → ℝ) (hH : Measurable (fun p : ℝ × Ω => H p.1 p.2)) : Measurable (M.energyIntegral H M.horizon) := by have hf : Measurable (fun p : ℝ × Ω => H p.1 p.2 * (M.atRisk p.1 p.2 * M.intensity p.1 p.2)) := hH.mul (M.atRisk_joint_measurable.mul M.intensity_joint_measurable) have hi := (hf.stronglyMeasurable.integral_prod_left' (μ := volume.restrict (Ioc 0 M.horizon))).measurable exact hi
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.measurable_energyIntegral · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/JumpEnumeration.lean:303
Jump­Occupation 2 core · 1 supporting The event occupation measure records every ordered jump together with its sample path. ★ jumpOccupation_indicator

The event occupation measure of a finite-jump path

The event occupation measure records every ordered jump together with its sample path. Its total mass is the expected number of events, and its mass on a measurable time-sample set is the expected finite event sum of its indicator.

def jumpOccupation reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

The event occupation measure sums the laws of the indexed jump time and sample, restricted to paths with that jump index present.

Definition (Lean source)
Ω :
Type u_1
shared
M :
Model Ω μ
jumpOccupation M :
Measure (ℝ × Ω)
Measure.sum (fun k : ℕ => Measure.map (fun ω : Ω => (M.jumpTime k ω, ω)) (μ.restrict {ω | k < (M.eventTimes ω).card}))
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.jumpOccupation · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/JumpOccupation.lean:20 · uses Model
theorem jumpOccupation_indicator reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

The mass of a measurable time-sample set under the event occupation measure is the expected finite sum of its indicator over event times. The model and measurable set, together with integrability of its event indicator, give the occupation-mass identity.

Formal statement
Ω :
Type u_1
shared
M :
Model Ω μ
S :
Set (ℝ × Ω)
hS :
hjump :
Integrable (M.jumpIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon) μ
(M.jumpOccupation S).toReal
= ∫ ω, M.jumpIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon ω ∂μ
Proof (Lean source)
theorem Model.jumpOccupation_indicator (M : Model Ω μ) [IsProbabilityMeasure μ] (S : Set (ℝ × Ω)) (hS : MeasurableSet S) (hjump : Integrable (M.jumpIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon) μ) : (M.jumpOccupation S).toReal = ∫ ω, M.jumpIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon ω ∂μ := by let F : Ω → ℝ := M.jumpIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon have hnonneg : ∀ ω, 0 ≤ F ω := by intro ω change 0 ≤ M.jumpIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon ω rw [M.jumpIntegral_eq_sum_jumpTime] apply Finset.sum_nonneg intro k hk unfold indicator split_ifs <;> norm_num have hlintegral : ofReal (∫ ω, F ω ∂μ) = M.jumpOccupation S := by rw [M.jumpOccupation_apply S hS] exact ofReal_integral_eq_lintegral_ofReal hjump (Filter.Eventually.of_forall hnonneg) rw [← hlintegral] exact ENNReal.toReal_ofReal (integral_nonneg hnonneg)
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.jumpOccupation_indicator · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/JumpOccupation.lean:100 · uses Model , jumpIntegral , jumpOccupation
1 supporting declaration (lemmas, instances)
  • jumpOccupation_finite theorem — Under a probability law and an integrable event count, the total mass of the event occupation measure is finite.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    M.jumpOccupation univ < ⊤
    Proof (Lean source)
    theorem Model.jumpOccupation_finite (M : Model Ω μ) [IsProbabilityMeasure μ] : M.jumpOccupation univ < ⊤ := by have hmeas : Measurable (fun ω => ((M.eventTimes ω).card : ℝ)) := (measurable_of_countable (fun n : ℕ => (n : ℝ))).comp M.measurable_eventCard have hcount : Integrable (fun ω => ((M.eventTimes ω).card : ℝ)) μ := ((memLp_two_iff_integrable_sq hmeas.aestronglyMeasurable).2 M.count_square_integrable).integrable one_le_two have heq : M.jumpOccupation univ = ∫⁻ ω, ofReal ((M.eventTimes ω).card : ℝ) ∂μ := by rw [M.jumpOccupation_apply univ MeasurableSet.univ] congr 1 funext ω have hf : (M.eventTimes ω).filter (fun t => t ≤ M.horizon) = M.eventTimes ω := Finset.filter_eq_self.mpr (fun t ht => (M.events_in_horizon ω t ht).2) simp [Model.jumpIntegral, hf] rw [heq] exact lt_top_iff_ne_top.mpr ((lintegral_ofReal_ne_top_iff_integrable hmeas.aestronglyMeasurable (Filter.Eventually.of_forall (fun ω => Nat.cast_nonneg _))).2 hcount)
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.jumpOccupation_finite · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/JumpOccupation.lean:77
Bounded­Convergence 1 core · 1 supporting These two analytic bridges isolate passage to the limit in expected event sums and intensity integrals. ★ tendsto_expected_jumpIntegral

Dominated convergence for bounded finite-jump payoffs

These two analytic bridges isolate passage to the limit in expected event sums and intensity integrals. They use finite counts and bounded rates, without any compensation or isometry premise.

theorem tendsto_expected_jumpIntegral reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

Uniformly bounded predictable payoffs converging pointwise have convergent expected finite event sums under a probability law with a count second moment. The model, the approximating and limiting payoffs, predictability of the approximating payoffs, the common bound, and pointwise convergence give convergence of expected event sums.

Formal statement
Ω :
Type u_1
shared
M :
Model Ω μ
G :
ℕ → ℝ → Ω → ℝ
H :
ℝ → Ω → ℝ
hG :
∀ k, M.Predictable (G k)
C :
ℝ
hbound :
∀ k t ω, |G k t ω| ≤ C
hlim :
∀ t ω, Tendsto (fun k => G k t ω) atTop (nhds (H t ω))
Tendsto (fun k => ∫ ω, M.jumpIntegral (G k) M.horizon ω ∂μ) atTop (nhds (∫ ω, M.jumpIntegral H M.horizon ω ∂μ))
Proof (Lean source)
theorem Model.tendsto_expected_jumpIntegral (M : Model Ω μ) [IsProbabilityMeasure μ] (G : ℕ → ℝ → Ω → ℝ) (H : ℝ → Ω → ℝ) (hG : ∀ k, M.Predictable (G k)) (C : ℝ) (hbound : ∀ k t ω, |G k t ω| ≤ C) (hlim : ∀ t ω, Tendsto (fun k => G k t ω) atTop (nhds (H t ω))) : Tendsto (fun k => ∫ ω, M.jumpIntegral (G k) M.horizon ω ∂μ) atTop (nhds (∫ ω, M.jumpIntegral H M.horizon ω ∂μ)) := by /- First commute the limit with the fixed finite event sum on each path (`tendsto_finset_sum`). The integrable envelope is C times event count, from `integrable_eventCount` and `abs_jumpIntegral_le_card`. Use Mathlib's `tendsto_integral_of_dominated_convergence`; no intensity identity is used. -/ classical apply tendsto_integral_of_dominated_convergence (fun ω => C * ((M.eventTimes ω).card : ℝ)) · intro k exact (M.measurable_jumpIntegral (G k) (M.predictable_joint_measurable (G k) (hG k))).aestronglyMeasurable · exact M.integrable_eventCount.const_mul C · intro k exact Eventually.of_forall (fun ω => by simpa only [Real.norm_eq_abs] using M.abs_jumpIntegral_le_card (G k) C (hbound k) ω) · apply Eventually.of_forall intro ω unfold Model.jumpIntegral exact tendsto_finsetSum _ (fun t _ => hlim t ω)
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.tendsto_expected_jumpIntegral · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/BoundedConvergence.lean:20 · uses Model , Predictable , jumpIntegral
1 supporting declaration (lemmas, instances)
  • tendsto_expected_energyIntegral theorem — Uniformly bounded predictable payoffs converging pointwise have convergent expected intensity integrals on the finite horizon.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    G :
    ℕ → ℝ → Ω → ℝ
    H :
    ℝ → Ω → ℝ
    hG :
    ∀ k, M.Predictable (G k)
    C :
    ℝ
    hC :
    0 ≤ C
    hbound :
    ∀ k t ω, |G k t ω| ≤ C
    hlim :
    ∀ t ω, Tendsto (fun k => G k t ω) atTop (nhds (H t ω))
    Tendsto (fun k => ∫ ω, M.energyIntegral (G k) M.horizon ω ∂μ) atTop (nhds (∫ ω, M.energyIntegral H M.horizon ω ∂μ))
    Proof (Lean source)
    theorem Model.tendsto_expected_energyIntegral (M : Model Ω μ) [IsProbabilityMeasure μ] (G : ℕ → ℝ → Ω → ℝ) (H : ℝ → Ω → ℝ) (hG : ∀ k, M.Predictable (G k)) (C : ℝ) (hC : 0 ≤ C) (hbound : ∀ k t ω, |G k t ω| ≤ C) (hlim : ∀ t ω, Tendsto (fun k => G k t ω) atTop (nhds (H t ω))) : Tendsto (fun k => ∫ ω, M.energyIntegral (G k) M.horizon ω ∂μ) atTop (nhds (∫ ω, M.energyIntegral H M.horizon ω ∂μ)) := by /- Apply dominated convergence in time on each path, using C times its nonnegative integrable rate. Then apply it in the sample variable with the constant envelope C * rateBound * horizon. Both measurability facts follow from `predictable_joint_measurable` and `measurable_energyIntegral`. This lemma imports no compensator theorem, avoiding a dependency cycle. -/ obtain ⟨R, hR, hr⟩ := M.rate_horizon_uniform_bound apply tendsto_integral_of_dominated_convergence (fun _ω => C * (R * M.horizon)) · intro k exact (M.measurable_energyIntegral (G k) (M.predictable_joint_measurable (G k) (hG k))).aestronglyMeasurable · exact integrable_const _ · intro k apply Eventually.of_forall intro ω rw [Real.norm_eq_abs] calc |M.energyIntegral (G k) M.horizon ω| ≤ C * M.compensator M.horizon ω := M.abs_energyIntegral_le_compensator (G k) C (hbound k) ω _ ≤ C * (R * M.horizon) := by apply mul_le_mul_of_nonneg_left _ hC have hi := integral_mono_ae (M.rate_integrable ω) (integrable_const R : Integrable (fun _t : ℝ => R) (volume.restrict (Ioc 0 M.horizon))) (ae_restrict_of_forall_mem measurableSet_Ioc (fun t ht => (hr t ω (le_of_lt ht.1) ht.2).2)) simpa [Model.compensator, integral_const, Real.volume_Ioc, M.horizon_pos.le, mul_comm] using hi · apply Eventually.of_forall intro ω unfold Model.energyIntegral apply tendsto_integral_of_dominated_convergence (fun t => C * (M.atRisk t ω * M.intensity t ω)) · intro k exact (((M.predictable_joint_measurable (G k) (hG k)).comp (measurable_id.prodMk measurable_const)).mul ((M.atRisk_joint_measurable.comp (measurable_id.prodMk measurable_const)).mul (M.intensity_joint_measurable.comp (measurable_id.prodMk measurable_const)))).aestronglyMeasurable · exact (M.rate_integrable ω).const_mul C · intro k apply Eventually.of_forall intro t have hnonneg : 0 ≤ M.atRisk t ω * M.intensity t ω := mul_nonneg (M.atRisk_nonneg t ω) (M.intensity_nonneg t ω) rw [Real.norm_eq_abs, abs_mul, abs_of_nonneg hnonneg] exact mul_le_mul_of_nonneg_right (hbound k t ω) hnonneg · exact Eventually.of_forall (fun t => (hlim t ω).mul tendsto_const_nhds)
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.tendsto_expected_energyIntegral · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/BoundedConvergence.lean:53
Bounded­Regularity 1 core · 6 supporting Joint measurability, the count second moment, and the uniform finite-horizon rate bound supply Bochner integrability independently of compensation. ★ integrable_jump

Bounded finite-jump integral regularity

Joint measurability, the count second moment, and the uniform finite-horizon rate bound supply Bochner integrability independently of compensation. This lower layer is also used by the dominated-convergence bridge.

theorem integrable_jump reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

A bounded predictable integrand has an integrable finite event sum. The model and payoff, predictability, and the uniform bound give Bochner integrability of the event sum.

Formal statement
Ω :
Type u_1
shared
M :
Model Ω μ
H :
ℝ → Ω → ℝ
hH :
M.Predictable H
hbound :
∃ C : ℝ, ∀ t ω, |H t ω| ≤ C
Integrable (M.jumpIntegral H M.horizon) μ
Proof (Lean source)
theorem Model.integrable_jump (M : Model Ω μ) [IsProbabilityMeasure μ] (H : ℝ → Ω → ℝ) (hH : M.Predictable H) (hbound : ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C) : Integrable (M.jumpIntegral H M.horizon) μ := by obtain ⟨C, hC⟩ := hbound apply (M.integrable_eventCount.const_mul |C|).mono' (M.measurable_jumpIntegral H (M.predictable_joint_measurable H hH)).aestronglyMeasurable filter_upwards [] with ω simpa only [Real.norm_eq_abs] using M.abs_jumpIntegral_le_card H |C| (fun t ω => (hC t ω).trans (le_abs_self C)) ω
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.integrable_jump · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/BoundedRegularity.lean:100 · uses Model , Predictable , jumpIntegral
6 supporting declarations (lemmas, instances)
  • predictable_joint_measurable theorem — A predictable process is jointly measurable for ordinary time and sample σ-algebras because each filtration is contained in the sample σ-algebra.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    H :
    ℝ → Ω → ℝ
    hH :
    M.Predictable H
    Measurable (fun p : ℝ × Ω => H p.1 p.2)
    Proof (Lean source)
    theorem Model.predictable_joint_measurable (M : Model Ω μ) (H : ℝ → Ω → ℝ) (hH : M.Predictable H) : Measurable (fun p : ℝ × Ω => H p.1 p.2) := by apply Measurable.le ?_ hH apply (MeasurableSpace.generateFrom_le_iff _).mpr rintro S ⟨a, b, B, hB, rfl⟩ exact measurableSet_Ioc.prod ((M.filtration_le a) B hB)
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.predictable_joint_measurable · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/BoundedRegularity.lean:20
  • measurable_stochasticIntegral theorem — A finite-horizon compensated integral of a predictable integrand is a measurable function of the sample path.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    H :
    ℝ → Ω → ℝ
    hH :
    M.Predictable H
    Measurable (M.stochasticIntegral H M.horizon)
    Proof (Lean source)
    theorem Model.measurable_stochasticIntegral (M : Model Ω μ) (H : ℝ → Ω → ℝ) (hH : M.Predictable H) : Measurable (M.stochasticIntegral H M.horizon) := by unfold Model.stochasticIntegral exact (M.measurable_jumpIntegral H (M.predictable_joint_measurable H hH)).sub (M.measurable_energyIntegral H (M.predictable_joint_measurable H hH))
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.measurable_stochasticIntegral · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/BoundedRegularity.lean:30
  • integrable_eventCount theorem — The finite event count has an integrable first moment under the assumed second moment of the count.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    Integrable (fun ω => ((M.eventTimes ω).card : ℝ)) μ
    Proof (Lean source)
    theorem Model.integrable_eventCount (M : Model Ω μ) [IsProbabilityMeasure μ] : Integrable (fun ω => ((M.eventTimes ω).card : ℝ)) μ := by have hmeas : Measurable (fun ω => ((M.eventTimes ω).card : ℝ)) := by have hcount : Measurable (M.count M.horizon) := (M.count_adapted M.horizon).mono (M.filtration_le M.horizon) le_rfl have hcard : (fun ω => (M.eventTimes ω).card) = M.count M.horizon := by funext ω simp only [Model.count] congr 1 exact (Finset.filter_eq_self.mpr (fun t ht => (M.events_in_horizon ω t ht).2)).symm exact (measurable_of_countable (fun n : ℕ => (n : ℝ))).comp (hcard ▸ hcount) exact ((memLp_two_iff_integrable_sq hmeas.aestronglyMeasurable).2 M.count_square_integrable).integrable one_le_two
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.integrable_eventCount · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/BoundedRegularity.lean:39
  • abs_jumpIntegral_le_card theorem — A uniformly bounded event payoff has absolute finite sum at most its bound times the number of events in the horizon.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    H :
    ℝ → Ω → ℝ
    C :
    ℝ
    hbound :
    ∀ t ω, |H t ω| ≤ C
    ω :
    Ω
    |M.jumpIntegral H M.horizon ω| ≤ C * ((M.eventTimes ω).card : ℝ)
    Proof (Lean source)
    theorem Model.abs_jumpIntegral_le_card (M : Model Ω μ) (H : ℝ → Ω → ℝ) (C : ℝ) (hbound : ∀ t ω, |H t ω| ≤ C) (ω : Ω) : |M.jumpIntegral H M.horizon ω| ≤ C * ((M.eventTimes ω).card : ℝ) := by classical have hfilter : (M.eventTimes ω).filter (fun t => t ≤ M.horizon) = M.eventTimes ω := Finset.filter_eq_self.mpr (fun t ht => (M.events_in_horizon ω t ht).2) rw [Model.jumpIntegral, hfilter] calc |∑ t ∈ M.eventTimes ω, H t ω| ≤ ∑ t ∈ M.eventTimes ω, |H t ω| := Finset.abs_sum_le_sum_abs _ _ _ ≤ ∑ _t ∈ M.eventTimes ω, C := Finset.sum_le_sum (fun t _ => hbound t ω) _ = C * ((M.eventTimes ω).card : ℝ) := by simp [mul_comm]
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.abs_jumpIntegral_le_card · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/BoundedRegularity.lean:58
  • abs_energyIntegral_le_compensator theorem — The absolute intensity integral of a uniformly bounded payoff is at most its bound times the nonnegative compensator at the horizon.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    H :
    ℝ → Ω → ℝ
    C :
    ℝ
    hbound :
    ∀ t ω, |H t ω| ≤ C
    ω :
    Ω
    |M.energyIntegral H M.horizon ω| ≤ C * M.compensator M.horizon ω
    Proof (Lean source)
    theorem Model.abs_energyIntegral_le_compensator (M : Model Ω μ) (H : ℝ → Ω → ℝ) (C : ℝ) (hbound : ∀ t ω, |H t ω| ≤ C) (ω : Ω) : |M.energyIntegral H M.horizon ω| ≤ C * M.compensator M.horizon ω := by have hr_nonneg (t : ℝ) : 0 ≤ M.atRisk t ω * M.intensity t ω := mul_nonneg (M.atRisk_nonneg t ω) (M.intensity_nonneg t ω) have hdom (t : ℝ) : |H t ω * (M.atRisk t ω * M.intensity t ω)| ≤ C * (M.atRisk t ω * M.intensity t ω) := by rw [abs_mul, abs_of_nonneg (hr_nonneg t)] exact mul_le_mul_of_nonneg_right (hbound t ω) (hr_nonneg t) have hrate : Integrable (fun t => C * (M.atRisk t ω * M.intensity t ω)) (volume.restrict (Ioc 0 M.horizon)) := (M.rate_integrable ω).const_mul C have hmain := norm_integral_le_of_norm_le (f := fun t => H t ω * (M.atRisk t ω * M.intensity t ω)) (g := fun t => C * (M.atRisk t ω * M.intensity t ω)) hrate (Filter.Eventually.of_forall (fun t => by simpa only [Real.norm_eq_abs] using hdom t)) simpa [Model.energyIntegral, Model.compensator, Real.norm_eq_abs, integral_const_mul] using hmain
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.abs_energyIntegral_le_compensator · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/BoundedRegularity.lean:76
  • integrable_energy theorem — A bounded predictable integrand has an integrable time integral against the at-risk intensity.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    H :
    ℝ → Ω → ℝ
    hH :
    M.Predictable H
    hbound :
    ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C
    Integrable (M.energyIntegral H M.horizon) μ
    Proof (Lean source)
    theorem Model.integrable_energy (M : Model Ω μ) [IsProbabilityMeasure μ] (H : ℝ → Ω → ℝ) (hH : M.Predictable H) (hbound : ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C) : Integrable (M.energyIntegral H M.horizon) μ := by obtain ⟨C, hC⟩ := hbound obtain ⟨R, hR, hr⟩ := M.rate_horizon_uniform_bound apply (integrable_const (|C| * (R * M.horizon) : ℝ)).mono' (M.measurable_energyIntegral H (M.predictable_joint_measurable H hH)).aestronglyMeasurable filter_upwards [] with ω rw [Real.norm_eq_abs] calc |M.energyIntegral H M.horizon ω| ≤ |C| * M.compensator M.horizon ω := M.abs_energyIntegral_le_compensator H |C| (fun t ω => (hC t ω).trans (le_abs_self C)) ω _ ≤ |C| * (R * M.horizon) := by apply mul_le_mul_of_nonneg_left _ (abs_nonneg C) have hi := integral_mono_ae (M.rate_integrable ω) (integrable_const R : Integrable (fun _t : ℝ => R) (volume.restrict (Ioc 0 M.horizon))) (ae_restrict_of_forall_mem measurableSet_Ioc (fun t ht => (hr t ω (le_of_lt ht.1) ht.2).2)) simpa [Model.compensator, integral_const, Real.volume_Ioc, M.horizon_pos.le, mul_comm] using hi
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.integrable_energy · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/BoundedRegularity.lean:116
Compensator 1 core · 11 supporting The cylinder formula is the direct translation of the conditional count increment premise. ★ predictable_compensator

From conditional intensity to predictable compensation

The cylinder formula is the direct translation of the conditional count increment premise. Its extension to predictable payoffs is a monotone-class and integrable-truncation argument on the predictable σ-algebra.

theorem predictable_compensator reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

Every integrable predictable payoff satisfies the expected jump-sum equals expected compensator integral identity. Truncate an integrable payoff, apply the bounded formula, and pass to the limit in both expectations. The model and payoff, predictability, and absolute integrability of the event term give the predictable-compensation identity.

Formal statement
Ω :
Type u_1
shared
M :
Model Ω μ
G :
ℝ → Ω → ℝ
hG :
M.Predictable G
hjumpAbs :
Integrable (M.jumpIntegral (fun t ω => |G t ω|) M.horizon) μ
(∫ ω, M.jumpIntegral G M.horizon ω ∂μ) = ∫ ω, M.energyIntegral G M.horizon ω ∂μ
Proof (Lean source)
theorem Model.predictable_compensator (M : Model Ω μ) [IsProbabilityMeasure μ] (G : ℝ → Ω → ℝ) (hG : M.Predictable G) (hjumpAbs : Integrable (M.jumpIntegral (fun t ω => |G t ω|) M.horizon) μ) : (∫ ω, M.jumpIntegral G M.horizon ω ∂μ) = ∫ ω, M.energyIntegral G M.horizon ω ∂μ := by /- Cutoffs are bounded and dominated by |G|. Absolute time-sample integrability is derived, not added as a new caller hypothesis. -/ let A (k : ℕ) (t : ℝ) (ω : Ω) : ℝ := if |G t ω| ≤ (k : ℝ) then G t ω else 0 have hA (k : ℕ) : M.Predictable (A k) := by letI : MeasurableSpace (ℝ × Ω) := predictableSpace M.filtration change Measurable[predictableSpace M.filtration] (fun p : ℝ × Ω => if |G p.1 p.2| ≤ (k : ℝ) then G p.1 p.2 else 0) apply Measurable.ite · exact hG.abs measurableSet_Iic · exact hG · exact measurable_const have hbound (k : ℕ) : ∃ C : ℝ, ∀ t ω, |A k t ω| ≤ C := by refine ⟨(k : ℝ), ?_⟩ intro t ω dsimp [A] split_ifs with h · exact h · simp have hdom : ∀ k t ω, |A k t ω| ≤ |G t ω| := by intro k t ω dsimp [A] split_ifs <;> simp have hlim (t : ℝ) (ω : Ω) : Tendsto (fun k => A k t ω) atTop (nhds (G t ω)) := by obtain ⟨K, hK⟩ := exists_nat_ge |G t ω| apply tendsto_const_nhds.congr' filter_upwards [eventually_ge_atTop K] with k hk simp [A, hK.trans (Nat.cast_le.mpr hk)] have hj := M.tendsto_expected_jumpIntegral_of_dominated A G hA hdom hjumpAbs hlim have he := M.tendsto_expected_energyIntegral_of_dominated A G hA hG hdom (M.predictable_rate_product_integrable G hG hjumpAbs) hlim have heq (k : ℕ) : (∫ ω, M.jumpIntegral (A k) M.horizon ω ∂μ) = ∫ ω, M.energyIntegral (A k) M.horizon ω ∂μ := M.bounded_predictable_compensator (A k) (hA k) (hbound k) exact tendsto_nhds_unique hj (by simpa only [heq] using he)
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.predictable_compensator · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Compensator.lean:479 · uses Model , Predictable , energyIntegral , jumpIntegral
11 supporting declarations (lemmas, instances)
  • conditional_increment theorem — A bounded observation measurable at time a makes the expected weighted count increment on (a,b] equal the expected weighted intensity integral.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    a b :
    ℝ
    F :
    Ω → ℝ
    ha :
    0 ≤ a
    hab :
    a ≤ b
    hb :
    b ≤ M.horizon
    hF :
    Measurable[M.filtration a] F
    hbounded :
    ∃ C : ℝ, ∀ ω, |F ω| ≤ C
    hcount :
    Integrable (fun ω => F ω * (((M.eventTimes ω).filter (fun t => a < t ∧ t ≤ b)).card : ℝ)) μ
    hrate :
    Integrable (fun ω => F ω * ∫ t in Ioc a b, M.atRisk t ω * M.intensity t ω ∂volume) μ
    (∫ ω, F ω * (((M.eventTimes ω).filter (fun t => a < t ∧ t ≤ b)).card : ℝ) ∂μ)
    = ∫ ω, F ω * (∫ t in Ioc a b, M.atRisk t ω * M.intensity t ω ∂volume) ∂μ
    Proof (Lean source)
    theorem Model.conditional_increment (M : Model Ω μ) (a b : ℝ) (F : Ω → ℝ) (ha : 0 ≤ a) (hab : a ≤ b) (hb : b ≤ M.horizon) (hF : Measurable[M.filtration a] F) (hbounded : ∃ C : ℝ, ∀ ω, |F ω| ≤ C) (hcount : Integrable (fun ω => F ω * (((M.eventTimes ω).filter (fun t => a < t ∧ t ≤ b)).card : ℝ)) μ) (hrate : Integrable (fun ω => F ω * ∫ t in Ioc a b, M.atRisk t ω * M.intensity t ω ∂volume) μ) : (∫ ω, F ω * (((M.eventTimes ω).filter (fun t => a < t ∧ t ≤ b)).card : ℝ) ∂μ) = ∫ ω, F ω * (∫ t in Ioc a b, M.atRisk t ω * M.intensity t ω ∂volume) ∂μ := M.conditional_intensity_increment a b F ha hab hb hF hbounded hcount hrate
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.conditional_increment · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Compensator.lean:25
  • cylinder_compensator theorem — For an elementary predictable payoff F(ω) 1_(a,b](t), the expected jump sum equals its expected compensator integral. The proof unfolds the finite sum and applies conditional_increment.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    a b :
    ℝ
    F :
    Ω → ℝ
    ha :
    0 ≤ a
    hab :
    a ≤ b
    hb :
    b ≤ M.horizon
    hF :
    Measurable[M.filtration a] F
    hbounded :
    ∃ C : ℝ, ∀ ω, |F ω| ≤ C
    hjump :
    Integrable (M.jumpIntegral (fun t ω => if a < t ∧ t ≤ b then F ω else 0) M.horizon) μ
    henergy :
    Integrable (M.energyIntegral (fun t ω => if a < t ∧ t ≤ b then F ω else 0) M.horizon) μ
    (∫ ω, M.jumpIntegral (fun t ω => if a < t ∧ t ≤ b then F ω else 0) M.horizon ω ∂μ)
    = ∫ ω, M.energyIntegral (fun t ω => if a < t ∧ t ≤ b then F ω else 0) M.horizon ω ∂μ
    Proof (Lean source)
    theorem Model.cylinder_compensator (M : Model Ω μ) (a b : ℝ) (F : Ω → ℝ) (ha : 0 ≤ a) (hab : a ≤ b) (hb : b ≤ M.horizon) (hF : Measurable[M.filtration a] F) (hbounded : ∃ C : ℝ, ∀ ω, |F ω| ≤ C) (hjump : Integrable (M.jumpIntegral (fun t ω => if a < t ∧ t ≤ b then F ω else 0) M.horizon) μ) (henergy : Integrable (M.energyIntegral (fun t ω => if a < t ∧ t ≤ b then F ω else 0) M.horizon) μ) : (∫ ω, M.jumpIntegral (fun t ω => if a < t ∧ t ≤ b then F ω else 0) M.horizon ω ∂μ) = ∫ ω, M.energyIntegral (fun t ω => if a < t ∧ t ≤ b then F ω else 0) M.horizon ω ∂μ := by have hJump (ω : Ω) : M.jumpIntegral (fun t ω => if a < t ∧ t ≤ b then F ω else 0) M.horizon ω = F ω * (((M.eventTimes ω).filter (fun t => a < t ∧ t ≤ b)).card : ℝ) := by classical have hfilter : (M.eventTimes ω).filter (fun t => t ≤ M.horizon) = M.eventTimes ω := by ext t simp only [mem_filter] constructor · exact left · intro ht exact ⟨ht, (M.events_in_horizon ω t ht).2⟩ simp [Model.jumpIntegral, hfilter, Finset.sum_ite, Finset.sum_const, mul_comm] have hEnergy (ω : Ω) : M.energyIntegral (fun t ω => if a < t ∧ t ≤ b then F ω else 0) M.horizon ω = F ω * (∫ t in Ioc a b, M.atRisk t ω * M.intensity t ω ∂volume) := by have hset : Ioc 0 M.horizon ∩ Ioc a b = Ioc a b := by ext t simp only [mem_inter_iff, mem_Ioc] constructor · intro h exact h.2 · intro h exact ⟨⟨lt_of_le_of_lt ha h.1, le_trans h.2 hb⟩, h⟩ change (∫ t in Ioc 0 M.horizon, (if t ∈ Ioc a b then F ω else 0) * (M.atRisk t ω * M.intensity t ω) ∂volume) = _ have heq : (fun t => (if t ∈ Ioc a b then F ω else 0) * (M.atRisk t ω * M.intensity t ω)) = (Ioc a b).indicator (fun t => F ω * (M.atRisk t ω * M.intensity t ω)) := by funext t simp [indicator] rw [heq, setIntegral_indicator measurableSet_Ioc, hset, integral_const_mul] have hcount : Integrable (fun ω => F ω * (((M.eventTimes ω).filter (fun t => a < t ∧ t ≤ b)).card : ℝ)) μ := by simpa only [← hJump] using hjump have hrate : Integrable (fun ω => F ω * ∫ t in Ioc a b, M.atRisk t ω * M.intensity t ω ∂volume) μ := by simpa only [← hEnergy] using henergy simpa only [hJump, hEnergy] using M.conditional_increment a b F ha hab hb hF hbounded hcount hrate
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.cylinder_compensator · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Compensator.lean:41
  • integrable_jump_indicator theorem — The finite jump sum of the indicator of a measurable time-sample set is integrable under the finite event-count second-moment assumption.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    S :
    Set (ℝ × Ω)
    hS :
    Integrable (M.jumpIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon) μ
    Proof (Lean source)
    theorem Model.integrable_jump_indicator (M : Model Ω μ) [IsProbabilityMeasure μ] (S : Set (ℝ × Ω)) (hS : MeasurableSet S) : Integrable (M.jumpIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon) μ := by have hmeas : Measurable (M.jumpIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon) := M.measurable_jumpIntegral _ (measurable_const.indicator hS) have hcard : Integrable (fun ω => ((M.eventTimes ω).card : ℝ)) μ := by have hm : Measurable (fun ω => ((M.eventTimes ω).card : ℝ)) := (measurable_of_countable (fun n : ℕ => (n : ℝ))).comp M.measurable_eventCard exact ((memLp_two_iff_integrable_sq hm.aestronglyMeasurable).2 M.count_square_integrable).integrable one_le_two apply hcard.mono' hmeas.aestronglyMeasurable filter_upwards [] with ω classical have hf : (M.eventTimes ω).filter (fun t => t ≤ M.horizon) = M.eventTimes ω := Finset.filter_eq_self.mpr (fun t ht => (M.events_in_horizon ω t ht).2) rw [Model.jumpIntegral, hf, Real.norm_eq_abs] calc |∑ t ∈ M.eventTimes ω, S.indicator (fun _ => (1 : ℝ)) (t, ω)| ≤ ∑ t ∈ M.eventTimes ω, |S.indicator (fun _ => (1 : ℝ)) (t, ω)| := Finset.abs_sum_le_sum_abs _ _ _ ≤ ∑ _t ∈ M.eventTimes ω, (1 : ℝ) := by apply Finset.sum_le_sum intro t ht by_cases hs : (t, ω) ∈ S <;> simp [indicator, hs] _ = ((M.eventTimes ω).card : ℝ) := by simp
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.integrable_jump_indicator · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Compensator.lean:104
  • integrable_energy_indicator theorem — The finite-horizon intensity integral of the indicator of a measurable time-sample set is integrable under the uniform intensity bound.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    S :
    Set (ℝ × Ω)
    hS :
    Integrable (M.energyIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon) μ
    Proof (Lean source)
    theorem Model.integrable_energy_indicator (M : Model Ω μ) [IsProbabilityMeasure μ] (S : Set (ℝ × Ω)) (hS : MeasurableSet S) : Integrable (M.energyIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon) μ := by have hmeas : Measurable (M.energyIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon) := M.measurable_energyIntegral _ (measurable_const.indicator hS) obtain ⟨C, hC, hrate⟩ := M.rate_horizon_uniform_bound apply (integrable_const (C * M.horizon : ℝ)).mono' hmeas.aestronglyMeasurable filter_upwards [] with ω have hdom (t : ℝ) (ht : t ∈ Ioc 0 M.horizon) : ‖S.indicator (fun _ => (1 : ℝ)) (t, ω) * (M.atRisk t ω * M.intensity t ω)‖ ≤ C := by have hr := hrate t ω (le_of_lt ht.1) ht.2 by_cases hs : (t, ω) ∈ S · calc ‖S.indicator (fun _ => (1 : ℝ)) (t, ω) * (M.atRisk t ω * M.intensity t ω)‖ = |M.atRisk t ω * M.intensity t ω| := by simp [indicator, hs, Real.norm_eq_abs] _ = M.atRisk t ω * M.intensity t ω := abs_of_nonneg hr.1 _ ≤ C := hr.2 · simp [indicator, hs, hC] have hbound := norm_integral_le_of_norm_le (f := fun t => S.indicator (fun _ => (1 : ℝ)) (t, ω) * (M.atRisk t ω * M.intensity t ω)) (g := fun _t : ℝ => C) (integrable_const C : Integrable (fun _t : ℝ => C) (volume.restrict (Ioc 0 M.horizon))) (ae_restrict_of_forall_mem measurableSet_Ioc hdom) simpa [Model.energyIntegral, Real.norm_eq_abs, integral_const, Real.volume_Ioc, M.horizon_pos.le, mul_comm] using hbound
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.integrable_energy_indicator · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Compensator.lean:137
  • occupation_cylinder_agree theorem — The event and intensity occupation measures assign the same mass to a predictable cylinder, by the conditional intensity increment identity.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    a b :
    ℝ
    B :
    Set Ω
    hB :
    MeasurableSet[M.filtration a] B
    M.jumpOccupation (Ioc a b ×ˢ B) = M.energyOccupation (Ioc a b ×ˢ B)
    Proof (Lean source)
    theorem Model.occupation_cylinder_agree (M : Model Ω μ) [IsProbabilityMeasure μ] (a b : ℝ) (B : Set Ω) (hB : MeasurableSet[M.filtration a] B) : M.jumpOccupation (Ioc a b ×ˢ B) = M.energyOccupation (Ioc a b ×ˢ B) := by let S : Set (ℝ × Ω) := Ioc a b ×ˢ B have hS : MeasurableSet S := measurableSet_Ioc.prod ((M.filtration_le a) B hB) have hj := M.integrable_jump_indicator S hS have he := M.integrable_energy_indicator S hS have hreal : (M.jumpOccupation S).toReal = (M.energyOccupation S).toReal := by rw [M.jumpOccupation_indicator S hS hj, M.energyOccupation_indicator S hS he] exact M.predictable_cylinder_compensator a b B hB hj he exact (ENNReal.toReal_eq_toReal_iff' (ne_of_lt ((measure_mono (subset_univ S)).trans_lt M.jumpOccupation_finite)) (ne_of_lt ((measure_mono (subset_univ S)).trans_lt M.energyOccupation_finite))).mp hreal
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.occupation_cylinder_agree · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Compensator.lean:174
  • occupation_univ_agree theorem — The expected total number of jumps equals the expected total integrated at-risk intensity, so the two finite occupation measures have equal mass.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    M.jumpOccupation univ = M.energyOccupation univ
    Proof (Lean source)
    theorem Model.occupation_univ_agree (M : Model Ω μ) [IsProbabilityMeasure μ] : M.jumpOccupation univ = M.energyOccupation univ := by have hj := M.integrable_jump_indicator univ MeasurableSet.univ have he := M.integrable_energy_indicator univ MeasurableSet.univ have hf (ω : Ω) : (M.eventTimes ω).filter (fun t => 0 < t ∧ t ≤ M.horizon) = M.eventTimes ω := Finset.filter_eq_self.mpr (fun t ht => M.events_in_horizon ω t ht) have hfh (ω : Ω) : (M.eventTimes ω).filter (fun t => t ≤ M.horizon) = M.eventTimes ω := Finset.filter_eq_self.mpr (fun t ht => (M.events_in_horizon ω t ht).2) have hcount : Integrable (fun ω : Ω => (1 : ℝ) * (((M.eventTimes ω).filter (fun t => 0 < t ∧ t ≤ M.horizon)).card : ℝ)) μ := by convert hj using 1 funext ω simp [Model.jumpIntegral, hf ω, hfh ω] have hrate : Integrable (fun ω : Ω => (1 : ℝ) * ∫ t in Ioc 0 M.horizon, M.atRisk t ω * M.intensity t ω ∂volume) μ := by convert he using 1 funext ω simp [Model.energyIntegral] have hreal : (M.jumpOccupation univ).toReal = (M.energyOccupation univ).toReal := by rw [M.jumpOccupation_indicator univ MeasurableSet.univ hj, M.energyOccupation_indicator univ MeasurableSet.univ he] simpa [Model.jumpIntegral, Model.energyIntegral, hf, hfh] using (M.conditional_increment 0 M.horizon (fun _ => 1) (le_refl 0) M.horizon_pos.le le_rfl measurable_const ⟨1, by simp⟩ hcount hrate) exact (ENNReal.toReal_eq_toReal_iff' (ne_of_lt M.jumpOccupation_finite) (ne_of_lt M.energyOccupation_finite)).mp hreal
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.occupation_univ_agree · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Compensator.lean:196
  • occupation_agree theorem — The event and intensity occupation measures agree on every predictable time-sample set. Their equality on cylinders follows from conditional intensity; finite-measure uniqueness extends it to the generated σ-algebra.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    S :
    Set (ℝ × Ω)
    hS :
    M.jumpOccupation S = M.energyOccupation S
    Proof (Lean source)
    theorem Model.occupation_agree (M : Model Ω μ) [IsProbabilityMeasure μ] (S : Set (ℝ × Ω)) (hS : MeasurableSet[predictableSpace M.filtration] S) : M.jumpOccupation S = M.energyOccupation S := by have hle : predictableSpace M.filtration ≤ (inferInstance : MeasurableSpace (ℝ × Ω)) := by apply (MeasurableSpace.generateFrom_le_iff _).mpr rintro T ⟨a, b, B, hB, rfl⟩ exact measurableSet_Ioc.prod ((M.filtration_le a) B hB) letI : IsFiniteMeasure M.jumpOccupation := ⟨M.jumpOccupation_finite⟩ apply ext_on_measurableSpace_of_generate_finite (inferInstance : MeasurableSpace (ℝ × Ω)) (predictableCylinders M.filtration) ?_ hle rfl (predictableCylinders_isPiSystem M.filtration M.filtration_mono) M.occupation_univ_agree hS rintro T ⟨a, b, B, hB, rfl⟩ exact M.occupation_cylinder_agree a b B hB
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.occupation_agree · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Compensator.lean:231
  • predictable_indicator_compensator theorem — The indicator of any predictable time-sample set has the same expected finite jump sum as expected integral against the at-risk intensity.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    S :
    Set (ℝ × Ω)
    hS :
    hjump :
    Integrable (M.jumpIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon) μ
    henergy :
    Integrable (M.energyIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon) μ
    (∫ ω, M.jumpIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon ω ∂μ)
    = ∫ ω, M.energyIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon ω ∂μ
    Proof (Lean source)
    theorem Model.predictable_indicator_compensator (M : Model Ω μ) [IsProbabilityMeasure μ] (S : Set (ℝ × Ω)) (hS : MeasurableSet[predictableSpace M.filtration] S) (hjump : Integrable (M.jumpIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon) μ) (henergy : Integrable (M.energyIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon) μ) : (∫ ω, M.jumpIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon ω ∂μ) = ∫ ω, M.energyIntegral (fun t ω => S.indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon ω ∂μ := by have hle : predictableSpace M.filtration ≤ (inferInstance : MeasurableSpace (ℝ × Ω)) := by apply (MeasurableSpace.generateFrom_le_iff _).mpr rintro T ⟨a, b, B, hB, rfl⟩ exact measurableSet_Ioc.prod ((M.filtration_le a) B hB) have hS' : MeasurableSet S := hle S hS rw [← M.jumpOccupation_indicator S hS' hjump, ← M.energyOccupation_indicator S hS' henergy, M.occupation_agree S hS]
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.predictable_indicator_compensator · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Compensator.lean:253
  • finiteRange_predictable_compensator theorem — A predictable payoff taking finitely many real values has equal expected event and intensity integrals.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    G :
    ℝ → Ω → ℝ
    hG :
    M.Predictable G
    hfinite :
    Finite (range (fun p : ℝ × Ω => G p.1 p.2))
    (∫ ω, M.jumpIntegral G M.horizon ω ∂μ) = ∫ ω, M.energyIntegral G M.horizon ω ∂μ
    Proof (Lean source)
    theorem Model.finiteRange_predictable_compensator (M : Model Ω μ) [IsProbabilityMeasure μ] (G : ℝ → Ω → ℝ) (hG : M.Predictable G) (hfinite : Finite (range (fun p : ℝ × Ω => G p.1 p.2))) : (∫ ω, M.jumpIntegral G M.horizon ω ∂μ) = ∫ ω, M.energyIntegral G M.horizon ω ∂μ := by classical let s := hfinite.toFinset let S (x : ℝ) : Set (ℝ × Ω) := {p | G p.1 p.2 = x} let I (x : ℝ) (t : ℝ) (ω : Ω) : ℝ := (S x).indicator (fun _ => (1 : ℝ)) (t, ω) have hs (t : ℝ) (ω : Ω) : G t ω ∈ s := by simpa [s] using (show G t ω ∈ range (fun p : ℝ × Ω => G p.1 p.2) from ⟨(t, ω), rfl⟩) have hS (x : ℝ) : MeasurableSet[predictableSpace M.filtration] (S x) := hG (measurableSet_singleton x) have hle : predictableSpace M.filtration ≤ (inferInstance : MeasurableSpace (ℝ × Ω)) := by apply (MeasurableSpace.generateFrom_le_iff _).mpr rintro T ⟨a, b, B, hB, rfl⟩ exact measurableSet_Ioc.prod ((M.filtration_le a) B hB) have hS' (x : ℝ) : MeasurableSet (S x) := hle _ (hS x) have hdecomp (t : ℝ) (ω : Ω) : G t ω = ∑ x ∈ s, x * I x t ω := by simp [I, S, indicator, Finset.sum_ite_eq', hs t ω, eq_comm] have hjI (x : ℝ) : Integrable (M.jumpIntegral (I x) M.horizon) μ := M.integrable_jump_indicator (S x) (hS' x) have heI (x : ℝ) : Integrable (M.energyIntegral (I x) M.horizon) μ := M.integrable_energy_indicator (S x) (hS' x) have hjlin (ω : Ω) : M.jumpIntegral G M.horizon ω = ∑ x ∈ s, x * M.jumpIntegral (I x) M.horizon ω := by simp only [Model.jumpIntegral, hdecomp, Finset.mul_sum] rw [Finset.sum_comm] have hetime (x : ℝ) (ω : Ω) : Integrable (fun t => I x t ω * (M.atRisk t ω * M.intensity t ω)) (volume.restrict (Ioc 0 M.horizon)) := by have hsec : MeasurableSet {t : ℝ | (t, ω) ∈ S x} := (hS' x).preimage measurable_prodMk_right have h := (M.rate_integrable ω).indicator hsec change Integrable (indicator {t : ℝ | (t, ω) ∈ S x} (fun t => M.atRisk t ω * M.intensity t ω)) (volume.restrict (Ioc 0 M.horizon)) at h convert h using 1 funext t by_cases ht : (t, ω) ∈ S x <;> simp [I, indicator, ht] have helin (ω : Ω) : M.energyIntegral G M.horizon ω = ∑ x ∈ s, x * M.energyIntegral (I x) M.horizon ω := by simp only [Model.energyIntegral, hdecomp, Finset.sum_mul] rw [integral_finsetSum s] · simp_rw [mul_assoc, integral_const_mul] · intro x hx simpa only [mul_assoc] using (hetime x ω).const_mul x rw [show (∫ ω, M.jumpIntegral G M.horizon ω ∂μ) = ∑ x ∈ s, x * (∫ ω, M.jumpIntegral (I x) M.horizon ω ∂μ) from by simp_rw [hjlin] rw [integral_finsetSum s] · simp_rw [integral_const_mul] · intro x hx exact (hjI x).const_mul x] rw [show (∫ ω, M.energyIntegral G M.horizon ω ∂μ) = ∑ x ∈ s, x * (∫ ω, M.energyIntegral (I x) M.horizon ω ∂μ) from by simp_rw [helin] rw [integral_finsetSum s] · simp_rw [integral_const_mul] · intro x hx exact (heI x).const_mul x] apply Finset.sum_congr rfl intro x hx rw [M.predictable_indicator_compensator (S x) (hS x) (hjI x) (heI x)]
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.finiteRange_predictable_compensator · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Compensator.lean:276
  • bounded_predictable_compensator theorem — Every bounded predictable payoff satisfies the expected jump-sum equals expected intensity-integral identity. Approximate it by finite-valued predictable simple functions after proving the indicator identity.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    G :
    ℝ → Ω → ℝ
    hG :
    M.Predictable G
    hbounded :
    ∃ C : ℝ, ∀ t ω, |G t ω| ≤ C
    (∫ ω, M.jumpIntegral G M.horizon ω ∂μ) = ∫ ω, M.energyIntegral G M.horizon ω ∂μ
    Proof (Lean source)
    theorem Model.bounded_predictable_compensator (M : Model Ω μ) [IsProbabilityMeasure μ] (G : ℝ → Ω → ℝ) (hG : M.Predictable G) (hbounded : ∃ C : ℝ, ∀ t ω, |G t ω| ≤ C) : (∫ ω, M.jumpIntegral G M.horizon ω ∂μ) = ∫ ω, M.energyIntegral G M.horizon ω ∂μ := by obtain ⟨C, hC⟩ := hbounded have hbound : ∀ t ω, |G t ω| ≤ |C| := fun t ω => (hC t ω).trans (le_abs_self C) obtain ⟨A, hA, hfinite, hAbound, hlim⟩ := M.bounded_predictable_approximation G hG |C| (abs_nonneg C) hbound have hj := M.tendsto_expected_jumpIntegral A G hA |C| hAbound hlim have he := M.tendsto_expected_energyIntegral A G hA |C| (abs_nonneg C) hAbound hlim have heq (k : ℕ) : (∫ ω, M.jumpIntegral (A k) M.horizon ω ∂μ) = ∫ ω, M.energyIntegral (A k) M.horizon ω ∂μ := M.finiteRange_predictable_compensator (A k) (hA k) (hfinite k) exact tendsto_nhds_unique hj (by simpa only [heq] using he)
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.bounded_predictable_compensator · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Compensator.lean:349
  • predictable_rate_product_integrable theorem — An integrable absolute predictable event payoff has an absolutely integrable time-sample intensity payoff, as a consequence of conditional intensity and finite-horizon bounded compensation.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    G :
    ℝ → Ω → ℝ
    hG :
    M.Predictable G
    hjumpAbs :
    Integrable (M.jumpIntegral (fun t ω => |G t ω|) M.horizon) μ
    Integrable (fun p : ℝ × Ω => |G p.1 p.2| * (M.atRisk p.1 p.2 * M.intensity p.1 p.2)) ((volume.restrict (Ioc 0 M.horizon)).prod μ)
    Proof (Lean source)
    theorem Model.predictable_rate_product_integrable (M : Model Ω μ) [IsProbabilityMeasure μ] (G : ℝ → Ω → ℝ) (hG : M.Predictable G) (hjumpAbs : Integrable (M.jumpIntegral (fun t ω => |G t ω|) M.horizon) μ) : Integrable (fun p : ℝ × Ω => |G p.1 p.2| * (M.atRisk p.1 p.2 * M.intensity p.1 p.2)) ((volume.restrict (Ioc 0 M.horizon)).prod μ) := by /- Use nonnegative bounded predictable cutoffs U_k(t,ω) = if |G(t,ω)| ≤ k then |G(t,ω)| else 0. Their expected jump sums are bounded by the finite expected absolute jump sum. `bounded_predictable_compensator` identifies each expectation with its expected energy. Since U_k is bounded and the rate is bounded on the horizon, its product payoff is genuinely Bochner integrable; use Fubini and `ofReal_integral_eq_lintegral_ofReal` for those cutoffs. Fatou (`lintegral_liminf_le`) or monotone convergence proves finiteness of the lintegral of |G| times rate, hence the claimed Integrable fact. This must not invoke `predictable_compensator`, any isometry, or the downstream Regularity module. It prevents totalized time integrals from being used to justify a dominated-convergence step. -/ let ν := volume.restrict (Ioc 0 M.horizon) let rate : ℝ × Ω → ℝ := fun p => M.atRisk p.1 p.2 * M.intensity p.1 p.2 let U (k : ℕ) (t : ℝ) (ω : Ω) : ℝ := if |G t ω| ≤ (k : ℝ) then |G t ω| else 0 let F (k : ℕ) (p : ℝ × Ω) : ℝ := U k p.1 p.2 * rate p let f (p : ℝ × Ω) : ℝ := |G p.1 p.2| * rate p have hrmeas : Measurable rate := M.atRisk_joint_measurable.mul M.intensity_joint_measurable have hrnonneg (p : ℝ × Ω) : 0 ≤ rate p := mul_nonneg (M.atRisk_nonneg p.1 p.2) (M.intensity_nonneg p.1 p.2) have hU (k : ℕ) : M.Predictable (U k) := by letI : MeasurableSpace (ℝ × Ω) := predictableSpace M.filtration change Measurable[predictableSpace M.filtration] (fun p : ℝ × Ω => if |G p.1 p.2| ≤ (k : ℝ) then |G p.1 p.2| else 0) exact Measurable.ite (hG.abs measurableSet_Iic) hG.abs measurable_const have hUnonneg (k : ℕ) (t : ℝ) (ω : Ω) : 0 ≤ U k t ω := by dsimp [U] split_ifs <;> positivity have hUle (k : ℕ) (t : ℝ) (ω : Ω) : U k t ω ≤ |G t ω| := by dsimp [U] split_ifs <;> simp have hUbound (k : ℕ) : ∀ t ω, |U k t ω| ≤ (k : ℝ) := by intro t ω rw [abs_of_nonneg (hUnonneg k t ω)] dsimp [U] split_ifs with h · exact h · positivity have hFmeas (k : ℕ) : Measurable (F k) := (M.predictable_joint_measurable (U k) (hU k)).mul hrmeas have hFnonneg (k : ℕ) (p : ℝ × Ω) : 0 ≤ F k p := mul_nonneg (hUnonneg k p.1 p.2) (hrnonneg p) obtain ⟨R, hR, hr⟩ := M.rate_horizon_uniform_bound have hmem : ∀ᵐ p : ℝ × Ω ∂ν.prod μ, p.1 ∈ Ioc 0 M.horizon := (Measure.quasiMeasurePreserving_fst (μ := ν) (ν := μ)).ae (ae_restrict_mem measurableSet_Ioc) have hFi (k : ℕ) : Integrable (F k) (ν.prod μ) := by apply (integrable_const ((k : ℝ) * R)).mono' (hFmeas k).aestronglyMeasurable filter_upwards [hmem] with p hp rw [Real.norm_eq_abs, abs_of_nonneg (hFnonneg k p)] exact mul_le_mul (by simpa only [abs_of_nonneg (hUnonneg k p.1 p.2)] using hUbound k p.1 p.2) (hr p.1 p.2 hp.1.le hp.2).2 (hrnonneg p) (Nat.cast_nonneg k) have hj (k : ℕ) := M.integrable_jump (U k) (hU k) ⟨k, hUbound k⟩ have he (k : ℕ) := M.integrable_energy (U k) (hU k) ⟨k, hUbound k⟩ have hInt (k : ℕ) : (∫ p, F k p ∂ν.prod μ) ≤ ∫ ω, M.jumpIntegral (fun t ω => |G t ω|) M.horizon ω ∂μ := by rw [integral_prod_symm _ (hFi k)] change (∫ ω, M.energyIntegral (U k) M.horizon ω ∂μ) ≤ _ rw [← M.bounded_predictable_compensator (U k) (hU k) ⟨k, hUbound k⟩] apply integral_mono (hj k) hjumpAbs intro ω unfold Model.jumpIntegral exact Finset.sum_le_sum (fun t _ => hUle k t ω) have hlim (p : ℝ × Ω) : Tendsto (fun k => F k p) atTop (nhds (f p)) := by obtain ⟨K, hK⟩ := exists_nat_ge |G p.1 p.2| apply tendsto_const_nhds.congr' filter_upwards [eventually_ge_atTop K] with k hk simp [F, f, U, hK.trans (Nat.cast_le.mpr hk)] have hLeb (k : ℕ) : (∫⁻ p, ‖F k p‖ₑ ∂ν.prod μ) ≤ ofReal (∫ ω, M.jumpIntegral (fun t ω => |G t ω|) M.horizon ω ∂μ) := by have heq := ofReal_integral_eq_lintegral_ofReal (hFi k) (Eventually.of_forall (hFnonneg k)) have hn : (fun p => ‖F k p‖ₑ) = (fun p => ofReal (F k p)) := by funext p rw [← ofReal_norm, Real.norm_eq_abs, abs_of_nonneg (hFnonneg k p)] rw [hn, ← heq] exact ENNReal.ofReal_le_ofReal (hInt k) refine ⟨((M.predictable_joint_measurable G hG).abs.mul hrmeas).aestronglyMeasurable, ?_⟩ rw [hasFiniteIntegral_iff_enorm] have hFatou : (∫⁻ p, ‖f p‖ₑ ∂ν.prod μ) ≤ liminf (fun k => ∫⁻ p, ‖F k p‖ₑ ∂ν.prod μ) atTop := by have heq : (fun p => ‖f p‖ₑ) = (fun p => liminf (fun k => ‖F k p‖ₑ) atTop) := by funext p exact (hlim p).enorm.liminf_eq.symm rw [heq] exact lintegral_liminf_le' (fun k => (hFmeas k).aemeasurable.enorm) exact lt_of_le_of_lt (hFatou.trans (liminf_le_of_frequently_le' (Eventually.of_forall hLeb).frequently)) ENNReal.ofReal_lt_top
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.predictable_rate_product_integrable · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Compensator.lean:373
Continuous­Energy­Square 1 core · 0 supporting This isolates the real-analysis identity needed to expand the square of a pathwise compensator integral. ★ energyIntegral_square

Square identity for an absolutely continuous compensator

This isolates the real-analysis identity needed to expand the square of a pathwise compensator integral. The rate is the model's at-risk intensity.

theorem energyIntegral_square reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

The square of the integrated predictable intensity is twice the integral of its running integral times the current intensity-weighted payoff. The model, payoff, and path, predictability, and boundedness give the pathwise square identity.

Formal statement
Ω :
Type u_1
shared
M :
Model Ω μ
H :
ℝ → Ω → ℝ
hH :
M.Predictable H
hbound :
∃ C : ℝ, ∀ t ω, |H t ω| ≤ C
ω :
Ω
(M.energyIntegral H M.horizon ω) ^ 2
= 2 * ∫ t in Ioc 0 M.horizon, M.energyIntegral H t ω * (H t ω * (M.atRisk t ω * M.intensity t ω)) ∂volume
Proof (Lean source)
theorem Model.energyIntegral_square (M : Model Ω μ) (H : ℝ → Ω → ℝ) (hH : M.Predictable H) (hbound : ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C) (ω : Ω) : (M.energyIntegral H M.horizon ω) ^ 2 = 2 * ∫ t in Ioc 0 M.horizon, M.energyIntegral H t ω * (H t ω * (M.atRisk t ω * M.intensity t ω)) ∂volume := by let f : ℝ → ℝ := fun t => H t ω * (M.atRisk t ω * M.intensity t ω) let F : ℝ → ℝ := fun t => ∫ s in (0 : ℝ)..t, f s have hHjoint : Measurable (fun p : ℝ × Ω => H p.1 p.2) := by apply Measurable.le ?_ hH apply (MeasurableSpace.generateFrom_le_iff _).mpr rintro S ⟨a, b, B, hB, rfl⟩ exact measurableSet_Ioc.prod ((M.filtration_le a) B hB) have hHm : Measurable (fun t => H t ω) := hHjoint.comp (measurable_id.prodMk measurable_const) have hrate : Integrable (fun t => M.atRisk t ω * M.intensity t ω) (volume.restrict (Ioc 0 M.horizon)) := M.rate_integrable ω obtain ⟨C, hC⟩ := hbound have hf : Integrable f (volume.restrict (Ioc 0 M.horizon)) := by apply Integrable.mono' (hrate.abs.const_mul |C|) · exact (hHm.mul ((M.atRisk_joint_measurable.comp (measurable_id.prodMk measurable_const)).mul (M.intensity_joint_measurable.comp (measurable_id.prodMk measurable_const)))).aestronglyMeasurable · filter_upwards with t simp only [Real.norm_eq_abs, f, abs_mul] have hle : |H t ω| ≤ |C| := (hC t ω).trans (le_abs_self C) exact mul_le_mul_of_nonneg_right hle (mul_nonneg (abs_nonneg _) (abs_nonneg _)) have hfi : IntervalIntegrable f volume 0 M.horizon := (intervalIntegrable_iff_integrableOn_Ioc_of_le M.horizon_pos.le).2 hf have hF : AbsolutelyContinuousOnInterval F 0 M.horizon := hfi.absolutelyContinuousOnInterval_intervalIntegral (by simp) have hprod := hF.integral_deriv_mul_eq_sub hF have hderiv := hfi.ae_hasDerivAt_integral have heq : (∫ t in (0 : ℝ)..M.horizon, deriv F t * F t + F t * deriv F t) = ∫ t in (0 : ℝ)..M.horizon, 2 * F t * f t := by apply intervalIntegral.integral_congr_ae filter_upwards [hderiv] with t ht htm have htIcc : t ∈ Icc (0 : ℝ) M.horizon := by simpa [uIcc_of_le M.horizon_pos.le] using (uIoc_subset_uIcc htm) have hd : deriv F t = f t := (ht (by simpa [uIcc_of_le M.horizon_pos.le] using htIcc) 0 (by simp)).deriv rw [hd] ring rw [heq] at hprod have hzero : F 0 = 0 := by simp [F] have hfinal : F M.horizon = M.energyIntegral H M.horizon ω := by simp [F, f, Model.energyIntegral, intervalIntegral.integral_of_le M.horizon_pos.le] rw [hzero, hfinal] at hprod simp only [zero_mul, sub_zero] at hprod calc (M.energyIntegral H M.horizon ω) ^ 2 = ∫ t in (0 : ℝ)..M.horizon, 2 * F t * f t := by nlinarith [hprod] _ = 2 * ∫ t in Ioc 0 M.horizon, M.energyIntegral H t ω * (H t ω * (M.atRisk t ω * M.intensity t ω)) ∂volume := by rw [intervalIntegral.integral_of_le M.horizon_pos.le, ← integral_const_mul] apply integral_congr_ae filter_upwards [ae_restrict_mem measurableSet_Ioc] with t ht have ht0 : 0 ≤ t := le_of_lt ht.1 simp only [F, f, Model.energyIntegral, intervalIntegral.integral_of_le ht0] ring
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.energyIntegral_square · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/ContinuousEnergySquare.lean:19 · uses Model , Predictable , energyIntegral
Cross­Subject 1 core · 0 supporting This generalizes the public counting-process cross-prefix proof pattern to finite recurrent-event paths. ★ subject_product_pathwise

Strict-past cross products for full-sample predictable integrands

This generalizes the public counting-process cross-prefix proof pattern to finite recurrent-event paths. A product expansion and compensation of its two predictable cross payoffs establish orthogonality without integral independence.

theorem subject_product_pathwise reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel

On paths with disjoint stopped subject jumps, the product of their compensated integrals equals two oriented cross jump sums minus their two oriented compensator integrals. The sample model and payoff, left predictability, boundedness, the two indices and path, and their disjoint jumps give the pathwise product expansion.

Formal statement
n :
ℕ
shared
Ω :
Type u_1
shared
S :
SampleModel n Ω μ
H :
ℝ → (Fin n → Ω) → ℝ
hH :
S.LeftPredictable H
hbound :
∃ C : ℝ, ∀ t x, |H t x| ≤ C
i j :
Fin n
x :
Fin n → Ω
hdisjoint :
Disjoint ((S.process i).eventTimes x) ((S.process j).eventTimes x)
S.subjectIntegral H i x * S.subjectIntegral H j x
= (S.process i).jumpIntegral (S.crossPayoff H j) (S.process i).horizon x
+ (S.process j).jumpIntegral (S.crossPayoff H i) (S.process j).horizon x
- (S.process i).energyIntegral (S.crossPayoff H j) (S.process i).horizon x
- (S.process j).energyIntegral (S.crossPayoff H i) (S.process j).horizon x
Proof (Lean source)
theorem SampleModel.subject_product_pathwise (S : SampleModel n Ω μ) (H : ℝ → (Fin n → Ω) → ℝ) (hH : S.LeftPredictable H) (hbound : ∃ C : ℝ, ∀ t x, |H t x| ≤ C) (i j : Fin n) (x : Fin n → Ω) (hdisjoint : Disjoint ((S.process i).eventTimes x) ((S.process j).eventTimes x)) : S.subjectIntegral H i x * S.subjectIntegral H j x = (S.process i).jumpIntegral (S.crossPayoff H j) (S.process i).horizon x + (S.process j).jumpIntegral (S.crossPayoff H i) (S.process j).horizon x - (S.process i).energyIntegral (S.crossPayoff H j) (S.process i).horizon x - (S.process j).energyIntegral (S.crossPayoff H i) (S.process j).horizon x := by /- Instantiate finiteJump_sum_product on the two event sets, and finiteJump_sum_integral_product in both orientations with the respective H-weighted rates. Use integral_prefix_product for the two continuous parts. Every component horizon is S.horizon by process_horizon. The existing square_pathwise proof gives the local measurability, bounded strict-prefix and continuous-prefix integrability needed to distribute subtraction through the two time integrals. Assemble the identities with finite-sum linearity and ring; no moment premise enters. All three deterministic prerequisites in PathwiseCrossAlgebra are now proved. This is the only open proof in the dependency closure. Work at a fixed x with T := S.horizon, E := (S.process i).eventTimes x, F := (S.process j).eventTimes x, f t := H t x * rate_i t and g t := H t x * rate_j t. Weighted-rate integrability follows exactly as hf in Model.square_pathwise (joint measurability from predictability, dominated by |C| times the integrable absolute rate). Strict jump-prefix functions are measurable finite sums of Ioi indicators and bounded by the finite sum of absolute event payoffs. Continuous prefixes are continuous on Icc 0 T by the interval primitive theorem, hence bounded; their products with either weighted rate are integrable. These facts justify integral_sub when expanding each cross energy payoff. Model.events_in_horizon removes each t ≤ horizon event filter. The mixed sum/integral identities are instantiated twice; the continuous product identity supplies both continuous-prefix terms. Normalize crossPayoff, prefixIntegral, energyIntegral and the common horizons, distribute finite sums and the justified time subtractions, then ring with the four deterministic equalities. Do not add any hypothesis or invoke probabilistic independence in this pathwise proof. -/ classical let T := S.horizon let E (k : Fin n) := (S.process k).eventTimes x let r (k : Fin n) (t : ℝ) := (S.process k).atRisk t x * (S.process k).intensity t x let f (k : Fin n) (t : ℝ) := H t x * r k t let J (k : Fin n) (t : ℝ) := ∑ s ∈ (E k).filter (fun s => s < t), H s x let A (k : Fin n) (t : ℝ) := ∫ s in Ioc 0 t, f k s ∂volume have hT : 0 ≤ T := S.horizon_pos.le have hE (k : Fin n) (t : ℝ) (ht : t ∈ E k) : 0 < t ∧ t ≤ T := by simpa only [S.process_horizon] using (S.process k).events_in_horizon x t ht have hfilter (k : Fin n) : (E k).filter (fun t => t ≤ T) = E k := Finset.filter_eq_self.mpr (fun t ht => (hE k t ht).2) have hHm : Measurable (fun t => H t x) := ((S.process i).predictable_joint_measurable H (S.process_predictable H hH i)).comp (measurable_id.prodMk measurable_const) obtain ⟨C, hC⟩ := hbound have hf (k : Fin n) : IntegrableOn (f k) (Ioc 0 T) volume := by have hrm : Measurable (r k) := ((S.process k).atRisk_joint_measurable.comp (measurable_id.prodMk measurable_const)).mul ((S.process k).intensity_joint_measurable.comp (measurable_id.prodMk measurable_const)) have hr : Integrable (r k) (volume.restrict (Ioc 0 T)) := by simpa only [S.process_horizon, r, T, IntegrableOn] using (S.process k).rate_integrable x apply Integrable.mono' (hr.abs.const_mul |C|) · exact (hHm.mul hrm).aestronglyMeasurable · filter_upwards with t simp only [Real.norm_eq_abs, f, abs_mul] exact mul_le_mul_of_nonneg_right ((hC t x).trans (le_abs_self C)) (abs_nonneg (r k t)) have hJm (k : Fin n) : Measurable (J k) := by dsimp [J] simp_rw [Finset.sum_filter] apply Finset.measurable_sum intro s hs exact Measurable.ite measurableSet_Ioi measurable_const measurable_const have hJbound (k : Fin n) (t : ℝ) : |J k t| ≤ ∑ s ∈ E k, |H s x| := by calc _ ≤ ∑ s ∈ (E k).filter (fun s => s < t), |H s x| := Finset.abs_sum_le_sum_abs _ _ _ ≤ _ := Finset.sum_le_sum_of_subset_of_nonneg (filter_subset _ _) (by intro s hs hns; exact abs_nonneg _) have hJf (k l : Fin n) : IntegrableOn (fun t => J k t * f l t) (Ioc 0 T) volume := by apply (hf l).bdd_mul (c := ∑ s ∈ E k, |H s x|) (hJm k).aestronglyMeasurable filter_upwards with t simpa only [Real.norm_eq_abs] using hJbound k t have hAf (k l : Fin n) : IntegrableOn (fun t => A k t * f l t) (Ioc 0 T) volume := by let B : ℝ → ℝ := fun t => ∫ s in (0 : ℝ)..t, f k s have hki : IntervalIntegrable (f k) volume 0 T := (intervalIntegrable_iff_integrableOn_Ioc_of_le hT).2 (hf k) have hli : IntervalIntegrable (f l) volume 0 T := (intervalIntegrable_iff_integrableOn_Ioc_of_le hT).2 (hf l) have hB : ContinuousOn B (uIcc 0 T) := (hki.absolutelyContinuousOnInterval_intervalIntegral (by simp)).continuousOn have hb := (intervalIntegrable_iff_integrableOn_Ioc_of_le hT).1 (hli.continuousOn_mul hB) apply hb.congr filter_upwards [ae_restrict_mem measurableSet_Ioc] with t ht simp only [B, A, intervalIntegral.integral_of_le ht.1.le] have hcross (k l : Fin n) : (S.process k).energyIntegral (S.crossPayoff H l) (S.process k).horizon x = (∫ t in Ioc 0 T, J l t * f k t ∂volume) - ∫ t in Ioc 0 T, A l t * f k t ∂volume := by unfold Model.energyIntegral SampleModel.crossPayoff Model.prefixIntegral rw [S.process_horizon k] calc _ = ∫ t in Ioc 0 T, (J l t * f k t - A l t * f k t) ∂volume := by apply integral_congr_ae filter_upwards with t dsimp [J, A, f, r, E, Model.energyIntegral] ring _ = _ := integral_sub (hJf l k) (hAf l k) have hj := finiteJump_sum_product (E i) (E j) (fun t => H t x) (fun t => H t x) hdisjoint have hij := finiteJump_sum_integral_product (E i) (fun t => H t x) (f j) T hT (hE i) (hf j) have hji := finiteJump_sum_integral_product (E j) (fun t => H t x) (f i) T hT (hE j) (hf i) have ha := integral_prefix_product (f i) (f j) T hT (hf i) (hf j) rw [hcross i j, hcross j i] unfold SampleModel.subjectIntegral Model.stochasticIntegral Model.jumpIntegral Model.energyIntegral SampleModel.crossPayoff Model.prefixIntegral simp only [S.process_horizon] change ((∑ s ∈ (E i).filter (fun t => t ≤ T), H s x) - A i T) * ((∑ s ∈ (E j).filter (fun t => t ≤ T), H s x) - A j T) = (∑ s ∈ (E i).filter (fun t => t ≤ T), H s x * (J j s - A j s)) + (∑ s ∈ (E j).filter (fun t => t ≤ T), H s x * (J i s - A i s)) - ((∫ t in Ioc 0 T, J j t * f i t ∂volume) - ∫ t in Ioc 0 T, A j t * f i t ∂volume) - ((∫ t in Ioc 0 T, J i t * f j t ∂volume) - ∫ t in Ioc 0 T, A i t * f j t ∂volume) rw [hfilter i, hfilter j] simp only [mul_sub, Finset.sum_sub_distrib] dsimp only [J, A] at ⊢ nlinarith [hj, hij, hji, ha]
Dominated­Payoffs 1 core · 1 supporting These analytic bridges allow an integrable, possibly unbounded envelope in place of a uniform constant. ★ tendsto_expected_energyIntegral_of_dominated

Dominated convergence for integrable finite-jump payoffs

These analytic bridges allow an integrable, possibly unbounded envelope in place of a uniform constant. They import no compensation theorem. The energy bridge explicitly requires absolute time-sample integrability, so its use of Fubini and dominated convergence cannot rely on a totalized Bochner integral.

theorem tendsto_expected_energyIntegral_of_dominated reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

Pointwise convergent predictable payoffs dominated by an absolutely integrable time-sample intensity payoff have convergent expected compensator integrals. The model and payoffs, their predictability, domination, integrability of the dominating intensity payoff, and pointwise convergence give convergence of expected compensator integrals.

Formal statement
Ω :
Type u_1
shared
M :
Model Ω μ
G :
ℕ → ℝ → Ω → ℝ
H :
ℝ → Ω → ℝ
hG :
∀ k, M.Predictable (G k)
hH :
M.Predictable H
hdom :
∀ k t ω, |G k t ω| ≤ |H t ω|
hproduct :
Integrable (fun p : ℝ × Ω => |H p.1 p.2| * (M.atRisk p.1 p.2 * M.intensity p.1 p.2)) ((volume.restrict (Ioc 0 M.horizon)).prod μ)
hlim :
∀ t ω, Tendsto (fun k => G k t ω) atTop (nhds (H t ω))
Tendsto (fun k => ∫ ω, M.energyIntegral (G k) M.horizon ω ∂μ) atTop (nhds (∫ ω, M.energyIntegral H M.horizon ω ∂μ))
Proof (Lean source)
theorem Model.tendsto_expected_energyIntegral_of_dominated (M : Model Ω μ) [IsProbabilityMeasure μ] (G : ℕ → ℝ → Ω → ℝ) (H : ℝ → Ω → ℝ) (hG : ∀ k, M.Predictable (G k)) (hH : M.Predictable H) (hdom : ∀ k t ω, |G k t ω| ≤ |H t ω|) (hproduct : Integrable (fun p : ℝ × Ω => |H p.1 p.2| * (M.atRisk p.1 p.2 * M.intensity p.1 p.2)) ((volume.restrict (Ioc 0 M.horizon)).prod μ)) (hlim : ∀ t ω, Tendsto (fun k => G k t ω) atTop (nhds (H t ω))) : Tendsto (fun k => ∫ ω, M.energyIntegral (G k) M.horizon ω ∂μ) atTop (nhds (∫ ω, M.energyIntegral H M.horizon ω ∂μ)) := by /- Apply DCT once on the time-sample product, then rewrite each product integral as the sample expectation of the time integral using `integral_prod_symm`. Nonnegative rates convert norm domination into `hdom`. Use `Integrable.mono'` to derive product integrability of each approximant and of H from hproduct and joint measurability. Alternatively `integrable_prod_iff'` supplies a.e. integrable time sections and the integrable absolute energy envelope for two successive applications of DCT. Do not infer section integrability solely from integrability of a totalized pathwise Bochner integral. -/ let ν := volume.restrict (Ioc 0 M.horizon) let rate : ℝ × Ω → ℝ := fun p => M.atRisk p.1 p.2 * M.intensity p.1 p.2 have hrmeas : Measurable rate := M.atRisk_joint_measurable.mul M.intensity_joint_measurable have hrnonneg (p : ℝ × Ω) : 0 ≤ rate p := mul_nonneg (M.atRisk_nonneg p.1 p.2) (M.intensity_nonneg p.1 p.2) have hmeas (k : ℕ) : Measurable (fun p : ℝ × Ω => G k p.1 p.2 * rate p) := (M.predictable_joint_measurable (G k) (hG k)).mul hrmeas have hbound (k : ℕ) (p : ℝ × Ω) : ‖G k p.1 p.2 * rate p‖ ≤ |H p.1 p.2| * rate p := by rw [Real.norm_eq_abs, abs_mul, abs_of_nonneg (hrnonneg p)] exact mul_le_mul_of_nonneg_right (hdom k p.1 p.2) (hrnonneg p) have hGi (k : ℕ) : Integrable (fun p : ℝ × Ω => G k p.1 p.2 * rate p) (ν.prod μ) := hproduct.mono' (hmeas k).aestronglyMeasurable (Eventually.of_forall (hbound k)) have hHi : Integrable (fun p : ℝ × Ω => H p.1 p.2 * rate p) (ν.prod μ) := by apply hproduct.mono' ((M.predictable_joint_measurable H hH).mul hrmeas).aestronglyMeasurable apply Eventually.of_forall intro p change ‖H p.1 p.2 * rate p‖ ≤ |H p.1 p.2| * rate p rw [Real.norm_eq_abs, abs_mul, abs_of_nonneg (hrnonneg p)] have hconv : Tendsto (fun k => ∫ p, G k p.1 p.2 * rate p ∂(ν.prod μ)) atTop (nhds (∫ p, H p.1 p.2 * rate p ∂(ν.prod μ))) := by apply tendsto_integral_of_dominated_convergence (fun p => |H p.1 p.2| * rate p) · exact fun k => (hmeas k).aestronglyMeasurable · exact hproduct · exact fun k => Eventually.of_forall (hbound k) · exact Eventually.of_forall (fun p => (hlim p.1 p.2).mul tendsto_const_nhds) have hGeq (k : ℕ) : (∫ p, G k p.1 p.2 * rate p ∂(ν.prod μ)) = ∫ ω, M.energyIntegral (G k) M.horizon ω ∂μ := integral_prod_symm _ (hGi k) have hHeq : (∫ p, H p.1 p.2 * rate p ∂(ν.prod μ)) = ∫ ω, M.energyIntegral H M.horizon ω ∂μ := integral_prod_symm _ hHi simpa only [hGeq, hHeq] using hconv
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.tendsto_expected_energyIntegral_of_dominated · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/DominatedPayoffs.lean:55 · uses Model , Predictable , energyIntegral
1 supporting declaration (lemmas, instances)
  • tendsto_expected_jumpIntegral_of_dominated theorem — Pointwise convergent predictable payoffs dominated by an integrable absolute event payoff have convergent expected finite jump sums.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    G :
    ℕ → ℝ → Ω → ℝ
    H :
    ℝ → Ω → ℝ
    hG :
    ∀ k, M.Predictable (G k)
    hdom :
    ∀ k t ω, |G k t ω| ≤ |H t ω|
    hjumpAbs :
    Integrable (M.jumpIntegral (fun t ω => |H t ω|) M.horizon) μ
    hlim :
    ∀ t ω, Tendsto (fun k => G k t ω) atTop (nhds (H t ω))
    Tendsto (fun k => ∫ ω, M.jumpIntegral (G k) M.horizon ω ∂μ) atTop (nhds (∫ ω, M.jumpIntegral H M.horizon ω ∂μ))
    Proof (Lean source)
    theorem Model.tendsto_expected_jumpIntegral_of_dominated (M : Model Ω μ) [IsProbabilityMeasure μ] (G : ℕ → ℝ → Ω → ℝ) (H : ℝ → Ω → ℝ) (hG : ∀ k, M.Predictable (G k)) (hdom : ∀ k t ω, |G k t ω| ≤ |H t ω|) (hjumpAbs : Integrable (M.jumpIntegral (fun t ω => |H t ω|) M.horizon) μ) (hlim : ∀ t ω, Tendsto (fun k => G k t ω) atTop (nhds (H t ω))) : Tendsto (fun k => ∫ ω, M.jumpIntegral (G k) M.horizon ω ∂μ) atTop (nhds (∫ ω, M.jumpIntegral H M.horizon ω ∂μ)) := by /- Use `tendsto_integral_of_dominated_convergence` with envelope `jumpIntegral |H|`. Finset.abs_sum_le_sum_abs and Finset.sum_le_sum give domination; `tendsto_finsetSum` gives convergence on each path. Measurability is supplied by the closed enumeration module. This is purely analytic and must not import Compensator or Regularity. -/ classical apply tendsto_integral_of_dominated_convergence (M.jumpIntegral (fun t ω => |H t ω|) M.horizon) · intro k exact (M.measurable_jumpIntegral (G k) (M.predictable_joint_measurable (G k) (hG k))).aestronglyMeasurable · exact hjumpAbs · intro k apply Eventually.of_forall intro ω rw [Real.norm_eq_abs, Model.jumpIntegral, Model.jumpIntegral] exact (Finset.abs_sum_le_sum_abs _ _).trans (Finset.sum_le_sum (fun t _ => hdom k t ω)) · apply Eventually.of_forall intro ω unfold Model.jumpIntegral exact tendsto_finsetSum _ (fun t _ => hlim t ω)
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.tendsto_expected_jumpIntegral_of_dominated · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/DominatedPayoffs.lean:21
Finite­Jump­Algebra 1 core · 1 supporting These pathwise identities reduce the counting integral's square to finite-sum algebra and the continuous compensator square identity. ★ jumpIntegral_square

Finite-jump square and cross-term identities

These pathwise identities reduce the counting integral's square to finite-sum algebra and the continuous compensator square identity.

theorem jumpIntegral_square reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

The square of a finite event sum is the sum of squared event payoffs plus twice every event payoff times the sum over strictly earlier events. The model, payoff, and path give the finite-jump square expansion.

Formal statement
Ω :
Type u_1
shared
M :
Model Ω μ
H :
ℝ → Ω → ℝ
ω :
Ω
(M.jumpIntegral H M.horizon ω) ^ 2
= M.jumpIntegral (fun t ω => (H t ω) ^ 2) M.horizon ω
+ M.jumpIntegral (fun t ω => 2 * H t ω * (∑ s ∈ (M.eventTimes ω).filter (fun s => s < t), H s ω)) M.horizon ω
Proof (Lean source)
theorem Model.jumpIntegral_square (M : Model Ω μ) (H : ℝ → Ω → ℝ) (ω : Ω) : (M.jumpIntegral H M.horizon ω) ^ 2 = M.jumpIntegral (fun t ω => (H t ω) ^ 2) M.horizon ω + M.jumpIntegral (fun t ω => 2 * H t ω * (∑ s ∈ (M.eventTimes ω).filter (fun s => s < t), H s ω)) M.horizon ω := by /- Order the finite set of event times. Every unordered pair contributes twice, and has exactly one strictly later endpoint. -/ classical have hs (s : Finset ℝ) (f : ℝ → ℝ) : (∑ t ∈ s, f t) ^ 2 = (∑ t ∈ s, (f t) ^ 2) + ∑ t ∈ s, 2 * f t * (∑ u ∈ s.filter (fun u => u < t), f u) := by induction s using Finset.induction_on_max with | empty => simp | @insert a s ha ih => have han : a ∉ s := fun h => (lt_irrefl a) (ha a h) have hlt (t : ℝ) (ht : t ∈ s) : ¬ a < t := (ha t ht).not_gt simp only [Finset.sum_insert han, Finset.filter_insert] simp only [if_neg (lt_irrefl a)] have hfilt : s.filter (fun u => u < a) = s := Finset.filter_true_of_mem (fun u hu => ha u hu) simp only [hfilt] have hsum : (∑ t ∈ s, 2 * f t * ∑ u ∈ (if a < t then insert a (s.filter (fun u => u < t)) else s.filter (fun u => u < t)), f u) = ∑ t ∈ s, 2 * f t * ∑ u ∈ s.filter (fun u => u < t), f u := by apply Finset.sum_congr rfl intro t ht rw [if_neg (hlt t ht)] rw [hsum] nlinarith [ih] have hfin : (M.eventTimes ω).filter (fun t => t ≤ M.horizon) = M.eventTimes ω := Finset.filter_true_of_mem (fun t ht => (M.events_in_horizon ω t ht).2) simpa [Model.jumpIntegral, hfin] using hs (M.eventTimes ω) (fun t => H t ω)
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.jumpIntegral_square · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/FiniteJumpAlgebra.lean:19 · uses Model , jumpIntegral
1 supporting declaration (lemmas, instances)
  • jump_energy_cross theorem — Twice the product of the event sum and the compensator integral splits at each event into a past-compensator jump term and a past-event rate term.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    H :
    ℝ → Ω → ℝ
    hH :
    M.Predictable H
    hbound :
    ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C
    ω :
    Ω
    2 * M.jumpIntegral H M.horizon ω * M.energyIntegral H M.horizon ω
    = M.jumpIntegral (fun t ω => 2 * H t ω * M.energyIntegral H t ω) M.horizon ω
    + M.energyIntegral (fun t ω => 2 * H t ω * (∑ s ∈ (M.eventTimes ω).filter (fun s => s < t), H s ω)) M.horizon ω
    Proof (Lean source)
    theorem Model.jump_energy_cross (M : Model Ω μ) (H : ℝ → Ω → ℝ) (hH : M.Predictable H) (hbound : ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C) (ω : Ω) : 2 * M.jumpIntegral H M.horizon ω * M.energyIntegral H M.horizon ω = M.jumpIntegral (fun t ω => 2 * H t ω * M.energyIntegral H t ω) M.horizon ω + M.energyIntegral (fun t ω => 2 * H t ω * (∑ s ∈ (M.eventTimes ω).filter (fun s => s < t), H s ω)) M.horizon ω := by /- Expand the finite jump sum. For each event s split the compensator integral into (0,s] and (s,T]. Exchange the finite sum and the latter integral; endpoints have zero Lebesgue measure. -/ classical let E := M.eventTimes ω let r : ℝ → ℝ := fun t => M.atRisk t ω * M.intensity t ω let f : ℝ → ℝ := fun t => H t ω * r t have hHjoint : Measurable (fun p : ℝ × Ω => H p.1 p.2) := by apply Measurable.le ?_ hH apply (MeasurableSpace.generateFrom_le_iff _).mpr rintro S ⟨a, b, B, hB, rfl⟩ exact measurableSet_Ioc.prod ((M.filtration_le a) B hB) have hHm : Measurable (fun t => H t ω) := hHjoint.comp (measurable_id.prodMk measurable_const) have hrm : Measurable r := (M.atRisk_joint_measurable.comp (measurable_id.prodMk measurable_const)).mul (M.intensity_joint_measurable.comp (measurable_id.prodMk measurable_const)) obtain ⟨C, hC⟩ := hbound have hf : IntegrableOn f (Ioc 0 M.horizon) volume := by apply Integrable.mono' ((M.rate_integrable ω).abs.const_mul |C|) · exact (hHm.mul hrm).aestronglyMeasurable · filter_upwards with t simp only [Real.norm_eq_abs, f, abs_mul] simpa [r, abs_mul, mul_assoc] using mul_le_mul_of_nonneg_right ((hC t ω).trans (le_abs_self C)) (abs_nonneg (r t)) have hsplit (s : ℝ) (hs : s ∈ E) : (∫ t in Ioc 0 M.horizon, f t ∂volume) = (∫ t in Ioc 0 s, f t ∂volume) + ∫ t in Ioc s M.horizon, f t ∂volume := by have hs0 := (M.events_in_horizon ω s hs).1.le have hsT := (M.events_in_horizon ω s hs).2 have hdisj : Disjoint (Ioc 0 s) (Ioc s M.horizon) := by apply Set.disjoint_left.mpr intro t ht hu exact (not_lt_of_ge ht.2) hu.1 rw [← Ioc_union_Ioc_eq_Ioc hs0 hsT, setIntegral_union hdisj measurableSet_Ioc (hf.mono_set (Ioc_subset_Ioc_right hsT)) (hf.mono_set (Ioc_subset_Ioc_left hs0))] let g : ℝ → ℝ → ℝ := fun s t => if s < t then 2 * H s ω * f t else 0 have hg (s : ℝ) : IntegrableOn (g s) (Ioc 0 M.horizon) volume := by change Integrable ((Ioi s).indicator (fun t => 2 * H s ω * f t)) (volume.restrict (Ioc 0 M.horizon)) exact (integrable_indicator_iff measurableSet_Ioi).2 ((hf.const_mul (2 * H s ω)).mono_measure Measure.restrict_le_self) have htail (s : ℝ) (hs : s ∈ E) : (∫ t in Ioc 0 M.horizon, g s t ∂volume) = 2 * H s ω * ∫ t in Ioc s M.horizon, f t ∂volume := by have hs0 := (M.events_in_horizon ω s hs).1.le have hset : Ioc 0 M.horizon ∩ Ioi s = Ioc s M.horizon := by ext t simp only [mem_inter_iff, mem_Ioc, mem_Ioi] constructor · rintro ⟨⟨_, htT⟩, hst⟩ exact ⟨hst, htT⟩ · rintro ⟨hst, htT⟩ exact ⟨⟨lt_of_le_of_lt hs0 hst, htT⟩, hst⟩ calc (∫ t in Ioc 0 M.horizon, g s t ∂volume) = ∫ t in Ioc 0 M.horizon, (Ioi s).indicator (fun t => 2 * H s ω * f t) t ∂volume := by congr 1 _ = ∫ t in Ioc s M.horizon, 2 * H s ω * f t ∂volume := by rw [setIntegral_indicator measurableSet_Ioi, hset] _ = _ := by rw [integral_const_mul] have hsum : (∫ t in Ioc 0 M.horizon, ∑ s ∈ E, g s t ∂volume) = ∑ s ∈ E, ∫ t in Ioc 0 M.horizon, g s t ∂volume := integral_finsetSum E (fun s _ => hg s) have hpoint (t : ℝ) : (∑ s ∈ E, g s t) = 2 * H t ω * (∑ s ∈ E.filter (fun s => s < t), H s ω) * r t := by rw [Finset.sum_filter] calc (∑ s ∈ E, g s t) = ∑ s ∈ E, 2 * H t ω * (if s < t then H s ω else 0) * r t := by apply Finset.sum_congr rfl intro s hs simp only [g] split_ifs <;> simp [f] <;> ring _ = _ := by rw [Finset.mul_sum, Finset.sum_mul] have hfin : E.filter (fun t => t ≤ M.horizon) = E := Finset.filter_true_of_mem (fun t ht => (M.events_in_horizon ω t ht).2) dsimp only [Model.jumpIntegral, Model.energyIntegral] change (2 * (∑ s ∈ E.filter (fun s => s ≤ M.horizon), H s ω) * ∫ t in Ioc 0 M.horizon, f t ∂volume) = (∑ s ∈ E.filter (fun s => s ≤ M.horizon), 2 * H s ω * ∫ t in Ioc 0 s, f t ∂volume) + ∫ t in Ioc 0 M.horizon, 2 * H t ω * (∑ s ∈ E.filter (fun s => s < t), H s ω) * r t ∂volume rw [hfin] calc 2 * (∑ s ∈ E, H s ω) * (∫ t in Ioc 0 M.horizon, f t ∂volume) = ∑ s ∈ E, 2 * H s ω * ∫ t in Ioc 0 M.horizon, f t ∂volume := by rw [← Finset.sum_mul, ← Finset.mul_sum] _ = ∑ s ∈ E, ((2 * H s ω * ∫ t in Ioc 0 s, f t ∂volume) + (2 * H s ω * ∫ t in Ioc s M.horizon, f t ∂volume)) := by apply Finset.sum_congr rfl intro s hs rw [hsplit s hs] ring _ = (∑ s ∈ E, 2 * H s ω * ∫ t in Ioc 0 s, f t ∂volume) + ∫ t in Ioc 0 M.horizon, 2 * H t ω * (∑ s ∈ E.filter (fun s => s < t), H s ω) * r t ∂volume := by rw [Finset.sum_add_distrib] congr 1 calc (∑ s ∈ E, 2 * H s ω * ∫ t in Ioc s M.horizon, f t ∂volume) = ∑ s ∈ E, ∫ t in Ioc 0 M.horizon, g s t ∂volume := by apply Finset.sum_congr rfl intro s hs exact (htail s hs).symm _ = ∫ t in Ioc 0 M.horizon, ∑ s ∈ E, g s t ∂volume := hsum.symm _ = _ := by apply setIntegral_congr_fun measurableSet_Ioc intro t ht exact hpoint t
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.jump_energy_cross · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/FiniteJumpAlgebra.lean:60
Isometry 1 core · 2 supporting The pathwise square expansion exposes a quadratic jump payoff and a mixed strict-past payoff. ★ stochasticIntegral_isometry

Centering and L² isometry for finite-jump counting processes

The pathwise square expansion exposes a quadratic jump payoff and a mixed strict-past payoff. Predictable compensation cancels the latter and converts the former into the integrated quadratic intensity.

theorem stochasticIntegral_isometry reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

The expected square of a bounded predictable compensated counting integral equals the expected integral of its squared integrand against the at-risk intensity. The model and payoff, predictability, and boundedness give the subject compensated-integral isometry.

Formal statement
Ω :
Type u_1
shared
M :
Model Ω μ
H :
ℝ → Ω → ℝ
hH :
M.Predictable H
hbound :
∃ C : ℝ, ∀ t ω, |H t ω| ≤ C
(∫ ω, (M.stochasticIntegral H M.horizon ω) ^ 2 ∂μ)
= ∫ ω, M.energyIntegral (M.quadraticPayoff H) M.horizon ω ∂μ
Proof (Lean source)
theorem Model.stochasticIntegral_isometry (M : Model Ω μ) (H : ℝ → Ω → ℝ) (hH : M.Predictable H) (hbound : ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C) : (∫ ω, (M.stochasticIntegral H M.horizon ω) ^ 2 ∂μ) = ∫ ω, M.energyIntegral (M.quadraticPayoff H) M.horizon ω ∂μ := by have hjq := M.integrable_quadratic_jump H hH hbound have heq := M.integrable_quadratic_energy H hH hbound have hjp := M.integrable_prefix_jump H hH hbound have hep := M.integrable_prefix_energy H hH hbound have hquad : ∃ C : ℝ, ∀ t ω, |M.quadraticPayoff H t ω| ≤ C := by obtain ⟨C, hC⟩ := hbound refine ⟨C ^ 2, ?_⟩ intro t ω simpa [Model.quadraticPayoff, abs_pow] using (pow_le_pow_left₀ (abs_nonneg (H t ω)) (hC t ω) 2) have hcq := M.bounded_predictable_compensator (M.quadraticPayoff H) (M.predictable_quadratic H hH) hquad have hcp := M.predictable_compensator (M.prefixPayoff H) (M.predictable_prefix_payoff H hH) (M.integrable_prefix_jump_abs H hH hbound) calc (∫ ω, (M.stochasticIntegral H M.horizon ω) ^ 2 ∂μ) = ∫ ω, M.jumpIntegral (M.quadraticPayoff H) M.horizon ω + M.jumpIntegral (M.prefixPayoff H) M.horizon ω - M.energyIntegral (M.prefixPayoff H) M.horizon ω ∂μ := integral_congr_ae (Filter.Eventually.of_forall (M.square_pathwise H hH hbound)) _ = (∫ ω, M.jumpIntegral (M.quadraticPayoff H) M.horizon ω ∂μ) + (∫ ω, M.jumpIntegral (M.prefixPayoff H) M.horizon ω ∂μ) - (∫ ω, M.energyIntegral (M.prefixPayoff H) M.horizon ω ∂μ) := by change (∫ ω, (M.jumpIntegral (M.quadraticPayoff H) M.horizon + M.jumpIntegral (M.prefixPayoff H) M.horizon - M.energyIntegral (M.prefixPayoff H) M.horizon) ω ∂μ) = _ rw [integral_sub' (hjq.add hjp) hep, integral_add' hjq hjp] _ = ∫ ω, M.energyIntegral (M.quadraticPayoff H) M.horizon ω ∂μ := by rw [hcq, hcp] ring
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.stochasticIntegral_isometry · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Isometry.lean:150 · uses Model , Predictable , energyIntegral , quadraticPayoff , stochasticIntegral
2 supporting declarations (lemmas, instances)
  • square_pathwise theorem — The square of a finite-jump compensated integral is its jump-sum of quadratic payoffs plus the mixed jump payoff minus the mixed compensator payoff.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    H :
    ℝ → Ω → ℝ
    hH :
    M.Predictable H
    hbound :
    ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C
    ω :
    Ω
    (M.stochasticIntegral H M.horizon ω) ^ 2
    = M.jumpIntegral (M.quadraticPayoff H) M.horizon ω
    + M.jumpIntegral (M.prefixPayoff H) M.horizon ω
    - M.energyIntegral (M.prefixPayoff H) M.horizon ω
    Proof (Lean source)
    theorem Model.square_pathwise (M : Model Ω μ) (H : ℝ → Ω → ℝ) (hH : M.Predictable H) (hbound : ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C) (ω : Ω) : (M.stochasticIntegral H M.horizon ω) ^ 2 = M.jumpIntegral (M.quadraticPayoff H) M.horizon ω + M.jumpIntegral (M.prefixPayoff H) M.horizon ω - M.energyIntegral (M.prefixPayoff H) M.horizon ω := by have hj := M.jumpIntegral_square H ω have hc := M.jump_energy_cross H hH hbound ω have he := M.energyIntegral_square H hH hbound ω unfold Model.stochasticIntegral Model.quadraticPayoff Model.prefixPayoff Model.prefixIntegral dsimp only [Model.jumpIntegral, Model.energyIntegral] at hj hc he ⊢ classical let r : ℝ → ℝ := fun t => M.atRisk t ω * M.intensity t ω let f : ℝ → ℝ := fun t => H t ω * r t let J : ℝ → ℝ := fun t => ∑ s ∈ (M.eventTimes ω).filter (fun s => s < t), H s ω let F : ℝ → ℝ := fun t => ∫ s in (0 : ℝ)..t, f s have hHm : Measurable (fun t => H t ω) := (M.predictable_joint_measurable H hH).comp (measurable_id.prodMk measurable_const) have hrm : Measurable r := (M.atRisk_joint_measurable.comp (measurable_id.prodMk measurable_const)).mul (M.intensity_joint_measurable.comp (measurable_id.prodMk measurable_const)) obtain ⟨C, hC⟩ := hbound have hf : Integrable f (volume.restrict (Ioc 0 M.horizon)) := by apply Integrable.mono' ((M.rate_integrable ω).abs.const_mul |C|) · exact (hHm.mul hrm).aestronglyMeasurable · filter_upwards with t simp only [Real.norm_eq_abs, f, abs_mul] simpa [r, abs_mul, mul_assoc] using mul_le_mul_of_nonneg_right ((hC t ω).trans (le_abs_self C)) (abs_nonneg (r t)) have hJm : Measurable J := by dsimp [J] simp_rw [Finset.sum_filter] apply Finset.measurable_sum intro s hs exact Measurable.ite measurableSet_Ioi measurable_const measurable_const have hJbound (t : ℝ) : |J t| ≤ ∑ s ∈ M.eventTimes ω, |H s ω| := by calc |J t| ≤ ∑ s ∈ (M.eventTimes ω).filter (fun s => s < t), |H s ω| := Finset.abs_sum_le_sum_abs _ _ _ ≤ ∑ s ∈ M.eventTimes ω, |H s ω| := Finset.sum_le_sum_of_subset_of_nonneg (filter_subset _ _) (by intro s hs hns; exact abs_nonneg _) have hfi : IntervalIntegrable f volume 0 M.horizon := (intervalIntegrable_iff_integrableOn_Ioc_of_le M.horizon_pos.le).2 hf have hFcont : ContinuousOn F (Icc 0 M.horizon) := by simpa [F, Set.uIcc_of_le M.horizon_pos.le] using (hfi.absolutelyContinuousOnInterval_intervalIntegral (by simp)).continuousOn obtain ⟨D, hD⟩ := isCompact_Icc.exists_bound_of_continuousOn hFcont have hFm : AEStronglyMeasurable F (volume.restrict (Ioc 0 M.horizon)) := (hFcont.mono (Set.Ioc_subset_Icc_self)).aestronglyMeasurable measurableSet_Ioc have hA : Integrable (fun t => (2 * H t ω * J t) * r t) (volume.restrict (Ioc 0 M.horizon)) := by apply (M.rate_integrable ω).bdd_mul (c := 2 * |C| * ∑ s ∈ M.eventTimes ω, |H s ω|) ((measurable_const.mul hHm).mul hJm).aestronglyMeasurable filter_upwards with t simp only [Real.norm_eq_abs] have ht := hJbound t have hHle : |H t ω| ≤ |C| := (hC t ω).trans (le_abs_self C) calc |2 * H t ω * J t| = 2 * |H t ω| * |J t| := by simp [abs_mul] _ ≤ 2 * |C| * ∑ s ∈ M.eventTimes ω, |H s ω| := by gcongr have hB : Integrable (fun t => (2 * F t * H t ω) * r t) (volume.restrict (Ioc 0 M.horizon)) := by apply (M.rate_integrable ω).bdd_mul (c := 2 * D * |C|) ((MeasureTheory.AEStronglyMeasurable.const_mul hFm 2).mul hHm.aestronglyMeasurable) filter_upwards [ae_restrict_mem measurableSet_Ioc] with t ht simp only [Real.norm_eq_abs] have hFle : |F t| ≤ D := hD t ⟨le_of_lt ht.1, ht.2⟩ have hHle : |H t ω| ≤ |C| := (hC t ω).trans (le_abs_self C) have hD0 : 0 ≤ D := (abs_nonneg _).trans hFle calc |2 * F t * H t ω| = 2 * |F t| * |H t ω| := by simp [abs_mul] _ ≤ 2 * D * |C| := by gcongr have hI : (∫ t in Ioc 0 M.horizon, (2 * H t ω * (J t - M.energyIntegral H t ω)) * r t ∂volume) = (∫ t in Ioc 0 M.horizon, (2 * H t ω * J t) * r t ∂volume) - (∫ t in Ioc 0 M.horizon, (2 * F t * H t ω) * r t ∂volume) := by calc _ = ∫ t in Ioc 0 M.horizon, ((2 * H t ω * J t) * r t - (2 * F t * H t ω) * r t) ∂volume := by apply integral_congr_ae filter_upwards [ae_restrict_mem measurableSet_Ioc] with t ht have hFt : F t = M.energyIntegral H t ω := by simp [F, f, r, Model.energyIntegral, intervalIntegral.integral_of_le (le_of_lt ht.1)] rw [← hFt] ring _ = _ := integral_sub hA hB simp only [J, r, Model.energyIntegral] at hI rw [hI] have hBval : (∫ t in Ioc 0 M.horizon, (2 * F t * H t ω) * (M.atRisk t ω * M.intensity t ω) ∂volume) = (∫ t in Ioc 0 M.horizon, H t ω * (M.atRisk t ω * M.intensity t ω) ∂volume) ^ 2 := by rw [he, ← integral_const_mul] apply integral_congr_ae filter_upwards [ae_restrict_mem measurableSet_Ioc] with t ht simp only [F, f, r, intervalIntegral.integral_of_le (le_of_lt ht.1)] ring simp only [mul_sub, Finset.sum_sub_distrib] nlinarith [hj, hc, hBval]
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.square_pathwise · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Isometry.lean:23
  • stochasticIntegral_centered theorem — The expected finite-horizon stochastic integral of a bounded predictable integrand against the compensated count is zero.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    H :
    ℝ → Ω → ℝ
    hH :
    M.Predictable H
    hbound :
    ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C
    (∫ ω, M.stochasticIntegral H M.horizon ω ∂μ) = 0
    Proof (Lean source)
    theorem Model.stochasticIntegral_centered (M : Model Ω μ) (H : ℝ → Ω → ℝ) (hH : M.Predictable H) (hbound : ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C) : (∫ ω, M.stochasticIntegral H M.horizon ω ∂μ) = 0 := by unfold Model.stochasticIntegral rw [integral_sub (M.integrable_jump H hH hbound) (M.integrable_energy H hH hbound), M.bounded_predictable_compensator H hH hbound] ring
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.stochasticIntegral_centered · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Isometry.lean:138
No­Common­Jumps 1 core · 2 supporting Absolutely continuous conditional intensities imply that a subject has no jump at any fixed deterministic time. ★ no_common_jumps

No common recurrent-event jumps in independent subjects

Absolutely continuous conditional intensities imply that a subject has no jump at any fixed deterministic time. Independent coordinate paths then have disjoint finite stopped event sets almost surely. Independence of stochastic integrals with a shared full-sample integrand is neither asserted nor used.

theorem no_common_jumps reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel

Distinct subjects in the iid finite sample almost surely have no common stopped recurrent-event time, as a consequence of conditional intensity and independence of their coordinate paths. The sample model, the two indices, and their distinctness give almost-sure disjointness of their stopped jumps.

Formal statement
Ω :
Type u_1
shared
n :
ℕ
S :
SampleModel n Ω μ
i j :
Fin n
hij :
i ≠ j
∀ᵐ x ∂finiteSampleLaw n μ, Disjoint ((S.process i).eventTimes x) ((S.process j).eventTimes x)
Proof (Lean source)
theorem SampleModel.no_common_jumps {n : ℕ} (S : SampleModel n Ω μ) [IsProbabilityMeasure μ] (i j : Fin n) (hij : i ≠ j) : ∀ᵐ x ∂finiteSampleLaw n μ, Disjoint ((S.process i).eventTimes x) ((S.process j).eventTimes x) := by /- Apply independent_time_avoids_events to each i jumpTime and process j. The maps (eventCard, jumpTime k) depend only on their subject coordinate: process_events identifies their event sets, and jumpTime is defined from the filtered counts. For a measurable coordinate factorization, compose these already-measurable maps with a constant sample updated at i or j (the probability law supplies Nonempty Ω). Use iIndepFun_pi and IndepFun.comp for the two coordinate maps. Intersect over k, then use the finite enumeration to obtain disjointness. No independence of H is required. -/ classical let ω₀ : Ω := choice (nonempty_of_isProbabilityMeasure μ) let lift : Fin n → Ω → (Fin n → Ω) := fun a ω => update (fun _ => ω₀) a ω have hlift (a : Fin n) : Measurable (lift a) := by apply measurable_pi_lambda intro b by_cases hab : b = a · subst b intro A hA simpa [lift] using hA · simp [lift, Function.update_of_ne hab] have hevents (a : Fin n) (x : Fin n → Ω) : (S.process a).eventTimes (lift a (x a)) = (S.process a).eventTimes x := by simp [S.process_events, lift] have hjump (a : Fin n) (k : ℕ) (x : Fin n → Ω) : (S.process a).jumpTime k (lift a (x a)) = (S.process a).jumpTime k x := by unfold Model.jumpTime Model.count rw [hevents] have hcoords : iIndepFun (fun a : Fin n => fun x : Fin n → Ω => x a) (finiteSampleLaw n μ) := ProbabilityTheory.iIndepFun_pi (X := fun _ => id) (fun _ => aemeasurable_id) have havoid (k : ℕ) : ∀ᵐ x ∂finiteSampleLaw n μ, (S.process i).jumpTime k x ∉ (S.process j).eventTimes x := by apply (S.process j).independent_time_avoids_events ((S.process i).jumpTime k) ((S.process i).measurable_jumpTime k) intro l have h := (hcoords.indepFun hij).comp (((S.process i).measurable_jumpTime k).comp (hlift i)) ((((S.process j).measurable_eventCard).prodMk ((S.process j).measurable_jumpTime l)).comp (hlift j)) simpa only [Function.comp_def, hevents, hjump] using h filter_upwards [ae_all_iff.mpr havoid] with x hx apply Finset.disjoint_left.mpr intro t hi hj rw [← (S.process i).eventTimes_eq_image x] at hi obtain ⟨k, hk, heq⟩ := Finset.mem_image.mp hi exact hx k (heq.symm ▸ hj)
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel.no_common_jumps · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/NoCommonJumps.lean:128 · uses SampleModel , finiteSampleLaw
2 supporting declarations (lemmas, instances)
  • deterministic_jump_null theorem — A simple finite-jump process with an absolutely continuous conditional intensity has probability zero of a jump at a fixed deterministic time.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    t :
    ℝ
    ∀ᵐ ω ∂μ, t ∉ M.eventTimes ω
    Proof (Lean source)
    theorem Model.deterministic_jump_null (M : Model Ω μ) [IsProbabilityMeasure μ] (t : ℝ) : ∀ᵐ ω ∂μ, t ∉ M.eventTimes ω := by /- Prove the predictable measurability of the deterministic time singleton, apply occupation agreement, and use its zero Lebesgue mass. Equivalently, bound the expected count on shrinking left intervals by rateBound times interval length, using the bounded conditional increment test F=1. `measurable_jumpTime` and its finite enumeration establish measurability of the event. This is diffuse jump mass, not an assumed no-ties premise. -/ classical have hfst : Measurable[predictableSpace M.filtration] (Prod.fst : ℝ × Ω → ℝ) := by change @Measurable _ _ (predictableSpace M.filtration) (borel ℝ) Prod.fst rw [borel_eq_generateFrom_Ioc ℝ] apply @measurable_generateFrom (ℝ × Ω) ℝ (predictableSpace M.filtration) rintro A ⟨a, b, hab, rfl⟩ exact MeasurableSpace.measurableSet_generateFrom ⟨a, b, univ, MeasurableSet.univ, by ext p; simp⟩ let A : Set (ℝ × Ω) := {t} ×ˢ univ have hA : MeasurableSet A := (measurableSet_singleton t).prod MeasurableSet.univ have hAp : MeasurableSet[predictableSpace M.filtration] A := by convert hfst (measurableSet_singleton t) using 1 ext p simp [A] have hzero : M.jumpOccupation A = 0 := by rw [M.occupation_agree A hAp] apply withDensity_absolutelyContinuous _ _ simp [A, Measure.prod_prod] have hkzero (k : ℕ) : μ {ω | k < (M.eventTimes ω).card ∧ M.jumpTime k ω = t} = 0 := by have h := (Measure.sum_apply_eq_zero.mp hzero) k rw [Measure.map_apply (f := fun ω => (M.jumpTime k ω, ω)) ((M.measurable_jumpTime k).prodMk measurable_id) hA, Measure.restrict_apply] at h · convert h using 1 congr 1 ext ω simp [A, and_comm] · exact ((M.measurable_jumpTime k).prodMk measurable_id) hA have hk (k : ℕ) : ∀ᵐ ω ∂μ, ¬ (k < (M.eventTimes ω).card ∧ M.jumpTime k ω = t) := ae_iff.mpr (by simpa using hkzero k) filter_upwards [ae_all_iff.mpr hk] with ω hω intro ht rw [← M.eventTimes_eq_image ω] at ht obtain ⟨k, hk, heq⟩ := Finset.mem_image.mp ht exact hω k ⟨Finset.mem_range.mp hk, heq⟩
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.deterministic_jump_null · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/NoCommonJumps.lean:37
  • independent_time_avoids_events theorem — A measurable random time independent of each enumerated event time and the event count almost surely avoids every event of a process with an absolutely continuous conditional intensity.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    τ :
    Ω → ℝ
    hτ :
    hindependent :
    ∀ k : ℕ, IndepFun τ (fun ω => ((M.eventTimes ω).card, M.jumpTime k ω)) μ
    ∀ᵐ ω ∂μ, τ ω ∉ M.eventTimes ω
    Proof (Lean source)
    theorem Model.independent_time_avoids_events (M : Model Ω μ) [IsProbabilityMeasure μ] (τ : Ω → ℝ) (hτ : Measurable τ) (hindependent : ∀ k : ℕ, IndepFun τ (fun ω => ((M.eventTimes ω).card, M.jumpTime k ω)) μ) : ∀ᵐ ω ∂μ, τ ω ∉ M.eventTimes ω := by /- For each k use IndepFun.map_prod_eq_prod_map_map on τ and the measurable pair (count, jumpTime k). The bad set is {p | k < p.2.1 ∧ p.1 = p.2.2}. For every fixed t, its second-coordinate section is null by deterministic_jump_null and jumpTime_mem. Fubini makes the product bad set null. Pull back through the joint law and intersect over k. The existing injective enumeration has the same cardinality as eventTimes, hence covers every event. Out-of-range default jumpTime values must remain guarded by k<count: they can have atoms even in a diffuse model. Independence concerns event paths only, never the full-sample payoff. -/ classical have hk (k : ℕ) : ∀ᵐ ω ∂μ, ¬ (k < (M.eventTimes ω).card ∧ τ ω = M.jumpTime k ω) := by let f : Ω → ℕ × ℝ := fun ω => ((M.eventTimes ω).card, M.jumpTime k ω) have hf : Measurable f := M.measurable_eventCard.prodMk (M.measurable_jumpTime k) let B : Set (ℝ × (ℕ × ℝ)) := {p | k < p.2.1 ∧ p.1 = p.2.2} have hB : MeasurableSet B := (measurableSet_lt measurable_const (measurable_fst.comp measurable_snd)).inter (measurableSet_eq_fun measurable_fst (measurable_snd.comp measurable_snd)) have hsection (t : ℝ) : ∀ᵐ y ∂μ.map f, (t, y) ∉ B := by apply (ae_map_iff hf.aemeasurable (hB.preimage measurable_prodMk_left).compl).mpr filter_upwards [M.deterministic_jump_null t] with ω hω rintro ⟨hcount, heq⟩ apply hω change t = M.jumpTime k ω at heq rw [heq] exact M.jumpTime_mem k ω hcount have hprod : ∀ᵐ p ∂(μ.map τ).prod (μ.map f), p ∉ B := (Measure.ae_prod_iff_ae_ae hB.compl).mpr (Filter.Eventually.of_forall hsection) rw [← (hindependent k).map_prod_eq_prod_map_map hτ.aemeasurable hf.aemeasurable] at hprod exact ae_of_ae_map (hτ.prodMk hf).aemeasurable hprod filter_upwards [ae_all_iff.mpr hk] with ω hω intro ht rw [← M.eventTimes_eq_image ω] at ht obtain ⟨k, hk, heq⟩ := Finset.mem_image.mp ht exact hω k ⟨Finset.mem_range.mp hk, heq.symm⟩
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.independent_time_avoids_events · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/NoCommonJumps.lean:84
Pathwise­Cross­Algebra 1 core · 2 supporting These deterministic identities separate the three independent parts of the compensated cross-product expansion. ★ integral_prefix_product

Elementary cross products of finite jumps and continuous integrals

These deterministic identities separate the three independent parts of the compensated cross-product expansion. They concern two finite event sets and two integrable time functions, with no stochastic, predictability, or moment premise. The strict prefixes agree with the public counting-process product convention.

theorem integral_prefix_product reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump

The product of two integrable finite-horizon time integrals is the sum of their two oriented running-prefix integrals. The two functions and horizon, nonnegative horizon, and integrability of both functions give the prefix-product identity.

Formal statement
f g :
ℝ → ℝ
T :
ℝ
hT :
0 ≤ T
hf :
hg :
(∫ t in Ioc 0 T, f t ∂volume) * (∫ t in Ioc 0 T, g t ∂volume)
= (∫ t in Ioc 0 T, (∫ s in Ioc 0 t, f s ∂volume) * g t ∂volume)
+ (∫ t in Ioc 0 T, (∫ s in Ioc 0 t, g s ∂volume) * f t ∂volume)
Proof (Lean source)
theorem integral_prefix_product (f g : ℝ → ℝ) (T : ℝ) (hT : 0 ≤ T) (hf : IntegrableOn f (Ioc 0 T) volume) (hg : IntegrableOn g (Ioc 0 T) volume) : (∫ t in Ioc 0 T, f t ∂volume) * (∫ t in Ioc 0 T, g t ∂volume) = (∫ t in Ioc 0 T, (∫ s in Ioc 0 t, f s ∂volume) * g t ∂volume) + (∫ t in Ioc 0 T, (∫ s in Ioc 0 t, g s ∂volume) * f t ∂volume) := by let F : ℝ → ℝ := fun t => ∫ s in (0 : ℝ)..t, f s let G : ℝ → ℝ := fun t => ∫ s in (0 : ℝ)..t, g s have hfi : IntervalIntegrable f volume 0 T := (intervalIntegrable_iff_integrableOn_Ioc_of_le hT).2 hf have hgi : IntervalIntegrable g volume 0 T := (intervalIntegrable_iff_integrableOn_Ioc_of_le hT).2 hg have hF : AbsolutelyContinuousOnInterval F 0 T := hfi.absolutelyContinuousOnInterval_intervalIntegral (by simp) have hG : AbsolutelyContinuousOnInterval G 0 T := hgi.absolutelyContinuousOnInterval_intervalIntegral (by simp) have hprod := hF.integral_deriv_mul_eq_sub hG have heq : (∫ t in (0 : ℝ)..T, deriv F t * G t + F t * deriv G t) = ∫ t in (0 : ℝ)..T, (∫ s in Ioc 0 t, f s ∂volume) * g t + (∫ s in Ioc 0 t, g s ∂volume) * f t := by apply intervalIntegral.integral_congr_ae filter_upwards [hfi.ae_hasDerivAt_integral, hgi.ae_hasDerivAt_integral] with t hft hgt htm have htIcc : t ∈ Icc (0 : ℝ) T := by simpa [uIcc_of_le hT] using (uIoc_subset_uIcc htm) have hdF : deriv F t = f t := (hft (by simpa [uIcc_of_le hT] using htIcc) 0 (by simp)).deriv have hdG : deriv G t = g t := (hgt (by simpa [uIcc_of_le hT] using htIcc) 0 (by simp)).deriv rw [hdF, hdG] simp only [F, G, intervalIntegral.integral_of_le htIcc.1] ring have hfg : IntegrableOn (fun t => (∫ s in Ioc 0 t, f s ∂volume) * g t) (Ioc 0 T) volume := by have h : IntegrableOn (fun t => F t * g t) (Ioc 0 T) volume := (intervalIntegrable_iff_integrableOn_Ioc_of_le hT).1 (hgi.continuousOn_mul (by simpa [uIcc_of_le hT] using hF.continuousOn)) apply h.congr filter_upwards [ae_restrict_mem measurableSet_Ioc] with t ht simp only [F, intervalIntegral.integral_of_le ht.1.le] have hgf : IntegrableOn (fun t => (∫ s in Ioc 0 t, g s ∂volume) * f t) (Ioc 0 T) volume := by have h : IntegrableOn (fun t => G t * f t) (Ioc 0 T) volume := (intervalIntegrable_iff_integrableOn_Ioc_of_le hT).1 (hfi.continuousOn_mul (by simpa [uIcc_of_le hT] using hG.continuousOn)) apply h.congr filter_upwards [ae_restrict_mem measurableSet_Ioc] with t ht simp only [G, intervalIntegral.integral_of_le ht.1.le] rw [heq, intervalIntegral.integral_of_le hT, integral_add hfg hgf] at hprod simpa only [F, G, intervalIntegral.integral_of_le hT, intervalIntegral.integral_same, zero_mul, sub_zero] using hprod.symm
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.integral_prefix_product · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/PathwiseCrossAlgebra.lean:139
2 supporting declarations (lemmas, instances)
  • finiteJump_sum_product theorem — The product of payoff sums on disjoint finite time sets splits into the two strict temporal orderings, with no same-time contribution.
    E F :
    Finset ℝ
    f g :
    ℝ → ℝ
    hdisjoint :
    (∑ s ∈ E, f s) * (∑ t ∈ F, g t)
    = (∑ s ∈ E, f s * (∑ t ∈ F.filter (fun t => t < s), g t))
    + (∑ t ∈ F, g t * (∑ s ∈ E.filter (fun s => s < t), f s))
    Proof (Lean source)
    theorem finiteJump_sum_product (E F : Finset ℝ) (f g : ℝ → ℝ) (hdisjoint : Disjoint E F) : (∑ s ∈ E, f s) * (∑ t ∈ F, g t) = (∑ s ∈ E, f s * (∑ t ∈ F.filter (fun t => t < s), g t)) + (∑ t ∈ F, g t * (∑ s ∈ E.filter (fun s => s < t), f s)) := by classical have hpair (s : ℝ) (hs : s ∈ E) (t : ℝ) (ht : t ∈ F) : f s * g t = f s * (if t < s then g t else 0) + g t * (if s < t then f s else 0) := by have hne : s ≠ t := by intro heq subst t exact Finset.disjoint_left.mp hdisjoint hs ht rcases lt_or_gt_of_ne hne with hlt | hgt · simp [hlt, not_lt_of_ge hlt.le, mul_comm] · simp [hgt, not_lt_of_ge hgt.le] calc (∑ s ∈ E, f s) * (∑ t ∈ F, g t) = ∑ s ∈ E, ∑ t ∈ F, f s * g t := by rw [Finset.sum_mul] apply Finset.sum_congr rfl intro s hs rw [Finset.mul_sum] _ = ∑ s ∈ E, ∑ t ∈ F, (f s * (if t < s then g t else 0) + g t * (if s < t then f s else 0)) := by apply Finset.sum_congr rfl intro s hs exact Finset.sum_congr rfl (fun t ht => hpair s hs t ht) _ = (∑ s ∈ E, ∑ t ∈ F, f s * (if t < s then g t else 0)) + (∑ s ∈ E, ∑ t ∈ F, g t * (if s < t then f s else 0)) := by simp_rw [Finset.sum_add_distrib] _ = _ := by congr 1 · simp_rw [← Finset.mul_sum, ← Finset.sum_filter] · rw [Finset.sum_comm] simp_rw [← Finset.mul_sum, ← Finset.sum_filter]
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.finiteJump_sum_product · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/PathwiseCrossAlgebra.lean:19
  • finiteJump_sum_integral_product theorem — A finite event payoff sum times an integrable time integral splits into the integrated prefix evaluated at each event and the strict event prefix integrated against the time function.
    E :
    Finset ℝ
    f g :
    ℝ → ℝ
    T :
    ℝ
    hT :
    0 ≤ T
    hE :
    ∀ s ∈ E, 0 < s ∧ s ≤ T
    hg :
    (∑ s ∈ E, f s) * (∫ t in Ioc 0 T, g t ∂volume)
    = (∑ s ∈ E, f s * (∫ t in Ioc 0 s, g t ∂volume))
    + ∫ t in Ioc 0 T, (∑ s ∈ E.filter (fun s => s < t), f s) * g t ∂volume
    Proof (Lean source)
    theorem finiteJump_sum_integral_product (E : Finset ℝ) (f g : ℝ → ℝ) (T : ℝ) (hT : 0 ≤ T) (hE : ∀ s ∈ E, 0 < s ∧ s ≤ T) (hg : IntegrableOn g (Ioc 0 T) volume) : (∑ s ∈ E, f s) * (∫ t in Ioc 0 T, g t ∂volume) = (∑ s ∈ E, f s * (∫ t in Ioc 0 s, g t ∂volume)) + ∫ t in Ioc 0 T, (∑ s ∈ E.filter (fun s => s < t), f s) * g t ∂volume := by -- The event support already implies a nonnegative horizon when nonempty. have _ := hT classical have hsplit (s : ℝ) (hs : s ∈ E) : (∫ t in Ioc 0 T, g t ∂volume) = (∫ t in Ioc 0 s, g t ∂volume) + ∫ t in Ioc s T, g t ∂volume := by have hs0 := (hE s hs).1.le have hsT := (hE s hs).2 have hdisj : Disjoint (Ioc 0 s) (Ioc s T) := by apply Set.disjoint_left.mpr intro t ht hu exact (not_lt_of_ge ht.2) hu.1 rw [← Ioc_union_Ioc_eq_Ioc hs0 hsT, setIntegral_union hdisj measurableSet_Ioc (hg.mono_set (Ioc_subset_Ioc_right hsT)) (hg.mono_set (Ioc_subset_Ioc_left hs0))] let k : ℝ → ℝ → ℝ := fun s t => if s < t then f s * g t else 0 have hk (s : ℝ) : IntegrableOn (k s) (Ioc 0 T) volume := by change Integrable ((Ioi s).indicator (fun t => f s * g t)) (volume.restrict (Ioc 0 T)) exact (integrable_indicator_iff measurableSet_Ioi).2 ((hg.const_mul (f s)).mono_measure Measure.restrict_le_self) have htail (s : ℝ) (hs : s ∈ E) : (∫ t in Ioc 0 T, k s t ∂volume) = f s * ∫ t in Ioc s T, g t ∂volume := by have hs0 := (hE s hs).1.le have hset : Ioc 0 T ∩ Ioi s = Ioc s T := by ext t simp only [mem_inter_iff, mem_Ioc, mem_Ioi] constructor · rintro ⟨⟨_, htT⟩, hst⟩ exact ⟨hst, htT⟩ · rintro ⟨hst, htT⟩ exact ⟨⟨lt_of_le_of_lt hs0 hst, htT⟩, hst⟩ calc (∫ t in Ioc 0 T, k s t ∂volume) = ∫ t in Ioc 0 T, (Ioi s).indicator (fun t => f s * g t) t ∂volume := by congr 1 _ = ∫ t in Ioc s T, f s * g t ∂volume := by rw [setIntegral_indicator measurableSet_Ioi, hset] _ = _ := by rw [integral_const_mul] have hpoint (t : ℝ) : (∑ s ∈ E, k s t) = (∑ s ∈ E.filter (fun s => s < t), f s) * g t := by rw [Finset.sum_filter, Finset.sum_mul] apply Finset.sum_congr rfl intro s hs by_cases hst : s < t <;> simp [k, hst] calc (∑ s ∈ E, f s) * (∫ t in Ioc 0 T, g t ∂volume) = ∑ s ∈ E, f s * ∫ t in Ioc 0 T, g t ∂volume := by rw [Finset.sum_mul] _ = ∑ s ∈ E, (f s * (∫ t in Ioc 0 s, g t ∂volume) + f s * ∫ t in Ioc s T, g t ∂volume) := by apply Finset.sum_congr rfl intro s hs rw [hsplit s hs, mul_add] _ = _ := by rw [Finset.sum_add_distrib] congr 1 calc (∑ s ∈ E, f s * ∫ t in Ioc s T, g t ∂volume) = ∑ s ∈ E, ∫ t in Ioc 0 T, k s t ∂volume := Finset.sum_congr rfl (fun s hs => (htail s hs).symm) _ = ∫ t in Ioc 0 T, ∑ s ∈ E, k s t ∂volume := (integral_finsetSum E (fun s _ => hk s)).symm _ = _ := by apply setIntegral_congr_fun measurableSet_Ioc intro t ht exact hpoint t
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.finiteJump_sum_integral_product · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/PathwiseCrossAlgebra.lean:59
Predictable­Approximation 1 core · 0 supporting This isolates the simple-function approximation needed to pass from finite-range predictable compensation to bounded predictable compensation. ★ bounded_predictable_approximation

Finite-valued approximation of bounded predictable payoffs

This isolates the simple-function approximation needed to pass from finite-range predictable compensation to bounded predictable compensation. The approximants remain predictable, obey the original uniform bound, and converge at every time-sample point.

theorem bounded_predictable_approximation reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

A uniformly bounded predictable real payoff admits finite-valued predictable approximants with the same bound and pointwise convergence. The model and payoff, predictability, and the nonnegative common bound give the finite-valued approximation sequence.

Formal statement
Ω :
Type u_1
shared
M :
Model Ω μ
H :
ℝ → Ω → ℝ
hH :
M.Predictable H
C :
ℝ
hC :
0 ≤ C
hbound :
∀ t ω, |H t ω| ≤ C
∃ G : ℕ → ℝ → Ω → ℝ,
conclusion 1
n :
M.Predictable (G n)
conclusion 2
n :
Finite (range (fun p : ℝ × Ω => G n p.1 p.2))
conclusion 3
n t ω :
|G n t ω| ≤ C
conclusion 4
t ω :
Tendsto (fun n => G n t ω) atTop (nhds (H t ω))
Proof (Lean source)
theorem Model.bounded_predictable_approximation (M : Model Ω μ) (H : ℝ → Ω → ℝ) (hH : M.Predictable H) (C : ℝ) (hC : 0 ≤ C) (hbound : ∀ t ω, |H t ω| ≤ C) : ∃ G : ℕ → ℝ → Ω → ℝ, (∀ n, M.Predictable (G n)) ∧ (∀ n, Finite (range (fun p : ℝ × Ω => G n p.1 p.2))) ∧ (∀ n t ω, |G n t ω| ≤ C) ∧ (∀ t ω, Tendsto (fun n => G n t ω) atTop (nhds (H t ω))) := by letI : MeasurableSpace (ℝ × Ω) := predictableSpace M.filtration have hsm : StronglyMeasurable[predictableSpace M.filtration] (fun p : ℝ × Ω => H p.1 p.2) := hH.stronglyMeasurable refine ⟨fun n t ω => hsm.approxBounded C n (t, ω), ?_, ?_, ?_, ?_⟩ · intro n exact (hsm.approxBounded C n).measurable · intro n exact (hsm.approxBounded C n).finite_range · intro n t ω simpa only [Real.norm_eq_abs] using hsm.norm_approxBounded_le hC n (t, ω) · intro t ω apply hsm.tendsto_approxBounded_of_norm_le simpa only [Real.norm_eq_abs] using hbound t ω
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.bounded_predictable_approximation · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/PredictableApproximation.lean:21 · uses Model , Predictable
Predictable­Generators 1 core · 1 supporting The predictable cylinders form a π-system. ★ predictable_cylinder_compensator

Predictable cylinders and the counting-compensator generator identity

The predictable cylinders form a π-system. On each cylinder, conditional intensity gives equality of expected event and compensator masses after clipping its time interval to the counting process's finite horizon.

theorem predictable_cylinder_compensator reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

The expected event and intensity masses agree on every predictable cylinder, including cylinders extending outside the counting horizon. The model and cylinder data, left-endpoint measurability, and integrability of both indicator integrals give the cylinder compensation identity.

Formal statement
Ω :
Type u_1
shared
M :
Model Ω μ
a b :
ℝ
B :
Set Ω
hB :
MeasurableSet[M.filtration a] B
hjump :
Integrable (M.jumpIntegral (fun t ω => (Ioc a b ×ˢ B).indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon) μ
henergy :
Integrable (M.energyIntegral (fun t ω => (Ioc a b ×ˢ B).indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon) μ
(∫ ω, M.jumpIntegral (fun t ω => (Ioc a b ×ˢ B).indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon ω ∂μ)
= ∫ ω, M.energyIntegral (fun t ω => (Ioc a b ×ˢ B).indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon ω ∂μ
Proof (Lean source)
theorem Model.predictable_cylinder_compensator (M : Model Ω μ) [IsProbabilityMeasure μ] (a b : ℝ) (B : Set Ω) (hB : MeasurableSet[M.filtration a] B) (hjump : Integrable (M.jumpIntegral (fun t ω => (Ioc a b ×ˢ B).indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon) μ) (henergy : Integrable (M.energyIntegral (fun t ω => (Ioc a b ×ˢ B).indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon) μ) : (∫ ω, M.jumpIntegral (fun t ω => (Ioc a b ×ˢ B).indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon ω ∂μ) = ∫ ω, M.energyIntegral (fun t ω => (Ioc a b ×ˢ B).indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon ω ∂μ := by let u : ℝ := max 0 a let v : ℝ := min M.horizon b let F : Ω → ℝ := B.indicator (fun _ => 1) have htime (t : ℝ) (ht : 0 < t ∧ t ≤ M.horizon) : (a < t ∧ t ≤ b) ↔ (u < t ∧ t ≤ v) := by simp only [u, v, max_lt_iff, le_min_iff] exact ⟨fun h => ⟨⟨ht.1, h.1⟩, ⟨ht.2, h.2⟩⟩, fun h => ⟨h.1.2, h.2.2⟩⟩ have hJump (ω : Ω) : M.jumpIntegral (fun t ω => (Ioc a b ×ˢ B).indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon ω = F ω * (((M.eventTimes ω).filter (fun t => u < t ∧ t ≤ v)).card : ℝ) := by classical have hfilter : (M.eventTimes ω).filter (fun t => t ≤ M.horizon) = M.eventTimes ω := Finset.filter_eq_self.mpr (fun t ht => (M.events_in_horizon ω t ht).2) have heq (t : ℝ) (ht : t ∈ M.eventTimes ω) : (Ioc a b ×ˢ B).indicator (fun _ => (1 : ℝ)) (t, ω) = if u < t ∧ t ≤ v then F ω else 0 := by by_cases hb : ω ∈ B · simp [F, Set.indicator_apply, mem_prod, mem_Ioc, hb, htime t (M.events_in_horizon ω t ht)] · simp [F, mem_prod, hb] simp only [Model.jumpIntegral, hfilter] rw [Finset.sum_congr rfl heq] simp [Finset.sum_ite, Finset.sum_const, mul_comm] have hEnergy (ω : Ω) : M.energyIntegral (fun t ω => (Ioc a b ×ˢ B).indicator (fun _ => (1 : ℝ)) (t, ω)) M.horizon ω = F ω * (∫ t in Ioc u v, M.atRisk t ω * M.intensity t ω ∂volume) := by have heq : (fun t : ℝ => (Ioc a b ×ˢ B).indicator (fun _ => (1 : ℝ)) (t, ω) * (M.atRisk t ω * M.intensity t ω)) = (Ioc a b).indicator (fun t => F ω * (M.atRisk t ω * M.intensity t ω)) := by funext t by_cases hb : ω ∈ B · by_cases ht : t ∈ Ioc a b <;> simp [F, mem_prod, hb, ht] · simp [F, Set.indicator_apply, mem_prod, hb] change (∫ t in Ioc 0 M.horizon, (Ioc a b ×ˢ B).indicator (fun _ => (1 : ℝ)) (t, ω) * (M.atRisk t ω * M.intensity t ω) ∂volume) = _ rw [heq, setIntegral_indicator measurableSet_Ioc, Ioc_inter_Ioc, integral_const_mul] by_cases huv : u ≤ v · have hu0 : 0 ≤ u := le_max_left 0 a have hvT : v ≤ M.horizon := min_le_left _ _ have hFu : Measurable[M.filtration u] F := by have haU : a ≤ u := le_max_right 0 a exact (measurable_const.indicator ((M.filtration_mono haU) B hB)) have hbounded : ∃ C : ℝ, ∀ ω, |F ω| ≤ C := by refine ⟨1, ?_⟩ intro ω by_cases hb : ω ∈ B <;> simp [F, hb] have hc : Integrable (fun ω => F ω * (((M.eventTimes ω).filter (fun t => u < t ∧ t ≤ v)).card : ℝ)) μ := by simpa only [← hJump] using hjump have hr : Integrable (fun ω => F ω * ∫ t in Ioc u v, M.atRisk t ω * M.intensity t ω ∂volume) μ := by simpa only [← hEnergy] using henergy simpa only [hJump, hEnergy] using M.conditional_intensity_increment u v F hu0 huv hvT hFu hbounded hc hr · have hzero : Ioc u v = (∅ : Set ℝ) := Ioc_eq_empty_iff.mpr (not_lt_of_ge (le_of_not_ge huv)) have hcard (ω : Ω) : (M.eventTimes ω).filter (fun t => u < t ∧ t ≤ v) = ∅ := by apply Finset.filter_false_of_mem intro t _ ht exact huv (le_trans (le_of_lt ht.1) ht.2) simp [hJump, hEnergy, hzero, hcard]
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.predictable_cylinder_compensator · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/PredictableGenerators.lean:32 · uses Model , energyIntegral , jumpIntegral
1 supporting declaration (lemmas, instances)
Prefix­Bounds 1 core · 4 supporting The bounds use only a finite event set, a bounded payoff, and the uniform finite-horizon rate bound. ★ abs_stochasticIntegral_le

Pathwise bounds for finite-jump prefixes

The bounds use only a finite event set, a bounded payoff, and the uniform finite-horizon rate bound. They do not depend on compensation or isometry. They supply envelopes for both same-subject and cross-subject payoffs.

theorem abs_stochasticIntegral_le reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

A terminal compensated integral is bounded by the payoff bound times the full event count plus its deterministic rate envelope. The model and payoff, the payoff and rate bounds, and the path give the terminal bound.

Formal statement
Ω :
Type u_1
shared
M :
Model Ω μ
H :
ℝ → Ω → ℝ
C R :
ℝ
hC :
0 ≤ C
hR :
0 ≤ R
hH :
∀ t ω, |H t ω| ≤ C
hr :
∀ t ω
if
0 ≤ t
and
t ≤ M.horizon
then
M.atRisk t ω * M.intensity t ω ≤ R
ω :
Ω
|M.stochasticIntegral H M.horizon ω|
≤ C * ((M.eventTimes ω).card : ℝ) + C * (R * M.horizon)
Proof (Lean source)
theorem Model.abs_stochasticIntegral_le (M : Model Ω μ) (H : ℝ → Ω → ℝ) (C R : ℝ) (hC : 0 ≤ C) (hR : 0 ≤ R) (hH : ∀ t ω, |H t ω| ≤ C) (hr : ∀ t ω, 0 ≤ t → t ≤ M.horizon → M.atRisk t ω * M.intensity t ω ≤ R) (ω : Ω) : |M.stochasticIntegral H M.horizon ω| ≤ C * ((M.eventTimes ω).card : ℝ) + C * (R * M.horizon) := by have hab : |M.stochasticIntegral H M.horizon ω| ≤ |M.jumpIntegral H M.horizon ω| + |M.energyIntegral H M.horizon ω| := by simpa [Model.stochasticIntegral] using (abs_sub_le (M.jumpIntegral H M.horizon ω) 0 (M.energyIntegral H M.horizon ω)) exact hab.trans (add_le_add (M.abs_jumpIntegral_le_card H C hH ω) (M.abs_energyIntegral_le_horizon H C R hC hR hH hr M.horizon ⟨M.horizon_pos.le, le_rfl⟩ ω))
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.abs_stochasticIntegral_le · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/PrefixBounds.lean:77 · uses Model , stochasticIntegral
4 supporting declarations (lemmas, instances)
  • abs_energyIntegral_le_horizon theorem — A bounded payoff's intensity integral through a time in the horizon is bounded by the payoff bound times the rate bound times the horizon.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    H :
    ℝ → Ω → ℝ
    C R :
    ℝ
    hC :
    0 ≤ C
    hR :
    0 ≤ R
    hH :
    ∀ t ω, |H t ω| ≤ C
    hr :
    ∀ t ω
    if
    0 ≤ t
    and
    t ≤ M.horizon
    then
    M.atRisk t ω * M.intensity t ω ≤ R
    t :
    ℝ
    ht :
    t ∈ Icc 0 M.horizon
    ω :
    Ω
    |M.energyIntegral H t ω| ≤ C * (R * M.horizon)
    Proof (Lean source)
    theorem Model.abs_energyIntegral_le_horizon (M : Model Ω μ) (H : ℝ → Ω → ℝ) (C R : ℝ) (hC : 0 ≤ C) (hR : 0 ≤ R) (hH : ∀ t ω, |H t ω| ≤ C) (hr : ∀ t ω, 0 ≤ t → t ≤ M.horizon → M.atRisk t ω * M.intensity t ω ≤ R) (t : ℝ) (ht : t ∈ Icc 0 M.horizon) (ω : Ω) : |M.energyIntegral H t ω| ≤ C * (R * M.horizon) := by have h := norm_integral_le_of_norm_le (f := fun s => H s ω * (M.atRisk s ω * M.intensity s ω)) (integrable_const (C * R) : Integrable (fun _s : ℝ => C * R) (volume.restrict (Ioc 0 t))) (ae_restrict_of_forall_mem measurableSet_Ioc (fun s hs => by rw [Real.norm_eq_abs, abs_mul, abs_of_nonneg (mul_nonneg (M.atRisk_nonneg s ω) (M.intensity_nonneg s ω))] exact mul_le_mul (hH s ω) (hr s ω hs.1.le (hs.2.trans ht.2)) (mul_nonneg (M.atRisk_nonneg s ω) (M.intensity_nonneg s ω)) hC)) have h' : |M.energyIntegral H t ω| ≤ (C * R) * t := by simpa [Model.energyIntegral, Real.norm_eq_abs, integral_const, Real.volume_Ioc, ht.1, mul_comm] using h calc |M.energyIntegral H t ω| ≤ (C * R) * t := h' _ ≤ (C * R) * M.horizon := mul_le_mul_of_nonneg_left ht.2 (mul_nonneg hC hR) _ = C * (R * M.horizon) := by ring
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.abs_energyIntegral_le_horizon · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/PrefixBounds.lean:20
  • abs_prefixIntegral_le theorem — A strict-past compensated integral in the horizon is bounded by the payoff bound times the full event count plus its deterministic rate envelope.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    H :
    ℝ → Ω → ℝ
    C R :
    ℝ
    hC :
    0 ≤ C
    hR :
    0 ≤ R
    hH :
    ∀ t ω, |H t ω| ≤ C
    hr :
    ∀ t ω
    if
    0 ≤ t
    and
    t ≤ M.horizon
    then
    M.atRisk t ω * M.intensity t ω ≤ R
    t :
    ℝ
    ht :
    t ∈ Icc 0 M.horizon
    ω :
    Ω
    |M.prefixIntegral H t ω| ≤ C * ((M.eventTimes ω).card : ℝ) + C * (R * M.horizon)
    Proof (Lean source)
    theorem Model.abs_prefixIntegral_le (M : Model Ω μ) (H : ℝ → Ω → ℝ) (C R : ℝ) (hC : 0 ≤ C) (hR : 0 ≤ R) (hH : ∀ t ω, |H t ω| ≤ C) (hr : ∀ t ω, 0 ≤ t → t ≤ M.horizon → M.atRisk t ω * M.intensity t ω ≤ R) (t : ℝ) (ht : t ∈ Icc 0 M.horizon) (ω : Ω) : |M.prefixIntegral H t ω| ≤ C * ((M.eventTimes ω).card : ℝ) + C * (R * M.horizon) := by classical have hj : |∑ s ∈ (M.eventTimes ω).filter (fun s => s < t), H s ω| ≤ C * ((M.eventTimes ω).card : ℝ) := by calc _ ≤ ∑ s ∈ (M.eventTimes ω).filter (fun s => s < t), |H s ω| := Finset.abs_sum_le_sum_abs _ _ _ ≤ ∑ s ∈ M.eventTimes ω, |H s ω| := Finset.sum_le_sum_of_subset_of_nonneg (filter_subset _ _) (by intro s hs hns; exact abs_nonneg _) _ ≤ ∑ _s ∈ M.eventTimes ω, C := Finset.sum_le_sum (fun s _ => hH s ω) _ = C * ((M.eventTimes ω).card : ℝ) := by simp [mul_comm] have hab : |M.prefixIntegral H t ω| ≤ |∑ s ∈ (M.eventTimes ω).filter (fun s => s < t), H s ω| + |M.energyIntegral H t ω| := by simpa [Model.prefixIntegral] using (abs_sub_le (∑ s ∈ (M.eventTimes ω).filter (fun s => s < t), H s ω) 0 (M.energyIntegral H t ω)) exact hab.trans (add_le_add hj (M.abs_energyIntegral_le_horizon H C R hC hR hH hr t ht ω))
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.abs_prefixIntegral_le · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/PrefixBounds.lean:47
  • integrable_jump_of_envelope theorem — A jointly measurable payoff whose horizon values have a sample-dependent envelope has an integrable jump sum if envelope times count is integrable.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    G :
    ℝ → Ω → ℝ
    hG :
    Measurable (fun p : ℝ × Ω => G p.1 p.2)
    B :
    Ω → ℝ
    hB :
    Integrable (fun ω => B ω * ((M.eventTimes ω).card : ℝ)) μ
    hbound :
    ∀ t ω
    if
    0 < t
    and
    t ≤ M.horizon
    then
    |G t ω| ≤ B ω
    Integrable (M.jumpIntegral G M.horizon) μ
    Proof (Lean source)
    theorem Model.integrable_jump_of_envelope (M : Model Ω μ) (G : ℝ → Ω → ℝ) (hG : Measurable (fun p : ℝ × Ω => G p.1 p.2)) (B : Ω → ℝ) (hB : Integrable (fun ω => B ω * ((M.eventTimes ω).card : ℝ)) μ) (hbound : ∀ t ω, 0 < t → t ≤ M.horizon → |G t ω| ≤ B ω) : Integrable (M.jumpIntegral G M.horizon) μ := by classical apply hB.mono' (M.measurable_jumpIntegral G hG).aestronglyMeasurable filter_upwards [] with ω rw [Real.norm_eq_abs, Model.jumpIntegral, Finset.filter_eq_self.mpr (fun t ht => (M.events_in_horizon ω t ht).2)] calc |∑ t ∈ M.eventTimes ω, G t ω| ≤ ∑ t ∈ M.eventTimes ω, |G t ω| := Finset.abs_sum_le_sum_abs _ _ _ ≤ ∑ _t ∈ M.eventTimes ω, B ω := Finset.sum_le_sum (fun t ht => hbound t ω (M.events_in_horizon ω t ht).1 (M.events_in_horizon ω t ht).2) _ = B ω * ((M.eventTimes ω).card : ℝ) := by simp [mul_comm]
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.integrable_jump_of_envelope · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/PrefixBounds.lean:97
  • integrable_energy_of_envelope theorem — A jointly measurable payoff with an integrable sample-dependent envelope on the horizon has an integrable intensity integral under a bounded rate.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    G :
    ℝ → Ω → ℝ
    hG :
    Measurable (fun p : ℝ × Ω => G p.1 p.2)
    B :
    Ω → ℝ
    hB :
    hBnonneg :
    ∀ ω, 0 ≤ B ω
    R :
    ℝ
    hr :
    ∀ t ω
    if
    0 ≤ t
    and
    t ≤ M.horizon
    then
    M.atRisk t ω * M.intensity t ω ≤ R
    hbound :
    ∀ t ω
    if
    0 < t
    and
    t ≤ M.horizon
    then
    |G t ω| ≤ B ω
    Integrable (M.energyIntegral G M.horizon) μ
    Proof (Lean source)
    theorem Model.integrable_energy_of_envelope (M : Model Ω μ) (G : ℝ → Ω → ℝ) (hG : Measurable (fun p : ℝ × Ω => G p.1 p.2)) (B : Ω → ℝ) (hB : Integrable B μ) (hBnonneg : ∀ ω, 0 ≤ B ω) (R : ℝ) (hr : ∀ t ω, 0 ≤ t → t ≤ M.horizon → M.atRisk t ω * M.intensity t ω ≤ R) (hbound : ∀ t ω, 0 < t → t ≤ M.horizon → |G t ω| ≤ B ω) : Integrable (M.energyIntegral G M.horizon) μ := by apply (hB.mul_const (R * M.horizon)).mono' (M.measurable_energyIntegral G hG).aestronglyMeasurable filter_upwards [] with ω have h := norm_integral_le_of_norm_le (f := fun s => G s ω * (M.atRisk s ω * M.intensity s ω)) (integrable_const (B ω * R) : Integrable (fun _s : ℝ => B ω * R) (volume.restrict (Ioc 0 M.horizon))) (ae_restrict_of_forall_mem measurableSet_Ioc (fun s hs => by rw [Real.norm_eq_abs, abs_mul, abs_of_nonneg (mul_nonneg (M.atRisk_nonneg s ω) (M.intensity_nonneg s ω))] exact mul_le_mul (hbound s ω hs.1 hs.2) (hr s ω hs.1.le hs.2) (mul_nonneg (M.atRisk_nonneg s ω) (M.intensity_nonneg s ω)) (hBnonneg ω))) simpa [Model.energyIntegral, integral_const, Real.volume_Ioc, M.horizon_pos.le, mul_assoc, mul_comm, mul_left_comm] using h
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.integrable_energy_of_envelope · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/PrefixBounds.lean:118
Prefix­Predictability 1 core · 1 supporting Separate the finite weighted jump prefix from the time integral. ★ predictable_strictJumpIntegral

Predictability of the two strict-past integral components

Separate the finite weighted jump prefix from the time integral. These are filtration measurability obligations; neither uses compensation or L² moments. Their difference is the prefix used in the square and cross-product expansions.

theorem predictable_strictJumpIntegral reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

The sum of a predictable payoff over events strictly before the current time is a predictable process. The model and payoff and predictability give predictability of the strict-past event sum.

Formal statement
Ω :
Type u_1
shared
M :
Model Ω μ
H :
ℝ → Ω → ℝ
hH :
M.Predictable H
M.Predictable (fun t ω => ∑ s ∈ (M.eventTimes ω).filter (fun s => s < t), H s ω)
Proof (Lean source)
theorem Model.predictable_strictJumpIntegral (M : Model Ω μ) (H : ℝ → Ω → ℝ) (hH : M.Predictable H) : M.Predictable (fun t ω => ∑ s ∈ (M.eventTimes ω).filter (fun s => s < t), H s ω) := by classical let : MeasurableSpace (ℝ × Ω) := predictableSpace M.filtration let F : ℕ → (ℝ × Ω) → ℝ := fun k p => if k < (M.eventTimes p.2).card ∧ M.jumpTime k p.2 < p.1 then H (M.jumpTime k p.2) p.2 else 0 have hF (k : ℕ) : Measurable (F k) := by have hg := hH.comp (M.predictable_measurable_pastJump k) have hi := hg.indicator (M.predictableSet_jumpTime_lt k) convert hi using 1 funext p by_cases hp : k < (M.eventTimes p.2).card ∧ M.jumpTime k p.2 < p.1 <;> simp [F, indicator, hp] -- Finite sums of already observed jumps are left-continuous adapted time -- steps. Their measurability follows directly from the predictable cylinders; -- on each finite path the approximations eventually equal the strict prefix. have hsum (n : ℕ) : Measurable (fun p => ∑ k ∈ range n, F k p) := Finset.measurable_sum _ (fun k _ => hF k) have hrepr (p : ℝ × Ω) : (∑ s ∈ (M.eventTimes p.2).filter (fun s => s < p.1), H s p.2) = ∑ k ∈ range (M.eventTimes p.2).card, F k p := by have he := M.jumpIntegral_eq_sum_jumpTime (fun s ω => if s < p.1 then H s ω else 0) p.2 have hfilter : (M.eventTimes p.2).filter (fun s => s ≤ M.horizon) = M.eventTimes p.2 := Finset.filter_eq_self.mpr (fun s hs => (M.events_in_horizon p.2 s hs).2) rw [Model.jumpIntegral, hfilter, ← Finset.sum_filter] at he rw [he] apply Finset.sum_congr rfl intro k hk simp only [F, Finset.mem_range.mp hk, true_and] change Measurable (fun p : ℝ × Ω => ∑ s ∈ (M.eventTimes p.2).filter (fun s => s < p.1), H s p.2) apply measurable_of_tendsto_metrizable hsum apply tendsto_pi_nhds.mpr intro p apply Filter.Tendsto.congr' _ tendsto_const_nhds filter_upwards [Filter.eventually_ge_atTop (M.eventTimes p.2).card] with n hn rw [hrepr p] apply Finset.sum_subset (Finset.range_mono hn) intro k hkn hkc have hk : ¬ k < (M.eventTimes p.2).card := by simpa only [Finset.mem_range] using hkc simp [F, hk]
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.predictable_strictJumpIntegral · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/PrefixPredictability.lean:230 · uses Model , Predictable
1 supporting declaration (lemmas, instances)
  • predictable_energyIntegral theorem — Integrating a predictable payoff against predictable intensity from zero through the current time gives a predictable process.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    H :
    ℝ → Ω → ℝ
    hH :
    M.Predictable H
    M.Predictable (M.energyIntegral H)
    Proof (Lean source)
    theorem Model.predictable_energyIntegral (M : Model Ω μ) (H : ℝ → Ω → ℝ) (hH : M.Predictable H) : M.Predictable (M.energyIntegral H) := by /- The rate-weighted payoff is predictable. A predictable parameter-integral argument for the kernel 0 < s < t proves the conclusion. Alternatively use adapted, continuous integrals where locally integrable, and express the Bochner integrability event predictably via the absolute lintegral. IMPORTANT: rate_integrable/rate_bounded are only asserted on [0,T]. Do not assert global continuity or global local integrability; for t>T the definition remains a totalized integral. Endpoints have zero time mass, and t≤0 gives zero. Keep this all-time statement unchanged. -/ let : MeasurableSpace (ℝ × Ω) := predictableSpace M.filtration have ht : Measurable (fun q : (ℝ × Ω) × ℝ => q.1.1) := M.predictable_measurable_time.comp measurable_fst have hD : MeasurableSet {q : (ℝ × Ω) × ℝ | 0 < q.2 ∧ q.2 < q.1.1} := (measurableSet_lt measurable_const measurable_snd).inter (measurableSet_lt measurable_snd ht) have hf : Measurable (fun q : (ℝ × Ω) × ℝ => H (min q.2 q.1.1) q.1.2 * (M.atRisk (min q.2 q.1.1) q.1.2 * M.intensity (min q.2 q.1.1) q.1.2)) := (hH.mul (M.atRisk_predictable.mul M.intensity_predictable)).comp M.predictable_measurable_min have hi := ((hf.indicator hD).stronglyMeasurable.integral_prod_right' (ν := volume)).measurable change Measurable (fun p : ℝ × Ω => M.energyIntegral H p.1 p.2) convert hi using 1 funext p rw [Model.energyIntegral, integral_Ioc_eq_integral_Ioo] rw [← integral_indicator measurableSet_Ioo] apply integral_congr_ae exact Filter.Eventually.of_forall (fun s => by by_cases hs : s ∈ Ioo 0 p.1 · simp [indicator, hs, hs.1, hs.2, min_eq_left (le_of_lt hs.2)] · have hs' : (p, s) ∉ {q : (ℝ × Ω) × ℝ | 0 < q.2 ∧ q.2 < q.1.1} := hs simp only [Set.indicator_of_notMem hs, Set.indicator_of_notMem hs'])
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.predictable_energyIntegral · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/PrefixPredictability.lean:282
Prefix­Regularity 1 core · 5 supporting The count second moment and pathwise bounds give integrability without using compensation or predictable-prefix closure. ★ integrable_stochastic_square

Analytic regularity of finite-jump prefixes

The count second moment and pathwise bounds give integrability without using compensation or predictable-prefix closure. Ordinary joint measurability of the prefix suffices here, making this layer independent of filtration arguments.

theorem integrable_stochastic_square reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

A bounded predictable compensated integral is square integrable under a second moment for the finite event count and a bounded intensity. The model and payoff, predictability, and boundedness give square integrability of the compensated integral.

Formal statement
Ω :
Type u_1
shared
M :
Model Ω μ
H :
ℝ → Ω → ℝ
hH :
M.Predictable H
hbound :
∃ C : ℝ, ∀ t ω, |H t ω| ≤ C
Integrable (fun ω => (M.stochasticIntegral H M.horizon ω) ^ 2) μ
Proof (Lean source)
theorem Model.integrable_stochastic_square (M : Model Ω μ) [IsProbabilityMeasure μ] (H : ℝ → Ω → ℝ) (hH : M.Predictable H) (hbound : ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C) : Integrable (fun ω => (M.stochasticIntegral H M.horizon ω) ^ 2) μ := by obtain ⟨C, hC⟩ := hbound obtain ⟨R, hR, hr⟩ := M.rate_horizon_uniform_bound let D : ℝ := |C| * (R * M.horizon) have hD : 0 ≤ D := mul_nonneg (abs_nonneg C) (mul_nonneg hR M.horizon_pos.le) have hi : Integrable (fun ω => 2 * |C| ^ 2 * ((M.eventTimes ω).card : ℝ) ^ 2 + 2 * D ^ 2) μ := (M.count_square_integrable.const_mul (2 * |C| ^ 2)).add (integrable_const _) apply hi.mono' ((M.measurable_stochasticIntegral H hH).pow_const 2).aestronglyMeasurable filter_upwards [] with ω rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _)] have hb := M.abs_stochasticIntegral_le H |C| R (abs_nonneg C) hR (fun t ω => (hC t ω).trans (le_abs_self C)) (fun t ω ht hT => (hr t ω ht hT).2) ω change |M.stochasticIntegral H M.horizon ω| ≤ |C| * ((M.eventTimes ω).card : ℝ) + D at hb have hsq := pow_le_pow_left₀ (abs_nonneg (M.stochasticIntegral H M.horizon ω)) hb 2 rw [sq_abs] at hsq nlinarith [sq_nonneg (|C| * ((M.eventTimes ω).card : ℝ) - D)]
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.integrable_stochastic_square · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/PrefixRegularity.lean:254 · uses Model , Predictable , stochasticIntegral
5 supporting declarations (lemmas, instances)
  • measurable_prefixIntegral theorem — A jointly measurable payoff has a jointly measurable strict-past compensated prefix, including the totalized time-integral definition.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    H :
    ℝ → Ω → ℝ
    hH :
    Measurable (fun p : ℝ × Ω => H p.1 p.2)
    Measurable (fun p : ℝ × Ω => M.prefixIntegral H p.1 p.2)
    Proof (Lean source)
    theorem Model.measurable_prefixIntegral (M : Model Ω μ) (H : ℝ → Ω → ℝ) (hH : Measurable (fun p : ℝ × Ω => H p.1 p.2)) : Measurable (fun p : ℝ × Ω => M.prefixIntegral H p.1 p.2) := by classical let J : ℝ × Ω → ℝ := fun p => ∑ s ∈ (M.eventTimes p.2).filter (fun s => s < p.1), H s p.2 have henum (p : ℝ × Ω) : J p = ∑ k ∈ range (M.eventTimes p.2).card, if M.jumpTime k p.2 < p.1 then H (M.jumpTime k p.2) p.2 else 0 := by have he := M.jumpIntegral_eq_sum_jumpTime (fun s ω => if s < p.1 then H s ω else 0) p.2 simpa [Model.jumpIntegral, J, Finset.sum_filter, Finset.filter_eq_self.mpr (fun s hs => (M.events_in_horizon p.2 s hs).2)] using he have hterm (k : ℕ) : Measurable (fun p : ℝ × Ω => if M.jumpTime k p.2 < p.1 then H (M.jumpTime k p.2) p.2 else 0) := by exact Measurable.ite (measurableSet_lt ((M.measurable_jumpTime k).comp measurable_snd) measurable_fst) (hH.comp (((M.measurable_jumpTime k).comp measurable_snd).prodMk measurable_snd)) measurable_const have hsum (n : ℕ) : Measurable (fun p : ℝ × Ω => ∑ k ∈ range n, if M.jumpTime k p.2 < p.1 then H (M.jumpTime k p.2) p.2 else 0) := Finset.measurable_sum _ (fun k _ => hterm k) have hj : Measurable J := by apply measurable_of_Iio intro a have hset : J ⁻¹' Iio a = ⋃ n : ℕ, {p : ℝ × Ω | (M.eventTimes p.2).card = n} ∩ (fun p : ℝ × Ω => ∑ k ∈ range n, if M.jumpTime k p.2 < p.1 then H (M.jumpTime k p.2) p.2 else 0) ⁻¹' Iio a := by ext p simp only [Set.mem_preimage, Set.mem_Iio, Set.mem_iUnion] constructor · intro h refine ⟨(M.eventTimes p.2).card, rfl, ?_⟩ change (∑ k ∈ range (M.eventTimes p.2).card, if M.jumpTime k p.2 < p.1 then H (M.jumpTime k p.2) p.2 else 0) < a rwa [henum p] at h · rintro ⟨n, hn, h⟩ rw [henum p, hn] exact h rw [hset] exact MeasurableSet.iUnion (fun n => ((M.measurable_eventCard.comp measurable_snd) (measurableSet_singleton n)).inter (hsum n measurableSet_Iio)) let K : (ℝ × Ω) × ℝ → ℝ := fun q => if 0 < q.2 ∧ q.2 ≤ q.1.1 then H q.2 q.1.2 * (M.atRisk q.2 q.1.2 * M.intensity q.2 q.1.2) else 0 have hk : Measurable K := by have hp : Measurable (fun q : (ℝ × Ω) × ℝ => (q.2, q.1.2)) := measurable_snd.prodMk (measurable_snd.comp measurable_fst) exact Measurable.ite ((measurableSet_lt measurable_const measurable_snd).inter (measurableSet_le measurable_snd (measurable_fst.comp measurable_fst))) ((hH.comp hp).mul ((M.atRisk_joint_measurable.comp hp).mul (M.intensity_joint_measurable.comp hp))) measurable_const have he : Measurable (fun p : ℝ × Ω => M.energyIntegral H p.1 p.2) := by have hi := (hk.stronglyMeasurable.integral_prod_right' (ν := volume)).measurable convert hi using 1 funext p simpa only [Model.energyIntegral, K, indicator, Set.mem_Ioc] using (integral_indicator (μ := volume) (f := fun s => H s p.2 * (M.atRisk s p.2 * M.intensity s p.2)) (s := Ioc 0 p.1) measurableSet_Ioc).symm exact hj.sub he
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.measurable_prefixIntegral · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/PrefixRegularity.lean:20
  • integrable_prefix_jump theorem — The mixed strict-past jump payoff is integrable because it grows at most quadratically in the finite event count.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    H :
    ℝ → Ω → ℝ
    hH :
    M.Predictable H
    hbound :
    ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C
    Integrable (M.jumpIntegral (M.prefixPayoff H) M.horizon) μ
    Proof (Lean source)
    theorem Model.integrable_prefix_jump (M : Model Ω μ) [IsProbabilityMeasure μ] (H : ℝ → Ω → ℝ) (hH : M.Predictable H) (hbound : ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C) : Integrable (M.jumpIntegral (M.prefixPayoff H) M.horizon) μ := by obtain ⟨C₀, hC₀⟩ := hbound let C : ℝ := |C₀| have hC : 0 ≤ C := abs_nonneg C₀ have hb : ∀ t ω, |H t ω| ≤ C := fun t ω => (hC₀ t ω).trans (le_abs_self C₀) obtain ⟨R, hR, hr⟩ := M.rate_horizon_uniform_bound let B : Ω → ℝ := fun ω => 2 * C * (C * ((M.eventTimes ω).card : ℝ) + C * (R * M.horizon)) have hm := M.predictable_joint_measurable H hH have hpay : Measurable (fun p : ℝ × Ω => M.prefixPayoff H p.1 p.2) := (measurable_const.mul hm).mul (M.measurable_prefixIntegral H hm) have hpaybound (t : ℝ) (ω : Ω) (ht : 0 < t) (hT : t ≤ M.horizon) : |M.prefixPayoff H t ω| ≤ B ω := by have hp := M.abs_prefixIntegral_le H C R hC hR hb (fun s ω hs hS => (hr s ω hs hS).2) t ⟨ht.le, hT⟩ ω calc |M.prefixPayoff H t ω| = 2 * |H t ω| * |M.prefixIntegral H t ω| := by simp [Model.prefixPayoff, abs_mul] _ ≤ (2 * C) * (C * ((M.eventTimes ω).card : ℝ) + C * (R * M.horizon)) := mul_le_mul (mul_le_mul_of_nonneg_left (hb t ω) (by norm_num)) hp (abs_nonneg _) (mul_nonneg (by norm_num) hC) _ = B ω := rfl have hi : Integrable (fun ω => B ω * ((M.eventTimes ω).card : ℝ)) μ := by have h := (M.count_square_integrable.const_mul (2 * C * C)).add (M.integrable_eventCount.const_mul (2 * C * C * (R * M.horizon))) have heq : (fun ω => B ω * ((M.eventTimes ω).card : ℝ)) = (fun ω => 2 * C * C * ((M.eventTimes ω).card : ℝ) ^ 2 + (2 * C * C * (R * M.horizon)) * ((M.eventTimes ω).card : ℝ)) := by funext ω dsimp [B] ring rw [heq] exact h exact M.integrable_jump_of_envelope _ hpay B hi hpaybound
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.integrable_prefix_jump · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/PrefixRegularity.lean:89
  • integrable_prefix_jump_abs theorem — The sum of absolute mixed strict-past jump payoffs is integrable; this controls truncation in the predictable-compensator theorem.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    H :
    ℝ → Ω → ℝ
    hH :
    M.Predictable H
    hbound :
    ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C
    Integrable (M.jumpIntegral (fun t ω => |M.prefixPayoff H t ω|) M.horizon) μ
    Proof (Lean source)
    theorem Model.integrable_prefix_jump_abs (M : Model Ω μ) [IsProbabilityMeasure μ] (H : ℝ → Ω → ℝ) (hH : M.Predictable H) (hbound : ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C) : Integrable (M.jumpIntegral (fun t ω => |M.prefixPayoff H t ω|) M.horizon) μ := by obtain ⟨C₀, hC₀⟩ := hbound let C : ℝ := |C₀| have hC : 0 ≤ C := abs_nonneg C₀ have hb : ∀ t ω, |H t ω| ≤ C := fun t ω => (hC₀ t ω).trans (le_abs_self C₀) obtain ⟨R, hR, hr⟩ := M.rate_horizon_uniform_bound let B : Ω → ℝ := fun ω => 2 * C * (C * ((M.eventTimes ω).card : ℝ) + C * (R * M.horizon)) have hm := M.predictable_joint_measurable H hH have hpay : Measurable (fun p : ℝ × Ω => M.prefixPayoff H p.1 p.2) := (measurable_const.mul hm).mul (M.measurable_prefixIntegral H hm) have hpaybound (t : ℝ) (ω : Ω) (ht : 0 < t) (hT : t ≤ M.horizon) : |M.prefixPayoff H t ω| ≤ B ω := by have hp := M.abs_prefixIntegral_le H C R hC hR hb (fun s ω hs hS => (hr s ω hs hS).2) t ⟨ht.le, hT⟩ ω calc |M.prefixPayoff H t ω| = 2 * |H t ω| * |M.prefixIntegral H t ω| := by simp [Model.prefixPayoff, abs_mul] _ ≤ (2 * C) * (C * ((M.eventTimes ω).card : ℝ) + C * (R * M.horizon)) := mul_le_mul (mul_le_mul_of_nonneg_left (hb t ω) (by norm_num)) hp (abs_nonneg _) (mul_nonneg (by norm_num) hC) _ = B ω := rfl have hi : Integrable (fun ω => B ω * ((M.eventTimes ω).card : ℝ)) μ := by have h := (M.count_square_integrable.const_mul (2 * C * C)).add (M.integrable_eventCount.const_mul (2 * C * C * (R * M.horizon))) have heq : (fun ω => B ω * ((M.eventTimes ω).card : ℝ)) = (fun ω => 2 * C * C * ((M.eventTimes ω).card : ℝ) ^ 2 + (2 * C * C * (R * M.horizon)) * ((M.eventTimes ω).card : ℝ)) := by funext ω dsimp [B] ring rw [heq] exact h exact M.integrable_jump_of_envelope _ hpay.abs B hi (fun t ω ht hT => by simpa only [abs_abs] using hpaybound t ω ht hT)
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.integrable_prefix_jump_abs · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/PrefixRegularity.lean:130
  • integrable_prefix_energy theorem — The mixed strict-past compensator payoff is integrable because it grows at most linearly in the finite event count.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    H :
    ℝ → Ω → ℝ
    hH :
    M.Predictable H
    hbound :
    ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C
    Integrable (M.energyIntegral (M.prefixPayoff H) M.horizon) μ
    Proof (Lean source)
    theorem Model.integrable_prefix_energy (M : Model Ω μ) [IsProbabilityMeasure μ] (H : ℝ → Ω → ℝ) (hH : M.Predictable H) (hbound : ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C) : Integrable (M.energyIntegral (M.prefixPayoff H) M.horizon) μ := by obtain ⟨C₀, hC₀⟩ := hbound let C : ℝ := |C₀| have hC : 0 ≤ C := abs_nonneg C₀ have hb : ∀ t ω, |H t ω| ≤ C := fun t ω => (hC₀ t ω).trans (le_abs_self C₀) obtain ⟨R, hR, hr⟩ := M.rate_horizon_uniform_bound let B : Ω → ℝ := fun ω => 2 * C * (C * ((M.eventTimes ω).card : ℝ) + C * (R * M.horizon)) have hm := M.predictable_joint_measurable H hH have hpay : Measurable (fun p : ℝ × Ω => M.prefixPayoff H p.1 p.2) := (measurable_const.mul hm).mul (M.measurable_prefixIntegral H hm) have hpaybound (t : ℝ) (ω : Ω) (ht : 0 < t) (hT : t ≤ M.horizon) : |M.prefixPayoff H t ω| ≤ B ω := by have hp := M.abs_prefixIntegral_le H C R hC hR hb (fun s ω hs hS => (hr s ω hs hS).2) t ⟨ht.le, hT⟩ ω calc |M.prefixPayoff H t ω| = 2 * |H t ω| * |M.prefixIntegral H t ω| := by simp [Model.prefixPayoff, abs_mul] _ ≤ (2 * C) * (C * ((M.eventTimes ω).card : ℝ) + C * (R * M.horizon)) := mul_le_mul (mul_le_mul_of_nonneg_left (hb t ω) (by norm_num)) hp (abs_nonneg _) (mul_nonneg (by norm_num) hC) _ = B ω := rfl have hi : Integrable B μ := ((M.integrable_eventCount.const_mul C).add (integrable_const (C * (R * M.horizon)))).const_mul (2 * C) have hnonneg (ω : Ω) : 0 ≤ B ω := by dsimp [B] have hT := M.horizon_pos.le positivity exact M.integrable_energy_of_envelope _ hpay B hi hnonneg R (fun t ω ht hT => (hr t ω ht hT).2) hpaybound
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.integrable_prefix_energy · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/PrefixRegularity.lean:174
  • integrable_prefix_energy_abs theorem — The integral of the absolute mixed strict-past payoff against the compensator is integrable; this controls truncation in predictable compensation.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    H :
    ℝ → Ω → ℝ
    hH :
    M.Predictable H
    hbound :
    ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C
    Integrable (M.energyIntegral (fun t ω => |M.prefixPayoff H t ω|) M.horizon) μ
    Proof (Lean source)
    theorem Model.integrable_prefix_energy_abs (M : Model Ω μ) [IsProbabilityMeasure μ] (H : ℝ → Ω → ℝ) (hH : M.Predictable H) (hbound : ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C) : Integrable (M.energyIntegral (fun t ω => |M.prefixPayoff H t ω|) M.horizon) μ := by obtain ⟨C₀, hC₀⟩ := hbound let C : ℝ := |C₀| have hC : 0 ≤ C := abs_nonneg C₀ have hb : ∀ t ω, |H t ω| ≤ C := fun t ω => (hC₀ t ω).trans (le_abs_self C₀) obtain ⟨R, hR, hr⟩ := M.rate_horizon_uniform_bound let B : Ω → ℝ := fun ω => 2 * C * (C * ((M.eventTimes ω).card : ℝ) + C * (R * M.horizon)) have hm := M.predictable_joint_measurable H hH have hpay : Measurable (fun p : ℝ × Ω => M.prefixPayoff H p.1 p.2) := (measurable_const.mul hm).mul (M.measurable_prefixIntegral H hm) have hpaybound (t : ℝ) (ω : Ω) (ht : 0 < t) (hT : t ≤ M.horizon) : |M.prefixPayoff H t ω| ≤ B ω := by have hp := M.abs_prefixIntegral_le H C R hC hR hb (fun s ω hs hS => (hr s ω hs hS).2) t ⟨ht.le, hT⟩ ω calc |M.prefixPayoff H t ω| = 2 * |H t ω| * |M.prefixIntegral H t ω| := by simp [Model.prefixPayoff, abs_mul] _ ≤ (2 * C) * (C * ((M.eventTimes ω).card : ℝ) + C * (R * M.horizon)) := mul_le_mul (mul_le_mul_of_nonneg_left (hb t ω) (by norm_num)) hp (abs_nonneg _) (mul_nonneg (by norm_num) hC) _ = B ω := rfl have hi : Integrable B μ := ((M.integrable_eventCount.const_mul C).add (integrable_const (C * (R * M.horizon)))).const_mul (2 * C) have hnonneg (ω : Ω) : 0 ≤ B ω := by dsimp [B] have hT := M.horizon_pos.le positivity exact M.integrable_energy_of_envelope _ hpay.abs B hi hnonneg R (fun t ω ht hT => (hr t ω ht hT).2) (fun t ω ht hT => by simpa only [abs_abs] using hpaybound t ω ht hT)
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.integrable_prefix_energy_abs · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/PrefixRegularity.lean:212
Regularity 1 core · 4 supporting Uniform bounds on the integrand and intensity, together with a second moment for the finite event count, supply the integrability needed in the compensator and square-expansion arguments. ★ predictable_quadratic

Measurability and integrability of bounded predictable integrals

Uniform bounds on the integrand and intensity, together with a second moment for the finite event count, supply the integrability needed in the compensator and square-expansion arguments.

theorem predictable_quadratic reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model

The square of a predictable integrand remains predictable. The model and payoff and predictability give predictability of the squared payoff.

Formal statement
Ω :
Type u_1
shared
M :
Model Ω μ
H :
ℝ → Ω → ℝ
hH :
M.Predictable H
M.Predictable (M.quadraticPayoff H)
Proof (Lean source)
theorem Model.predictable_quadratic (M : Model Ω μ) (H : ℝ → Ω → ℝ) (hH : M.Predictable H) : M.Predictable (M.quadraticPayoff H) := by exact hH.pow_const 2
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.predictable_quadratic · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Regularity.lean:21 · uses Model , Predictable , quadraticPayoff
4 supporting declarations (lemmas, instances)
  • predictable_prefix theorem — The strict-past compensated integral is predictable when its integrand and the at-risk intensity are predictable.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    H :
    ℝ → Ω → ℝ
    hH :
    M.Predictable H
    M.Predictable (M.prefixIntegral H)
    Proof (Lean source)
    theorem Model.predictable_prefix (M : Model Ω μ) (H : ℝ → Ω → ℝ) (hH : M.Predictable H) : M.Predictable (M.prefixIntegral H) := by exact (M.predictable_strictJumpIntegral H hH).sub (M.predictable_energyIntegral H hH)
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.predictable_prefix · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Regularity.lean:28
  • predictable_prefix_payoff theorem — Twice the current predictable value times its strictly past compensated integral is predictable.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    H :
    ℝ → Ω → ℝ
    hH :
    M.Predictable H
    M.Predictable (M.prefixPayoff H)
    Proof (Lean source)
    theorem Model.predictable_prefix_payoff (M : Model Ω μ) (H : ℝ → Ω → ℝ) (hH : M.Predictable H) : M.Predictable (M.prefixPayoff H) := by exact (measurable_const.mul hH).mul (M.predictable_prefix H hH)
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.predictable_prefix_payoff · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Regularity.lean:36
  • integrable_quadratic_jump theorem — The quadratic jump payoff is integrable for a bounded predictable integrand under the event-count second-moment bound.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    H :
    ℝ → Ω → ℝ
    hH :
    M.Predictable H
    hbound :
    ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C
    Integrable (M.jumpIntegral (M.quadraticPayoff H) M.horizon) μ
    Proof (Lean source)
    theorem Model.integrable_quadratic_jump (M : Model Ω μ) [IsProbabilityMeasure μ] (H : ℝ → Ω → ℝ) (hH : M.Predictable H) (hbound : ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C) : Integrable (M.jumpIntegral (M.quadraticPayoff H) M.horizon) μ := by obtain ⟨C, hC⟩ := hbound apply M.integrable_jump (M.quadraticPayoff H) (M.predictable_quadratic H hH) refine ⟨C ^ 2, ?_⟩ intro t ω simpa [Model.quadraticPayoff, abs_pow] using (pow_le_pow_left₀ (abs_nonneg (H t ω)) (hC t ω) 2)
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.integrable_quadratic_jump · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Regularity.lean:43
  • integrable_quadratic_energy theorem — The quadratic compensator payoff is integrable for a bounded predictable integrand under the uniform intensity bound.
    Ω :
    Type u_1
    shared
    M :
    Model Ω μ
    H :
    ℝ → Ω → ℝ
    hH :
    M.Predictable H
    hbound :
    ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C
    Integrable (M.energyIntegral (M.quadraticPayoff H) M.horizon) μ
    Proof (Lean source)
    theorem Model.integrable_quadratic_energy (M : Model Ω μ) [IsProbabilityMeasure μ] (H : ℝ → Ω → ℝ) (hH : M.Predictable H) (hbound : ∃ C : ℝ, ∀ t ω, |H t ω| ≤ C) : Integrable (M.energyIntegral (M.quadraticPayoff H) M.horizon) μ := by obtain ⟨C, hC⟩ := hbound apply M.integrable_energy (M.quadraticPayoff H) (M.predictable_quadratic H hH) refine ⟨C ^ 2, ?_⟩ intro t ω simpa [Model.quadraticPayoff, abs_pow] using (pow_le_pow_left₀ (abs_nonneg (H t ω)) (hC t ω) 2)
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.Model.integrable_quadratic_energy · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Regularity.lean:56
Tensorization 1 core · 1 supporting The subject conditional-increment premise gives predictable compensation and subject isometry. ★ aggregate_integral_isometry

Full-sample finite recurrent-event isometry

The subject conditional-increment premise gives predictable compensation and subject isometry. Cross-prefix compensation gives distinct-subject orthogonality under the iid path law, even for a common integrand depending on all subject histories. Finite-sum algebra then gives the aggregate isometry.

This interface covers payoffs depending on the whole sample, for which independence of the subject integrals themselves is not valid; the coordinate-only copy* definitions cover only integrands of a subject's own path.

theorem aggregate_integral_isometry reviewed
Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel

The aggregate finite-multiple-jump integral has second moment equal to its expected predictable quadratic energy. The integrand may use all sample histories. Quadratic-energy finiteness and Bochner energy integrability are explicit; the second moment is derived from conditional intensities rather than supplied as a bracket or isometry premise. The sample model and full-sample payoff, left predictability and joint measurability, boundedness, quadratic-energy finiteness, and Bochner integrability of the energy give the aggregate second-moment isometry and integrability.

Formal statement
n :
ℕ
shared
Ω :
Type u_1
shared
S :
SampleModel n Ω μ
H :
ℝ → (Fin n → Ω) → ℝ
hPredictable :
S.LeftPredictable H
hMeasurable :
Measurable (fun p : ℝ × (Fin n → Ω) => H p.1 p.2)
hbound :
∃ C : ℝ, ∀ t x, |H t x| ≤ C
hQuadratic :
S.QuadraticEnergyFinite H
hEnergy :
Integrable (S.predictableEnergy H) (finiteSampleLaw n μ)
conclusion 1
Integrable (fun x => (S.aggregateIntegral H x) ^ 2) (finiteSampleLaw n μ)
conclusion 2
(∫ x, (S.aggregateIntegral H x) ^ 2 ∂finiteSampleLaw n μ)
= ∫ x, S.predictableEnergy H x ∂finiteSampleLaw n μ
Proof (Lean source)
theorem SampleModel.aggregate_integral_isometry (S : SampleModel n Ω μ) [IsProbabilityMeasure μ] (H : ℝ → (Fin n → Ω) → ℝ) (hPredictable : S.LeftPredictable H) (hMeasurable : Measurable (fun p : ℝ × (Fin n → Ω) => H p.1 p.2)) (hbound : ∃ C : ℝ, ∀ t x, |H t x| ≤ C) (hQuadratic : S.QuadraticEnergyFinite H) (hEnergy : Integrable (S.predictableEnergy H) (finiteSampleLaw n μ)) : Integrable (fun x => (S.aggregateIntegral H x) ^ 2) (finiteSampleLaw n μ) ∧ (∫ x, (S.aggregateIntegral H x) ^ 2 ∂finiteSampleLaw n μ) = ∫ x, S.predictableEnergy H x ∂finiteSampleLaw n μ := by -- Bounded payoffs and rates supply the stronger component integrability -- facts below. Retain the explicit energy hypotheses at the API boundary. have _ := hQuadratic have _ := hEnergy classical let J : Fin n → (Fin n → Ω) → ℝ := S.subjectIntegral H let Q : Fin n → (Fin n → Ω) → ℝ := S.subjectEnergy H have hLp (i : Fin n) : MemLp (J i) 2 (finiteSampleLaw n μ) := (memLp_two_iff_integrable_sq ((S.process i).measurable_stochasticIntegral H (S.process_predictable H hPredictable i)).aestronglyMeasurable).2 (S.subject_square_integrable H hPredictable hbound i) have hProd (i j : Fin n) : Integrable (fun x => J i x * J j x) (finiteSampleLaw n μ) := (hLp i).integrable_mul (hLp j) have hQ (i : Fin n) : Integrable (Q i) (finiteSampleLaw n μ) := (S.process i).integrable_quadratic_energy H (S.process_predictable H hPredictable i) hbound have hIso (i : Fin n) : (∫ x, (J i x) ^ 2 ∂finiteSampleLaw n μ) = ∫ x, Q i x ∂finiteSampleLaw n μ := S.subject_integral_isometry H hPredictable hbound i constructor · exact (memLp_finsetSum univ (fun i _ => hLp i)).integrable_sq · calc (∫ x, (S.aggregateIntegral H x) ^ 2 ∂finiteSampleLaw n μ) = ∫ x, ∑ i : Fin n, ∑ j : Fin n, J i x * J j x ∂finiteSampleLaw n μ := by apply integral_congr_ae filter_upwards [] with x simp only [SampleModel.aggregateIntegral, J, pow_two, Finset.sum_mul_sum] _ = ∑ i : Fin n, ∑ j : Fin n, ∫ x, J i x * J j x ∂finiteSampleLaw n μ := by rw [integral_finsetSum univ (fun i _ => integrable_finsetSum univ (fun j _ => hProd i j))] apply Finset.sum_congr rfl intro i _ rw [integral_finsetSum univ (fun j _ => hProd i j)] _ = ∑ i : Fin n, ∫ x, Q i x ∂finiteSampleLaw n μ := by apply Finset.sum_congr rfl intro i _ rw [Finset.sum_eq_single i] · simpa only [pow_two] using hIso i · intro j _ hji exact S.distinct_subject_integrals_orthogonal H hPredictable hMeasurable hbound i j (Ne.symm hji) · simp _ = ∫ x, S.predictableEnergy H x ∂finiteSampleLaw n μ := by exact (integral_finsetSum univ (fun i _ => hQ i)).symm
1 supporting declaration (lemmas, instances)
  • distinct_subject_integrals_orthogonal theorem — Compensated integrals from distinct subjects are orthogonal in expectation for a bounded predictable payoff depending on every subject history.
    n :
    ℕ
    shared
    Ω :
    Type u_1
    shared
    S :
    SampleModel n Ω μ
    H :
    ℝ → (Fin n → Ω) → ℝ
    hPredictable :
    S.LeftPredictable H
    hMeasurable :
    Measurable (fun p : ℝ × (Fin n → Ω) => H p.1 p.2)
    hbound :
    ∃ C : ℝ, ∀ t x, |H t x| ≤ C
    i j :
    Fin n
    hij :
    i ≠ j
    (∫ x, S.subjectIntegral H i x * S.subjectIntegral H j x ∂finiteSampleLaw n μ) = 0
    Proof (Lean source)
    theorem SampleModel.distinct_subject_integrals_orthogonal (S : SampleModel n Ω μ) [IsProbabilityMeasure μ] (H : ℝ → (Fin n → Ω) → ℝ) (hPredictable : S.LeftPredictable H) (hMeasurable : Measurable (fun p : ℝ × (Fin n → Ω) => H p.1 p.2)) (hbound : ∃ C : ℝ, ∀ t x, |H t x| ≤ C) (i j : Fin n) (hij : i ≠ j) : (∫ x, S.subjectIntegral H i x * S.subjectIntegral H j x ∂finiteSampleLaw n μ) = 0 := by -- Component predictability already implies ordinary joint measurability. have _ := hMeasurable classical let E : Fin n → Fin n → (Fin n → Ω) → ℝ := fun k l => (S.process k).jumpIntegral (S.crossPayoff H l) (S.process k).horizon let C : Fin n → Fin n → (Fin n → Ω) → ℝ := fun k l => (S.process k).energyIntegral (S.crossPayoff H l) (S.process k).horizon have hPair (k l : Fin n) : Integrable (E k l) (finiteSampleLaw n μ) ∧ Integrable (C k l) (finiteSampleLaw n μ) ∧ (∫ x, E k l x ∂finiteSampleLaw n μ) = ∫ x, C k l x ∂finiteSampleLaw n μ := by have hp := S.crossPayoff_predictable H hPredictable k l have hm := (S.process k).predictable_joint_measurable _ hp obtain ⟨hjAbs, heAbs⟩ := S.crossPayoff_integrable H hPredictable hbound k l have hj : Integrable (E k l) (finiteSampleLaw n μ) := by apply hjAbs.mono' ((S.process k).measurable_jumpIntegral _ hm).aestronglyMeasurable filter_upwards [] with x simp only [Model.jumpIntegral, Real.norm_eq_abs] exact Finset.abs_sum_le_sum_abs _ _ have he : Integrable (C k l) (finiteSampleLaw n μ) := by apply heAbs.mono' ((S.process k).measurable_energyIntegral _ hm).aestronglyMeasurable filter_upwards [] with x change ‖∫ t in Ioc 0 (S.process k).horizon, S.crossPayoff H l t x * ((S.process k).atRisk t x * (S.process k).intensity t x)‖ ≤ _ calc _ ≤ ∫ t in Ioc 0 (S.process k).horizon, ‖S.crossPayoff H l t x * ((S.process k).atRisk t x * (S.process k).intensity t x)‖ := norm_integral_le_integral_norm _ _ = _ := by apply integral_congr_ae filter_upwards [] with t rw [Real.norm_eq_abs, abs_mul, abs_of_nonneg (mul_nonneg ((S.process k).atRisk_nonneg t x) ((S.process k).intensity_nonneg t x))] exact ⟨hj, he, (S.process k).predictable_compensator _ hp hjAbs⟩ have hi := hPair i j have hj := hPair j i have hPath : ∀ᵐ x ∂finiteSampleLaw n μ, S.subjectIntegral H i x * S.subjectIntegral H j x = E i j x + E j i x - C i j x - C j i x := by filter_upwards [S.no_common_jumps i j hij] with x hx exact S.subject_product_pathwise H hPredictable hbound i j x hx calc (∫ x, S.subjectIntegral H i x * S.subjectIntegral H j x ∂finiteSampleLaw n μ) = ∫ x, E i j x + E j i x - C i j x - C j i x ∂finiteSampleLaw n μ := integral_congr_ae hPath _ = 0 := by change (∫ x, (E i j + E j i - C i j - C j i) x ∂finiteSampleLaw n μ) = 0 rw [integral_sub' ((hi.1.add hj.1).sub hi.2.1) hj.2.1, integral_sub' (hi.1.add hj.1) hi.2.1, integral_add' hi.1 hj.1, hi.2.2, hj.2.2] ring
    Causalean.Stat.RecurrentEvent.CountingProcess.FiniteJump.SampleModel.distinct_subject_integrals_orthogonal · Causalean/Stat/RecurrentEvent/CountingProcess/FiniteJump/Tensorization.lean:25