File size: 4,183 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | 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
|