Download data/lean/OAI/Dynamics/EntropyCounterexample/ClockQuotient.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 8 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Dynamics/EntropyCounterexample/ClockQuotient.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Dynamics/EntropyCounterexample/ClockQuotient.lean
-
curl -L -o ClockQuotient.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Dynamics/EntropyCounterexample/ClockQuotient.lean
8 kB
| import OAI.Dynamics.EntropyCounterexample.ClockPeriodization | |
| namespace OAI | |
| noncomputable section | |
| open Set Filter Function | |
| open scoped Topology | |
| namespace Problem340 | |
| namespace ClockQuotient | |
| variable {E F : Type*} | |
| def periodize [AddCommMonoid F] (P : β) (f : β Γ E β F) (x : β Γ E) : F := | |
| βαΆ k : β€, f (x.1 - (k : β) * P, x.2) | |
| lemma periodic_periodize [AddCommMonoid F] (P : β) (f : β Γ E β F) (z : E) : | |
| Periodic (fun t => periodize P f (t, z)) P := by | |
| intro t | |
| unfold periodize | |
| refine finsum_eq_of_bijective (fun k : β€ => k - 1) ?_ ?_ | |
| Β· constructor | |
| Β· intro a b h | |
| dsimp at h | |
| omega | |
| Β· intro a | |
| exact β¨a + 1, by simpβ© | |
| Β· intro k | |
| apply congrArg f | |
| apply Prod.ext | |
| Β· simp only [Int.cast_sub, Int.cast_one] | |
| ring | |
| Β· rfl | |
| lemma locallyFinite_translated_strips [TopologicalSpace E] | |
| {P : β} (hP : 0 < P) (a b : β) : | |
| LocallyFinite (fun k : β€ => | |
| {x : β Γ E | x.1 - (k : β) * P β Icc a b}) := by | |
| have hl := (ClockPeriodization.locallyFinite_clockIntervals hP a b).preimage_continuous | |
| (continuous_fst : Continuous (Prod.fst : β Γ E β β)) | |
| refine hl.subset ?_ | |
| intro k x hx | |
| change (k : β) * P + a β€ x.1 β§ x.1 β€ (k : β) * P + b | |
| exact β¨by linarith [hx.1], by linarith [hx.2]β© | |
| lemma locallyFinite_translated_supports [TopologicalSpace E] [Zero F] | |
| {P a b : β} {f : β Γ E β F} (hP : 0 < P) | |
| (hsupp : β x, f x β 0 β x.1 β Icc a b) : | |
| LocallyFinite (fun k : β€ => support (fun x : β Γ E => | |
| f (x.1 - (k : β) * P, x.2))) := by | |
| refine (locallyFinite_translated_strips hP a b).subset ?_ | |
| intro k x hx | |
| exact hsupp _ hx | |
| lemma continuous_periodize [TopologicalSpace E] | |
| [AddCommMonoid F] [TopologicalSpace F] [ContinuousAdd F] | |
| {P a b : β} {f : β Γ E β F} | |
| (hP : 0 < P) (hf : Continuous f) | |
| (hsupp : β x, f x β 0 β x.1 β Icc a b) : | |
| Continuous (periodize P f) := by | |
| exact continuous_finsum | |
| (fun k => hf.comp ((continuous_fst.sub continuous_const).prodMk continuous_snd)) | |
| (locallyFinite_translated_supports hP hsupp) | |
| lemma periodize_eq_tsum [TopologicalSpace E] | |
| [AddCommMonoid F] [TopologicalSpace F] | |
| {P a b : β} {f : β Γ E β F} | |
| (hP : 0 < P) (hsupp : β x, f x β 0 β x.1 β Icc a b) (x : β Γ E) : | |
| periodize P f x = β' k : β€, f (x.1 - (k : β) * P, x.2) := by | |
| exact (tsum_eq_finsum | |
| ((locallyFinite_translated_supports hP hsupp).point_finite x)).symm | |
| lemma periodize_eq_on_fundamental_strip [AddCommMonoid F] | |
| {P : β} {f : β Γ E β F} (hP : 0 < P) | |
| (hsupp : β x, f x β 0 β x.1 β Ioo 0 P) | |
| {t : β} (ht : t β Icc 0 P) (z : E) : | |
| periodize P f (t, z) = f (t, z) := by | |
| unfold periodize | |
| have hzero : β k : β€, k β 0 β f (t - (k : β) * P, z) = 0 := by | |
| intro k hk | |
| by_contra hne | |
| have hi := hsupp (t - (k : β) * P, z) hne | |
| rcases lt_or_gt_of_ne hk with hkneg | hkpos | |
| Β· have hk1 : (k : β) β€ -1 := by exact_mod_cast (show k β€ -1 by omega) | |
| have hmul := mul_le_mul_of_nonneg_right hk1 hP.le | |
| linarith [hi.2, ht.1] | |
| Β· have hk1 : (1 : β) β€ k := by exact_mod_cast (show 1 β€ k by omega) | |
| have hmul := mul_le_mul_of_nonneg_right hk1 hP.le | |
| linarith [hi.1, ht.2] | |
| simpa using finsum_eq_single (fun k : β€ => f (t - (k : β) * P, z)) 0 hzero | |
| lemma periodize_eq_toIcoMod [AddCommMonoid F] | |
| {P : β} {f : β Γ E β F} (hP : 0 < P) | |
| (hsupp : β x, f x β 0 β x.1 β Ioo 0 P) (t : β) (z : E) : | |
| periodize P f (t, z) = f (toIcoMod hP 0 t, z) := by | |
| have hm := toIcoMod_mem_Ico' hP t | |
| have hp := (periodic_periodize P f z).sub_zsmul_eq (x := t) (toIcoDiv hP 0 t) | |
| rw [self_sub_toIcoDiv_zsmul] at hp | |
| rw [β hp] | |
| exact periodize_eq_on_fundamental_strip hP hsupp β¨hm.1, hm.2.leβ© z | |
| lemma periodize_mem_Icc [TopologicalSpace E] | |
| {P a b : β} {f : β Γ E β β} (hP : 0 < P) | |
| (hsupp : β x, f x β 0 β x.1 β Ioo 0 P) | |
| (hbound : β x, f x β Icc a b) (x : β Γ E) : | |
| periodize P f x β Icc a b := by | |
| rw [periodize_eq_toIcoMod hP hsupp] | |
| exact hbound _ | |
| def liftPeriodic {P : β} (f : β Γ E β F) | |
| (hf : β z, Periodic (fun t => f (t, z)) P) (x : AddCircle P Γ E) : F := | |
| (hf x.2).lift x.1 | |
| @[simp] lemma liftPeriodic_coe {P : β} (f : β Γ E β F) | |
| (hf : β z, Periodic (fun t => f (t, z)) P) (t : β) (z : E) : | |
| liftPeriodic f hf ((t : AddCircle P), z) = f (t, z) := | |
| (hf z).lift_coe t | |
| lemma continuous_liftPeriodic [TopologicalSpace E] [TopologicalSpace F] | |
| {P : β} {f : β Γ E β F} | |
| (hf : β z, Periodic (fun t => f (t, z)) P) (hc : Continuous f) : | |
| Continuous (liftPeriodic f hf) := by | |
| have hq : IsOpenQuotientMap | |
| (fun x : β Γ E => ((x.1 : AddCircle P), x.2)) := | |
| QuotientAddGroup.isOpenQuotientMap_mk.prodMap IsOpenQuotientMap.id | |
| rw [β hq.continuous_comp_iff] | |
| simpa only [Function.comp_def, liftPeriodic_coe] using hc | |
| lemma liftPeriodic_eq_liftIco {P : β} [Fact (0 < P)] (f : β Γ E β F) | |
| (hf : β z, Periodic (fun t => f (t, z)) P) (x : AddCircle P Γ E) : | |
| liftPeriodic f hf x = AddCircle.liftIco P 0 (fun t => f (t, x.2)) x.1 := by | |
| let r := AddCircle.equivIco P 0 x.1 | |
| have he : ((r : β) : AddCircle P) = x.1 := AddCircle.coe_equivIco | |
| calc | |
| liftPeriodic f hf x = liftPeriodic f hf (((r : β) : AddCircle P), x.2) := by rw [he] | |
| _ = f ((r : β), x.2) := liftPeriodic_coe f hf _ _ | |
| _ = AddCircle.liftIco P 0 (fun t => f (t, x.2)) x.1 := rfl | |
| lemma continuous_liftIco_of_periodic [TopologicalSpace E] [TopologicalSpace F] | |
| {P : β} [Fact (0 < P)] {f : β Γ E β F} | |
| (hf : β z, Periodic (fun t => f (t, z)) P) (hc : Continuous f) : | |
| Continuous (fun x : AddCircle P Γ E => | |
| AddCircle.liftIco P 0 (fun t => f (t, x.2)) x.1) := | |
| (continuous_liftPeriodic hf hc).congr (liftPeriodic_eq_liftIco f hf) | |
| def liftPeriodize [AddCommMonoid F] (P : β) (f : β Γ E β F) : AddCircle P Γ E β F := | |
| liftPeriodic (periodize P f) (periodic_periodize P f) | |
| @[simp] lemma liftPeriodize_coe [AddCommMonoid F] | |
| (P : β) (f : β Γ E β F) (t : β) (z : E) : | |
| liftPeriodize P f ((t : AddCircle P), z) = periodize P f (t, z) := | |
| liftPeriodic_coe _ _ _ _ | |
| lemma continuous_liftPeriodize [TopologicalSpace E] | |
| [AddCommMonoid F] [TopologicalSpace F] [ContinuousAdd F] | |
| {P a b : β} {f : β Γ E β F} | |
| (hP : 0 < P) (hf : Continuous f) | |
| (hsupp : β x, f x β 0 β x.1 β Icc a b) : | |
| Continuous (liftPeriodize P f) := | |
| continuous_liftPeriodic _ (continuous_periodize hP hf hsupp) | |
| lemma liftPeriodize_eq_liftIco [AddCommMonoid F] | |
| {P : β} [Fact (0 < P)] {f : β Γ E β F} | |
| (hsupp : β x, f x β 0 β x.1 β Ioo 0 P) (x : AddCircle P Γ E) : | |
| liftPeriodize P f x = AddCircle.liftIco P 0 (fun t => f (t, x.2)) x.1 := by | |
| let r := AddCircle.equivIco P 0 x.1 | |
| have hr : (r : β) β Icc 0 P := by | |
| have h := r.property | |
| simp only [zero_add] at h | |
| exact β¨h.1, h.2.leβ© | |
| have he : ((r : β) : AddCircle P) = x.1 := AddCircle.coe_equivIco | |
| calc | |
| liftPeriodize P f x = liftPeriodize P f (((r : β) : AddCircle P), x.2) := by | |
| rw [he] | |
| _ = f ((r : β), x.2) := by | |
| rw [liftPeriodize_coe] | |
| exact periodize_eq_on_fundamental_strip Fact.out hsupp hr x.2 | |
| _ = AddCircle.liftIco P 0 (fun t => f (t, x.2)) x.1 := rfl | |
| lemma continuous_liftIco_of_strip_support [TopologicalSpace E] | |
| [AddCommMonoid F] [TopologicalSpace F] [ContinuousAdd F] | |
| {P : β} [Fact (0 < P)] {f : β Γ E β F} | |
| (hf : Continuous f) (hsupp : β x, f x β 0 β x.1 β Ioo 0 P) : | |
| Continuous (fun x : AddCircle P Γ E => | |
| AddCircle.liftIco P 0 (fun t => f (t, x.2)) x.1) := by | |
| have hsupp' : β x, f x β 0 β x.1 β Icc 0 P := | |
| fun x hx => β¨(hsupp x hx).1.le, (hsupp x hx).2.leβ© | |
| exact (continuous_liftPeriodize Fact.out hf hsupp').congr | |
| (liftPeriodize_eq_liftIco hsupp) | |
| end ClockQuotient | |
| end Problem340 | |
| end | |
| end OAI | |