math / data /lean /OAI /Probability /FreeIsing /Factors /InnovationFactorRecovery.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
7.23 kB
import OAI.Probability.FreeIsing.Conditioning.ObservationCopyStationarity
import OAI.Probability.FreeIsing.Martingales.InnovationMartingale
namespace OAI
noncomputable section
open MeasureTheory ProbabilityTheory
open scoped NNReal
namespace Problem367
theorem observations_ae_eq_of_common_innovation_and_field_zero
{O : Type*} [MeasurableSpace O] {mu : Measure O}
{h h' : ℝβ‰₯0 β†’ O β†’ ℝ} {X Y W : β„• β†’ O β†’ ℝ}
(hc : βˆ€α΅ p βˆ‚mu, Continuous (fun t => h t p))
(hc' : βˆ€α΅ p βˆ‚mu, Continuous (fun t => h' t p))
(hInt : βˆ€ t, Integrable (fun p => (h t p - h' t p) ^ 2) mu)
(hzero : βˆ€ t, (∫ p, (h t p - h' t p) ^ 2 βˆ‚mu) = 0)
(hX : βˆ€ n, βˆ€α΅ p βˆ‚mu,
X n p = W n p + nnrealTimePrimitive (fun t p => Real.tanh (h t p)) n p)
(hY : βˆ€ n, βˆ€α΅ p βˆ‚mu,
Y n p = W n p + nnrealTimePrimitive (fun t p => Real.tanh (h' t p)) n p) :
βˆ€ n, X n =ᡐ[mu] Y n := by
have hfield : (fun p t => h t p) =ᡐ[mu] (fun p t => h' t p) :=
ae_eq_of_continuous_of_integral_sq_sub_eq_zero hc hc' hInt hzero
intro n
filter_upwards [hfield, hX n, hY n] with p hp hx hy
rw [hx, hy]
congr 1
unfold nnrealTimePrimitive
apply intervalIntegral.integral_congr
intro t _
exact congrArg Real.tanh (congrFun hp t.toNNReal)
theorem observations_ae_eq_of_common_innovation_and_measurable_fields
{O : Type*} [MeasurableSpace O] {mu : Measure O} [SFinite mu]
{h h' : ℝβ‰₯0 β†’ O β†’ ℝ} {X Y W : β„• β†’ O β†’ ℝ}
(hm : Measurable (fun q : ℝ Γ— O => Real.tanh (h q.1.toNNReal q.2)))
(hm' : Measurable (fun q : ℝ Γ— O => Real.tanh (h' q.1.toNNReal q.2)))
(heq : βˆ€ t, h t =ᡐ[mu] h' t)
(hX : βˆ€ n, βˆ€α΅ p βˆ‚mu,
X n p = W n p + nnrealTimePrimitive (fun t p => Real.tanh (h t p)) n p)
(hY : βˆ€ n, βˆ€α΅ p βˆ‚mu,
Y n p = W n p + nnrealTimePrimitive (fun t p => Real.tanh (h' t p)) n p) :
βˆ€ n, X n =ᡐ[mu] Y n := by
have htime : βˆ€α΅ t βˆ‚(volume : Measure ℝ), βˆ€α΅ p βˆ‚mu,
Real.tanh (h t.toNNReal p) = Real.tanh (h' t.toNNReal p) := by
apply Filter.Eventually.of_forall
intro t
filter_upwards [heq t.toNNReal] with p hp
rw [hp]
have hsample : βˆ€α΅ p βˆ‚mu, βˆ€α΅ t βˆ‚(volume : Measure ℝ),
Real.tanh (h t.toNNReal p) = Real.tanh (h' t.toNNReal p) :=
(Measure.ae_ae_comm (ΞΌ := (volume : Measure ℝ)) (Ξ½ := mu)
(p := fun t p => Real.tanh (h t.toNNReal p) = Real.tanh (h' t.toNNReal p))
(measurableSet_eq_fun hm hm')).1 htime
intro n
filter_upwards [hsample, hX n, hY n] with p hp hx hy
rw [hx, hy]
congr 1
unfold nnrealTimePrimitive
apply intervalIntegral.integral_congr_ae
exact hp.mono (fun _ ht _ => ht)
theorem observations_ae_eq_of_common_innovation_and_measurable_field_zero
{O : Type*} [MeasurableSpace O] {mu : Measure O} [SFinite mu]
{h h' : ℝβ‰₯0 β†’ O β†’ ℝ} {X Y W : β„• β†’ O β†’ ℝ}
(hm : Measurable (fun q : ℝ Γ— O => Real.tanh (h q.1.toNNReal q.2)))
(hm' : Measurable (fun q : ℝ Γ— O => Real.tanh (h' q.1.toNNReal q.2)))
(hInt : βˆ€ t, Integrable (fun p => (h t p - h' t p) ^ 2) mu)
(hzero : βˆ€ t, (∫ p, (h t p - h' t p) ^ 2 βˆ‚mu) = 0)
(hX : βˆ€ n, βˆ€α΅ p βˆ‚mu,
X n p = W n p + nnrealTimePrimitive (fun t p => Real.tanh (h t p)) n p)
(hY : βˆ€ n, βˆ€α΅ p βˆ‚mu,
Y n p = W n p + nnrealTimePrimitive (fun t p => Real.tanh (h' t p)) n p) :
βˆ€ n, X n =ᡐ[mu] Y n := by
apply observations_ae_eq_of_common_innovation_and_measurable_fields hm hm' _ hX hY
exact fun t => ae_eq_of_integral_sq_sub_eq_zero (hInt t) (hzero t)
theorem isFactorOfIID_of_joint_innovation_field_zero
{d : β„•} {theta : ℝ} {A : Type*} [MeasurableSpace A]
[StandardBorelSpace A] [Nonempty A]
(nu : Measure A) [IsProbabilityMeasure nu]
(rho : Measure ((TreeVertex d β†’ A) Γ— (TreeVertex d β†’ β„• β†’ ℝ)))
[IsProbabilityMeasure rho] (o : TreeVertex d)
(hfirst : rho.fst = Measure.infinitePi (fun _ : TreeVertex d => nu))
(hLaw : HasFreeIsingLaw theta
(Measure.map (fun p => SpinRecovery.decodeArray p.2) rho))
(hjoint : βˆ€ g : TreeAut d, rho.map (Prod.map (relabel g) (relabel g)) = rho)
(h h' : ℝβ‰₯0 β†’
((TreeVertex d β†’ A) Γ— ((TreeVertex d β†’ β„• β†’ ℝ) Γ— (TreeVertex d β†’ β„• β†’ ℝ))) β†’ ℝ)
(W : β„• β†’ (TreeVertex d β†’ A) β†’ ℝ)
(hc : βˆ€α΅ p βˆ‚rho.fst βŠ—β‚˜ (rho.condKernel Γ—β‚– rho.condKernel),
Continuous (fun t => h t p))
(hc' : βˆ€α΅ p βˆ‚rho.fst βŠ—β‚˜ (rho.condKernel Γ—β‚– rho.condKernel),
Continuous (fun t => h' t p))
(hInt : βˆ€ t, Integrable (fun p => (h t p - h' t p) ^ 2)
(rho.fst βŠ—β‚˜ (rho.condKernel Γ—β‚– rho.condKernel)))
(hzero : βˆ€ t, (∫ p, (h t p - h' t p) ^ 2
βˆ‚rho.fst βŠ—β‚˜ (rho.condKernel Γ—β‚– rho.condKernel)) = 0)
(hX : βˆ€ n, βˆ€α΅ p βˆ‚rho.fst βŠ—β‚˜ (rho.condKernel Γ—β‚– rho.condKernel),
p.2.1 o n = W n p.1 + nnrealTimePrimitive (fun t p => Real.tanh (h t p)) n p)
(hY : βˆ€ n, βˆ€α΅ p βˆ‚rho.fst βŠ—β‚˜ (rho.condKernel Γ—β‚– rho.condKernel),
p.2.2 o n = W n p.1 + nnrealTimePrimitive (fun t p => Real.tanh (h' t p)) n p) :
IsFactorOfIID d theta := by
apply ObservationCopyStationarity.isFactorOfIID_of_joint_observation_reference_collapse
nu rho o hfirst hLaw hjoint
exact observations_ae_eq_of_common_innovation_and_field_zero hc hc' hInt hzero hX hY
theorem isFactorOfIID_of_joint_innovation_measurable_field_zero
{d : β„•} {theta : ℝ} {A : Type*} [MeasurableSpace A]
[StandardBorelSpace A] [Nonempty A]
(nu : Measure A) [IsProbabilityMeasure nu]
(rho : Measure ((TreeVertex d β†’ A) Γ— (TreeVertex d β†’ β„• β†’ ℝ)))
[IsProbabilityMeasure rho] (o : TreeVertex d)
(hfirst : rho.fst = Measure.infinitePi (fun _ : TreeVertex d => nu))
(hLaw : HasFreeIsingLaw theta
(Measure.map (fun p => SpinRecovery.decodeArray p.2) rho))
(hjoint : βˆ€ g : TreeAut d, rho.map (Prod.map (relabel g) (relabel g)) = rho)
(h h' : ℝβ‰₯0 β†’
((TreeVertex d β†’ A) Γ— ((TreeVertex d β†’ β„• β†’ ℝ) Γ— (TreeVertex d β†’ β„• β†’ ℝ))) β†’ ℝ)
(W : β„• β†’ (TreeVertex d β†’ A) β†’ ℝ)
(hm : Measurable (Function.uncurry (fun (t : ℝ) p => Real.tanh (h t.toNNReal p))))
(hm' : Measurable (Function.uncurry (fun (t : ℝ) p => Real.tanh (h' t.toNNReal p))))
(hInt : βˆ€ t, Integrable (fun p => (h t p - h' t p) ^ 2)
(rho.fst βŠ—β‚˜ (rho.condKernel Γ—β‚– rho.condKernel)))
(hzero : βˆ€ t, (∫ p, (h t p - h' t p) ^ 2
βˆ‚rho.fst βŠ—β‚˜ (rho.condKernel Γ—β‚– rho.condKernel)) = 0)
(hX : βˆ€ n, βˆ€α΅ p βˆ‚rho.fst βŠ—β‚˜ (rho.condKernel Γ—β‚– rho.condKernel),
p.2.1 o n = W n p.1 + nnrealTimePrimitive (fun t p => Real.tanh (h t p)) n p)
(hY : βˆ€ n, βˆ€α΅ p βˆ‚rho.fst βŠ—β‚˜ (rho.condKernel Γ—β‚– rho.condKernel),
p.2.2 o n = W n p.1 + nnrealTimePrimitive (fun t p => Real.tanh (h' t p)) n p) :
IsFactorOfIID d theta := by
apply ObservationCopyStationarity.isFactorOfIID_of_joint_observation_reference_collapse
nu rho o hfirst hLaw hjoint
exact observations_ae_eq_of_common_innovation_and_measurable_field_zero
hm hm' hInt hzero hX hY
end Problem367
end
end OAI