Download data/lean/OAI/NumberTheory/TwoPoint/Bounds/ActualCodeAssignments.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.52 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/TwoPoint/Bounds/ActualCodeAssignments.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/NumberTheory/TwoPoint/Bounds/ActualCodeAssignments.lean
-
curl -L -o ActualCodeAssignments.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/TwoPoint/Bounds/ActualCodeAssignments.lean
4.52 kB
| import OAI.NumberTheory.TwoPoint.Bounds.ActualSlotClasses | |
| import OAI.NumberTheory.TwoPoint.Bounds.PositiveWordProbability | |
| namespace OAI | |
| /-! Actual code assignments preserve prime pools and the distinct-prime weight. -/ | |
| namespace TwoPointCorrelations | |
| open Finset | |
| open scoped Classical | |
| variable {R : β} | |
| lemma actualSlotPrime_mem_tuplePool (w : Fin R β SignedStep) (P : Finset β) | |
| (hP : β i, (w i).tuple.primeFactors β P) (s : ActualPrimeSlot w) | |
| (hs : actualSlotKind w s = false) : actualSlotPrime w s β P := by | |
| rcases s with β¨i, p | pβ© | |
| Β· exact hP i p.property | |
| Β· cases hs | |
| lemma actualSlotPrime_mem_paddingPool (w : Fin R β SignedStep) (Q : Finset β) | |
| (hQ : β i, (w i).padding.primeFactors β Q) (s : ActualPrimeSlot w) | |
| (hs : actualSlotKind w s = true) : actualSlotPrime w s β Q := by | |
| rcases s with β¨i, p | pβ© | |
| Β· cases hs | |
| Β· exact hQ i p.property | |
| lemma actualPrimeSlotData_prime_image (w : Fin R β SignedStep) : | |
| univ.image (actualPrimeSlotData w).prime = univ.image (actualSlotPrime w) := by | |
| ext p | |
| constructor | |
| Β· rintro hp | |
| obtain β¨i, _, rflβ© := mem_image.mp hp | |
| exact mem_image.mpr β¨(actualPrimeSlotEquiv w).symm i, mem_univ _, rflβ© | |
| Β· rintro hp | |
| obtain β¨s, _, rflβ© := mem_image.mp hp | |
| refine mem_image.mpr β¨actualPrimeSlotEquiv w s, mem_univ _, ?_β© | |
| change actualSlotPrime w ((actualPrimeSlotEquiv w).symm (actualPrimeSlotEquiv w s)) = _ | |
| rw [Equiv.symm_apply_apply] | |
| lemma actualPrimeSlot_support (w : Fin R β SignedStep) | |
| (ht : β i, (w i).tuple β 0) (hq : β i, (w i).padding β 0) : | |
| wordDivisorPrimeSupport (List.ofFn w) = univ.image (actualSlotPrime w) := by | |
| ext p | |
| simp only [wordDivisorPrimeSupport, mem_biUnion, List.mem_toFinset, List.mem_ofFn] | |
| constructor | |
| Β· rintro β¨a, β¨i, rflβ©, hpβ© | |
| rw [Nat.primeFactors_mul (hq i) (ht i), mem_union] at hp | |
| rcases hp with hp | hp | |
| Β· exact mem_image.mpr β¨β¨i, Sum.inr β¨p, hpβ©β©, mem_univ _, rflβ© | |
| Β· exact mem_image.mpr β¨β¨i, Sum.inl β¨p, hpβ©β©, mem_univ _, rflβ© | |
| Β· rintro hp | |
| obtain β¨β¨i, p | pβ©, _, rflβ© := mem_image.mp hp | |
| Β· refine β¨w i, β¨i, rflβ©, ?_β© | |
| rw [Nat.primeFactors_mul (hq i) (ht i), mem_union] | |
| exact Or.inr p.property | |
| Β· refine β¨w i, β¨i, rflβ©, ?_β© | |
| rw [Nat.primeFactors_mul (hq i) (ht i), mem_union] | |
| exact Or.inl p.property | |
| /-- The encoded assignment pays exactly one reciprocal per distinct prime. -/ | |
| theorem actual_code_reciprocal_weight (w : Fin R β SignedStep) | |
| (ht : β i, (w i).tuple β 0) (hq : β i, (w i).padding β 0) : | |
| (β z : (actualPrimeSlotData w).code.usedClasses, | |
| ((actualPrimeSlotData w).prime z.val : β)β»ΒΉ) = | |
| β p β wordDivisorPrimeSupport (List.ofFn w), (p : β)β»ΒΉ := by | |
| rw [actualPrimeSlot_support w ht hq, β actualPrimeSlotData_prime_image] | |
| rw [β PrimeSlotData.code_value_image, prod_image] | |
| exact fun z _ t _ h => (actualPrimeSlotData w).code_value_injective h | |
| /-- Actual tuple and padding classes inhabit their separate numerical pools. -/ | |
| theorem actual_code_pool_assignments (w : Fin R β SignedStep) (P Q : Finset β) | |
| (hP : β i, (w i).tuple.primeFactors β P) | |
| (hQ : β i, (w i).padding.primeFactors β Q) : | |
| β a : (actualPrimeSlotData w).code.tupleClasses β P, | |
| β b : {z : (actualPrimeSlotData w).code.usedClasses // | |
| z β (actualPrimeSlotData w).code.tupleClasses} β Q, | |
| joinCoordinates (actualPrimeSlotData w).code.tupleClasses | |
| (fun z => (a z).val) (fun z => (b z).val) = | |
| fun z => (actualPrimeSlotData w).prime z.val := by | |
| let c := (actualPrimeSlotData w).code | |
| have htuple (z : c.tupleClasses) : (actualPrimeSlotData w).prime z.val.val β P := by | |
| apply actualSlotPrime_mem_tuplePool w P hP | |
| ((actualPrimeSlotEquiv w).symm z.val.val) | |
| exact (mem_filter.mp z.property).2 | |
| have hpadding (z : {z : c.usedClasses // z β c.tupleClasses}) : | |
| (actualPrimeSlotData w).prime z.val.val β Q := by | |
| apply actualSlotPrime_mem_paddingPool w Q hQ | |
| ((actualPrimeSlotEquiv w).symm z.val.val) | |
| have hn : Β¬c.2.2.2 z.val.val = false := by | |
| intro hz | |
| exact z.property (mem_filter.mpr β¨mem_univ _, hzβ©) | |
| change c.2.2.2 z.val.val = true | |
| cases he : c.2.2.2 z.val.val <;> simp_all | |
| refine β¨(fun z => β¨_, htuple zβ©), (fun z => β¨_, hpadding zβ©), ?_β© | |
| funext z | |
| dsimp only [joinCoordinates] | |
| split_ifs <;> rfl | |
| end TwoPointCorrelations | |
| end OAI | |