(* (c) Copyright 2006-2016 Microsoft Corporation and Inria.                  *)
(* Distributed under the terms of CeCILL-B.                                  *)
From mathcomp
From mathcomp
From mathcomp
(******************************************************************************)
(*   This file defines nilpotent and solvable groups, and give some of their  *)
(* elementary properties; more will be added later (e.g., the nilpotence of   *)
(* p-groups in sylow.v, or the fact that minimal normal subgroups of solvable *)
(* groups are elementary abelian in maximal.v). This file defines:            *)
(*   nilpotent G == G is nilpotent, i.e., [~: H, G] is a proper subgroup of H *)
(*                  for all nontrivial H <| G.                                *)
(*    solvable G == G is solvable, i.e., H^`(1) is a proper subgroup of H for *)
(*                  all nontrivial subgroups H of G.                          *)
(*       'L_n(G) == the nth term of the lower central series, namely          *)
(*                  [~: G, ..., G] (n Gs) if n > 0, with 'L_0(G) = G.         *)
(*                  G is nilpotent iff 'L_n(G) = 1 for some n.                *)
(*       'Z_n(G) == the nth term of the upper central series, i.e.,           *)
(*                  with 'Z_0(G) = 1, 'Z_n.+1(G) / 'Z_n(G) = 'Z(G / 'Z_n(G)). *)
(*   nil_class G == the nilpotence class of G, i.e., the least n such that    *)
(*                  'L_n.+1(G) = 1 (or, equivalently, 'Z_n(G) = G), if G is   *)
(*                  nilpotent; we take nil_class G = #|G| when G is not       *)
(*                  nilpotent, so nil_class G < #|G| iff G is nilpotent.      *)
(******************************************************************************)
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Section SeriesDefs.
Variables (n : nat) (gT : finGroupType) (A : {set gT}).
Definition lower_central_at_rec := iter n (fun B => [~: B, A]) A.
Definition upper_central_at_rec := iter n (fun B => coset B @*^-1 'Z(A / B)) 1.
End SeriesDefs.
(* By convention, the lower central series starts at 1 while the upper series *)
(* starts at 0 (sic).                                                         *)
Definition lower_central_at n := lower_central_at_rec n.-1.
(* Note: 'nosimpl' MUST be used outside of a section -- the end of section    *)
(* "cooking" destroys it.                                                     *)
Definition upper_central_at := nosimpl upper_central_at_rec.
Arguments lower_central_at n%N {gT} A%g.
Arguments upper_central_at n%N {gT} A%g.
Notation "''L_' n ( G )" := (lower_central_at n G)
(at level 8, n at level 2, format "''L_' n ( G )") : group_scope.
Notation "''Z_' n ( G )" := (upper_central_at n G)
(at level 8, n at level 2, format "''Z_' n ( G )") : group_scope.
Section PropertiesDefs.
Variables (gT : finGroupType) (A : {set gT}).
Definition nilpotent :=
[forall (G : {group gT} | G \subset A :&: [~: G, A]), G :==: 1].
Definition nil_class := index 1 (mkseq (fun n => 'L_n.+1(A)) #|A|).
Definition solvable :=
[forall (G : {group gT} | G \subset A :&: [~: G, G]), G :==: 1].
End PropertiesDefs.
Arguments nilpotent {gT} A%g.
Arguments nil_class {gT} A%g.
Arguments solvable {gT} A%g.
Section NilpotentProps.
Variable gT: finGroupType.
Implicit Types (A B : {set gT}) (G H : {group gT}).

Lemma nil_comm_properl G H A :
nilpotent G -> H \subset G -> H :!=: 1 -> A \subset 'N_G(H) ->
[~: H, A] \proper H.