let F, F1 be FinSequence of INT ; :: thesis: for k, ma being Nat st k + 1 <= len F & ma = min_at (F,(k + 1),(len F)) & F is_split_at k & F1 = (F +* ((k + 1),(F . ma))) +* (ma,(F . (k + 1))) holds
F1 is_split_at k + 1

let k, ma be Nat; :: thesis: ( k + 1 <= len F & ma = min_at (F,(k + 1),(len F)) & F is_split_at k & F1 = (F +* ((k + 1),(F . ma))) +* (ma,(F . (k + 1))) implies F1 is_split_at k + 1 )
assume that
A1: k + 1 <= len F and
A2: ma = min_at (F,(k + 1),(len F)) and
A3: F is_split_at k and
A4: F1 = (F +* ((k + 1),(F . ma))) +* (ma,(F . (k + 1))) ; :: thesis: F1 is_split_at k + 1
A5: dom F1 = dom (F +* ((k + 1),(F . ma))) by ;
A6: k < k + 1 by NAT_1:13;
A7: 1 <= k + 1 by NAT_1:12;
let i, j be Nat; :: according to FINSEQ_6:def 10 :: thesis: ( 1 <= i & i <= k + 1 & k + 1 < j & j <= len F1 implies F1 . i <= F1 . j )
assume that
A8: 1 <= i and
A9: i <= k + 1 and
A10: k + 1 < j and
A11: j <= len F1 ; :: thesis: F1 . i <= F1 . j
A12: k < j by ;
A13: dom (F +* ((k + 1),(F . ma))) = dom F by FUNCT_7:30;
then A14: len F1 = len F by ;
then A15: k + 1 <= len F by ;
i <= len F1 by ;
then A16: i in dom F1 by ;
1 <= j by ;
then A17: j in dom F1 by ;
per cases ( i < k + 1 or i = k + 1 ) by ;
suppose A18: i < k + 1 ; :: thesis: F1 . i <= F1 . j
then i <> ma by A1, A2, A7, Th59;
then A19: F1 . i = (F +* ((k + 1),(F . ma))) . i by
.= F . i by ;
A20: i <= k by ;
thus F1 . i <= F1 . j :: thesis: verum
proof
per cases ( j <> ma or j = ma ) ;
suppose j <> ma ; :: thesis: F1 . i <= F1 . j
then F1 . j = (F +* ((k + 1),(F . ma))) . j by
.= F . j by ;
hence F1 . i <= F1 . j by A3, A14, A8, A11, A12, A20, A19; :: thesis: verum
end;
suppose j = ma ; :: thesis: F1 . i <= F1 . j
then F1 . j = F . (k + 1) by ;
hence F1 . i <= F1 . j by A3, A6, A8, A15, A20, A19; :: thesis: verum
end;
end;
end;
end;
suppose A21: i = k + 1 ; :: thesis: F1 . i <= F1 . j
A22: F1 . i = F . ma
proof
per cases ( k + 1 = ma or k + 1 <> ma ) ;
suppose k + 1 = ma ; :: thesis: F1 . i = F . ma
hence F1 . i = F . ma by ; :: thesis: verum
end;
suppose k + 1 <> ma ; :: thesis: F1 . i = F . ma
hence F1 . i = (F +* ((k + 1),(F . ma))) . i by
.= F . ma by ;
:: thesis: verum
end;
end;
end;
thus F1 . i <= F1 . j :: thesis: verum
proof
per cases ( j = ma or j <> ma ) ;
suppose j = ma ; :: thesis: F1 . i <= F1 . j
then F1 . j = F . (k + 1) by ;
hence F1 . i <= F1 . j by A1, A2, A7, A22, Th59; :: thesis: verum
end;
suppose j <> ma ; :: thesis: F1 . i <= F1 . j
then F1 . j = (F +* ((k + 1),(F . ma))) . j by
.= F . j by ;
hence F1 . i <= F1 . j by A1, A2, A14, A7, A10, A11, A22, Th59; :: thesis: verum
end;
end;
end;
end;
end;