reserve x,y for set;
reserve C,C9,D,D9,E for non empty set;
reserve c for Element of C;
reserve c9 for Element of C9;
reserve d,d1,d2,d3,d4,e for Element of D;
reserve d9 for Element of D9;
reserve i,j for natural Number;
reserve F for Function of [:D,D9:],E;
reserve p,q for FinSequence of D,
  p9,q9 for FinSequence of D9;
reserve f,f9 for Function of C,D,
  h for Function of D,E;
reserve T,T1,T2,T3 for Tuple of i,D;
reserve T9 for Tuple of i, D9;
reserve S for Tuple of j, D;
reserve S9 for Tuple of j, D9;

theorem Th10:
  F.:(T^<*d*>,T9^<*d9*>) = (F.:(T,T9))^<*F.(d,d9)*>
proof
  set p = T^<*d*>, q = T9^<*d9*>, pq = F.:(T,T9);
  set r = F.:(p,q), s = pq^<*F.(d,d9)*>;
A1: len T9 = i by CARD_1:def 7;
  then
A2: len q = i+1 by FINSEQ_2:16;
A3: len T = i by CARD_1:def 7;
  then
A4: len pq = i by A1,FINSEQ_2:72;
  len p = i+1 by A3,FINSEQ_2:16;
  then
A5: len r = i+1 by A2,FINSEQ_2:72;
  then
A6: dom r = Seg(i+1) by FINSEQ_1:def 3;
A7: now
    let j be Nat;
    assume
A8: j in dom r;
    now
      per cases by A6,A8,FINSEQ_2:7;
      suppose
A9:     j in Seg i;
        Seg len T = dom T by FINSEQ_1:def 3;
        then
A10:    p.j = T.j by A3,A9,FINSEQ_1:def 7;
A11:    Seg len pq = dom pq by FINSEQ_1:def 3;
        Seg len T9 = dom T9 by FINSEQ_1:def 3;
        then
A12:    q.j = T9.j by A1,A9,FINSEQ_1:def 7;
        j in dom pq by A4,A9,FINSEQ_1:def 3;
        hence F.(p.j,q.j) = pq.j by A10,A12,FUNCOP_1:22
          .= s.j by A4,A9,A11,FINSEQ_1:def 7;
      end;
      suppose
A13:    j = i+1;
        then p.j = d & q.j = d9 by A3,A1,FINSEQ_1:42;
        hence F.(p.j,q.j) = s.j by A4,A13,FINSEQ_1:42;
      end;
    end;
    hence r.j = s.j by A8,FUNCOP_1:22;
  end;
  len s = len pq + 1 by FINSEQ_2:16;
  hence thesis by A5,A4,A7,FINSEQ_2:9;
end;
