Download data/lean/OAI/Computability/MinUncut/Games/AdaptiveKernel.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.38 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/MinUncut/Games/AdaptiveKernel.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Computability/MinUncut/Games/AdaptiveKernel.lean
-
curl -L -o AdaptiveKernel.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/MinUncut/Games/AdaptiveKernel.lean
3.38 kB
| import Mathlib | |
| import OAI.Computability.MinUncut.Games.TripleKernel | |
| namespace OAI | |
| section | |
| noncomputable section | |
| open scoped BigOperators | |
| namespace MinUncut.Composition | |
| open BinaryFourier OuterSmoothness | |
| attribute [local instance] Classical.propDecidable BinaryFourier.dualFintype | |
| abbrev TripleIndex (J : Type*) := Option (Option (Option J)) | |
| def tripleTupleEquiv {J A : Type*} : | |
| (TripleIndex J β A) β ((J β A) Γ (A Γ A Γ A)) where | |
| toFun L := (fun j => L (some (some (some j))), L none,L (some none),L (some (some none))) | |
| invFun z | |
| | none => z.2.1 | |
| | some none => z.2.2.1 | |
| | some (some none) => z.2.2.2 | |
| | some (some (some j)) => z.1 j | |
| left_inv L := by funext j; cases j with | |
| | none => rfl | |
| | some j => cases j with | |
| | none => rfl | |
| | some j => cases j <;> rfl | |
| right_inv _ := rfl | |
| lemma TripleIndex.card (J : Type*) [Fintype J] : | |
| Fintype.card (TripleIndex J)=Fintype.card J+3 := by simp [TripleIndex] | |
| variable {J V W : Type*} [Fintype J] [DecidableEq J] | |
| [AddCommGroup V] [Module Fβ V] [Fintype V] | |
| [AddCommGroup W] [Module Fβ W] [Fintype W] | |
| def adaptiveKernel (f : (J β V) β V β β) (u : β) (L : TripleIndex J β V) : β := | |
| tripleKernel (remainder (f (tripleTupleEquiv L).1) u) (tripleTupleEquiv L).2 | |
| omit [Fintype J] [DecidableEq J] in | |
| lemma adaptiveKernel_abs (f : (J β V) β V β β) {M u : β} | |
| (hM : 0β€M) (hu : 0<u) (hf : β D z, |f D z|β€M) (L : TripleIndex J β V) : | |
| |adaptiveKernel f u L|β€(M+M^2/u)^4 := | |
| tripleKernel_abs _ (by positivity) (remainder_abs_bound _ hM hu (hf _)) _ | |
| lemma adaptiveKernel_uniform (f : (J β V) β V β β) {M u : β} | |
| (hM : 0β€M) (hu : 0<u) (hf : β D z, |f D z|β€M) : | |
| (πΌ L : TripleIndex J β V, adaptiveKernel f u L)β€u^2*M^2 := by | |
| have he : (πΌ L : TripleIndex J β V, adaptiveKernel f u L) = | |
| πΌ z : (J β V) Γ (V Γ V Γ V), tripleKernel (remainder (f z.1) u) z.2 := | |
| Fintype.expect_equiv tripleTupleEquiv _ _ (fun _ => rfl) | |
| rw [he,expect_pair] | |
| simp_rw [tripleKernel_mean] | |
| exact (Finset.expect_le_expect (fun D _ => remainder_fourth_bound (f D) hM hu (hf D))).trans_eq | |
| (Fintype.expect_const _) | |
| omit [Fintype J] [DecidableEq J] [Fintype W] in | |
| lemma adaptiveKernel_pullback (Ο : W ββ[Fβ] V) (f : (J β V) β V β β) (u : β) | |
| (L : TripleIndex J β W) : | |
| adaptiveKernel f u (fun j => Ο (L j)) = | |
| tripleKernel (fun z => remainder (f (fun j => Ο ((tripleTupleEquiv L).1 j))) u (Ο z)) | |
| (tripleTupleEquiv L).2 := by | |
| simp only [adaptiveKernel,tripleKernel,tripleTupleEquiv,Equiv.coe_fn_mk,map_add] | |
| lemma adaptiveKernel_pullback_mean (Ο : W ββ[Fβ] V) (f : (J β V) β V β β) (u : β) : | |
| (πΌ L : TripleIndex J β W, adaptiveKernel f u (fun j => Ο (L j))) = | |
| πΌ D : J β W, β Ξ² : Module.Dual Fβ W, | |
| coefficient (fun z => remainder (f (fun j => Ο (D j))) u (Ο z)) Ξ² ^4 := by | |
| simp_rw [adaptiveKernel_pullback] | |
| have he := Fintype.expect_equiv (tripleTupleEquiv (J := J) (A := W)) | |
| (fun L => tripleKernel (fun z => remainder (f (fun j => Ο ((tripleTupleEquiv L).1 j))) u (Ο z)) | |
| (tripleTupleEquiv L).2) | |
| (fun z => tripleKernel (fun w => remainder (f (fun j => Ο (z.1 j))) u (Ο w)) z.2) | |
| (fun _ => rfl) | |
| rw [he,expect_pair] | |
| simp_rw [tripleKernel_mean] | |
| end MinUncut.Composition | |
| end | |
| end | |
| end OAI | |