File size: 3,375 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | 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
|