Download data/lean/OAI/RepresentationTheory/UniversalSquare/Capacity/NumericBands.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 2.35 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/RepresentationTheory/UniversalSquare/Capacity/NumericBands.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/RepresentationTheory/UniversalSquare/Capacity/NumericBands.lean
-
curl -L -o NumericBands.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/RepresentationTheory/UniversalSquare/Capacity/NumericBands.lean
2.35 kB
| import Mathlib | |
| import OAI.RepresentationTheory.Saxl.Main | |
| import OAI.RepresentationTheory.UniversalSquare.Band.OutputBands | |
| import OAI.RepresentationTheory.UniversalSquare.Capacity.RefinedExhaustion | |
| namespace OAI | |
| /-! Numeric Bands. -/ | |
| section | |
| noncomputable section | |
| namespace Saxl.Balance | |
| def BandsValid (es : List (β Γ β)) : Prop := | |
| (β e β es, e.1 β€ e.2) β§ β e β es, β f β es, | |
| (e.1 = f.1 β e.2 = f.2) β§ (e.1 < f.1 β e.2 < f.1) | |
| instance (es : List (β Γ β)) : Decidable (BandsValid es) := by | |
| unfold BandsValid | |
| infer_instance | |
| def bandStarts (es : List (β Γ β)) : Finset β := (es.map Prod.fst).toFinset | |
| def bandUpper (es : List (β Γ β)) (k : β) : β := | |
| es.toFinset.sup (fun e => if e.1 = k then e.2 else 0) | |
| lemma bandUpper_eq {es : List (β Γ β)} (h : BandsValid es) {e : β Γ β} | |
| (he : e β es) : bandUpper es e.1 = e.2 := by | |
| apply le_antisymm | |
| Β· apply Finset.sup_le | |
| intro f hf | |
| by_cases hf' : f.1 = e.1 | |
| Β· simp only [ite_eq_left hf'] | |
| exact ((h.2 f (List.mem_toFinset.mp hf) e he).1 hf').le | |
| Β· simp only [ite_eq_right hf']; exact Nat.zero_le _ | |
| Β· have hh := Finset.le_sup (f := fun f : β Γ β => if f.1 = e.1 then f.2 else 0) | |
| (List.mem_toFinset.mpr he) | |
| simpa only [bandUpper, ite_true] using hh | |
| lemma mem_bandStarts {es : List (β Γ β)} {k : β} : | |
| k β bandStarts es β β e β es, e.1 = k := by simp [bandStarts] | |
| def numericBands (es : List (β Γ β)) (h : BandsValid es) : OutputBands where | |
| starts := bandStarts es | |
| upper := bandUpper es | |
| nonempty := by | |
| intro k hk | |
| obtain β¨e,he,rflβ© := mem_bandStarts.mp hk | |
| rw [bandUpper_eq h he] | |
| exact h.1 e he | |
| separated := by | |
| intro k hk l hl hkl | |
| obtain β¨e,he,rflβ© := mem_bandStarts.mp hk | |
| obtain β¨f,hf,rflβ© := mem_bandStarts.mp hl | |
| rw [bandUpper_eq h he] | |
| exact (h.2 e he f hf).2 hkl | |
| lemma numericBands_iff {es : List (β Γ β)} (h : BandsValid es) {e : β Γ β} | |
| (he : e β es) {d : β} (z : Fin (d*d)) : | |
| ((numericBands es h).alphabet d z β§ (numericBands es h).letterLabel d z = e.1) β | |
| output z β Set.Icc e.1 e.2 := by | |
| rw [(numericBands es h).letter_iff (mem_bandStarts.mpr β¨e,he,rflβ©)] | |
| rw [show (numericBands es h).upper e.1 = e.2 from bandUpper_eq h he] | |
| end Saxl.Balance | |
| end | |
| end | |
| end OAI | |