let p, q be XFinSequence; p ^ q = p +* (Shift (q,(card p)))
F:
dom (Shift (q,(card p))) = { (M + (card p)) where M is Element of NAT : M in dom q }
by VALUED_1:def 12;
for x being set holds
( x in dom (p ^ q) iff ( x in dom p or x in dom (Shift (q,(card p))) ) )
then A:
dom (p ^ q) = (dom p) \/ (dom (Shift (q,(card p))))
by XBOOLE_0:def 3;
for x being set st x in (dom p) \/ (dom (Shift (q,(card p)))) holds
( ( x in dom (Shift (q,(card p))) implies (p ^ q) . x = (Shift (q,(card p))) . x ) & ( not x in dom (Shift (q,(card p))) implies (p ^ q) . x = p . x ) )
proof
let x be
set ;
( x in (dom p) \/ (dom (Shift (q,(card p)))) implies ( ( x in dom (Shift (q,(card p))) implies (p ^ q) . x = (Shift (q,(card p))) . x ) & ( not x in dom (Shift (q,(card p))) implies (p ^ q) . x = p . x ) ) )
assume Z:
x in (dom p) \/ (dom (Shift (q,(card p))))
;
( ( x in dom (Shift (q,(card p))) implies (p ^ q) . x = (Shift (q,(card p))) . x ) & ( not x in dom (Shift (q,(card p))) implies (p ^ q) . x = p . x ) )
hereby ( not x in dom (Shift (q,(card p))) implies (p ^ q) . x = p . x )
assume ZZ:
x in dom (Shift (q,(card p)))
;
(p ^ q) . x = (Shift (q,(card p))) . xthen reconsider k =
x as
Nat ;
consider M being
Element of
NAT such that W1:
x = M + (card p)
and W2:
M in dom q
by ZZ, F;
set m =
k -' (len p);
A:
(len p) + (k -' (len p)) = k
by NAT_D:34, W1;
hence (p ^ q) . x =
q . (k -' (len p))
by W1, W2, Def4
.=
(Shift (q,(card p))) . x
by W1, W2, A, VALUED_1:def 12
;
verum
end;
assume
not
x in dom (Shift (q,(card p)))
;
(p ^ q) . x = p . x
then
x in dom p
by Z, XBOOLE_0:def 3;
hence
(p ^ q) . x = p . x
by Def4;
verum
end;
hence
p ^ q = p +* (Shift (q,(card p)))
by A, FUNCT_4:def 1; verum