reserve i,j,k,n for Nat;
reserve x,y,z for Tuple of n, BOOLEAN;
reserve m,k,k1,k2 for FinSequence of NAT;

theorem Th36:
  for n being non zero Nat,lk being Nat,
Key being Matrix of lk,6,NAT, k being Nat holds IDEA_P_F(Key,n,(k+1)
  ) = IDEA_P_F(Key,n,k)^<* IDEA_P(Line(Key,(k+1)),n) *>
proof
  let n be non zero Nat;
  let lk be Nat;
  let Key be Matrix of lk,6,NAT;
  let k be Nat;
A1: for i being Nat st 1 <= i & i <= len IDEA_P_F(Key,n,(k+1)) holds
IDEA_P_F(Key,n,(k+1)).i = (IDEA_P_F(Key,n,k)^<* IDEA_P(Line(Key,(k+1)),n) *>).i
  proof
    dom <* IDEA_P(Line(Key,(k+1)),n) *> = Seg 1 by FINSEQ_1:def 8;
    then
A2: 1 in dom <*IDEA_P(Line(Key,(k+1)),n)*> by FINSEQ_1:1;
    let i be Nat;
    assume that
A3: 1 <= i and
A4: i <= len IDEA_P_F(Key,n,(k+1));
    i in Seg len IDEA_P_F(Key,n,(k+1)) by A3,A4,FINSEQ_1:1;
    then
A5: i in dom IDEA_P_F(Key,n,(k+1)) by FINSEQ_1:def 3;
A6: i <= k+1 by A4,Def17;
    now
      per cases;
      suppose
        i <> k+1;
        then i <= k by A6,NAT_1:8;
        then i in Seg k by A3,FINSEQ_1:1;
        then i in Seg len IDEA_P_F(Key,n,k) by Def17;
        then
A7:     i in dom IDEA_P_F(Key,n,k) by FINSEQ_1:def 3;
        hence
        (IDEA_P_F(Key,n,k)^<* IDEA_P(Line(Key,(k+1)),n) *>).i = IDEA_P_F(
        Key,n,k).i by FINSEQ_1:def 7
          .= IDEA_P(Line(Key,i),n) by A7,Def17
          .= IDEA_P_F(Key,n,(k+1)).i by A5,Def17;
      end;
      suppose
A8:     i = k+1;
        hence
        (IDEA_P_F(Key,n,k)^<* IDEA_P(Line(Key,(k+1)),n) *>).i =(IDEA_P_F(
Key,n,k)^<* IDEA_P(Line(Key,(k+1)),n) *>). (len IDEA_P_F(Key,n,k) + 1) by Def17
          .= <* IDEA_P(Line(Key,(k+1)),n) *>.1 by A2,FINSEQ_1:def 7
          .= IDEA_P(Line(Key,(k+1)),n)
          .= IDEA_P_F(Key,n,(k+1)).i by A5,A8,Def17;
      end;
    end;
    hence thesis;
  end;
  len (IDEA_P_F(Key,n,k)^<* IDEA_P(Line(Key,(k+1)),n) *>) = len IDEA_P_F(
  Key,n,k) + len <* IDEA_P(Line(Key,(k+1)),n) *> by FINSEQ_1:22
    .= k + len <* IDEA_P(Line(Key,(k+1)),n) *> by Def17
    .= k + 1 by FINSEQ_1:39;
  then
  len IDEA_P_F(Key,n,(k+1)) = len (IDEA_P_F(Key,n,k)^<* IDEA_P(Line(Key,(k
  +1)),n) *>) by Def17;
  hence thesis by A1,FINSEQ_1:14;
end;
