(* Semi-direct product *)

(* Specifications: *)
Lemma sdprod1g : left_id 1 sdprod.
Lemma sdprodE K H : H \subset 'N(K) -> K :&: H = 1 -> K ><| H = K * H.
Lemma sdprod_context G K H : K ><| H = G ->
[/\ K <| G, H \subset G, K * H = G, H \subset 'N(K) & K :&: H = 1].
Lemma sdprod_compl G K H : K ><| H = G -> H \in [complements to K in G].
Lemma sdprod_card G A B : A ><| B = G -> (#|A| * #|B|)%N = #|G|.
Lemma sdprod_isog G A B : A ><| B = G -> B \isog G / A.
Lemma index_sdprod G A B : A ><| B = G -> #|B| = #|G : A|.
Lemma index_sdprodr G A B M :
A ><| B = G -> M \subset B -> #|B : M| =  #|G : A <*> M|.
Lemma quotient_sdprodr_isom G A B M :
A ><| B = G -> M <| B ->
{f : {morphism B / M >-> coset_of (A <*> M)} |
isom (B / M) (G / (A <*> M)) f
& forall L, L \subset B -> f @* (L / M) = A <*> L / (A <*> M)}.
Lemma quotient_sdprodr_isog G A B M :
A ><| B = G -> M <| B -> B / M \isog G / (A <*> M).
Lemma sdprod_modl A B G H :
A ><| B = G -> A \subset H -> A ><| (B :&: H) = G :&: H.
Lemma sdprod_modr A B G H :
A ><| B = G -> B \subset H -> (H :&: A) ><| B = H :&: G.
Lemma subcent_sdprod B C G A :
B ><| C = G -> A \subset 'N(B) :&: 'N(C) -> 'C_B(A) ><| 'C_C(A) = 'C_G(A).
Lemma sdprod_recl n G K H K1 :
#|G| <= n -> K ><| H = G -> K1 \proper K -> H \subset 'N(K1) ->
exists G1 : {group gT}, [/\ #|G1| < n, G1 \subset G & K1 ><| H = G1].
Lemma sdprod_recr n G K H H1 :
#|G| <= n -> K ><| H = G -> H1 \proper H ->
exists G1 : {group gT}, [/\ #|G1| < n, G1 \subset G & K ><| H1 = G1].
Lemma mem_sdprod G A B x : A ><| B = G -> x \in G ->
exists y, exists z,
[/\ y \in A, z \in B, x = y * z &
{in A & B, forall u t, x = u * t -> u = y /\ t = z}].