Skip to content

Commit

Permalink
Maschke Lemma with formulation in terms of retracts added, Preadditiv…
Browse files Browse the repository at this point in the history
…e categories added, proof that preadditive categories with 1 objects are rings
  • Loading branch information
s3midetnov committed Aug 12, 2024
1 parent acfc723 commit 2b4ca62
Show file tree
Hide file tree
Showing 10 changed files with 441 additions and 15 deletions.
6 changes: 6 additions & 0 deletions src/Algebra/Group.ard
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
\import Algebra.Monoid.Category
\import Data.Array
\import Data.Or
\import Equiv
\import Function.Meta ($)
\import Logic
\import Meta
Expand Down Expand Up @@ -144,6 +145,11 @@
\lemma inverse-inverse {G : Group} (g : G) : inverse (inverse g) = g => cancel_*-left (inverse g) (rewrite (inverse-left, inverse-right) idp)

\lemma inverse-ide {G : Group}: G.inverse G.ide = G.ide => cancel_*-left G.ide (rewrite inverse-right (rewrite ide-left idp))

\func translate-is-Equiv{G : Group}(h : G) : QEquiv {G} {G} (h *) \cowith
| ret => (inverse h) *
| ret_f _ => rewrite (inv G.*-assoc, G.inverse-left, G.ide-left) idp
| f_sec _ => rewrite (inv G.*-assoc, G.inverse-right, G.ide-left) idp
}

\func conjugate {E : Group}(g : E) : GroupHom E E \cowith
Expand Down
34 changes: 33 additions & 1 deletion src/Algebra/Group/Representation/Category.ard
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
\import Algebra.Group.GSet.Category
\import Algebra.Group.GSet
\import Algebra.Group.Representation.Representation
\import Algebra.Module
\import Algebra.Module.Category
\import Algebra.Module.LinearMap
\import Algebra.Ring
Expand Down Expand Up @@ -46,7 +47,7 @@
\where{
\func inverseMap => \new InterwiningMap B A {
| LinearMap => p.hinv
| func-** {b : B} {g : G} => rewrite (inv (aux {R} {G} {A} {B} {f} {p}{b}),
| func-** {b : B} {_ : G} => rewrite (inv (aux {R} {G} {A} {B} {f} {p}{b}),
inv f.func-**, aux-2, aux) idp
}
\func aux {b : B} : f (p.hinv b) = b => path (\lam i => (p.f_hinv i) b)
Expand Down Expand Up @@ -84,3 +85,34 @@
\func ImageLRepresLeftHom{R : Ring}{G : Group}(f : InterwiningMap {| R => R | G => G}) : InterwiningMap f.Dom (ImageLRepres f) \cowith
| LinearMap => ImageLModuleLeftHom f
| func-** {_} {_} => exts (rewrite f.func-** idp)

\instance InterwiningMapLModule{R : CRing}{G : Group} (A B : LRepres R G) : LModule R (InterwiningMap A B) \cowith
| zro => zeroInterwining
| + => addInterwining
| zro-left => exts (\lam _ => B.zro-left)
| zro-right => exts (\lam _ => B.zro-right)
| +-assoc => exts (\lam _ => B.+-assoc)
| negative => negativeInterwining
| negative-left => exts (\lam _ => B.negative-left)
| +-comm => exts (\lam _ => B.+-comm)
| *c => mulconstInterwining
| *c-assoc => exts (\lam _ => B.*c-assoc)
| *c-ldistr => exts (\lam _ => B.*c-ldistr)
| *c-rdistr => exts (\lam _ => B.*c-rdistr)
| ide_*c => exts (\lam _ => B.ide_*c)
\where {
\func zeroInterwining : InterwiningMap A B \cowith
| LinearMap => LModulePreAdditive.zeroMap
| func-** => inv B.g**-zro
\func addInterwining (f g : InterwiningMap A B) : InterwiningMap A B \cowith
| LinearMap => LModulePreAdditive.addMaps f g
| func-** => unfold (rewrite (f.func-**, g.func-**, B.**-ldistr) idp)

\func negativeInterwining (f : InterwiningMap A B) : InterwiningMap A B \cowith
| LinearMap => LModulePreAdditive.negativeMap f
| func-** => unfold (rewrite (f.func-**, B.g**-negative) idp)

\func mulconstInterwining(c : R)(f : InterwiningMap A B) : InterwiningMap A B \cowith
| LinearMap => LModule.*c {LinearMapLModule A B} c f
| func-** => rewrite (B.**-*c, inv f.func-**) idp
}
163 changes: 163 additions & 0 deletions src/Algebra/Group/Representation/MaschkeLemma.ard
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
\import Algebra.Group
\import Algebra.Group.GSet
\import Algebra.Group.Representation.Category
\import Algebra.Group.Representation.Representation
\import Algebra.Group.Representation.Sub
\import Algebra.Module
\import Algebra.Module.Category
\import Algebra.Module.LinearMap
\import Algebra.Monoid
\import Algebra.Ring
\import Category
\import Category.PreAdditive
\import Data.Array
\import Equiv
\import Function \hiding (id, o)
\import Function.Meta
\import Logic
\import Logic.Meta
\import Meta \hiding (in)
\import Paths
\import Paths.Meta
\import Set.Fin

\class Maschke'sLemma{R : CRing}{G : FinGroup}{|G|^-1 : R}(q : R.natCoef G.finCard R.* |G|^-1 = R.ide)
{E : LRepres R G}{S : SubLRepres E}{

\func mean_func {E W : LRepres R G} (f : LinearMap E W):
InterwiningMap E W => LModule.*c |G|^-1 (SumOverGroup f)

\func retracts (p : SplitMono {LModuleCat R} S.in) : SplitMono {RepresentationCat R G} {S} {E} S.in \cowith
| hinv => mean_func p.hinv
| hinv_f => exts \lam e => rewrite (mean-func-preserve p-hinv-decypher e) idp
\where {
\func p-hinv-decypher (s : S) : p.hinv (S.in s) = s => path (\lam i => (p.hinv_f i) s)
}

\func mean-func-preserve {f : LinearMap E S} (p : \Pi(s : S) -> f (S.in s) = s) (t : S)
: mean_func f (S.in t) = t =>
unfold (rewrite (SumOverGroup-multiply, inv $ LModule.*c-assoc {S.S}, R.*-comm, q, ide_*c) idp)
\where {

\func SumOverGroup-multiply : SumOverGroup f (S.in t) = R.natCoef G.finCard *c t
=> rewrite (SumOverGroup_same-elements, SumOverGroup.FinSumEqual-multiply t) idp
\where {
\func SumOverGroup_Sub : SumOverGroup f (S.in t) = AbMonoid.FinSum {S}
(\lam (g : G) => g S.**'in f (inverse {G} g E.** S.in t)) => SumOverGroup.FinSumRewrite (\lam g => SumOverGroup.adjust g f) (in {S} t)

\func SumOverGroup_same-elements :
SumOverGroup f (S.in t) = AbMonoid.FinSum {S} (\lam (_ : G) => t)
=> rewrite (SumOverGroup_Sub, SumOverGroup.FinSumEquality (\lam (g : G) => SumOverGroup_subrepr-property g t)) idp

\func SumOverGroup_subrepr-property (g : G) (t : S) : g S.**'in f (inverse g E.** S.in t) = t
=> rewrite (inv $ InterwiningMap.func-** {S.in}, p (inverse g S.**'in t), **-assoc, G.inverse-right, id-action) idp
}

}
}



{- | It is a function that given a linear map $f : A \to B$ between two representations of a finite group $G$
produces an interwining linear map $f'$ via the following formula
$f' a := \sum_{g : G} g f (g^{ -1} a)$
-}
\func SumOverGroup{R : CRing}{G : FinGroup} {A B : LRepres R G}(f : LinearMap A B) : InterwiningMap A B \cowith
| LinearMap => int
| func-** {a} {h} => rewrite (bring_h_out h a, inv $ ap-rearrange h a) idp
\where {
\func Ab : AbGroup => PreAdditivePrecat.AbHom {LModulePreAdditive R} {A} {B}

\func adjust(g : G) (f : LinearMap A B) : LinearMap A B \cowith
| func a => g B.** f ( inverse g A.** a)
| func-+ => rewrite (A.**-ldistr, f.func-+, B.**-ldistr) idp
| func-*c => rewrite (A.**-*c, f.func-*c, B.**-*c) idp

\func adjust' : G -> LinearMap A B => \lam g => adjust g f

\func int : LinearMap A B => Ab.FinSum (\lam (g : G) => adjust g f)

\func group_prop (g h : G)(a : A) : adjust g f (h A.** a) = h B.** (adjust ((inverse h) * g) f a)
=> unfold (inv (rewrite (B.**-assoc, inv G.*-assoc, G.inverse-right, G.ide-left, G.inverse_*, G.inverse-isInv, A.**-assoc) idp))

\func FinSum-equivariance (h : G) {x : G -> B} : h B.** (B.FinSum x) = B.FinSum (\lam z => h B.** (x z))
=> \case B.FinSum_char x \with {
| inP p => \case B.FinSum_char2 (\lam z => h B.** (x z)) p.1 \with {
| q => rewrite (p.2, q, BigSum-equivariance) idp
}
}
\where {
\func act_array (h : G)(e : Array B) : Array B => \lam i => h B.** (e i)

\func BigSum-equivariance (e : Array B) : h B.** (B.BigSum e) = B.BigSum (act_array h e) \elim e
| nil => rewrite B.g**-zro idp
| a :: l => rewrite (B.**-ldistr, BigSum-equivariance l) idp
}

\func FinSumEquality {E : AbMonoid} {A : FinSet} {x y : A -> E} (eq : \Pi (a : A) -> x a = y a)
: E.FinSum x = E.FinSum y => \case E.FinSum_char x \with {
| inP a => \case E.FinSum_char2 y a.1 \with {
| p => rewrite (a.2, p, BigSumEquality) idp
}
}\where {
\func BigSumEquality {a : Equiv {Fin A.finCard} {A}}
: AddMonoid.BigSum (\new Array E A.finCard (\lam j => x (a j))) =
AddMonoid.BigSum (\new Array E A.finCard (\lam j => y (a j))) =>
pmap AddMonoid.BigSum ArrayEquality
\func ArrayEquality {a : Equiv {Fin A.finCard} {A}}: (\new Array E A.finCard (\lam j => x (a j))) =
(\new Array E A.finCard (\lam j => y (a j))) => arrayExt (\lam j => eq (a j))
}

\func FinSumRewrite (x : G -> Ab) (a : A) :
(Ab.FinSum x) a = B.FinSum (\lam e => (x e) a) => \case Ab.FinSum_char x \with {
| inP a1 => \case B.FinSum_char2 (\lam e => (x e) a) a1.1 \with {
| p => rewrite (a1.2, p, BigSumRewrite) idp
}
}
\where {
\func Ab_Helper {f g : Ab}{x : A} : (f + g) x = (f x) + g x => idp

\func ap_BigSum_el_wise (e : Array Ab)(a : A) : Array B => \lam i => (e i) a

\func BigSumRewrite (e : Array Ab)(a : A) : (Ab.BigSum e) a = B.BigSum (ap_BigSum_el_wise e a) \elim e
| nil => idp
| a1 :: l => rewrite (Ab_Helper, BigSumRewrite l a) idp
}

\lemma PermutationInvariance {E : AbMonoid}{A : FinSet}
(x : A -> E)(p : A -> A)(permute : QEquiv p): E.FinSum x = E.FinSum {A} (x Function.o p)
=> E.FinSum_Equiv {A}{A} permute

\lemma rearrange(h : G) :
int = (Ab.FinSum (\lam (g : G) => adjust ((inverse h) * g) f))
=> PermutationInvariance {Ab} adjust' ((inverse h) *) (Group.translate-is-Equiv (inverse h))

\func ap-rearrange (h : G)(a : A) :
int a = (Ab.FinSum (\lam (g : G) => adjust ((inverse h) * g) f)) a => path (\lam i => ((rearrange h) i) a)

\func bring_h_out (h : G) (a : A) : int (h A.** a)
= h B.** (Ab.FinSum (\lam (g : G) => adjust ((inverse h) * g) f)) a
=> inv $ rewrite (zero-2-step h a, FinSum-equivariance, step-4 h a, inv $ FinSumRewrite (\lam (g : G) => adjust g f) (h A.** a)) idp
\where {
\func zero-2-step(h : G)(a : A) :
(Ab.FinSum (\lam g => adjust (G.inverse h G.* g) f) )a = B.FinSum (\lam g => adjust (G.inverse h G.* g) f a) => FinSumRewrite (\lam g => adjust (G.inverse h G.* g) f) a

\func step-4 (h : G)(a : A) :
B.FinSum (\lam (g : G) => h B.**(adjust ((inverse h) * g) f) a) =
B.FinSum(\lam (g : G) => g B.** (f (inverse g A.** (h A.** a)))) => rewrite (FinSumEquality helper) idp
\where {
\func helper {h : G}{a : A}(g : G) : h B.**(adjust ((inverse h) * g) f) a = g B.** (f (inverse g A.** (h A.** a)))
=> unfold (rewrite (G.inverse_*, G.inverse-isInv, inv A.**-assoc, B.**-assoc, inv G.*-assoc, G.inverse-right, G.ide-left) idp)
}

}
\func FinSumEqual-multiply {E : LModule R} {A : FinSet} (e : E) : E.FinSum (\lam (_ : A) => e) = R.natCoef A.finCard *c e =>
\case E.FinSum_char (\lam (_ : A) => e) \with {
| inP a => rewrite (a.2, BigSumEqual A.finCard) idp
}
\where {
\func BigSumEqual (n : Nat) : AddMonoid.BigSum (\new Array E n (\lam _ => e)) = R.natCoef n *c e \elim n
| 0 => rewrite (R.natCoefZero, E.*c_zro-left) idp
| suc n => rewrite (R.natCoefSuc n, E.*c-rdistr, inv $ BigSumEqual n, E.ide_*c, E.+-comm) idp
}
}
61 changes: 61 additions & 0 deletions src/Algebra/Group/Representation/Product.ard
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
\import Algebra.Group
\import Algebra.Group.Representation.Category
\import Algebra.Group.Representation.Representation
\import Algebra.Group.Representation.Sub
\import Algebra.Meta
\import Algebra.Module
\import Algebra.Module.LinearMap
\import Algebra.Ring
\import Category
\import Function.Meta
\import Logic
\import Logic.Meta
\import Meta (unfold)
\import Paths
\import Paths.Meta

\func ProductLRepres {R : Ring} {G : Group} (A B : LRepres R G) : LRepres R G \cowith
| LModule => ProductLModule R A B
| ** g (a, b) => (g A.** a, g B.** b)
| **-assoc => rewrite (A.**-assoc, B.**-assoc) idp
| id-action => rewrite (A.id-action, B.id-action) idp
| **-ldistr => rewrite (A.**-ldistr, B.**-ldistr) idp
| **-*c => rewrite (A.**-*c, B.**-*c) idp
\where {
\func in_1 {R : Ring} {G : Group} (A B : LRepres R G) : InterwiningMap A (ProductLRepres A B) \cowith
| func a => (a, 0)
| func-+ {a}{b} => rewrite (pmap (\lam z => (a A.+ b, z)) (inv B.zro-right)) idp
| func-*c{r} {_} => rewrite (inv $ B.*c_zro-right {r}, inv aux, B.*c_zro-right) idp
| func-** {e} {g} => rewrite (pmap (\lam z => (g A.** e, z) )(inv $ B.g**-zro {g})) idp
\where {
\func aux {r : R}{a : A}{b : B} : r *c (a, b) = (r *c a, r *c b) => idp
}
\func in_2 {R : Ring} {G : Group} (A B : LRepres R G) : InterwiningMap B (ProductLRepres A B) \cowith
| func b => (0, b)
| func-+ {a}{b} => rewrite (pmap (\lam z => (z, a B.+ b)) (inv A.zro-right)) idp
| func-*c {r} {_} => rewrite (inv $ A.*c_zro-right {r}, inv aux, A.*c_zro-right) idp
| func-** {e} {g} => rewrite (pmap (\lam z => (z, g B.** e) )(inv $ A.g**-zro {g})) idp
\where {
\func aux {r : R}{a : A}{b : B} : r *c (a, b) = (r *c a, r *c b) => idp
}

\func proj_1{R : Ring} {G : Group} (A B : LRepres R G) : InterwiningMap (ProductLRepres A B) A \cowith
| func (a, b) => a
| func-** => idp
| func-+ => idp
| func-*c => idp

\func proj_2{R : Ring} {G : Group} (A B : LRepres R G) : InterwiningMap (ProductLRepres A B) B \cowith
| func (a, b) => b
| func-** => idp
| func-+ => idp
| func-*c => idp

\func coprod-map{R : Ring} {G : Group} {A B C : LRepres R G}(i : InterwiningMap A C)(j : InterwiningMap B C) : InterwiningMap (ProductLRepres A B) C \cowith
| func (a, b) => i a C.+ j b
| func-+ => rewrite (i.func-+, j.func-+) equation
| func-*c => rewrite (i.func-*c, j.func-*c, C.*c-ldistr) idp
| func-** => rewrite (i.func-**, j.func-**, C.**-ldistr) idp
}


2 changes: 2 additions & 0 deletions src/Algebra/Group/Representation/Representation.ard
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
| **-*c {g : G} {e : E} {c : R} : g ** (c *c e) = c *c (g ** e)

\func g**-zro {g : G} : g ** 0 = 0 => rewrite (inv *c_zro-right, **-*c, *c_zro-left, *c_zro-left) idp

\func g**-negative {g : G} {e : E} : g ** negative e = negative (g ** e) => rewrite (inv neg_ide_*c, **-*c, neg_ide_*c) idp
}

\func LRepres (R : Ring)(G : Group) : \Type => LinRepres {| R => R | G => G}
Expand Down
6 changes: 6 additions & 0 deletions src/Algebra/Group/Representation/Sub.ard
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
\import Algebra.Group
\import Algebra.Group.Category
\import Algebra.Group.Representation.Category
\import Algebra.Group.Representation.Product
\import Algebra.Group.Representation.Representation
\import Algebra.Module.Category
\import Algebra.Ring
\import Category
\import Function
\import Logic
\import Logic.Meta
\import Paths
\import Paths.Meta

Expand All @@ -14,6 +17,9 @@
| in-mono : isInj in

\func isTrivial => isZeroMod S || isSurj in

\func \infix 7 **'in (g : G)(s : S) : S => (LinRepres.** {S}) g s

}

\func KernelSubLRepres{R : Ring} {G : Group} {A B : LRepres R G} (f : InterwiningMap A B) : SubLRepres A \cowith
Expand Down
38 changes: 38 additions & 0 deletions src/Algebra/Module.ard
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,44 @@
| *c-ldistr => pmap2 (__,__) *c-ldistr *c-ldistr
| *c-rdistr => pmap2 (__,__) *c-rdistr *c-rdistr
| ide_*c => pmap2 (__,__) ide_*c ide_*c
\where {
\func in_1 {R : Ring} (A B : LModule R) : LinearMap A (ProductLModule R A B) \cowith
| func a => (a, 0)
| func-+ {a} {b} => rewrite (pmap (\lam z => (a A.+ b, z)) (inv B.zro-right)) idp
| func-*c{r} {_} => rewrite (inv $ B.*c_zro-right {r}, inv aux, B.*c_zro-right) idp
\where {
\func aux {r : R} {a : A} {b : B} : r LModule.*c {ProductLModule R A B} (a, b) = (r *c a, r *c b) => idp
}

\func in_2 {R : Ring} (A B : LModule R) : LinearMap B (ProductLModule R A B) \cowith
| func b => (0, b)
| func-+ {a} {b} => rewrite (pmap (\lam z => (z, a B.+ b)) (inv A.zro-right)) idp
| func-*c {r} {_} => rewrite (inv $ A.*c_zro-right {r}, inv aux, A.*c_zro-right) idp
\where {
\func aux {r : R} {a : A} {b : B} : r LModule.*c {ProductLModule R A B} (a, b) = (r *c a, r *c b) => idp
}

\func proj_1{R : Ring} (A B : LModule R) : LinearMap (ProductLModule R A B) A \cowith
| func (a, b) => a
| func-+ => idp
| func-*c => idp

\func proj_2{R : Ring} (A B : LModule R) : LinearMap (ProductLModule R A B) B \cowith
| func (a, b) => b
| func-+ => idp
| func-*c => idp

\func coprod-map{R : Ring} {A B C : LModule R} (i : LinearMap A C) (j : LinearMap B C) : LinearMap (ProductLModule R A B) C \cowith
| func (a, b) => i a C.+ j b
| func-+ => rewrite (i.func-+, j.func-+) equation
| func-*c => rewrite (i.func-*c, j.func-*c, C.*c-ldistr) idp

\func prod-map {R : Ring} {A B C : LModule R} (a : LinearMap C A) (b : LinearMap C B) : LinearMap C (ProductLModule R A B) \cowith
| func c => (a c, b c)
| func-+ => rewrite (a.func-+, b.func-+) idp
| func-*c => rewrite (a.func-*c, b.func-*c) idp
}


\func RingLModule (R : Ring) : LModule R R \cowith
| AbGroup => R
Expand Down
Loading

0 comments on commit 2b4ca62

Please sign in to comment.