import Mathlib import OAI.Probability.Contingency.LawComposition namespace OAI /-! Dense Regularity. -/ noncomputable section open scoped BigOperators open scoped BigOperators namespace Contingency.Dense noncomputable section variable {a c : ℕ} theorem scaled_affine (R : Fin (a+1) → ℝ) (P : Fin (c+1) → ℝ) (w : Fin a → Fin c → ℝ) (u v : Fin a×Fin c → ℝ) (α β : ℝ) (hab : α+β=1) (i : Fin (a+1)) (j : Fin (c+1)) : scaled R P w (α • u+β • v) i j=α*scaled R P w u i j+β*scaled R P w v i j := by have hs (i j) : w i j*(α*u (i,j)+β*v (i,j))=α*(w i j*u (i,j))+β*(w i j*v (i,j)) := by ring refine Fin.lastCases ?_ (fun i => ?_) i <;> refine Fin.lastCases ?_ (fun j => ?_) j all_goals simp only [scaled,complete_corner,complete_bottom,complete_right,complete_free, Pi.add_apply,Pi.smul_apply,smul_eq_mul,hs,Finset.sum_add_distrib,← Finset.mul_sum] all_goals have hb : β=1-α := by linarith only [hab] all_goals rw [hb]; ring theorem normalized_affine (R : Fin (a+1) → ℝ) (P : Fin (c+1) → ℝ) (w : Fin a → Fin c → ℝ) (u v : Fin a×Fin c → ℝ) (α β : ℝ) (hab : α+β=1) (i : Fin (a+1)) (j : Fin (c+1)) : normalized R P w (α • u+β • v) i j=α*normalized R P w u i j+β*normalized R P w v i j := by simp only [normalized,scaled_affine R P w u v α β hab] ring theorem polytope_convex (R : Fin (a+1) → ℝ) (P : Fin (c+1) → ℝ) (w : Fin a → Fin c → ℝ) : Convex ℝ (polytope R P w) := by intro u hu v hv α β hα hβ hab i j rw [normalized_affine R P w u v α β hab] exact add_nonneg (mul_nonneg hα (hu i j)) (mul_nonneg hβ (hv i j)) def coefficient (R : Fin (a+1) → ℝ) (P : Fin (c+1) → ℝ) (w : Fin a → Fin c → ℝ) (i : Fin (a+1)) (j : Fin (c+1)) (k : Fin a) (l : Fin c) : ℝ := Fin.lastCases (Fin.lastCases (w k l/scale R P (Fin.last a) (Fin.last c)) (fun j => if l=j then -(w k l/scale R P (Fin.last a) j.castSucc) else 0) j) (fun i => Fin.lastCases (if k=i then -(w k l/scale R P i.castSucc (Fin.last c)) else 0) (fun j => if k=i ∧ l=j then w k l/scale R P i.castSucc j.castSucc else 0) j) i theorem normalized_difference (R : Fin (a+1) → ℝ) (P : Fin (c+1) → ℝ) (w : Fin a → Fin c → ℝ) (u v : Fin a×Fin c → ℝ) (i : Fin (a+1)) (j : Fin (c+1)) : normalized R P w u i j-normalized R P w v i j= ∑ k,∑ l,coefficient R P w i j k l*(u (k,l)-v (k,l)) := by refine Fin.lastCases ?_ (fun i => ?_) i <;> refine Fin.lastCases ?_ (fun j => ?_) j all_goals simp only [normalized,scaled,complete_corner,complete_bottom,complete_right, complete_free,coefficient,Fin.lastCases_last,Fin.lastCases_castSucc] · simp only [div_mul_eq_mul_div,mul_sub,Finset.sum_sub_distrib,← Finset.sum_div] ring · simp only [ite_mul,zero_mul,Finset.sum_ite_eq',Finset.mem_univ,ite_true] simp only [neg_mul,div_mul_eq_mul_div,mul_sub,Finset.sum_sub_distrib,← Finset.sum_div,Finset.sum_neg_distrib] ring · simp only [ite_mul,zero_mul,Finset.sum_ite_irrel,Finset.sum_const_zero,Finset.sum_ite_eq',Finset.mem_univ,ite_true] simp only [neg_mul,div_mul_eq_mul_div,mul_sub,Finset.sum_sub_distrib,← Finset.sum_div,Finset.sum_neg_distrib] ring · simp only [ite_and,ite_mul,zero_mul,Finset.sum_ite_irrel,Finset.sum_const_zero, Finset.sum_ite_eq',Finset.mem_univ,ite_true] ring theorem normalized_width_bound (w s t B : ℝ) (hw0 : 0 ≤ w) (hB : 0 ?_) i <;> refine Fin.lastCases ?_ (fun j => ?_) j all_goals simp only [coefficient,Fin.lastCases_last,Fin.lastCases_castSucc] · exact hbase _ _ (min_le_min (hRmax _) (hPmax _)) · split_ifs with h · subst l; rw [abs_neg]; exact hbase _ _ (min_le_min_right _ (hRmax _)) · simp only [abs_zero]; positivity · split_ifs with h · subst k; rw [abs_neg]; exact hbase _ _ (min_le_min_left _ (hPmax _)) · simp only [abs_zero]; positivity · split_ifs with h · rcases h with ⟨rfl,rfl⟩; exact hbase _ _ le_rfl · simp only [abs_zero]; positivity theorem normalized_lipschitz (R : Fin (a+1) → ℝ) (P : Fin (c+1) → ℝ) (w : Fin a → Fin c → ℝ) (B d : ℝ) (hB : 0 Finset.abs_sum_le_sum_abs _ _) _ ≤ ∑ k : Fin a,∑ l : Fin c,(1/B)*‖u-v‖ := by apply Finset.sum_le_sum; intro k _ apply Finset.sum_le_sum; intro l _ rw [abs_mul] apply mul_le_mul (coefficient_bound R P w B hB hR hP hRmax hPmax hw0 hw i j k l) · simpa only [Real.norm_eq_abs,Pi.sub_apply] using norm_le_pi_norm (u-v) (k,l) · exact abs_nonneg _ · positivity _ = (a*c:ℕ)/B*‖u-v‖ := by simp; ring _ ≤ d/B*‖u-v‖ := mul_le_mul_of_nonneg_right (div_le_div_of_nonneg_right he hB.le) (norm_nonneg _) end end Contingency.Dense open scoped BigOperators namespace Contingency.Dense noncomputable section variable {a c : ℕ} def penalty (R : Fin (a+1) → ℝ) (P : Fin (c+1) → ℝ) (w : Fin a → Fin c → ℝ) (B d : ℝ) (u : Fin a×Fin c → ℝ) : ℝ := max 0 (Finset.univ.sup' Finset.univ_nonempty fun s : Fin (a+1)×Fin (c+1) => -normalized R P w u s.1 s.2-d/B) theorem penalty_nonneg (R : Fin (a+1) → ℝ) (P : Fin (c+1) → ℝ) (w : Fin a → Fin c → ℝ) (B d : ℝ) (u : Fin a×Fin c → ℝ) : 0 ≤ penalty R P w B d u := le_max_left _ _ theorem le_penalty (R : Fin (a+1) → ℝ) (P : Fin (c+1) → ℝ) (w : Fin a → Fin c → ℝ) (B d : ℝ) (u : Fin a×Fin c → ℝ) (i j) : -normalized R P w u i j-d/B ≤ penalty R P w B d u := by exact (Finset.le_sup' (fun s : Fin (a+1)×Fin (c+1) => -normalized R P w u s.1 s.2-d/B) (Finset.mem_univ (i,j))).trans (le_max_right _ _) theorem penalty_le_iff (R : Fin (a+1) → ℝ) (P : Fin (c+1) → ℝ) (w : Fin a → Fin c → ℝ) (B d : ℝ) (u : Fin a×Fin c → ℝ) (z : ℝ) : penalty R P w B d u ≤ z ↔ 0 ≤ z ∧ ∀ i j,-normalized R P w u i j-d/B ≤ z := by simp only [penalty,max_le_iff,Finset.sup'_le_iff,Finset.mem_univ,forall_const] exact and_congr_right (fun _ => ⟨fun h i j => h (i,j),fun h s => h s.1 s.2⟩) theorem penalty_convex (R : Fin (a+1) → ℝ) (P : Fin (c+1) → ℝ) (w : Fin a → Fin c → ℝ) (B d : ℝ) : ConvexOn ℝ Set.univ (penalty R P w B d) := by refine ⟨convex_univ,?_⟩ intro u _ v _ α β ha hb hab rw [smul_eq_mul,smul_eq_mul,penalty_le_iff] constructor · exact add_nonneg (mul_nonneg ha (penalty_nonneg _ _ _ _ _ _)) (mul_nonneg hb (penalty_nonneg _ _ _ _ _ _)) · intro i j rw [normalized_affine R P w u v α β hab] have h1 := mul_le_mul_of_nonneg_left (le_penalty R P w B d u i j) ha have h2 := mul_le_mul_of_nonneg_left (le_penalty R P w B d v i j) hb have h3 := congrArg (fun t : ℝ => t*(d/B)) hab nlinarith only [h1,h2,h3] theorem penalty_zero_of_slack (R : Fin (a+1) → ℝ) (P : Fin (c+1) → ℝ) (w : Fin a → Fin c → ℝ) (B d : ℝ) (u : Fin a×Fin c → ℝ) (hu : ∀ i j,-d/B ≤ normalized R P w u i j) : penalty R P w B d u=0 := by apply le_antisymm _ (penalty_nonneg _ _ _ _ _ _) rw [penalty_le_iff] exact ⟨le_rfl,fun i j => by have hh := hu i j; rw [neg_div] at hh; linarith only [hh]⟩ theorem penalty_difference (R : Fin (a+1) → ℝ) (P : Fin (c+1) → ℝ) (w : Fin a → Fin c → ℝ) (B d K : ℝ) (hK : 0 ≤ K) (u v : Fin a×Fin c → ℝ) (hv : ∀ i j,|normalized R P w u i j-normalized R P w v i j| ≤ K) : |penalty R P w B d u-penalty R P w B d v| ≤ K := by have h (u v : Fin a×Fin c → ℝ) (hh : ∀ i j,normalized R P w v i j-normalized R P w u i j ≤ K) : penalty R P w B d u ≤ penalty R P w B d v+K := by rw [penalty_le_iff] refine ⟨add_nonneg (penalty_nonneg _ _ _ _ _ _) hK,fun i j => ?_⟩ linarith only [hh i j,le_penalty R P w B d v i j] rw [abs_le] constructor · have hv' := h v u (fun i j => (abs_le.mp (hv i j)).2) linarith only [hv'] · have hu' := h u v (fun i j => by have := (abs_le.mp (hv i j)).1; linarith) linarith only [hu'] def density (R : Fin (a+1) → ℝ) (P : Fin (c+1) → ℝ) (w : Fin a → Fin c → ℝ) (B d A : ℝ) (u : Fin a×Fin c → ℝ) : ℝ := (2:ℝ)^(-A*penalty R P w B d u) theorem density_pos (R : Fin (a+1) → ℝ) (P : Fin (c+1) → ℝ) (w : Fin a → Fin c → ℝ) (B d A : ℝ) (u : Fin a×Fin c → ℝ) : 0 Ioo (B.lower i) (B.upper i) def boxUnion {q : ℕ} (S : Finset (OpenBox q)) : Set (Fin q → ℝ) := ⋃ B∈S, B.carrier def FiniteBoxInterpolation : Prop := ∀ (q : ℕ) (S₁ S₂ S₀ : Finset (OpenBox q)) (t : ℝ), 0 isOpen_Ioo theorem OpenBox.isBounded (B : OpenBox q) : Bornology.IsBounded B.carrier := by exact (Bornology.isBounded_pi).mpr (Or.inr fun _ => Metric.isBounded_Ioo _ _) theorem boxUnion_isOpen (S : Finset (OpenBox q)) : IsOpen (boxUnion S) := isOpen_iUnion fun B => isOpen_iUnion fun _ => B.isOpen theorem boxUnion_isBounded (S : Finset (OpenBox q)) : Bornology.IsBounded (boxUnion S) := by classical induction S using Finset.induction_on with | empty => simp [boxUnion] | @insert B S hB ih => have he : boxUnion (insert B S)=B.carrier ∪ boxUnion S := by simp [boxUnion] rw [he] exact B.isBounded.union ih theorem boxUnion_measurable (S : Finset (OpenBox q)) : MeasurableSet (boxUnion S) := (boxUnion_isOpen S).measurableSet theorem boxUnion_volume_finite (S : Finset (OpenBox q)) : volume (boxUnion S)<⊤ := (boxUnion_isBounded S).measure_lt_top theorem boxUnion_volume_pos (S : Finset (OpenBox q)) (hS : (boxUnion S).Nonempty) : 0 B.lower i.succ,fun i => B.upper i.succ⟩ def slices (S : Finset (OpenBox (q+1))) (x : ℝ) : Finset (OpenBox q) := by classical exact (S.filter (fun B => B.lower 0 {B.lower 0,B.upper 0} theorem lower_mem_endpoints (S : Finset (OpenBox (q+1))) (B : OpenBox (q+1)) (hB : B∈S) : B.lower 0∈endpoints S := by classical simp only [endpoints,Finset.mem_biUnion,Finset.mem_insert,Finset.mem_singleton] exact ⟨B,hB,Or.inl rfl⟩ theorem upper_mem_endpoints (S : Finset (OpenBox (q+1))) (B : OpenBox (q+1)) (hB : B∈S) : B.upper 0∈endpoints S := by classical simp only [endpoints,Finset.mem_biUnion,Finset.mem_insert,Finset.mem_singleton] exact ⟨B,hB,Or.inr rfl⟩ structure GoodWeight (q : ℕ) where f : (Fin q → ℝ) → ℝ continuous : Continuous f positive : ∀ x,0 (F.positive x).le theorem integral_pos (F : GoodWeight q) (S : Finset (OpenBox q)) (hS : (boxUnion S).Nonempty) : 0 < ∫ x in boxUnion S,F.f x := by apply (integral_pos_iff_support_of_nonneg (fun x => (F.positive x).le) (F.integrable S)).mpr have he : Function.support F.f=univ := by ext x; simp [Function.mem_support,(F.positive x).ne'] rw [he,Measure.restrict_apply_univ] exact boxUnion_volume_pos S hS def slice (F : GoodWeight (q+1)) (x : ℝ) : GoodWeight q := ⟨fun y => F.f (Fin.cons x y),F.continuous.comp (continuous_const.finCons continuous_id), fun point => F.positive (Fin.cons x point),F.bound,fun point => F.bounded (Fin.cons x point)⟩ theorem marginal_continuous (F : GoodWeight (q+1)) (S : Finset (OpenBox q)) : Continuous (fun x : ℝ => ∫ y in boxUnion S,F.f (Fin.cons x y)) := by apply continuous_of_dominated (bound := fun _ => F.bound) · intro x exact (F.slice x).continuous.aestronglyMeasurable · intro x exact Filter.Eventually.of_forall fun y => F.bounded _ · exact integrableOn_const (boxUnion_volume_finite S).ne · exact Filter.Eventually.of_forall fun y => F.continuous.comp (by fun_prop) end GoodWeight end end Contingency.Interpolation open Set MeasureTheory namespace Contingency.Interpolation noncomputable section variable {q : ℕ} def marginal (S : Finset (OpenBox (q+1))) (F : GoodWeight (q+1)) (x : ℝ) : ℝ := ∫ y in boxUnion (slices S x),F.f (Fin.cons x y) theorem marginal_nonneg (S : Finset (OpenBox (q+1))) (F : GoodWeight (q+1)) (x : ℝ) : 0 ≤ marginal S F x := (F.slice x).integral_nonneg _ theorem marginal_fubini (S : Finset (OpenBox (q+1))) (F : GoodWeight (q+1)) : Integrable (marginal S F) ∧ (∫ x,marginal S F x)=∫ z in boxUnion S,F.f z := by classical let e : ℝ × (Fin q → ℝ) ≃ᵐ (Fin (q+1) → ℝ) := (MeasurableEquiv.piFinSuccAbove (fun _ => ℝ) 0).symm have hp : MeasurePreserving e := (volume_preserving_piFinSuccAbove (fun _ : Fin (q+1) => ℝ) 0).symm _ have he (p : ℝ × (Fin q → ℝ)) : e p=Fin.cons p.1 p.2 := by simp [e,MeasurableEquiv.piFinSuccAbove_symm_apply,Fin.insertNthEquiv] let I := (boxUnion S).indicator F.f have hi : Integrable I := (F.integrable S).integrable_indicator (boxUnion_measurable S) have hpull : Integrable (fun p : ℝ × (Fin q → ℝ) => I (Fin.cons p.1 p.2)) (volume.prod volume) := by simpa only [Function.comp_def,he,Measure.volume_eq_prod] using (hp.integrable_comp_emb e.measurableEmbedding).mpr hi have hind (x : ℝ) : (fun y => I (Fin.cons x y))= (boxUnion (slices S x)).indicator (fun y => F.f (Fin.cons x y)) := by funext y by_cases hy : y∈boxUnion (slices S x) · simp only [I,Set.indicator_of_mem hy,Set.indicator_of_mem ((mem_slices S x y).mp hy)] · simp only [I,Set.indicator_of_notMem hy,Set.indicator_of_notMem (mt (mem_slices S x y).mpr hy)] have hm (x : ℝ) : (∫ y,I (Fin.cons x y))=marginal S F x := by rw [hind x,integral_indicator (boxUnion_measurable _)]; rfl refine ⟨?_,?_⟩ · simpa only [hm] using hpull.integral_prod_left · have hprod := integral_prod (fun p : ℝ × (Fin q → ℝ) => I (Fin.cons p.1 p.2)) hpull simp only [hm] at hprod rw [← hprod] have heq := hp.integral_comp' I simp only [he,Measure.volume_eq_prod] at heq rw [heq,integral_indicator (boxUnion_measurable S)] end end Contingency.Interpolation open Set namespace Contingency.Interpolation noncomputable section def nextEndpoint (E : Finset ℝ) (x : ℝ) : ℝ := if h : (E.filter (x < ·)).Nonempty then (E.filter (x < ·)).min' h else x theorem nextEndpoint_le (E : Finset ℝ) (x y : ℝ) (hy : y∈E) (hxy : x constructor <;> constructor <;> intro h <;> linarith theorem grid_covers (E : Finset ℝ) (x a b : ℝ) (ha : a∈E) (hb : b∈E) (hax : a ?_⟩ obtain ⟨hyq,heq⟩ := hq y hy have hcont : ContinuousAt Q y := by apply hmono.continuousAt_of_image_mem_nhds (isOpen_Ioo.mem_nhds hy) rw [himage] exact isOpen_Ioo.mem_nhds hyq refine ⟨heq,hyq,?_⟩ apply (hd _ hyq).of_local_left_inverse hcont (hp _ hyq).ne' filter_upwards [isOpen_Ioo.mem_nhds hy] with z hz exact (hq z hz).2 theorem positive_quantile (F : ℝ → ℝ) (a b : ℝ) (hab : a (hp x (Ioc_subset_Icc_self hx)).le) ⟨a,left_mem_Icc.mpr hab.le,hp a (left_mem_Icc.mpr hab.le)⟩ let C := fun x => (∫ t in a..x,F t)/M have hi : IntervalIntegrable F volume a b := hc.intervalIntegrable_of_Icc hab.le have hci : ContinuousOn (fun x => ∫ t in a..x,F t) (Icc a b) := by simpa only [uIcc_of_le hab.le] using intervalIntegral.continuousOn_primitive_interval' hi (left_mem_uIcc : a∈uIcc a b) have hC : ContinuousOn C (Icc a b) := hci.div_const M have hmono : StrictMonoOn C (Icc a b) := by intro x hx y hy hxy apply (div_lt_div_iff_of_pos_right hM).mpr have hxint : IntervalIntegrable F volume a x := hi.mono_set (by simp only [uIcc_of_le hab.le,uIcc_of_le hx.1]; exact Icc_subset_Icc le_rfl hx.2) have hyint : IntervalIntegrable F volume x y := hi.mono_set (by simp only [uIcc_of_le hab.le,uIcc_of_le hxy.le]; exact Icc_subset_Icc hx.1 hy.2) have he := intervalIntegral.integral_add_adjacent_intervals hxint hyint have hpos : 0<∫ t in x..y,F t := intervalIntegral.integral_pos hxy (hc.mono (Icc_subset_Icc hx.1 hy.2)) (fun z hz => (hp z ⟨hx.1.trans hz.1.le,hz.2.trans hy.2⟩).le) ⟨x,left_mem_Icc.mpr hxy.le,hp x hx⟩ linarith only [he,hpos] have hder (x) (hx : x∈Ioo a b) : HasDerivAt C (F x/M) x := by have hint : IntervalIntegrable F volume a x := hi.mono_set (by simp only [uIcc_of_le hab.le,uIcc_of_le hx.1.le]; exact Icc_subset_Icc le_rfl hx.2.le) have hfc : ContinuousAt F x := hc.continuousAt (Icc_mem_nhds hx.1 hx.2) apply HasDerivAt.div_const exact intervalIntegral.integral_hasDerivAt_right hint (ContinuousOn.stronglyMeasurableAtFilter isOpen_Ioo (hc.mono Ioo_subset_Icc_self) x hx) hfc have hCa : C a=0 := by simp [C] have hCb : C b=1 := by simp [C,M,hM.ne'] obtain ⟨Q,hqm,hqi,hqd⟩ := interval_inverse C (fun x => F x/M) a b hab hC hmono hder (fun x hx => div_pos (hp x (Ioo_subset_Icc_self hx)) hM) rw [hCa,hCb] at hqm hqi hqd refine ⟨hM,Q,hqm,hqi,fun y hy => ?_⟩ have hh := hqd y hy refine ⟨hh.2.1,?_⟩ simpa only [inv_div] using hh.2.2 theorem transport_amgm (M N F G α β : ℝ) (hM : 0 j < i), m j def totalMass (m : Fin n → ℝ) : ℝ := ∑ i,m i theorem prefix_nonneg (m : Fin n → ℝ) (hm : ∀ i,0 ≤ m i) (i : Fin n) : 0 ≤ prefixMass m i := Finset.sum_nonneg fun j _ => hm j theorem prefix_next_le (m : Fin n → ℝ) (hm : ∀ i,0 ≤ m i) (i j : Fin n) (hij : i k < i),m k := by rw [Finset.sum_insert (by simp)] simp only [prefixMass]; ring rw [he] apply Finset.sum_le_sum_of_subset_of_nonneg · intro k hk rcases Finset.mem_insert.mp hk with rfl|hk · exact Finset.mem_filter.mpr ⟨Finset.mem_univ _,hij⟩ · exact Finset.mem_filter.mpr ⟨Finset.mem_univ _,(Finset.mem_filter.mp hk).2.trans hij⟩ · intro k _ _; exact hm k theorem prefix_add_le_total (m : Fin n → ℝ) (hm : ∀ i,0 ≤ m i) (i : Fin n) : prefixMass m i+m i ≤ totalMass m := by classical have he : prefixMass m i+m i=∑ k ∈ insert i (Finset.univ.filter fun k => k < i),m k := by rw [Finset.sum_insert (by simp)] simp only [prefixMass]; ring rw [he] exact Finset.sum_le_sum_of_subset_of_nonneg (Finset.subset_univ _) (fun k _ _ => hm k) def probabilityPiece (m : Fin n → ℝ) (i : Fin n) : Set ℝ := Ioo (prefixMass m i/totalMass m) ((prefixMass m i+m i)/totalMass m) theorem probabilityPiece_subset (m : Fin n → ℝ) (hm : ∀ i,0 ≤ m i) (hM : 0 Disjoint (probabilityPiece m i) (probabilityPiece m j)) := by intro i j hij rcases lt_or_gt_of_ne hij with hij|hij · apply disjoint_left.mpr intro t ht1 ht2 have hh := div_le_div_of_nonneg_right (prefix_next_le m hm i j hij) hM.le exact not_lt_of_ge (ht1.2.le.trans hh) ht2.1 · apply disjoint_left.mpr intro t ht1 ht2 have hh := div_le_div_of_nonneg_right (prefix_next_le m hm j i hij) hM.le exact not_lt_of_ge (ht2.2.le.trans hh) ht1.1 theorem probabilityPieces_volume (m : Fin n → ℝ) (hm : ∀ i,0 ≤ m i) (hM : 0 measurableSet_Ioo)] simp only [tsum_fintype,probabilityPiece,Real.volume_Ioo] have he (i) : (prefixMass m i+m i)/totalMass m-prefixMass m i/totalMass m=m i/totalMass m := by ring simp only [he] rw [← ENNReal.ofReal_sum_of_nonneg (fun i _ => div_nonneg (hm i) hM.le),← Finset.sum_div] change ENNReal.ofReal (totalMass m / totalMass m) = 1 rw [div_self hM.ne', ENNReal.ofReal_one] end end Contingency.Interpolation end end OAI