Download data/lean/OAI/NumberTheory/Ostmann/Arithmetic/BulkFrequencyFactor.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.58 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/Ostmann/Arithmetic/BulkFrequencyFactor.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/NumberTheory/Ostmann/Arithmetic/BulkFrequencyFactor.lean
-
curl -L -o BulkFrequencyFactor.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/Ostmann/Arithmetic/BulkFrequencyFactor.lean
4.58 kB
Lean 4 Β· 5
declarations statementsfull
noncomputable def movingFrequencyCore {Ο : Type*} (value : Ο β β)
(F : Bool β {n : β} β MovingSlotData Ο n β β€ β β)
(E : Bool β {n : β} β MovingSlotData Ο n β β€ β β€ β β€ β β)
{n : β} (T : Bool β MovingSlotData Ο n) (R x y : β€) : β := body Β· 3 lines
if β b, movingFrequencyGate value R (T b) x y then
movingDataWeight (F false) (E false) (T false) *
conj (movingDataWeight (F true) (E true) (T true)) else 022The only nonperiodic part of this factor consists of the explicit regular-prime coincidence tests. The remaining node bounds are independent of the numerical bulk values.
theorem movingFrequencyPairFactor_core {Ο : Type*} (value : Ο β β)
(outside : List β)
(F : Bool β {n : β} β MovingSlotData Ο n β β€ β β)
(E : Bool β {n : β} β MovingSlotData Ο n β β€ β β€ β β€ β β)
{n : β} (T : Bool β MovingSlotData Ο n) (nodes : Bool β List MovingFormulaNode)
(R x y : β€) :
movingFrequencyPairFactor value outside F E T nodes R x y =
(if β b, movingRegularOutsidePairwise value outside (T b) β§
(β f β nodes b, f.guard.frequencyBounds) then (1 : β) else 0) *
movingFrequencyCore value F E T R x y := by proof Β· 14 lines
have he : movingFrequencyPairSupport value outside T nodes R x y β
(β b, movingRegularOutsidePairwise value outside (T b) β§
(β f β nodes b, f.guard.frequencyBounds)) β§
(β b, movingFrequencyGate value R (T b) x y) := by
simp only [movingFrequencyPairSupport, Bool.forall_bool]
tauto
unfold movingFrequencyPairFactor movingFrequencyCore
rw [he]
by_cases hs : β b, movingRegularOutsidePairwise value outside (T b) β§
(β f β nodes b, f.guard.frequencyBounds)
Β· by_cases hc : β b, movingFrequencyGate value R (T b) x y
Β· rw [ite_eq_left β¨hs, hcβ©, ite_eq_left hs, ite_eq_left hc, one_mul]
Β· rw [ite_eq_right (fun h => hc h.2), ite_eq_left hs, ite_eq_right hc, mul_zero]
Β· rw [ite_eq_right (fun h => hs h.1), ite_eq_right hs, zero_mul]49Unlike the removed coincidence tests, the actual frequency core is constant on the joint bulk residue cells.
theorem movingFrequencyCore_values_modEq {Ο : Type*} (v w : Ο β β)
(F : Bool β {n : β} β MovingSlotData Ο n β β€ β β)
(E : Bool β {n : β} β MovingSlotData Ο n β β€ β β€ β β€ β β)
{n : β} (T : Bool β MovingSlotData Ο n) (R : β€)
(hf : β b, (T b).Frequencies (Β· β 0))
(hcomp : β b, (T b).CompensationAgreement v w)
(hR : β b, (T b).frequencyProduct β£ R)
(hv : β i, (v i : β€) β‘ (w i : β€) [ZMOD R ^ (n + 1)])
(XL XR YL YR : β€) (hL : XL β‘ YL [ZMOD R ^ (n + 1)])
(hRight : XR β‘ YR [ZMOD R ^ (n + 1)]) :
movingFrequencyCore v F E T R XL XR = movingFrequencyCore w F E T R YL YR := by proof Β· 5 lines
have he : (β b, movingFrequencyGate v R (T b) XL XR) β
(β b, movingFrequencyGate w R (T b) YL YR) :=
forall_congr' fun b => movingFrequencyGate_values_modEq v w R (T b)
(hf b) (hcomp b) (hR b) hv XL XR YL YR hL hRight
simp only [movingFrequencyCore, he]def MovingSlotData.FrequencyBounds {Ο : Type*} (childBound : β β β) :
{n : β} β MovingSlotData Ο n β Prop body Β· 5 lines
| _, .leaf _ _ => True
| n + 1, .node _ _ _ _ left right =>
left.frequency.natAbs β€ childBound (n + 1) β§
right.frequency.natAbs β€ childBound (n + 1) β§
left.FrequencyBounds childBound β§ right.FrequencyBounds childBoundtheorem MovingSlotData.formulaNodes_frequencyBounds {Ο : Type*} (value : Ο β β)
(hv : β i, value i β 0) (childBound pivotBound : β β β)
{n : β} (T : MovingSlotData Ο n) (hf : T.Frequencies (Β· β 0))
(L R : HistoryFormula Bool) :
(β f β T.formulaNodes value hv childBound pivotBound hf L R,
f.guard.frequencyBounds) β T.FrequencyBounds childBound := by proof Β· 7 lines
induction T generalizing L R with
| leaf => simp [formulaNodes, FrequencyBounds]
| node s CL CR u left right ihL ihR =>
simp only [formulaNodes, List.mem_cons, List.mem_append,
or_imp, forall_and, forall_eq, ihL, ihR, FrequencyBounds]
change ((_ β§ _) β§ _ β§ _) β (_ β§ _ β§ _ β§ _)
tautoOutline