Buckets:
| import OAI.Analysis.Nonexpansive.PredictionOutputs | |
| namespace OAI | |
| /-! | |
| # Prediction families from a finite constructed frontier | |
| The evaluator is the actual evaluator of an already constructed | |
| finite frontier. Its uniform sensitivity is a proved helper premise. No future | |
| infinite tree is needed to form the coefficient family or its detector set. | |
| -/ | |
| noncomputable section | |
| open Set Filter | |
| open scoped BigOperators Topology | |
| namespace ReflexiveFixedPoints.Prediction.Prefix | |
| universe u | |
| variable {X : Type u} [NormedAddCommGroup X] [NormedSpace ℝ X] | |
| variable {P I : Type*} [Fintype P] [DecidableEq P] [Fintype I] | |
| variable {K : Set X} | |
| variable (hconvex : Convex ℝ K) | |
| variable (maps : P → K → K) (evaluate : (P → K) → K) | |
| variable (parent : I → P) (y : I → K) | |
| /-- The finite frontier's residual parent input, before any current map is chosen. -/ | |
| def residualInput (b : K) (theta : Prediction.coefficientSet parent) (p : P) : K := | |
| ⟨Prediction.residualPoint parent (fun i => (y i : X)) (b : X) theta.val p, | |
| Prediction.residualPoint_mem parent hconvex (fun i => (y i : X)) | |
| (fun i => (y i).property) (b : X) b.property theta.property p⟩ | |
| @[simp] theorem residualInput_val (b : K) (theta : Prediction.coefficientSet parent) | |
| (p : P) : | |
| (residualInput hconvex parent y b theta p : X) = | |
| Prediction.residualPoint parent (fun i => (y i : X)) (b : X) theta.val p := rfl | |
| /-- The actual prediction evaluates the current frontier maps on its residual inputs. -/ | |
| def evaluatedPrediction (b : K) (theta : Prediction.coefficientSet parent) : K := | |
| evaluate (fun p => maps p (residualInput hconvex parent y b theta p)) | |
| /-- Actual norm sensitivity of the finite evaluator gives a uniform coefficient estimate. -/ | |
| theorem evaluatedPrediction_norm_sub_le | |
| (hmaps : ∀ p, LipschitzWith 1 (maps p)) | |
| (hevaluate : ∀ H H' (ε : ℝ), | |
| (∀ p, ‖(H p : X) - (H' p : X)‖ ≤ ε) → | |
| ‖(evaluate H : X) - (evaluate H' : X)‖ ≤ ε) | |
| (hdiam : ∀ a b : K, ‖(a : X) - (b : X)‖ ≤ 1) | |
| (b : K) (theta eta : Prediction.coefficientSet parent) : | |
| ‖(evaluatedPrediction hconvex maps evaluate parent y b theta : X) - | |
| evaluatedPrediction hconvex maps evaluate parent y b eta‖ ≤ | |
| ∑ i, |theta.val i - eta.val i| := by | |
| unfold evaluatedPrediction | |
| apply hevaluate | |
| intro p | |
| have hm : | |
| ‖(maps p (residualInput hconvex parent y b theta p) : X) - | |
| maps p (residualInput hconvex parent y b eta p)‖ ≤ | |
| ‖(residualInput hconvex parent y b theta p : X) - | |
| residualInput hconvex parent y b eta p‖ := by | |
| simpa only [Subtype.dist_eq, dist_eq_norm, NNReal.coe_one, one_mul] | |
| using (hmaps p).dist_le_mul | |
| (residualInput hconvex parent y b theta p) | |
| (residualInput hconvex parent y b eta p) | |
| refine hm.trans ?_ | |
| exact Prediction.residualPoint_norm_sub_le parent | |
| (fun a ha b hb => hdiam ⟨a, ha⟩ ⟨b, hb⟩) | |
| (fun i => (y i : X)) (fun i => (y i).property) | |
| (b : X) b.property theta.val eta.val p | |
| /-- Compactness chooses limits of the already evaluated finite-frontier outputs. -/ | |
| def predictionWeakLimit (hK : WeaklyCompact K) (b : ℕ → K) (U : Ultrafilter ℕ) | |
| (theta : Prediction.coefficientSet parent) : K := | |
| Prediction.chosenWeakLimit hK | |
| (fun j => evaluatedPrediction hconvex maps evaluate parent y (b j) theta) U | |
| theorem tendsto_predictionWeakLimit (hK : WeaklyCompact K) (b : ℕ → K) | |
| (U : Ultrafilter ℕ) (theta : Prediction.coefficientSet parent) : | |
| Tendsto (fun j => toWeakSpace ℝ X | |
| (evaluatedPrediction hconvex maps evaluate parent y (b j) theta : X)) | |
| (U : Filter ℕ) | |
| (𝓝 (toWeakSpace ℝ X | |
| (predictionWeakLimit hconvex maps evaluate parent y hK b U theta : X))) := | |
| Prediction.tendsto_chosenWeakLimit hK | |
| (fun j => evaluatedPrediction hconvex maps evaluate parent y (b j) theta) U | |
| /-- The selected weak limits preserve the finite coefficient estimate. -/ | |
| theorem predictionWeakLimit_norm_sub_le | |
| (hmaps : ∀ p, LipschitzWith 1 (maps p)) | |
| (hevaluate : ∀ H H' (ε : ℝ), | |
| (∀ p, ‖(H p : X) - (H' p : X)‖ ≤ ε) → | |
| ‖(evaluate H : X) - (evaluate H' : X)‖ ≤ ε) | |
| (hK : WeaklyCompact K) | |
| (hdiam : ∀ a b : K, ‖(a : X) - (b : X)‖ ≤ 1) | |
| (b : ℕ → K) (U : Ultrafilter ℕ) (theta eta : Prediction.coefficientSet parent) : | |
| ‖(predictionWeakLimit hconvex maps evaluate parent y hK b U theta : X) - | |
| predictionWeakLimit hconvex maps evaluate parent y hK b U eta‖ ≤ | |
| ∑ i, |theta.val i - eta.val i| := | |
| Prediction.norm_sub_le_of_weak_tendsto | |
| (tendsto_predictionWeakLimit hconvex maps evaluate parent y hK b U theta) | |
| (tendsto_predictionWeakLimit hconvex maps evaluate parent y hK b U eta) | |
| (fun j => evaluatedPrediction_norm_sub_le hconvex maps evaluate parent y | |
| hmaps hevaluate hdiam (b j) theta eta) | |
| /-- Continuity of the chosen limit family in the original ambient norm. -/ | |
| theorem continuous_predictionWeakLimit_val | |
| (hmaps : ∀ p, LipschitzWith 1 (maps p)) | |
| (hevaluate : ∀ H H' (ε : ℝ), | |
| (∀ p, ‖(H p : X) - (H' p : X)‖ ≤ ε) → | |
| ‖(evaluate H : X) - (evaluate H' : X)‖ ≤ ε) | |
| (hK : WeaklyCompact K) | |
| (hdiam : ∀ a b : K, ‖(a : X) - (b : X)‖ ≤ 1) | |
| (b : ℕ → K) (U : Ultrafilter ℕ) : | |
| Continuous (fun theta => | |
| (predictionWeakLimit hconvex maps evaluate parent y hK b U theta : X)) := | |
| Prediction.continuous_of_coefficient_bound _ | |
| (predictionWeakLimit_norm_sub_le hconvex maps evaluate parent y | |
| hmaps hevaluate hK hdiam b U) | |
| /-- Continuity also holds for the literal norm subtype. -/ | |
| theorem continuous_predictionWeakLimit | |
| (hmaps : ∀ p, LipschitzWith 1 (maps p)) | |
| (hevaluate : ∀ H H' (ε : ℝ), | |
| (∀ p, ‖(H p : X) - (H' p : X)‖ ≤ ε) → | |
| ‖(evaluate H : X) - (evaluate H' : X)‖ ≤ ε) | |
| (hK : WeaklyCompact K) | |
| (hdiam : ∀ a b : K, ‖(a : X) - (b : X)‖ ≤ 1) | |
| (b : ℕ → K) (U : Ultrafilter ℕ) : | |
| Continuous (predictionWeakLimit hconvex maps evaluate parent y hK b U) := | |
| (continuous_predictionWeakLimit_val hconvex maps evaluate parent y | |
| hmaps hevaluate hK hdiam b U).subtype_mk | |
| (fun theta => (predictionWeakLimit hconvex maps evaluate parent y hK b U theta).property) | |
| /-- The finite-prefix prediction image is norm compact. -/ | |
| theorem isCompact_predictionWeakLimit_range | |
| (hmaps : ∀ p, LipschitzWith 1 (maps p)) | |
| (hevaluate : ∀ H H' (ε : ℝ), | |
| (∀ p, ‖(H p : X) - (H' p : X)‖ ≤ ε) → | |
| ‖(evaluate H : X) - (evaluate H' : X)‖ ≤ ε) | |
| (hK : WeaklyCompact K) | |
| (hdiam : ∀ a b : K, ‖(a : X) - (b : X)‖ ≤ 1) | |
| (b : ℕ → K) (U : Ultrafilter ℕ) : | |
| IsCompact (Set.range (fun theta => | |
| (predictionWeakLimit hconvex maps evaluate parent y hK b U theta : X))) := by | |
| let : CompactSpace (Prediction.coefficientSet parent) := | |
| isCompact_iff_compactSpace.mp (Prediction.isCompact_coefficientSet parent) | |
| exact isCompact_range (continuous_predictionWeakLimit_val hconvex maps evaluate parent y | |
| hmaps hevaluate hK hdiam b U) | |
| /-- The prescribed finite test prefix and all possible evaluated prediction limits. -/ | |
| def detectorSet (hK : WeaklyCompact K) (b : ℕ → K) (U : Ultrafilter ℕ) | |
| (densePoints : ℕ → K) (densePrefixLength : ℕ) : Set X := | |
| Set.range (fun i : Fin densePrefixLength => (densePoints i.val : X)) ∪ | |
| Set.range (fun theta => | |
| (predictionWeakLimit hconvex maps evaluate parent y hK b U theta : X)) | |
| /-- Nonemptiness follows from the zero parameter even if the test prefix is empty. -/ | |
| theorem detectorSet_nonempty (hK : WeaklyCompact K) (b : ℕ → K) | |
| (U : Ultrafilter ℕ) (densePoints : ℕ → K) (densePrefixLength : ℕ) : | |
| (detectorSet hconvex maps evaluate parent y hK b U densePoints densePrefixLength).Nonempty := by | |
| let theta : Prediction.coefficientSet parent := | |
| ⟨0, Prediction.zero_mem_coefficientSet parent⟩ | |
| exact ⟨(predictionWeakLimit hconvex maps evaluate parent y hK b U theta : X), | |
| Or.inr ⟨theta, rfl⟩⟩ | |
| theorem detectorSet_subset (hK : WeaklyCompact K) (b : ℕ → K) | |
| (U : Ultrafilter ℕ) (densePoints : ℕ → K) (densePrefixLength : ℕ) : | |
| detectorSet hconvex maps evaluate parent y hK b U densePoints densePrefixLength ⊆ K := by | |
| intro x hx | |
| rcases hx with ⟨i, rfl⟩ | ⟨theta, rfl⟩ | |
| · exact (densePoints i.val).property | |
| · exact (predictionWeakLimit hconvex maps evaluate parent y hK b U theta).property | |
| theorem mem_detectorSet_prefix (hK : WeaklyCompact K) (b : ℕ → K) | |
| (U : Ultrafilter ℕ) (densePoints : ℕ → K) (densePrefixLength : ℕ) | |
| (i : Fin densePrefixLength) : | |
| (densePoints i.val : X) ∈ | |
| detectorSet hconvex maps evaluate parent y hK b U densePoints densePrefixLength := | |
| Or.inl ⟨i, rfl⟩ | |
| theorem mem_detectorSet_predictionWeakLimit (hK : WeaklyCompact K) (b : ℕ → K) | |
| (U : Ultrafilter ℕ) (densePoints : ℕ → K) (densePrefixLength : ℕ) | |
| (theta : Prediction.coefficientSet parent) : | |
| (predictionWeakLimit hconvex maps evaluate parent y hK b U theta : X) ∈ | |
| detectorSet hconvex maps evaluate parent y hK b U densePoints densePrefixLength := | |
| Or.inr ⟨theta, rfl⟩ | |
| /-- Compactness in the original norm topology supplies exactly the compact-detector input. -/ | |
| theorem isCompact_detectorSet | |
| (hmaps : ∀ p, LipschitzWith 1 (maps p)) | |
| (hevaluate : ∀ H H' (ε : ℝ), | |
| (∀ p, ‖(H p : X) - (H' p : X)‖ ≤ ε) → | |
| ‖(evaluate H : X) - (evaluate H' : X)‖ ≤ ε) | |
| (hK : WeaklyCompact K) | |
| (hdiam : ∀ a b : K, ‖(a : X) - (b : X)‖ ≤ 1) | |
| (b : ℕ → K) (U : Ultrafilter ℕ) | |
| (densePoints : ℕ → K) (densePrefixLength : ℕ) : | |
| IsCompact (detectorSet hconvex maps evaluate parent y hK b U densePoints densePrefixLength) := | |
| (Set.finite_range (fun i : Fin densePrefixLength => (densePoints i.val : X))).isCompact.union | |
| (isCompact_predictionWeakLimit_range hconvex maps evaluate parent y | |
| hmaps hevaluate hK hdiam b U) | |
| /-- An exact evaluator correspondence preserves every actual prediction. -/ | |
| theorem evaluatedPrediction_congr_evaluate {evaluate' : (P → K) → K} | |
| (heq : ∀ H, evaluate H = evaluate' H) | |
| (b : K) (theta : Prediction.coefficientSet parent) : | |
| evaluatedPrediction hconvex maps evaluate parent y b theta = | |
| evaluatedPrediction hconvex maps evaluate' parent y b theta := | |
| heq _ | |
| /-- The chosen weak limits are preserved by equality of the actual evaluated sequences. -/ | |
| theorem predictionWeakLimit_congr_evaluate {evaluate' : (P → K) → K} | |
| (heq : ∀ H, evaluate H = evaluate' H) | |
| (hK : WeaklyCompact K) (b : ℕ → K) (U : Ultrafilter ℕ) | |
| (theta : Prediction.coefficientSet parent) : | |
| predictionWeakLimit hconvex maps evaluate parent y hK b U theta = | |
| predictionWeakLimit hconvex maps evaluate' parent y hK b U theta := by | |
| unfold predictionWeakLimit | |
| apply congrArg (fun q : ℕ → K => Prediction.chosenWeakLimit hK q U) | |
| funext j | |
| exact evaluatedPrediction_congr_evaluate hconvex maps evaluate parent y heq (b j) theta | |
| end ReflexiveFixedPoints.Prediction.Prefix | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 11.2 kB
- Xet hash:
- afb744a1dca88f9d55e0682b60577ad8be0632e4469e776eb047622a72aa036b
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.