Download data/lean/OAI/LinearAlgebra/MatrixMultiplication/FieldGroups/DegreeEnvelope.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 6.4 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/LinearAlgebra/MatrixMultiplication/FieldGroups/DegreeEnvelope.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/LinearAlgebra/MatrixMultiplication/FieldGroups/DegreeEnvelope.lean
-
curl -L -o DegreeEnvelope.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/LinearAlgebra/MatrixMultiplication/FieldGroups/DegreeEnvelope.lean
6.4 kB
| import OAI.LinearAlgebra.MatrixMultiplication.FieldGroups.OrbitData | |
| import OAI.LinearAlgebra.MatrixMultiplication.JointExtraction.MaskedRates | |
| namespace OAI | |
| /-! Group assignments, orbit counts and extraction capacities. -/ | |
| noncomputable section | |
| namespace MatrixMultiplication.AllFieldGroupDegreeEnvelope | |
| open AllFieldHistory AllFieldGroupOrbitData Filter | |
| open scoped Topology | |
| attribute [local instance] Classical.propDecidable | |
| variable {K tick : β} | |
| def variableDegree (allocation : Allocation) (m : β) (width : β) | |
| (sigma : Placement) (e : Targets (K := K) (tick := tick) allocation m sigma) : β := | |
| ((data (K := K) (tick := tick) allocation m width sigma).orbits e).sup fun o => | |
| ((data (K := K) (tick := tick) allocation m width sigma).passing e o).sup fun v => | |
| ((data (K := K) (tick := tick) allocation m width sigma).competitors e o v).card | |
| def uniformDegree (allocation : Allocation) (m : β) (width : β) | |
| (sigma : Placement) : β := | |
| Finset.univ.sup fun e : Targets (K := K) (tick := tick) allocation m sigma => | |
| max ((data (K := K) (tick := tick) allocation m width sigma).eligibilityCompetitors e).card | |
| (variableDegree (K := K) (tick := tick) allocation m width sigma e) | |
| theorem eligibility_card_le (allocation : Allocation) (m : β) (width : β) | |
| (sigma : Placement) (e : Targets (K := K) (tick := tick) allocation m sigma) : | |
| ((data (K := K) (tick := tick) allocation m width sigma).eligibilityCompetitors e).card β€ | |
| uniformDegree (K := K) (tick := tick) allocation m width sigma := | |
| (le_max_left _ _).trans (Finset.le_sup (f := fun e => | |
| max ((data (K := K) (tick := tick) allocation m width sigma).eligibilityCompetitors e).card | |
| (variableDegree (K := K) (tick := tick) allocation m width sigma e)) (Finset.mem_univ e)) | |
| theorem competitors_card_le (allocation : Allocation) (m : β) (width : β) | |
| (sigma : Placement) (e : Targets (K := K) (tick := tick) allocation m sigma) | |
| (o : Orbit (K := K) (tick := tick) allocation m sigma) (ho : o β (data (K := K) (tick := tick) allocation m width sigma).orbits e) | |
| (v : Variable (K := K) (tick := tick) allocation m sigma) (hv : v β (data (K := K) (tick := tick) allocation m width sigma).passing e o) : | |
| ((data (K := K) (tick := tick) allocation m width sigma).competitors e o v).card β€ | |
| uniformDegree (K := K) (tick := tick) allocation m width sigma := by | |
| have hvle := Finset.le_sup (f := fun v => | |
| ((data (K := K) (tick := tick) allocation m width sigma).competitors e o v).card) hv | |
| have hole := Finset.le_sup (f := fun o => | |
| ((data (K := K) (tick := tick) allocation m width sigma).passing e o).sup fun v => | |
| ((data (K := K) (tick := tick) allocation m width sigma).competitors e o v).card) ho | |
| have hel := Finset.le_sup (f := fun e => | |
| max ((data (K := K) (tick := tick) allocation m width sigma).eligibilityCompetitors e).card | |
| (variableDegree (K := K) (tick := tick) allocation m width sigma e)) (Finset.mem_univ e) | |
| exact hvle.trans (hole.trans ((le_max_right _ _).trans hel)) | |
| private theorem cast_max_le {a b : β} {R : β} | |
| (ha : (a : β) β€ R) (hb : (b : β) β€ R) : ((max a b : β) : β) β€ R := by | |
| rcases le_total a b with hab | hba | |
| Β· simpa only [max_eq_right hab] using hb | |
| Β· simpa only [max_eq_left hba] using ha | |
| private theorem cast_sup_le {I : Type*} (s : Finset I) (f : I β β) | |
| {R : β} (hR : 0 β€ R) (hs : β i β s, (f i : β) β€ R) : | |
| ((s.sup f : β) : β) β€ R := by | |
| classical | |
| revert hs | |
| induction s using Finset.induction_on with | |
| | empty => | |
| intro _ | |
| simpa using hR | |
| | @insert a s _ ih => | |
| intro hs | |
| rw [Finset.sup_insert] | |
| exact cast_max_le (hs a (Finset.mem_insert_self a s)) | |
| (ih (fun i hi => hs i (Finset.mem_insert_of_mem hi))) | |
| theorem uniformDegree_real_le (allocation : Allocation) (m : β) (width : β) | |
| (sigma : Placement) {R : β} (hR : 0 β€ R) | |
| (heligibility : β e : Targets (K := K) (tick := tick) allocation m sigma, | |
| (((data (K := K) (tick := tick) allocation m width sigma).eligibilityCompetitors e).card : β) β€ R) | |
| (hcompetitors : β e : Targets (K := K) (tick := tick) allocation m sigma, | |
| β o β (data (K := K) (tick := tick) allocation m width sigma).orbits e, | |
| β v β (data (K := K) (tick := tick) allocation m width sigma).passing e o, | |
| (((data (K := K) (tick := tick) allocation m width sigma).competitors e o v).card : β) β€ R) : | |
| (uniformDegree (K := K) (tick := tick) allocation m width sigma : β) β€ R := by | |
| apply cast_sup_le _ _ hR | |
| intro e _ | |
| apply cast_max_le (heligibility e) | |
| apply cast_sup_le _ _ hR | |
| intro o ho | |
| apply cast_sup_le _ _ hR | |
| exact hcompetitors e o ho | |
| theorem eventually_log_uniformDegree_le (allocation : Allocation) (width : β) | |
| (sigma : Placement) {D : β} (hD : 0 β€ D) | |
| (hcounts : βαΆ m : β in atTop, | |
| (β e : Targets (K := K) (tick := tick) allocation m sigma, | |
| (((data (K := K) (tick := tick) allocation m width sigma).eligibilityCompetitors e).card : β) β€ | |
| Real.exp ((m : β) * D)) β§ | |
| (β e : Targets (K := K) (tick := tick) allocation m sigma, | |
| β o β (data (K := K) (tick := tick) allocation m width sigma).orbits e, | |
| β v β (data (K := K) (tick := tick) allocation m width sigma).passing e o, | |
| (((data (K := K) (tick := tick) allocation m width sigma).competitors e o v).card : β) β€ | |
| Real.exp ((m : β) * D))) : | |
| βαΆ m : β in atTop, | |
| Real.log (uniformDegree (K := K) (tick := tick) allocation m width sigma : β) / | |
| (m : β) β€ D := by | |
| filter_upwards [hcounts, eventually_gt_atTop (0 : β)] with m hm hmp | |
| by_cases hz : uniformDegree (K := K) (tick := tick) allocation m width sigma = 0 | |
| Β· simpa only [hz, Nat.cast_zero, Real.log_zero, zero_div] using hD | |
| have hd : (0 : β) < uniformDegree (K := K) (tick := tick) allocation m width sigma := by | |
| exact_mod_cast Nat.pos_of_ne_zero hz | |
| have hb := uniformDegree_real_le (K := K) (tick := tick) allocation m width sigma | |
| (Real.exp_pos _).le hm.1 hm.2 | |
| have hl := Real.log_le_log hd hb | |
| rw [Real.log_exp] at hl | |
| have hmpos : (0 : β) < m := by exact_mod_cast hmp | |
| exact (div_le_iffβ hmpos).mpr (by simpa only [mul_comm] using hl) | |
| end MatrixMultiplication.AllFieldGroupDegreeEnvelope | |
| end | |
| end OAI | |