reserve x,O for set,
  o for Element of O,
  G,H,I for GroupWithOperators of O,
  A, B for Subset of G,
  N for normal StableSubgroup of G,
  H1,H2,H3 for StableSubgroup of G,
  g1,g2 for Element of G,
  h1,h2 for Element of H1,
  h for Homomorphism of G,H;
reserve E for set,
  A for Action of O,E,
  C for Subset of G,
  N1 for normal StableSubgroup of H1;
reserve y for set,
  H19,H29 for StableSubgroup of G,
  N19 for normal StableSubgroup of H19,
  s1,s19,s2,s29 for CompositionSeries of G,
  fs for FinSequence of the_stable_subgroups_of G,
  f1,f2 for FinSequence,
  i,j,n for Nat;

theorem Th106:
  i in dom f1 & (ex p being Permutation of dom f1
  st f1,f2 are_equivalent_under p,O & j = p".i) implies ex p9 being Permutation
  of dom Del(f1,i) st Del(f1,i),Del(f2,j) are_equivalent_under p9,O
proof
A1: len f1=0 or len f1>=0+1 by NAT_1:13;
  assume
A2: i in dom f1;
  given p be Permutation of dom f1 such that
A3: f1,f2 are_equivalent_under p,O and
A4: j = p".i;
A5: len f1 = len f2 by A3;
  rng(p") c= dom f1;
  then
A6: rng(p") c= Seg len f1 by FINSEQ_1:def 3;
  p".i in rng(p") by A2,FUNCT_2:4;
  then p".i in Seg len f1 by A6;
  then
A7: j in dom f2 by A4,A5,FINSEQ_1:def 3;
  then
A8: ex k2 be Nat st len f2 = k2 + 1 & len Del(f2,j) = k2 by FINSEQ_3:104;
  consider k1 be Nat such that
A9: len f1 = k1 + 1 and
A10: len Del(f1,i) = k1 by A2,FINSEQ_3:104;
  per cases by A1,XXREAL_0:1;
  suppose
A11: len f1 = 0;
    set p9 = the Permutation of dom Del(f1,i);
    take p9;
    thus thesis by A9,A11;
  end;
  suppose
A12: len f1 = 1;
    reconsider p9={} as Function of dom {}, rng {} by FUNCT_2:1;
    reconsider p9 as Function of {},{};
A13: p9 is onto;
    Del(f1,i)={} by A9,A10,A12;
    then reconsider p9 as Permutation of dom Del(f1,i) by A13;
    take p9;
    thus thesis by A5,A9,A10,A8;
  end;
  suppose
A14: len f1 > 1;
    set Y = (dom f2)\{j};
A15: now
      assume Y={};
      then
A16:  dom f2 c= {j} by XBOOLE_1:37;
      {j} c= dom f2 by A7,ZFMISC_1:31;
      then
A17:  dom f2 = {j} by A16,XBOOLE_0:def 10;
      consider k be Nat such that
A18:  dom f2 = Seg k by FINSEQ_1:def 2;
      k in NAT by ORDINAL1:def 12;
      then k = len f2 by A18,FINSEQ_1:def 3;
      then k >= 1+1 by A5,A14,NAT_1:13;
      then Seg 2 c= Seg k by FINSEQ_1:5;
      then { 1,2 } = {j} by A17,A18,FINSEQ_1:2,ZFMISC_1:21;
      hence contradiction by ZFMISC_1:5;
    end;
    set X = (dom f1)\{i};
    set p9=(Sgm X)" * p * Sgm Y;
A21: rng Sgm X = X by FINSEQ_1:def 14;
A22: Sgm Y is one-to-one & rng Sgm Y = Y by FINSEQ_1:def 14,FINSEQ_3:92;
A23: dom f1 = Seg len f1 by FINSEQ_1:def 3
      .= dom f2 by A3,FINSEQ_1:def 3;
A24: p.j = (p*p").i by A2,A4,FUNCT_2:15
      .= (id dom f1).i by FUNCT_2:61
      .= i by A2,FUNCT_1:18;
A25: p9 is Permutation of dom Del(f1,i) & p9" = (Sgm Y)" * (p") * (Sgm X)
    proof
      set R6=p;
      set R5=p";
      set R4=Sgm X;
      set R3=(Sgm X)";
      set R2=Sgm Y;
      set R1=(Sgm Y)";
      set p99=(Sgm Y)" * (p") * (Sgm X);
A26:  {i} c= dom f1 by A2,ZFMISC_1:31;
A27:  X \/ {i} = dom f1 \/ {i} by XBOOLE_1:39
        .= dom f1 by A26,XBOOLE_1:12;
      card(X \/ {i}) = (card X) + card {i} by CARD_2:40,XBOOLE_1:79;
      then
A28:  (card X) + 1 = card(X \/ {i}) by CARD_1:30
        .= card Seg len f1 by A27,FINSEQ_1:def 3
        .= k1+1 by A9,FINSEQ_1:57;
A29:  {j} c= dom f2 by A7,ZFMISC_1:31;
A30:  Y \/ {j} = dom f2 \/ {j} by XBOOLE_1:39
        .= dom f2 by A29,XBOOLE_1:12;
A31:  Sgm X is one-to-one by FINSEQ_3:92;
      then
A32:  dom((Sgm X)") = X by A21,FUNCT_1:33;
      then dom((Sgm X)") c= dom f1 by XBOOLE_1:36;
      then
A33:  dom((Sgm X)") c= rng p by FUNCT_2:def 3;
A34:  now
        let x be object;
        assume
A35:    x in Y;
        dom f1 = dom p by A2,FUNCT_2:def 1;
        then
A36:    x in dom p by A23,A35,XBOOLE_0:def 5;
        not x in {j} by A35,XBOOLE_0:def 5;
        then x <> j by TARSKI:def 1;
        then p.x <> i by A7,A23,A24,A36,FUNCT_2:56;
        then
A37:    not p.x in {i} by TARSKI:def 1;
        dom f1 = rng p by FUNCT_2:def 3;
        then p.x in dom f1 by A36,FUNCT_1:3;
        then p.x in X by A37,XBOOLE_0:def 5;
        hence x in dom((Sgm X)" * p) by A32,A36,FUNCT_1:11;
      end;
      now
        let x be object;
        assume
A38:    x in dom((Sgm X)" * p);
        then p.x in dom((Sgm X)") by FUNCT_1:11;
        then p.x in X by A21,A31,FUNCT_1:33;
        then not p.x in {i} by XBOOLE_0:def 5;
        then p.x <> i by TARSKI:def 1;
        then
A39:    not x in {j} by A24,TARSKI:def 1;
        x in dom p by A38,FUNCT_1:11;
        hence x in Y by A23,A39,XBOOLE_0:def 5;
      end;
      then dom((Sgm X)" * p) = Y by A34,TARSKI:2;
      then
A40:  dom((Sgm X)" * p) = rng(Sgm Y) by FINSEQ_1:def 14;
      then rng((Sgm X)" * p * Sgm Y) = rng((Sgm X)" * p) by RELAT_1:28
        .= rng((Sgm X)") by A33,RELAT_1:28
        .= dom(Sgm X) by A31,FUNCT_1:33;
      then
A41:  rng p9=Seg k1 by A28,FINSEQ_3:40;
      card(Y \/ {j}) = (card Y) + card {j} by CARD_2:40,XBOOLE_1:79;
      then (card Y) + 1 = card(Y \/ {j}) by CARD_1:30
        .= card Seg len f2 by A30,FINSEQ_1:def 3
        .= k1+1 by A3,A9,FINSEQ_1:57;
      then dom(Sgm Y) = Seg k1 by FINSEQ_3:40;
      then
A42:  dom p9=Seg k1 by A40,RELAT_1:27;
A43:  dom Del(f1,i) = Seg k1 by A10,FINSEQ_1:def 3;
      then reconsider p9 as Function of dom Del(f1,i),dom Del(f1,i) by A41,A42,
FUNCT_2:1;
A44:  p9 is onto by A43,A41;
      Sgm Y is one-to-one by FINSEQ_3:92;
      then reconsider p9 as Permutation of dom Del(f1,i) by A31,A44;
      set R7=p9;
      reconsider R1,R2,R3,R4,R5,R6,R7,p9,p99 as Function;
A45:  R3=R4~ by A31,FUNCT_1:def 5;
A46:  Sgm Y is one-to-one & R5=R6~ by FINSEQ_3:92,FUNCT_1:def 5;
      reconsider R1,R2,R3,R4,R5,R6,R7 as Relation;
      p9"=R7~ by FUNCT_1:def 5
        .=((R6*R3)~)*(R2~) by RELAT_1:35
        .=((R3)~*(R6~))*(R2~) by RELAT_1:35
        .=((R4~)~*R5)*R1 by A45,A46,FUNCT_1:def 5
        .=p99 by RELAT_1:36;
      hence thesis;
    end;
    then reconsider p9 as Permutation of dom Del(f1,i);
    take p9;
A47: Sgm Y is Function of dom Sgm Y, rng Sgm Y by FUNCT_2:1;
    now
      let H1,H2 be GroupWithOperators of O,l being Nat ,n;
      assume
A48:  l in dom Del(f1,i);
      set n1=(Sgm Y).n;
      reconsider n1 as Nat;
A49:  (Sgm Y)*(p9") = (Sgm Y) * ((Sgm Y)" * ((p") * (Sgm X))) by A25,RELAT_1:36
        .= ((Sgm Y) * (Sgm Y)") * ((p") * (Sgm X)) by RELAT_1:36
        .= id Y * ((p") * (Sgm X)) by A22,A15,A47,FUNCT_2:29
        .= id Y * p" * (Sgm X) by RELAT_1:36
        .= (Y|`p")*(Sgm X) by RELAT_1:92;
      assume
A50:  n=p9".l;
A51:  l in dom (p9") by A48,FUNCT_2:def 1;
      then n in rng (p9") by A50,FUNCT_1:3;
      then n in dom Del(f1,i);
      then n in Seg len Del(f2,j) by A5,A9,A10,A8,FINSEQ_1:def 3;
      then
A52:  n in dom Del(f2,j) by FINSEQ_1:def 3;
      set l1=(Sgm X).l;
A53:  dom Del(f1,i) c= dom Sgm X by RELAT_1:25;
      then l1 in rng Sgm X by A48,FUNCT_1:3;
      then
A54:  l1 in dom f1 by A21,XBOOLE_0:def 5;
      assume that
A55:  H1 = Del(f1,i).l and
A56:  H2 = Del(f2,j).n;
      reconsider l1 as Nat;
A57:  H1 = f1.l1 by A48,A55,A53,FUNCT_1:13;
A58:  dom f1 = rng p by FUNCT_2:def 3;
      then
A59:  l1 in dom(p") by A54,FUNCT_1:33;
A60:  now
        assume p".l1 in {j};
        then
A61:    p".l1=p".i by A4,TARSKI:def 1;
        i in dom(p") by A2,A58,FUNCT_1:33;
        then l1=i by A59,A61,FUNCT_1:def 4;
        then i in rng Sgm X by A48,A53,FUNCT_1:3;
        then not i in {i} by A21,XBOOLE_0:def 5;
        hence contradiction by TARSKI:def 1;
      end;
      p".l1 in rng(p") by A59,FUNCT_1:3;
      then
A62:  p".l1 in Y by A23,A60,XBOOLE_0:def 5;
      dom Del(f2,j) c= dom Sgm Y by RELAT_1:25;
      then
A63:  H2 = f2.n1 by A56,A52,FUNCT_1:13;
      n1 = ((Sgm Y)*(p9")).l by A50,A51,FUNCT_1:13
        .= (Y|`p").l1 by A48,A53,A49,FUNCT_1:13
        .= p".l1 by A54,A62,FUNCT_2:34;
      hence H1,H2 are_isomorphic by A3,A54,A57,A63;
    end;
    hence thesis by A5,A9,A10,A8;
  end;
end;
