let p, q be XFinSequence; p ^ q = p +* (Shift (q,(card p)))
A1:
dom (Shift (q,(card p))) = { (M + (card p)) where M is Nat : M in dom q }
by VALUED_1:def 12;
for x being object holds
( x in dom (p ^ q) iff ( x in dom p or x in dom (Shift (q,(card p))) ) )
then A5:
dom (p ^ q) = (dom p) \/ (dom (Shift (q,(card p))))
by XBOOLE_0:def 3;
for x being object 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
object ;
( 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 A6:
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 A7:
x in dom (Shift (q,(card p)))
;
(p ^ q) . x = (Shift (q,(card p))) . xthen reconsider k =
x as
Nat ;
consider M being
Nat such that A8:
x = M + (card p)
and A9:
M in dom q
by A7, A1;
set m =
k -' (len p);
A10:
(len p) + (k -' (len p)) = k
by A8, NAT_D:34;
hence (p ^ q) . x =
q . (k -' (len p))
by A8, A9, Def3
.=
(Shift (q,(card p))) . x
by A8, A9, A10, 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 A6, XBOOLE_0:def 3;
hence
(p ^ q) . x = p . x
by Def3;
verum
end;
hence
p ^ q = p +* (Shift (q,(card p)))
by A5, FUNCT_4:def 1; verum