Download data/lean/OAI/NumberTheory/PiExponent/Approximation/DeterminantContradiction.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 8.9 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/PiExponent/Approximation/DeterminantContradiction.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/NumberTheory/PiExponent/Approximation/DeterminantContradiction.lean
-
curl -L -o DeterminantContradiction.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/PiExponent/Approximation/DeterminantContradiction.lean
8.9 kB
| import Mathlib | |
| import OAI.NumberTheory.PiExponent.Approximation.AdmissibleParameters | |
| import OAI.NumberTheory.PiExponent.Approximation.Comparison | |
| import OAI.NumberTheory.PiExponent.Approximation.MatrixArithmetic | |
| import OAI.NumberTheory.PiExponent.Approximation.MatrixCounting | |
| import OAI.NumberTheory.PiExponent.Statement | |
| namespace OAI | |
| open Filter | |
| open scoped Topology | |
| namespace PiExponent.DeterminantContradiction | |
| noncomputable def collisionConstant : β := Real.log 2 / 4 | |
| theorem collisionConstant_pos : 0 < collisionConstant := by | |
| unfold collisionConstant | |
| exact div_pos (Real.log_pos (by norm_num)) (by norm_num) | |
| abbrev FixedData (nu : β) := AdmissibleParameters nu Arithmetic.lcmConstant collisionConstant | |
| noncomputable def finiteNumerators {nu : β} (d : FixedData nu) : Fin d.m β β€ := | |
| fun i => d.p i.val | |
| noncomputable def finiteDenominators {nu : β} (d : FixedData nu) : Fin d.m β β := | |
| fun i => d.q i.val | |
| theorem finiteDenominators_two_le {nu : β} (d : FixedData nu) (i : Fin d.m) : | |
| 2 β€ finiteDenominators d i := (d.approximations i.val).1 | |
| theorem logWeights_eq {nu : β} (d : FixedData nu) (i : Fin d.m) : | |
| MatrixArithmetic.logWeights (finiteDenominators d) i = d.x (i.val + 1) := | |
| (d.x_log i.val).symm | |
| abbrev Row {nu : β} (d : FixedData nu) (H : β) := | |
| InterpolationMatrix.Row d.K d.v0 d.base.theta | |
| (MatrixArithmetic.logWeights (finiteDenominators d)) H | |
| abbrev Column {nu : β} (d : FixedData nu) (H : β) := | |
| InterpolationMatrix.Column d.w0 (MatrixArithmetic.logWeights (finiteDenominators d)) H | |
| noncomputable def actualMatrix {nu : β} (d : FixedData nu) (H : β) : | |
| Matrix (Row d H) (Column d H) β := | |
| InterpolationMatrix.truncatedLogMatrix d.K d.w0 d.v0 d.base.theta | |
| (MatrixArithmetic.logWeights (finiteDenominators d)) H | |
| (MatrixArithmetic.rationalCenters (finiteNumerators d) (finiteDenominators d)) | |
| (MatrixArithmetic.truncationOrders (finiteDenominators d) d.F0 d.v0) | |
| noncomputable def actualMinor {nu : β} (d : FixedData nu) (H : β) | |
| (selection : Row d H β Column d H) : Matrix (Row d H) (Row d H) β := | |
| MatrixArithmetic.selectedMinor d.K d.w0 d.v0 d.base.theta d.F0 H | |
| (finiteNumerators d) (finiteDenominators d) selection | |
| noncomputable def actualMean {nu : β} (d : FixedData nu) (H : β) : β := | |
| MatrixArithmetic.meanRowWeight d.K d.v0 d.base.theta (finiteDenominators d) H | |
| noncomputable def actualRowCount {nu : β} (d : FixedData nu) (H : β) : β := | |
| Fintype.card (Row d H) | |
| noncomputable def lowIndexCount {nu : β} (d : FixedData nu) (H : β) : β := | |
| (realWeightedSimplex (MatrixArithmetic.logWeights (finiteDenominators d)) | |
| ((d.base.A : β) * H)).card | |
| noncomputable def collisionRate {nu : β} (d : FixedData nu) (H : β) : β := | |
| collisionConstant * d.base.eta ^ 2 * (actualRowCount d H : β) / | |
| (H * (lowIndexCount d H : β)) | |
| noncomputable def collisionLimit {nu : β} (d : FixedData nu) : β := | |
| collisionConstant * | |
| (d.base.eta ^ 2 * (d.K : β) * (d.base.theta : β) ^ d.m / | |
| (((d.m : β) + 1) * (d.v0 : β) * (d.base.A : β) ^ d.m)) | |
| theorem actual_minor_arithmetic_lower_bound {nu : β} (d : FixedData nu) | |
| (H : β) (hH : 0 < H) (selection : Row d H β Column d H) | |
| (hdet : (actualMinor d H selection).det β 0) : | |
| -(1 - actualMean d H) - d.arithmeticError β€ | |
| Real.log β(actualMinor d H selection).detβ / | |
| ((actualRowCount d H : β) * H) := by | |
| have hh := MatrixArithmetic.selectedMinor_arithmetic_lower_bound | |
| (finiteNumerators d) (finiteDenominators d) (finiteDenominators_two_le d) | |
| (Nat.zero_lt_of_lt d.K_pos) d.w0_pos d.v0_pos d.base.theta_pos d.F0_pos.le hH | |
| d.wstar_pos (fun i => by rw [logWeights_eq]; exact d.wstar_lower i) selection hdet | |
| simpa only [actualMinor, actualMean, actualRowCount, | |
| AdmissibleParameters.arithmeticError, logWeights_eq] using hh | |
| theorem actualMean_bounds {nu : β} (d : FixedData nu) (H : β) (hH : 0 < H) : | |
| 0 β€ actualMean d H β§ actualMean d H β€ (d.base.theta : β) := by | |
| exact β¨MatrixArithmetic.meanRowWeight_nonneg _ _ _ _ hH.le, | |
| MatrixArithmetic.meanRowWeight_le_theta (finiteDenominators d) | |
| (finiteDenominators_two_le d) (Nat.zero_lt_of_lt d.K_pos) | |
| d.v0_pos d.base.theta_pos hHβ© | |
| def GlobalInterpolationStatement : Prop := | |
| β nu : β, 2 < nu β β d : FixedData nu, | |
| β L : β, β H : β, L β€ H β§ Function.Surjective (actualMatrix d H).mulVecLin | |
| def AnalyticAggregateStatement : Prop := | |
| β nu : β, 2 < nu β β d : FixedData nu, | |
| β error : β β β, Tendsto error atTop (π 0) β§ | |
| βαΆ H : β in atTop, β selection : Row d H β Column d H, | |
| (actualMinor d H selection).det β 0 β | |
| Real.log β(actualMinor d H selection).detβ / ((actualRowCount d H : β) * H) β€ | |
| d.analyticError + error H + | |
| max (-collisionRate d H) | |
| (-nu * ((d.base.A : β) * (1 - d.base.eta) - actualMean d H)) | |
| theorem tendsto_collisionRate {nu : β} (d : FixedData nu) : | |
| Tendsto (collisionRate d) atTop (π (collisionLimit d)) := by | |
| have hv : 0 < d.v0 := by exact_mod_cast d.v0_pos | |
| have ht : 0 < d.base.theta := by exact_mod_cast d.base.theta_pos | |
| have hA : 0 < d.base.A := by exact_mod_cast d.base.A_pos | |
| have hh := MatrixCounting.tendsto_collisionRatio d.K d.v0 d.base.theta d.base.A | |
| (finiteDenominators d) hv ht hA (finiteDenominators_two_le d) | |
| collisionConstant d.base.eta | |
| have he : collisionConstant * d.base.eta ^ 2 * (d.K : β) * | |
| (d.base.theta : β) ^ d.m / | |
| (((d.m : β) + 1) * (d.v0 : β) * (d.base.A : β) ^ d.m) = | |
| collisionLimit d := by | |
| unfold collisionLimit | |
| ring | |
| rw [he] at hh | |
| exact hh | |
| theorem no_fixed_data_of_interpolation_and_analytic_aggregate | |
| (hgeometry : GlobalInterpolationStatement) (hanalytic : AnalyticAggregateStatement) | |
| (nu : β) (hnu : 2 < nu) (d : FixedData nu) : False := by | |
| classical | |
| obtain β¨error, herror, hupperβ© := hanalytic nu hnu d | |
| have hsum : Tendsto (fun H : β => d.arithmeticError + d.analyticError + error H) | |
| atTop (π (d.arithmeticError + d.analyticError + 0)) := | |
| tendsto_const_nhds.add herror | |
| have hsmall : βαΆ H : β in atTop, | |
| d.arithmeticError + d.analyticError + error H < | |
| nu * ((d.base.A : β) * (1 - d.base.eta) - d.base.theta) - | |
| (1 - d.base.theta) := | |
| hsum.eventually (Iio_mem_nhds (by simpa using d.error_sum_lt_gap)) | |
| have hdiff : Tendsto (fun H : β => | |
| collisionRate d H - (1 + d.arithmeticError + d.analyticError + error H)) | |
| atTop (π (collisionLimit d - (1 + d.arithmeticError + d.analyticError + 0))) := | |
| (tendsto_collisionRate d).sub (tendsto_const_nhds.add herror) | |
| have hlarge : βαΆ H : β in atTop, | |
| 0 < collisionRate d H - (1 + d.arithmeticError + d.analyticError + error H) := by | |
| apply hdiff.eventually (Ioi_mem_nhds ?_) | |
| have hh := d.collision_exceeds_error_sum | |
| change 1 + d.arithmeticError + d.analyticError < collisionLimit d at hh | |
| linarith | |
| have hcontradiction : βαΆ H : β in atTop, | |
| Function.Surjective (actualMatrix d H).mulVecLin β False := by | |
| filter_upwards [hsmall, hlarge, hupper, | |
| eventually_gt_atTop (0 : β)] with H hsmall hlarge hupper hH | |
| intro hsurj | |
| obtain β¨selection, _hselection, hdetβ© := | |
| InterpolationMatrix.exists_full_row_minor_of_surjective (actualMatrix d H) hsurj | |
| have hdet' : (actualMinor d H selection).det β 0 := hdet | |
| have hlower := actual_minor_arithmetic_lower_bound d H hH selection hdet' | |
| have hb := actualMean_bounds d H hH | |
| exact determinant_bounds_inconsistent nu d.base.theta | |
| ((d.base.A : β) * (1 - d.base.eta)) (actualMean d H) | |
| d.arithmeticError d.analyticError (error H) (collisionRate d H) | |
| (Real.log β(actualMinor d H selection).detβ / ((actualRowCount d H : β) * H)) | |
| (by linarith) hb.1 hb.2 hsmall (by linarith) hlower (hupper selection hdet') | |
| obtain β¨L, hLβ© := Filter.eventually_atTop.mp hcontradiction | |
| obtain β¨H, hLH, hsurjβ© := hgeometry nu hnu d L | |
| exact hL H hLH hsurj | |
| theorem piEventualLowerBound_of_interpolation_and_analytic_aggregate | |
| (hgeometry : GlobalInterpolationStatement) (hanalytic : AnalyticAggregateStatement) : | |
| PiEventualLowerBound := by | |
| intro nu hnu | |
| by_contra h | |
| push Not at h | |
| have hbad : β Q : β, β p : β€, β q : β, | |
| Q β€ q β§ |Real.pi - (p : β) / q| β€ (q : β) ^ (-nu) := by | |
| intro Q | |
| obtain β¨p, q, hq, herrβ© := h (max Q 2) (le_max_right _ _) | |
| exact β¨p, q, (le_max_left _ _).trans hq, herr.leβ© | |
| obtain β¨dβ© := exists_admissible_parameters nu Arithmetic.lcmConstant collisionConstant | |
| hnu Arithmetic.lcmConstant_pos collisionConstant_pos hbad | |
| exact no_fixed_data_of_interpolation_and_analytic_aggregate hgeometry hanalytic nu hnu d | |
| end PiExponent.DeterminantContradiction | |
| end OAI | |