reserve D for non empty set;
reserve f1,f2 for FinSequence of D;
reserve i,n,n1,n2,n3,n4,n5,n6 for Element of NAT;
reserve S for Gene-Set;
reserve p1,p2 for Individual of S;

theorem Th12:
  crossover(p1,p2,n1,n1) = p1
proof
A1: (((p2|n1)^(p1/^n1))/^n1) = (p1/^n1)
  proof
    now
      per cases;
      suppose
        n1 <= len p2;
        then len (p2|n1) = n1 by FINSEQ_1:59;
        hence thesis by FINSEQ_5:37;
      end;
      suppose
        n1 > len p2;
        then
A2:     n1 > len S by Def1;
        then n1 > len crossover(p2,p1,n1) by Def1;
        then
A3:     (((p2|n1)^(p1/^n1))/^n1) = {} by FINSEQ_5:32;
        n1 > len p1 by A2,Def1;
        hence thesis by A3,FINSEQ_5:32;
      end;
    end;
    hence thesis;
  end;
  (((p1|n1)^(p2/^n1))|n1) = (p1|n1)
  proof
    now
      per cases;
      suppose
        n1 <= len p1;
        then len (p1|n1) = n1 by FINSEQ_1:59;
        hence thesis by FINSEQ_5:23;
      end;
      suppose
A4:     n1 > len p1;
        then
A5:     n1 > len S by Def1;
        then
A6:     n1 > len p2 by Def1;
        n1 > len crossover(p1,p2,n1) by A5,Def1;
        then (((p1|n1)^(p2/^n1))|n1) = (p1|n1)^(p2/^n1) by FINSEQ_1:58
          .= p1^(p2/^n1) by A4,FINSEQ_1:58
          .= p1^{} by A6,FINSEQ_5:32
          .= p1 by FINSEQ_1:34
          .= p1|n1 by A4,FINSEQ_1:58;
        hence thesis;
      end;
    end;
    hence thesis;
  end;
  hence thesis by A1,RFINSEQ:8;
end;
