Buckets:
| import Mathlib | |
| import OAI.Probability.Ballisticity.Estimates.IndependentPairLaw | |
| namespace OAI | |
| section | |
| section | |
| open MeasureTheory ProbabilityTheory Filter | |
| open scoped ENNReal NNReal BigOperators Topology | |
| namespace DirectionalTransience | |
| def fixedPairSuffix {d : ℕ} (wv : List (Direction d) × List (Direction d)) | |
| (P : Path d × Path d) : Path d × Path d := | |
| ((fun j => P.1 (wv.1.length+j) - wordPath 0 wv.1 wv.1.length), | |
| (fun j => P.2 (wv.2.length+j) - wordPath 0 wv.2 wv.2.length)) | |
| lemma measurable_fixedPairSuffix {d : ℕ} (wv : List (Direction d) × List (Direction d)) : | |
| Measurable (fixedPairSuffix wv) := by unfold fixedPairSuffix; fun_prop | |
| lemma firstPairWordEvent_suffix_rectangle {d : ℕ} (ℓ : Vector d) | |
| (wv : List (Direction d) × List (Direction d)) | |
| (had : AdmissibleCommonWords ℓ 0 0 wv.1 wv.2) (A B : Set (Path d)) : | |
| FirstPairWordEvent ℓ wv ∩ fixedPairSuffix wv ⁻¹' (A ×ˢ B) = | |
| (((fun X : Path d => fun j => X (wv.1.length+j) - wordPath 0 wv.1 wv.1.length) ⁻¹' | |
| (A ∩ NoDrop ℓ 0) ∩ wordCylinder 0 wv.1) ×ˢ | |
| ((fun X : Path d => fun j => X (wv.2.length+j) - wordPath 0 wv.2 wv.2.length) ⁻¹' | |
| (B ∩ NoDrop ℓ 0) ∩ wordCylinder 0 wv.2)) := by | |
| ext P | |
| constructor | |
| · rintro ⟨hP,hAB⟩ | |
| have hFs := ((firstCommonWords_characterization ℓ 0 0 wv.1 wv.2 P | |
| hP.2.1.1 hP.2.1.2).mp ⟨hP.1.1,hP.1.2,hP.2.2⟩).2 | |
| refine ⟨⟨⟨hAB.1,?_⟩,hP.2.1.1⟩,⟨⟨hAB.2,?_⟩,hP.2.1.2⟩⟩ | |
| · have := (suffix_noDrop_iff ℓ P.1 wv.1.length).mpr hFs.1 | |
| simpa only [hP.2.1.1 wv.1.length le_rfl] using this | |
| · have := (suffix_noDrop_iff ℓ P.2 wv.2.length).mpr hFs.2 | |
| simpa only [hP.2.1.2 wv.2.length le_rfl] using this | |
| · rintro ⟨⟨⟨hA,hD1⟩,hw⟩,⟨⟨hB,hD2⟩,hv⟩⟩ | |
| have hF1 : P.1 ∈ FutureNoDrop ℓ wv.1.length := by | |
| apply (suffix_noDrop_iff ℓ P.1 wv.1.length).mp | |
| simpa only [hw wv.1.length le_rfl] using hD1 | |
| have hF2 : P.2 ∈ FutureNoDrop ℓ wv.2.length := by | |
| apply (suffix_noDrop_iff ℓ P.2 wv.2.length).mp | |
| simpa only [hv wv.2.length le_rfl] using hD2 | |
| have hc := (firstCommonWords_characterization ℓ 0 0 wv.1 wv.2 P hw hv).mpr | |
| ⟨had,hF1,hF2⟩ | |
| exact ⟨⟨⟨hc.1,hc.2.1⟩,⟨hw,hv⟩,hc.2.2⟩,hA,hB⟩ | |
| lemma independent_conditioned_pair_word_rectangle {d : ℕ} (ν : Measure (Row d)) | |
| [IsProbabilityMeasure ν] (ℓ : Vector d) (hp : annealedLaw ν (NoDrop ℓ 0) ≠ 0) | |
| (wv : List (Direction d) × List (Direction d)) | |
| (had : AdmissibleCommonWords ℓ 0 0 wv.1 wv.2) | |
| (A B : Set (Path d)) (hA : MeasurableSet A) (hB : MeasurableSet B) : | |
| independentConditionedPairLaw ν ℓ | |
| (FirstPairWordEvent ℓ wv ∩ fixedPairSuffix wv ⁻¹' (A ×ˢ B)) = | |
| (annealedLaw ν (wordCylinder 0 wv.1) * annealedLaw ν (wordCylinder 0 wv.2)) * | |
| independentConditionedPairLaw ν ℓ (A ×ˢ B) := by | |
| let : IsProbabilityMeasure (conditionedLaw ν ℓ) := conditionedLaw_probability ν ℓ hp | |
| rw [firstPairWordEvent_suffix_rectangle ℓ wv had A B, | |
| independentConditionedPairLaw,Measure.prod_prod,Measure.prod_prod, | |
| conditioned_record_word_factor ν ℓ wv.1 had.2.2.2.1 had.2.2.2.2.2.1 _ | |
| (hA.inter (measurableSet_noDrop ℓ 0)) Set.inter_subset_right, | |
| conditioned_record_word_factor ν ℓ wv.2 had.2.2.2.2.1 had.2.2.2.2.2.2.1 _ | |
| (hB.inter (measurableSet_noDrop ℓ 0)) Set.inter_subset_right, | |
| conditionedLaw_inter_noDrop ν ℓ A hA,conditionedLaw_inter_noDrop ν ℓ B hB] | |
| ac_rfl | |
| lemma independent_conditioned_pair_word_mass {d : ℕ} (ν : Measure (Row d)) | |
| [IsProbabilityMeasure ν] (ℓ : Vector d) (hp : annealedLaw ν (NoDrop ℓ 0) ≠ 0) | |
| (wv : List (Direction d) × List (Direction d)) | |
| (had : AdmissibleCommonWords ℓ 0 0 wv.1 wv.2) : | |
| independentConditionedPairLaw ν ℓ (FirstPairWordEvent ℓ wv) = | |
| annealedLaw ν (wordCylinder 0 wv.1) * annealedLaw ν (wordCylinder 0 wv.2) := by | |
| let : IsProbabilityMeasure (independentConditionedPairLaw ν ℓ) := | |
| independentConditionedPairLaw_probability ν ℓ hp | |
| simpa only [Set.univ_prod_univ,Set.preimage_univ,Set.inter_univ,measure_univ,mul_one] using | |
| independent_conditioned_pair_word_rectangle ν ℓ hp wv had Set.univ Set.univ | |
| MeasurableSet.univ MeasurableSet.univ | |
| lemma independent_conditioned_pair_word_factor {d : ℕ} (ν : Measure (Row d)) | |
| [IsProbabilityMeasure ν] (ℓ : Vector d) (hp : annealedLaw ν (NoDrop ℓ 0) ≠ 0) | |
| (wv : List (Direction d) × List (Direction d)) | |
| (A : Set (Path d × Path d)) (hA : MeasurableSet A) : | |
| independentConditionedPairLaw ν ℓ (FirstPairWordEvent ℓ wv ∩ fixedPairSuffix wv ⁻¹' A) = | |
| independentConditionedPairLaw ν ℓ (FirstPairWordEvent ℓ wv) * | |
| independentConditionedPairLaw ν ℓ A := by | |
| classical | |
| let μ := independentConditionedPairLaw ν ℓ | |
| let : IsProbabilityMeasure μ := independentConditionedPairLaw_probability ν ℓ hp | |
| by_cases had : AdmissibleCommonWords ℓ 0 0 wv.1 wv.2 | |
| · have he : (μ.restrict (FirstPairWordEvent ℓ wv)).map (fixedPairSuffix wv) = | |
| μ (FirstPairWordEvent ℓ wv) • μ := by | |
| apply Measure.ext_prod | |
| intro B C hB hC | |
| rw [Measure.map_apply (measurable_fixedPairSuffix wv) (hB.prod hC), | |
| Measure.restrict_apply ((hB.prod hC).preimage (measurable_fixedPairSuffix wv)), | |
| Set.inter_comm,Measure.smul_apply,smul_eq_mul] | |
| exact (independent_conditioned_pair_word_rectangle ν ℓ hp wv had B C hB hC).trans | |
| (by rw [independent_conditioned_pair_word_mass ν ℓ hp wv had]) | |
| have h := congrArg (fun ρ : Measure (Path d × Path d) => ρ A) he | |
| rw [Measure.map_apply (measurable_fixedPairSuffix wv) hA, | |
| Measure.restrict_apply (hA.preimage (measurable_fixedPairSuffix wv)), | |
| Set.inter_comm,Measure.smul_apply,smul_eq_mul] at h | |
| exact h | |
| · have he : FirstPairWordEvent ℓ wv = ∅ := by | |
| apply Set.eq_empty_iff_forall_notMem.mpr | |
| exact fun P hP => had (firstPairWordEvent_admissible ℓ wv P hP) | |
| simp only [he,Set.empty_inter,measure_empty,zero_mul] | |
| lemma renewPairSuffix_on_firstPairWordEvent {d : ℕ} (ℓ : Vector d) | |
| (wv : List (Direction d) × List (Direction d)) (P : Path d × Path d) | |
| (hP : P ∈ FirstPairWordEvent ℓ wv) : renewPairSuffix ℓ P = fixedPairSuffix wv P := by | |
| have hwv : wv ≠ ([],[]) := by | |
| intro he | |
| rw [he,firstPairWordEvent_nil] at hP | |
| exact hP | |
| unfold renewPairSuffix fixedPairSuffix | |
| rw [(firstPairWord_eq_iff ℓ P wv hwv).mpr hP, | |
| hP.2.1.1 wv.1.length le_rfl,hP.2.1.2 wv.2.length le_rfl] | |
| lemma independent_conditioned_firstPairWord_fiber_ae {d : ℕ} (ν : Measure (Row d)) | |
| [IsProbabilityMeasure ν] (ℓ : Vector d) (htrans : DirectionallyTransient ν ℓ) | |
| (height : Lattice d → ℤ) (hproj : ∀ x, dot (realPosition x) ℓ = (height x : ℝ)) | |
| (hstep : ∀ x e, height (x+step e) ≤ height x+1) | |
| (wv : List (Direction d) × List (Direction d)) : | |
| firstPairWord ℓ ⁻¹' {wv} =ᵐ[independentConditionedPairLaw ν ℓ] FirstPairWordEvent ℓ wv := by | |
| classical | |
| by_cases hwv : wv = ([],[]) | |
| · subst wv | |
| filter_upwards [independent_conditioned_firstPairWord_exists ν ℓ htrans height hproj hstep] | |
| with P hP | |
| apply propext | |
| change firstPairWord ℓ P = ([],[]) ↔ P ∈ FirstPairWordEvent ℓ ([],[]) | |
| rw [firstPairWord_nil_iff,firstPairWordEvent_nil] | |
| simp only [hP,not_true_eq_false,Set.mem_empty_iff_false] | |
| · exact Filter.Eventually.of_forall fun P => propext (firstPairWord_eq_iff ℓ P wv hwv) | |
| lemma independent_conditioned_firstPairWord_fiber_factor {d : ℕ} (ν : Measure (Row d)) | |
| [IsProbabilityMeasure ν] (ℓ : Vector d) (htrans : DirectionallyTransient ν ℓ) | |
| (height : Lattice d → ℤ) (hproj : ∀ x, dot (realPosition x) ℓ = (height x : ℝ)) | |
| (hstep : ∀ x e, height (x+step e) ≤ height x+1) | |
| (wv : List (Direction d) × List (Direction d)) | |
| (A : Set (Path d × Path d)) (hA : MeasurableSet A) : | |
| independentConditionedPairLaw ν ℓ (firstPairWord ℓ ⁻¹' {wv} ∩ renewPairSuffix ℓ ⁻¹' A) = | |
| independentConditionedPairLaw ν ℓ (firstPairWord ℓ ⁻¹' {wv}) * | |
| independentConditionedPairLaw ν ℓ A := by | |
| have hp := ne_of_gt (noDrop_positive_of_directionallyTransient ν ℓ htrans) | |
| have hcy := independent_conditioned_firstPairWord_fiber_ae ν ℓ htrans height hproj hstep wv | |
| have hE : (firstPairWord ℓ ⁻¹' {wv} ∩ renewPairSuffix ℓ ⁻¹' A : Set (Path d × Path d)) | |
| =ᵐ[independentConditionedPairLaw ν ℓ] | |
| (FirstPairWordEvent ℓ wv ∩ renewPairSuffix ℓ ⁻¹' A : Set (Path d × Path d)) := | |
| hcy.inter (Filter.Eventually.of_forall fun _ => rfl) | |
| rw [measure_congr hE,measure_congr hcy] | |
| have he : FirstPairWordEvent ℓ wv ∩ renewPairSuffix ℓ ⁻¹' A = | |
| FirstPairWordEvent ℓ wv ∩ fixedPairSuffix wv ⁻¹' A := by | |
| ext P | |
| by_cases hP : P ∈ FirstPairWordEvent ℓ wv | |
| · simp only [Set.mem_inter_iff,Set.mem_preimage,hP,true_and, | |
| renewPairSuffix_on_firstPairWordEvent ℓ wv P hP] | |
| · simp only [Set.mem_inter_iff,hP,false_and] | |
| rw [he] | |
| exact independent_conditioned_pair_word_factor ν ℓ hp wv A hA | |
| lemma measurePreserving_of_countable_fiber_factor {α β : Type*} [MeasurableSpace α] | |
| [MeasurableSpace β] [Countable β] [MeasurableSingletonClass β] | |
| (μ : Measure α) [IsProbabilityMeasure μ] (F : α → β) (T : α → α) | |
| (hF : Measurable F) (hT : Measurable T) | |
| (hfac : ∀ b A, MeasurableSet A → μ (F ⁻¹' {b} ∩ T ⁻¹' A) = μ (F ⁻¹' {b}) * μ A) : | |
| MeasurePreserving T μ μ := by | |
| refine ⟨hT,?_⟩ | |
| apply Measure.ext | |
| intro A hA | |
| rw [Measure.map_apply hT hA] | |
| have hpart : ∀ B : Set α, MeasurableSet B → μ B = ∑' b : β, μ (F ⁻¹' {b} ∩ B) := by | |
| intro B hB | |
| have he : (⋃ b : β,F ⁻¹' {b} ∩ B) = B := by | |
| ext x | |
| simp only [Set.mem_iUnion,Set.mem_inter_iff,Set.mem_preimage,Set.mem_singleton_iff] | |
| exact ⟨fun ⟨_,_,hx⟩ => hx,fun hx => ⟨F x,rfl,hx⟩⟩ | |
| rw [← he] | |
| conv_rhs => arg 1; ext b; rw [he] | |
| exact measure_iUnion (fun u v huv => ((Set.disjoint_singleton.mpr huv).preimage F).mono | |
| Set.inter_subset_left Set.inter_subset_left) | |
| (fun b => (hF (measurableSet_singleton b)).inter hB) | |
| have hsum : (∑' b : β,μ (F ⁻¹' {b})) = 1 := by | |
| simpa only [Set.inter_univ,measure_univ] using (hpart Set.univ MeasurableSet.univ).symm | |
| rw [hpart (T ⁻¹' A) (hA.preimage hT)] | |
| simp_rw [hfac _ A hA] | |
| rw [ENNReal.tsum_mul_right,hsum,one_mul] | |
| lemma indepFun_of_countable_fiber_factor {α β : Type*} [MeasurableSpace α] | |
| [MeasurableSpace β] [Countable β] [MeasurableSingletonClass β] | |
| (μ : Measure α) [IsProbabilityMeasure μ] (F : α → β) (T : α → α) | |
| (hF : Measurable F) (hT : Measurable T) | |
| (hfac : ∀ b A, MeasurableSet A → μ (F ⁻¹' {b} ∩ T ⁻¹' A) = μ (F ⁻¹' {b}) * μ A) : | |
| IndepFun F T μ := by | |
| apply indepFun_iff_measure_inter_preimage_eq_mul.mpr | |
| intro B A hB hA | |
| have hm := measurePreserving_of_countable_fiber_factor μ F T hF hT hfac | |
| rw [hm.measure_preimage hA.nullMeasurableSet,measure_preimage_partition μ F hF B hB] | |
| simp_rw [hfac _ A hA] | |
| rw [ENNReal.tsum_mul_right] | |
| have hsum := measure_preimage_partition μ F hF B hB Set.univ | |
| simpa only [Set.inter_univ] using congrArg (fun x => x * μ A) hsum.symm | |
| lemma renewPairSuffix_preserves_independent_conditioned {d : ℕ} (ν : Measure (Row d)) | |
| [IsProbabilityMeasure ν] (ℓ : Vector d) (htrans : DirectionallyTransient ν ℓ) | |
| (height : Lattice d → ℤ) (hproj : ∀ x, dot (realPosition x) ℓ = (height x : ℝ)) | |
| (hstep : ∀ x e, height (x+step e) ≤ height x+1) : | |
| MeasurePreserving (renewPairSuffix ℓ) | |
| (independentConditionedPairLaw ν ℓ) (independentConditionedPairLaw ν ℓ) := by | |
| let : IsProbabilityMeasure (independentConditionedPairLaw ν ℓ) := | |
| independentConditionedPairLaw_probability ν ℓ | |
| (ne_of_gt (noDrop_positive_of_directionallyTransient ν ℓ htrans)) | |
| exact measurePreserving_of_countable_fiber_factor _ _ _ | |
| (measurable_firstPairWord ℓ) (measurable_renewPairSuffix ℓ) | |
| (independent_conditioned_firstPairWord_fiber_factor ν ℓ htrans height hproj hstep) | |
| lemma firstPairWord_indep_renewPairSuffix {d : ℕ} (ν : Measure (Row d)) | |
| [IsProbabilityMeasure ν] (ℓ : Vector d) (htrans : DirectionallyTransient ν ℓ) | |
| (height : Lattice d → ℤ) (hproj : ∀ x, dot (realPosition x) ℓ = (height x : ℝ)) | |
| (hstep : ∀ x e, height (x+step e) ≤ height x+1) : | |
| IndepFun (firstPairWord ℓ) (renewPairSuffix ℓ) (independentConditionedPairLaw ν ℓ) := by | |
| let : IsProbabilityMeasure (independentConditionedPairLaw ν ℓ) := | |
| independentConditionedPairLaw_probability ν ℓ | |
| (ne_of_gt (noDrop_positive_of_directionallyTransient ν ℓ htrans)) | |
| exact indepFun_of_countable_fiber_factor _ _ _ | |
| (measurable_firstPairWord ℓ) (measurable_renewPairSuffix ℓ) | |
| (independent_conditioned_firstPairWord_fiber_factor ν ℓ htrans height hproj hstep) | |
| lemma common_words_independent {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] | |
| (ℓ : Vector d) (htrans : DirectionallyTransient ν ℓ) | |
| (height : Lattice d → ℤ) (hproj : ∀ x, dot (realPosition x) ℓ = (height x : ℝ)) | |
| (hstep : ∀ x e, height (x+step e) ≤ height x+1) : | |
| iIndepFun (fun n : ℕ => fun P => firstPairWord ℓ ((renewPairSuffix ℓ)^[n] P)) | |
| (independentConditionedPairLaw ν ℓ) := by | |
| let : IsProbabilityMeasure (independentConditionedPairLaw ν ℓ) := | |
| independentConditionedPairLaw_probability ν ℓ | |
| (ne_of_gt (noDrop_positive_of_directionallyTransient ν ℓ htrans)) | |
| exact independent_iterated_symbols _ _ _ (measurable_firstPairWord ℓ) | |
| (renewPairSuffix_preserves_independent_conditioned ν ℓ htrans height hproj hstep) | |
| (firstPairWord_indep_renewPairSuffix ν ℓ htrans height hproj hstep) | |
| lemma common_words_identDistrib {d : ℕ} (ν : Measure (Row d)) [IsProbabilityMeasure ν] | |
| (ℓ : Vector d) (htrans : DirectionallyTransient ν ℓ) | |
| (height : Lattice d → ℤ) (hproj : ∀ x, dot (realPosition x) ℓ = (height x : ℝ)) | |
| (hstep : ∀ x e, height (x+step e) ≤ height x+1) (n : ℕ) : | |
| IdentDistrib (fun P => firstPairWord ℓ ((renewPairSuffix ℓ)^[n] P)) (firstPairWord ℓ) | |
| (independentConditionedPairLaw ν ℓ) (independentConditionedPairLaw ν ℓ) := by | |
| exact identDistrib_iterated_symbol _ _ _ (measurable_firstPairWord ℓ) | |
| (renewPairSuffix_preserves_independent_conditioned ν ℓ htrans height hproj hstep) n | |
| noncomputable def commonWords {d : ℕ} (ℓ : Vector d) (P : Path d × Path d) (n : ℕ) := | |
| firstPairWord ℓ ((renewPairSuffix ℓ)^[n] P) | |
| noncomputable def commonTimes {d : ℕ} (ℓ : Vector d) (P : Path d × Path d) (n : ℕ) : ℕ × ℕ := | |
| (∑ i ∈ Finset.range n, (commonWords ℓ P i).1.length, | |
| ∑ i ∈ Finset.range n, (commonWords ℓ P i).2.length) | |
| lemma commonTimes_zero {d : ℕ} (ℓ : Vector d) (P : Path d × Path d) : | |
| commonTimes ℓ P 0 = (0,0) := by simp [commonTimes] | |
| lemma commonTimes_succ {d : ℕ} (ℓ : Vector d) (P : Path d × Path d) (n : ℕ) : | |
| commonTimes ℓ P (n+1) = | |
| ((commonTimes ℓ P n).1+(commonWords ℓ P n).1.length, | |
| (commonTimes ℓ P n).2+(commonWords ℓ P n).2.length) := by | |
| simp [commonTimes,Finset.sum_range_succ] | |
| lemma iterate_renewPairSuffix_eq {d : ℕ} (ℓ : Vector d) (P : Path d × Path d) | |
| (h0 : P.1 0 = 0) (h0' : P.2 0 = 0) (n : ℕ) : | |
| (renewPairSuffix ℓ)^[n] P = | |
| ((fun j => P.1 ((commonTimes ℓ P n).1+j)-P.1 (commonTimes ℓ P n).1), | |
| (fun j => P.2 ((commonTimes ℓ P n).2+j)-P.2 (commonTimes ℓ P n).2)) := by | |
| induction n with | |
| | zero => simp [commonTimes_zero,h0,h0'] | |
| | succ n ih => | |
| rw [Function.iterate_succ_apply',renewPairSuffix,commonTimes_succ] | |
| have hw : firstPairWord ℓ ((renewPairSuffix ℓ)^[n] P) = commonWords ℓ P n := rfl | |
| rw [hw,ih] | |
| apply Prod.ext <;> funext j | |
| · change P.1 ((commonTimes ℓ P n).1+((commonWords ℓ P n).1.length+j)) - | |
| P.1 (commonTimes ℓ P n).1 - | |
| (P.1 ((commonTimes ℓ P n).1+(commonWords ℓ P n).1.length)- | |
| P.1 (commonTimes ℓ P n).1) = | |
| P.1 (((commonTimes ℓ P n).1+(commonWords ℓ P n).1.length)+j) - | |
| P.1 ((commonTimes ℓ P n).1+(commonWords ℓ P n).1.length) | |
| rw [Nat.add_assoc]; abel | |
| · change P.2 ((commonTimes ℓ P n).2+((commonWords ℓ P n).2.length+j)) - | |
| P.2 (commonTimes ℓ P n).2 - | |
| (P.2 ((commonTimes ℓ P n).2+(commonWords ℓ P n).2.length)- | |
| P.2 (commonTimes ℓ P n).2) = | |
| P.2 (((commonTimes ℓ P n).2+(commonWords ℓ P n).2.length)+j) - | |
| P.2 ((commonTimes ℓ P n).2+(commonWords ℓ P n).2.length) | |
| rw [Nat.add_assoc]; abel | |
| lemma commonTrueRecord_suffix_iff {d : ℕ} (ℓ : Vector d) (P : Path d × Path d) | |
| {n m j k : ℕ} (hn : CommonTrueRecord ℓ P n m) (hj : 0 < j) (hk : 0 < k) : | |
| CommonTrueRecord ℓ ((fun a => P.1 (n+a)-P.1 n),(fun a => P.2 (m+a)-P.2 m)) j k ↔ | |
| CommonTrueRecord ℓ P (n+j) (m+k) := by | |
| simp only [CommonTrueRecord,trueRecord_suffix_iff ℓ P.1 hn.1.1 hj, | |
| trueRecord_suffix_iff ℓ P.2 hn.2.1.1 hk,dot_realPosition_sub,hn.2.2, | |
| sub_left_inj] | |
| lemma independent_conditioned_all_firstPairWords {d : ℕ} (ν : Measure (Row d)) | |
| [IsProbabilityMeasure ν] (ℓ : Vector d) (htrans : DirectionallyTransient ν ℓ) | |
| (height : Lattice d → ℤ) (hproj : ∀ x, dot (realPosition x) ℓ = (height x : ℝ)) | |
| (hstep : ∀ x e, height (x+step e) ≤ height x+1) : | |
| ∀ᵐ P ∂independentConditionedPairLaw ν ℓ, ∀ n, | |
| ((renewPairSuffix ℓ)^[n] P) ∈ FirstPairWordEvent ℓ (commonWords ℓ P n) := by | |
| apply ae_all_iff.mpr | |
| intro n | |
| have he := ((renewPairSuffix_preserves_independent_conditioned ν ℓ htrans height hproj hstep).iterate n).quasiMeasurePreserving.ae (independent_conditioned_firstPairWord_exists ν ℓ htrans height hproj hstep) | |
| filter_upwards [he] with P hP | |
| simpa only [commonWords,firstPairWord,dite_eq_left hP] using hP.choose_spec | |
| lemma commonTimes_strictMono {d : ℕ} (ℓ : Vector d) (P : Path d × Path d) | |
| (hP : ∀ n, ((renewPairSuffix ℓ)^[n] P) ∈ FirstPairWordEvent ℓ (commonWords ℓ P n)) : | |
| StrictMono (fun n => (commonTimes ℓ P n).1) ∧ StrictMono (fun n => (commonTimes ℓ P n).2) := by | |
| constructor <;> apply strictMono_nat_of_lt_succ <;> intro n <;> rw [commonTimes_succ] | |
| · exact Nat.lt_add_of_pos_right (hP n).2.2.1 | |
| · exact Nat.lt_add_of_pos_right (hP n).2.2.2.1 | |
| lemma commonTimes_true {d : ℕ} (ℓ : Vector d) (P : Path d × Path d) | |
| (h0 : P.1 0 = 0) (h0' : P.2 0 = 0) | |
| (hP : ∀ n, ((renewPairSuffix ℓ)^[n] P) ∈ FirstPairWordEvent ℓ (commonWords ℓ P n)) : | |
| ∀ n, CommonTrueRecord ℓ P (commonTimes ℓ P n).1 (commonTimes ℓ P n).2 := by | |
| intro n | |
| induction n with | |
| | zero => | |
| rw [commonTimes_zero] | |
| refine ⟨⟨fun j hj => by omega, ?_⟩, ⟨fun j hj => by omega, ?_⟩, ?_⟩ | |
| · simpa only [Function.iterate_zero_apply, NoDrop, FutureNoDrop, Set.mem_ofPred_eq, | |
| Nat.zero_add,h0] using (hP 0).1.1 | |
| · simpa only [Function.iterate_zero_apply, NoDrop, FutureNoDrop, Set.mem_ofPred_eq, | |
| Nat.zero_add,h0'] using (hP 0).1.2 | |
| · rw [h0,h0'] | |
| | succ n ih => | |
| have ht := (hP n).2.2.2.2.1 | |
| rw [iterate_renewPairSuffix_eq ℓ P h0 h0' n] at ht | |
| rw [commonTimes_succ] | |
| exact (commonTrueRecord_suffix_iff ℓ P ih (hP n).2.2.1 (hP n).2.2.2.1).mp ht | |
| lemma commonTimes_no_true_between {d : ℕ} (ℓ : Vector d) (P : Path d × Path d) | |
| (h0 : P.1 0 = 0) (h0' : P.2 0 = 0) | |
| (hP : ∀ n, ((renewPairSuffix ℓ)^[n] P) ∈ FirstPairWordEvent ℓ (commonWords ℓ P n)) | |
| (n j k : ℕ) (hj : (commonTimes ℓ P n).1 < j) | |
| (hjn : j < (commonTimes ℓ P (n+1)).1) : ¬ CommonTrueRecord ℓ P j k := by | |
| intro ht | |
| have hn := commonTimes_true ℓ P h0 h0' hP n | |
| have hn' := commonTimes_true ℓ P h0 h0' hP (n+1) | |
| have hk := (commonTrueRecord_time_order ℓ P hn ht).mp hj | |
| have hkn := (commonTrueRecord_time_order ℓ P ht hn').mp hjn | |
| have hs := (commonTrueRecord_suffix_iff ℓ P hn | |
| (show 0 < j-(commonTimes ℓ P n).1 by omega) | |
| (show 0 < k-(commonTimes ℓ P n).2 by omega)).mpr | |
| (show CommonTrueRecord ℓ P | |
| ((commonTimes ℓ P n).1+(j-(commonTimes ℓ P n).1)) | |
| ((commonTimes ℓ P n).2+(k-(commonTimes ℓ P n).2)) by | |
| simpa only [Nat.add_sub_of_le hj.le,Nat.add_sub_of_le hk.le] using ht) | |
| rw [← iterate_renewPairSuffix_eq ℓ P h0 h0' n] at hs | |
| exact (hP n).2.2.2.2.2 _ _ (by omega) | |
| (by rw [commonTimes_succ] at hjn; exact Nat.sub_lt_left_of_lt_add hj.le hjn) | |
| (by omega) (by rw [commonTimes_succ] at hkn; exact Nat.sub_lt_left_of_lt_add hk.le hkn) hs | |
| lemma commonTrueRecord_eq_commonTimes {d : ℕ} (ℓ : Vector d) (P : Path d × Path d) | |
| (h0 : P.1 0 = 0) (h0' : P.2 0 = 0) | |
| (hP : ∀ n, ((renewPairSuffix ℓ)^[n] P) ∈ FirstPairWordEvent ℓ (commonWords ℓ P n)) | |
| {j k : ℕ} (hj : CommonTrueRecord ℓ P j k) : | |
| ∃ n, commonTimes ℓ P n = (j,k) := by | |
| have hmono := (commonTimes_strictMono ℓ P hP).1 | |
| have hbig (n : ℕ) : n ≤ (commonTimes ℓ P n).1 := by | |
| induction n with | |
| | zero => omega | |
| | succ n ih => exact Nat.succ_le_of_lt (ih.trans_lt (hmono (Nat.lt_succ_self n))) | |
| have hex : ∃ n, j < (commonTimes ℓ P n).1 := ⟨j+1, (Nat.lt_succ_self j).trans_le (hbig _)⟩ | |
| let n := Nat.find hex | |
| have hn : j < (commonTimes ℓ P n).1 := Nat.find_spec hex | |
| have hn0 : 0 < n := by | |
| by_contra h | |
| have he : n = 0 := by omega | |
| simp only [he,commonTimes_zero,not_lt_zero] at hn | |
| have hbefore : (commonTimes ℓ P (n-1)).1 ≤ j := | |
| le_of_not_gt (Nat.find_min hex (show n-1 < Nat.find hex by change n-1 < n; omega)) | |
| have he : (commonTimes ℓ P (n-1)).1 = j := by | |
| by_contra he | |
| exact commonTimes_no_true_between ℓ P h0 h0' hP (n-1) j k | |
| (lt_of_le_of_ne hbefore he) (by simpa only [Nat.sub_add_cancel hn0] using hn) hj | |
| refine ⟨n-1, Prod.ext he ?_⟩ | |
| have hrec := commonTimes_true ℓ P h0 h0' hP (n-1) | |
| apply Nat.le_antisymm | |
| · by_contra h | |
| have := (commonTrueRecord_time_order ℓ P hj hrec).mpr (by omega : k < (commonTimes ℓ P (n-1)).2) | |
| omega | |
| · by_contra h | |
| have := (commonTrueRecord_time_order ℓ P hrec hj).mpr (by omega : (commonTimes ℓ P (n-1)).2 < k) | |
| omega | |
| lemma recordCount_commonTimes {d : ℕ} (ℓ : Vector d) (P : Path d × Path d) | |
| (h0 : P.1 0 = 0) (h0' : P.2 0 = 0) | |
| (hP : ∀ n, ((renewPairSuffix ℓ)^[n] P) ∈ FirstPairWordEvent ℓ (commonWords ℓ P n)) | |
| (n : ℕ) : recordCount ℓ P.1 (commonTimes ℓ P n).1 = | |
| ∑ i ∈ Finset.range n, wordRecordCount ℓ (commonWords ℓ P i).1 := by | |
| induction n with | |
| | zero => simp [commonTimes_zero,recordCount] | |
| | succ n ih => | |
| rw [commonTimes_succ,recordCount_add ℓ P.1 (commonTimes_true ℓ P h0 h0' hP n).1.1, | |
| ih,Finset.sum_range_succ] | |
| congr 1 | |
| apply recordCount_congr_prefix | |
| intro j hj | |
| have he := congrArg Prod.fst (iterate_renewPairSuffix_eq ℓ P h0 h0' n) | |
| have hword := (hP n).2.1.1 j hj | |
| rw [he] at hword | |
| exact hword | |
| lemma recordCount_integer_height {d : ℕ} (ℓ : Vector d) (height : Lattice d → ℤ) | |
| (hproj : ∀ x, dot (realPosition x) ℓ = (height x : ℝ)) (X : Path d) | |
| (hstep : ∀ n, height (X (n+1)) ≤ height (X n)+1) (n : ℕ) : | |
| (∀ j ≤ n, height (X j) ≤ height (X 0) + (recordCount ℓ X n : ℤ)) ∧ | |
| ∃ j ≤ n, height (X j) = height (X 0) + (recordCount ℓ X n : ℤ) := by | |
| classical | |
| induction n with | |
| | zero => simp [recordCount] | |
| | succ n ih => | |
| have he : recordCount ℓ X (n+1) = recordCount ℓ X n + | |
| (if StrictRecord ℓ X (n+1) then 1 else 0) := recordCount_succ ℓ X n | |
| rw [he] | |
| by_cases hr : StrictRecord ℓ X (n+1) | |
| · rw [ite_eq_left hr] | |
| obtain ⟨j,hj,heq⟩ := ih.2 | |
| have hlt := hr j (by omega) | |
| rw [hproj,hproj] at hlt | |
| have hlt' : height (X j) < height (X (n+1)) := by exact_mod_cast hlt | |
| have hb : height (X (n+1)) ≤ height (X 0)+(recordCount ℓ X n : ℤ)+1 := by | |
| have := hstep n; have := ih.1 n le_rfl; omega | |
| have hend : height (X (n+1)) = height (X 0)+(recordCount ℓ X n : ℤ)+1 := by omega | |
| constructor | |
| · intro k hk | |
| by_cases hk' : k ≤ n | |
| · have := ih.1 k hk'; push_cast; omega | |
| · have hk' : k = n+1 := by omega | |
| rw [hk',hend]; push_cast; omega | |
| · exact ⟨n+1,le_rfl,by rw [hend]; push_cast; omega⟩ | |
| · rw [ite_eq_right hr,Nat.add_zero] | |
| have hb : height (X (n+1)) ≤ height (X 0)+(recordCount ℓ X n : ℤ) := by | |
| simp only [StrictRecord] at hr | |
| push Not at hr | |
| obtain ⟨j,hj,hj'⟩ := hr | |
| rw [hproj,hproj] at hj' | |
| have hle : height (X (n+1)) ≤ height (X j) := by exact_mod_cast hj' | |
| exact hle.trans (ih.1 j (by omega)) | |
| refine ⟨fun k hk => ?_, ?_⟩ | |
| · by_cases hk' : k ≤ n | |
| · exact ih.1 k hk' | |
| · have : k = n+1 := by omega | |
| simpa only [this,Nat.add_zero] using hb | |
| · obtain ⟨j,hj,he⟩ := ih.2 | |
| exact ⟨j,by omega,he⟩ | |
| end DirectionalTransience | |
| end | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 25.3 kB
- Xet hash:
- 423e3cacfc742d681c0b88b3fec9e3f39b3388b03074d8c3c2fe32c55198880a
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.