Download data/lean/OAI/Algebra/Finitistic/Iteration/BinomialIteration.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.18 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Algebra/Finitistic/Iteration/BinomialIteration.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Algebra/Finitistic/Iteration/BinomialIteration.lean
-
curl -L -o BinomialIteration.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Algebra/Finitistic/Iteration/BinomialIteration.lean
4.18 kB
| import Mathlib.Data.Fintype.Sigma | |
| import OAI.Algebra.Finitistic.Iteration.BinomialIndex | |
| import OAI.Algebra.Finitistic.Iteration.BinomialBiproduct | |
| namespace OAI | |
| open CategoryTheory CategoryTheory.Limits | |
| noncomputable section | |
| namespace ExternalTensor.Binomial | |
| universe v u w | |
| variable {C : Type u} [Category.{v} C] [Preadditive C] [HasFiniteBiproducts C] [HasBinaryBiproducts C] | |
| variable [HasShift C β€] [β n : β€, (shiftFunctor C n).Additive] | |
| variable {S : Type w} (Phi : C β₯€ C) [Phi.Additive] [Phi.CommShift β€] | |
| variable (M : S β C) (H : S β S) (b d : β€) | |
| /-- Apply the splitting independently at each object; no naturality in S is present. -/ | |
| def branchIteration (split : β Y, Phi.obj (M Y) β (M (H Y))β¦bβ§ β (M (H Y))β¦b+dβ§) | |
| (j : β) (Y : S) : | |
| (Phi.obj^[j]) (M Y) β | |
| β¨ fun x : Branch j => (M ((H^[j]) Y))β¦(j : β€)*b + d*(weight x : β€)β§ := by | |
| induction j with | |
| | zero => | |
| letI : Unique (Branch 0) := inferInstanceAs (Unique Unit) | |
| simpa only [Function.iterate_zero_apply, Nat.cast_zero, zero_mul, mul_zero, zero_add, weight] using | |
| (shiftZero β€ (M Y)).symm βͺβ« | |
| (biproductUniqueIso (fun _ : Branch 0 => (M Y)β¦(0 : β€)β§)).symm | |
| | succ j ih => | |
| rw [Function.iterate_succ_apply'] | |
| refine Phi.mapIso ih βͺβ« Phi.mapBiproduct _ βͺβ« ?_ | |
| let X := M ((H^[j+1]) Y) | |
| let f : Branch j β C := fun x => Xβ¦((j+1 : β) : β€)*b + d*(weight x : β€)β§ | |
| let g : Branch j β C := fun x => Xβ¦((j+1 : β) : β€)*b + d*((weight x+1 : β) : β€)β§ | |
| have step (x : Branch j) : | |
| Phi.obj ((M ((H^[j]) Y))β¦(j : β€)*b+d*(weight x : β€)β§) β f x β g x := by | |
| simpa only [f, g, X, Function.iterate_succ_apply', Nat.cast_add, Nat.cast_one, | |
| add_mul, mul_add, mul_one, one_mul, add_assoc, add_left_comm, add_comm] using | |
| splitShift Phi (M ((H^[j]) Y)) (M (H ((H^[j]) Y))) b d | |
| ((j : β€)*b+d*(weight x : β€)) (split ((H^[j]) Y)) | |
| refine biproduct.mapIso step βͺβ« biproductBiprod f g βͺβ« biproduct.mapIso (J := Branch j β Branch j) | |
| (f := Sum.elim f g) | |
| (g := fun x : Branch j β Branch j => | |
| (M ((H^[j+1]) Y))β¦((j+1 : β) : β€)*b + d*(weight (n := j+1) x : β€)β§) ?_ | |
| intro x | |
| cases x with | |
| | inl x => exact Iso.refl _ | |
| | inr x => exact Iso.refl _ | |
| /-- The manuscript's repeated finite biproduct, including the multiplicity index. -/ | |
| def binomialObject (j : β) (X : C) : C := | |
| β¨ fun q : Fin (j+1) => β¨ fun _ : Fin (Nat.choose j q.val) => | |
| Xβ¦(j : β€)*b + d*(q.val : β€)β§ | |
| /-- Regroup by weight using the proved fiber cardinality, not an assumed decomposition. -/ | |
| def groupBiproduct (j : β) (X : C) : | |
| (β¨ fun x : Branch j => Xβ¦(j : β€)*b + d*(weight x : β€)β§) β | |
| binomialObject b d j X := | |
| biproduct.whiskerEquiv | |
| (f := fun x : Branch j => Xβ¦(j : β€)*b + d*(weight x : β€)β§) | |
| (g := fun p : Ξ£ q : Fin (j+1), Fin (Nat.choose j q.val) => | |
| Xβ¦(j : β€)*b + d*(p.1.val : β€)β§) | |
| (groupEquiv j) (fun _ => Iso.refl _) βͺβ« | |
| (biproductBiproductIso (fun q : Fin (j+1) => Fin (Nat.choose j q.val)) | |
| (fun q _ => Xβ¦(j : β€)*b + d*(q.val : β€)β§)).symm | |
| /-- Categorical binomial iteration with a common shift offset. -/ | |
| def binomialIteration (split : β Y, Phi.obj (M Y) β (M (H Y))β¦bβ§ β (M (H Y))β¦b+dβ§) | |
| (j : β) (Y : S) : | |
| (Phi.obj^[j]) (M Y) β binomialObject b d j (M ((H^[j]) Y)) := | |
| branchIteration Phi M H b d split j Y βͺβ« groupBiproduct b d j _ | |
| /-- Section 4, final corollary, with only objectwise splitting isomorphisms. -/ | |
| def section4Iteration (split : β Y, Phi.obj (M Y) β M (H Y) β (M (H Y))β¦(3 : β€)β§) | |
| (j : β) (Y : S) : | |
| (Phi.obj^[j]) (M Y) β | |
| β¨ fun q : Fin (j+1) => β¨ fun _ : Fin (Nat.choose j q.val) => | |
| (M ((H^[j]) Y))β¦(3 : β€)*(q.val : β€)β§ := by | |
| have h (Y : S) : Phi.obj (M Y) β (M (H Y))β¦(0 : β€)β§ β (M (H Y))β¦(0+3 : β€)β§ := | |
| split Y βͺβ« biprod.mapIso (shiftZero β€ (M (H Y))).symm (Iso.refl _) | |
| simpa only [binomialObject, mul_zero, zero_add] using binomialIteration Phi M H 0 3 h j Y | |
| end ExternalTensor.Binomial | |
| end | |
| end OAI | |