math / data /lean /OAI /Combinatorics /EditApproximation /Refinement /ComputedChargedRandomSourceCost.lean
Download data/lean/OAI/Combinatorics/EditApproximation/Refinement/ComputedChargedRandomSourceCost.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.35 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/EditApproximation/Refinement/ComputedChargedRandomSourceCost.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Combinatorics/EditApproximation/Refinement/ComputedChargedRandomSourceCost.lean
-
curl -L -o ComputedChargedRandomSourceCost.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/EditApproximation/Refinement/ComputedChargedRandomSourceCost.lean
5.35 kB
| import OAI.Combinatorics.EditApproximation.Refinement.ComputedGlobalSourceCost | |
| import OAI.Combinatorics.EditApproximation.Geometry.ChargedRandomCost | |
| import OAI.Combinatorics.EditApproximation.Geometry.ChargedTerminalCost | |
| namespace OAI | |
| namespace EditApproximation | |
| section Cost | |
| variable {Ο Ξ± : Type*} [DecidableEq Ξ±] {M J R : β} [NeZero M] [NeZero R] | |
| (source target : List Ξ±) (N P H T S passes copies : β) | |
| (factor : β β β) (multiplier : β β β) (tau eta kappa delta : β) | |
| (group : β β β β PhysicalInternalNode M J β Fin R β | |
| CellGroupDraws M (inputSmallLog N) (inputSmallLog N ^ 80)) | |
| (integer : β β β β PhysicalInternalNode M J β Fin R β β β TargetInterval target.length β β) | |
| (initial : PhysicalEntry M J target.length β β) | |
| (readGroup : β β β β PhysicalInternalNode M J β Fin R β | |
| GroupScalarKey M (inputSmallLog N) (inputSmallLog N ^ 80) β FiniteQuery Ο) | |
| (readInteger : β β β β PhysicalInternalNode M J β Fin R β | |
| (β Γ TargetInterval target.length) β β β FiniteQuery Ο) | |
| (sourceAnswer : Ο β β) (weight : Ο β β) (bound : β) | |
| (hN : 0 < N) (hell : 200 β€ inputSmallLog N) (hM : M = (integerParameters N).M) | |
| (hA : β pass, factor pass β€ ((integerParameters N).initialFactor : β)) | |
| (hgroup : β pass copy node time key, (readGroup pass copy node time key).cost sourceAnswer weight β€ bound) | |
| (honline : β pass copy node time key range, | |
| (readInteger pass copy node time key range).cost sourceAnswer weight β€ bound) | |
| local notation "tableValue" => localRequestValue source target N P (inputSmallLog N) | |
| (40 * smallLogExponent N) H (inputSmallLog N ^ 80) T S copies factor multiplier | |
| tau eta kappa delta group integer initial | |
| include hN hell hM hA hgroup honline in | |
| theorem computed_chargedRandomGlobalQuery_source_cost | |
| (request : ChargedPhysicalRequest M J target.length passes copies T S) : | |
| (chargedRandomGlobalQuery source target N P (inputSmallLog N) (40 * smallLogExponent N) | |
| H (inputSmallLog N ^ 80) T S passes copies factor multiplier tau eta kappa delta | |
| readGroup readInteger initial request).cost | |
| (Sum.elim sourceAnswer (fun child => chargedRequestValue source target N P (inputSmallLog N) | |
| (40 * smallLogExponent N) H (inputSmallLog N ^ 80) T S passes copies factor multiplier | |
| tau eta kappa delta group integer initial child.val)) | |
| (Sum.elim weight (fun _ => 0)) β€ inputHeight N ^ 91 * bound := by | |
| cases request with | |
| | inl entry => exact Nat.zero_le _ | |
| | inr parent => | |
| by_cases hi : parent.val.index β€ T | |
| Β· unfold chargedRandomGlobalQuery | |
| dsimp only | |
| rw [ite_eq_left hi, FiniteQuery.mapKeys_cost] | |
| simp only [Function.comp_def, Sum.elim_inr] | |
| rw [FiniteQuery.cost_zero] | |
| exact Nat.zero_le _ | |
| Β· by_cases hb : parent.val.node.1.val < J | |
| Β· by_cases hs : (physicalSourceInterval source.length parent.val.node).hi - | |
| (physicalSourceInterval source.length parent.val.node).lo β€ 1 | |
| Β· unfold chargedRandomGlobalQuery | |
| dsimp only | |
| rw [ite_eq_right hi, ite_eq_left hb, ite_eq_left hs, FiniteQuery.mapKeys_cost] | |
| simp only [Function.comp_def, Sum.elim_inr] | |
| rw [FiniteQuery.cost_zero] | |
| exact Nat.zero_le _ | |
| Β· have hanswer : chargedRequestValue source target N P (inputSmallLog N) | |
| (40 * smallLogExponent N) H (inputSmallLog N ^ 80) T S passes copies factor multiplier | |
| tau eta kappa delta group integer initial = | |
| Sum.elim (fun entry => (initial entry : β)) (fun r => tableValue r.val) := by | |
| funext key | |
| cases key <;> rfl | |
| have hz : (fun _ : ChargedPhysicalRequest M J target.length passes copies T S => 0) = | |
| chargedTableWeight 0 (fun _ => 0) := by | |
| funext key | |
| cases key <;> rfl | |
| rw [hanswer] | |
| have hcost := chargedRandomGlobalQuery_refinement_cost source target N P (inputSmallLog N) | |
| (40 * smallLogExponent N) H (inputSmallLog N ^ 80) T S passes copies factor multiplier | |
| tau eta kappa delta readGroup readInteger initial sourceAnswer tableValue weight 0 (fun _ => 0) | |
| parent (by omega) hb hs | |
| simp only [β hz] at hcost | |
| rw [hcost] | |
| rw [β physicalRandomGlobalQuery_refinement_cost source target N P (inputSmallLog N) | |
| (40 * smallLogExponent N) H (inputSmallLog N ^ 80) T S copies factor multiplier | |
| tau eta kappa delta readGroup readInteger initial sourceAnswer tableValue weight (fun _ => 0) | |
| parent.val (by omega) hb hs] | |
| apply computed_physicalRandomGlobalQuery_source_cost source target N P H T S copies | |
| hN hell hM factor multiplier tau eta kappa delta hA readGroup readInteger initial | |
| sourceAnswer tableValue weight bound hgroup honline | |
| intro pass copy node q | |
| rw [localRequestValue_initial] | |
| exact stageInitial_nonneg_all_seeds _ _ _ _ _ _ _ _ | |
| Β· unfold chargedRandomGlobalQuery | |
| dsimp only | |
| rw [ite_eq_right hi, ite_eq_right hb, FiniteQuery.mapKeys_cost] | |
| simp only [Function.comp_def, Sum.elim_inr] | |
| rw [FiniteQuery.cost_zero] | |
| exact Nat.zero_le _ | |
| end Cost | |
| end EditApproximation | |
| end OAI | |