math / data /lean /OAI /Combinatorics /BalancedRyser /Profiles /ProfileDetectionBridge.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
4.83 kB
import OAI.Combinatorics.BalancedRyser.Profiles.AnalyticDetection
import OAI.Combinatorics.BalancedRyser.Profiles.ProfileCoefficients
import OAI.Combinatorics.BalancedRyser.Profiles.ProfileDetection
import OAI.Combinatorics.BalancedRyser.Profiles.ProfileIdentifiability
namespace OAI
open MeasureTheory Filter Set
open scoped Topology
namespace Balanced.ProfileIdentifiability
theorem power_series_ne_zero_ae {ΞΉ : Type*} (a w : ΞΉ β†’ ℝ)
(ha : Summable (fun i => |a i|)) (hw0 : βˆ€ i, 0 ≀ w i)
(hw : Function.Injective w) (hfinite : βˆ€ t : ℝ, {i | w i ≀ t}.Finite)
(hne : βˆƒ i, a i β‰  0) :
βˆ€α΅ z : ℝ βˆ‚volume.restrict (Ioo 0 1), (βˆ‘' i, a i * z ^ w i) β‰  0 := by
have hn := exists_laplaceSeries_ne_zero a w ha hw hfinite hne
have hz := Balanced.power_series_zero_null_of_laplace_nonzero a w ha hw0 hn
simpa only [ae_iff, not_not] using hz
end Balanced.ProfileIdentifiability
namespace Balanced.ProfileDetectionBridge
noncomputable def planeTest (P : β„• Γ— β„• β†’ ℝ) (z : ℝ) : ℝ :=
βˆ‘' a : β„• Γ— β„•, P a * z ^ ((a.1 : ℝ) + Real.sqrt 2 * a.2)
noncomputable def dTest (x : β„• Γ— β„• β†’ ℝ) (z : ℝ) : ℝ :=
βˆ‘' a : β„• Γ— β„•, x a * z ^ ((a.1 : ℝ) - 1 + Real.sqrt 2 * a.2)
noncomputable def cTest (x : β„• Γ— β„• β†’ ℝ) (z : ℝ) : ℝ :=
βˆ‘' a : β„• Γ— β„•, x a * z ^ ((a.1 : ℝ) + Real.sqrt 2 * ((a.2 : ℝ) - 1))
theorem d_visible_ae_ne (x P : β„• Γ— β„• β†’ ℝ)
(hx : Summable x) (hP : Summable P) (hzero : βˆ€ j, x (0, j) = 0)
(hvisible : Β¬ βˆ€ i j, x (i, j) = if i = 0 then 0 else P (i - 1, j)) :
βˆ€α΅ z : ℝ βˆ‚volume.restrict (Ioo 0 1), dTest x z β‰  planeTest P z := by
have hc := ProfileCoefficients.summable_abs_shift_sub x P hx hP
(fun a : β„• Γ— β„• => (a.1 + 1, a.2)) ProfileCoefficients.shift_fst_injective
have hne : βˆƒ a : β„• Γ— β„•, x (a.1 + 1, a.2) - P a β‰  0 := by
by_contra h
push Not at h
exact hvisible ((ProfileCoefficients.d_invisibility_iff x P).mpr ⟨hzero, h⟩)
have hdet := ProfileIdentifiability.power_series_ne_zero_ae
(fun a : β„• Γ— β„• => x (a.1 + 1, a.2) - P a) ProfileDetection.profileExponent
hc ProfileDetection.profileExponent_nonneg ProfileDetection.profileExponent_injective
ProfileDetection.profileExponent_finite_sublevel hne
filter_upwards [hdet, ae_restrict_mem measurableSet_Ioo] with z hz hzone
apply sub_ne_zero.mp
change (βˆ‘' a : β„• Γ— β„•, x a * z ^ ((a.1 : ℝ) - 1 + Real.sqrt 2 * a.2)) -
(βˆ‘' a : β„• Γ— β„•, P a * z ^ ((a.1 : ℝ) + Real.sqrt 2 * a.2)) β‰  0
rw [ProfileCoefficients.original_d_transform_sub x P hx hP hzero
(Real.sqrt_nonneg 2) hzone.1.le hzone.2.le]
exact hz
theorem c_visible_ae_ne (x P : β„• Γ— β„• β†’ ℝ)
(hx : Summable x) (hP : Summable P) (hzero : βˆ€ i, x (i, 0) = 0)
(hvisible : Β¬ βˆ€ i j, x (i, j) = if j = 0 then 0 else P (i, j - 1)) :
βˆ€α΅ z : ℝ βˆ‚volume.restrict (Ioo 0 1), cTest x z β‰  planeTest P z := by
have hc := ProfileCoefficients.summable_abs_shift_sub x P hx hP
(fun a : β„• Γ— β„• => (a.1, a.2 + 1)) ProfileCoefficients.shift_snd_injective
have hne : βˆƒ a : β„• Γ— β„•, x (a.1, a.2 + 1) - P a β‰  0 := by
by_contra h
push Not at h
exact hvisible ((ProfileCoefficients.c_invisibility_iff x P).mpr ⟨hzero, h⟩)
have hdet := ProfileIdentifiability.power_series_ne_zero_ae
(fun a : β„• Γ— β„• => x (a.1, a.2 + 1) - P a) ProfileDetection.profileExponent
hc ProfileDetection.profileExponent_nonneg ProfileDetection.profileExponent_injective
ProfileDetection.profileExponent_finite_sublevel hne
filter_upwards [hdet, ae_restrict_mem measurableSet_Ioo] with z hz hzone
apply sub_ne_zero.mp
change (βˆ‘' a : β„• Γ— β„•, x a * z ^ ((a.1 : ℝ) + Real.sqrt 2 * ((a.2 : ℝ) - 1))) -
(βˆ‘' a : β„• Γ— β„•, P a * z ^ ((a.1 : ℝ) + Real.sqrt 2 * a.2)) β‰  0
rw [ProfileCoefficients.original_c_transform_sub x P hx hP hzero
(Real.sqrt_nonneg 2) hzone.1.le hzone.2.le]
exact hz
theorem d_invisible_eq (x P : β„• Γ— β„• β†’ ℝ)
(hinvisible : βˆ€ i j, x (i, j) = if i = 0 then 0 else P (i - 1, j))
(z : ℝ) : dTest x z = planeTest P z := by
obtain ⟨hzero, hc⟩ := (ProfileCoefficients.d_invisibility_iff x P).mp hinvisible
unfold dTest planeTest
rw [ProfileCoefficients.d_transform_reindex x hzero]
apply tsum_congr
intro a
rw [sub_eq_zero.mp (hc a)]
theorem c_invisible_eq (x P : β„• Γ— β„• β†’ ℝ)
(hinvisible : βˆ€ i j, x (i, j) = if j = 0 then 0 else P (i, j - 1))
(z : ℝ) : cTest x z = planeTest P z := by
obtain ⟨hzero, hc⟩ := (ProfileCoefficients.c_invisibility_iff x P).mp hinvisible
unfold cTest planeTest
rw [ProfileCoefficients.c_transform_reindex x hzero]
apply tsum_congr
intro a
rw [sub_eq_zero.mp (hc a)]
end Balanced.ProfileDetectionBridge
end OAI