let p, q be FinSequence; :: thesis: ( ( rng p misses rng q & p is one-to-one & q is one-to-one ) iff p ^ q is one-to-one )
thus
( rng p misses rng q & p is one-to-one & q is one-to-one implies p ^ q is one-to-one )
:: thesis: ( p ^ q is one-to-one implies ( rng p misses rng q & p is one-to-one & q is one-to-one ) )proof
assume that A1:
rng p misses rng q
and A2:
p is
one-to-one
and A3:
q is
one-to-one
;
:: thesis: p ^ q is one-to-one
let x be
set ;
:: according to FUNCT_1:def 8 :: thesis: for b1 being set holds
( not x in dom (p ^ q) or not b1 in dom (p ^ q) or not (p ^ q) . x = (p ^ q) . b1 or x = b1 )let y be
set ;
:: thesis: ( not x in dom (p ^ q) or not y in dom (p ^ q) or not (p ^ q) . x = (p ^ q) . y or x = y )
assume that A4:
x in dom (p ^ q)
and A5:
y in dom (p ^ q)
and A6:
(p ^ q) . x = (p ^ q) . y
;
:: thesis: x = y
reconsider k1 =
x,
k2 =
y as
Element of
NAT by A4, A5;
now per cases
( ( k1 in dom p & k2 in dom p ) or ( k1 in dom p & ex n being Nat st
( n in dom q & k2 = (len p) + n ) ) or ( k2 in dom p & ex n being Nat st
( n in dom q & k1 = (len p) + n ) ) or ( ex n being Nat st
( n in dom q & k1 = (len p) + n ) & ex n being Nat st
( n in dom q & k2 = (len p) + n ) ) )
by A4, A5, FINSEQ_1:38;
suppose A14:
( ex
n being
Nat st
(
n in dom q &
k1 = (len p) + n ) & ex
n being
Nat st
(
n in dom q &
k2 = (len p) + n ) )
;
:: thesis: x = ythen consider n1 being
Nat such that A15:
n1 in dom q
and A16:
k1 = (len p) + n1
;
consider n2 being
Nat such that A17:
n2 in dom q
and A18:
k2 = (len p) + n2
by A14;
(
(p ^ q) . k1 = q . n1 &
(p ^ q) . k2 = q . n2 )
by A15, A16, A17, A18, FINSEQ_1:def 7;
hence
x = y
by A3, A6, A15, A16, A17, A18, FUNCT_1:def 8;
:: thesis: verum end; end; end;
hence
x = y
;
:: thesis: verum
end;
assume A19:
p ^ q is one-to-one
; :: thesis: ( rng p misses rng q & p is one-to-one & q is one-to-one )
thus
rng p misses rng q
:: thesis: ( p is one-to-one & q is one-to-one )proof
assume
not
rng p misses rng q
;
:: thesis: contradiction
then consider x being
set such that A20:
x in rng p
and A21:
x in rng q
by XBOOLE_0:3;
consider y1 being
set such that A22:
y1 in dom p
and A23:
p . y1 = x
by A20, FUNCT_1:def 5;
consider y2 being
set such that A24:
y2 in dom q
and A25:
q . y2 = x
by A21, FUNCT_1:def 5;
A26:
(
y1 in Seg (len p) &
y2 in Seg (len q) )
by A22, A24, FINSEQ_1:def 3;
reconsider y1 =
y1,
y2 =
y2 as
Element of
NAT by A22, A24;
A27:
(len p) + y2 in dom (p ^ q)
by A24, FINSEQ_1:41;
(
(p ^ q) . y1 = p . y1 &
(p ^ q) . ((len p) + y2) = q . y2 &
y1 in dom (p ^ q) )
by A22, A24, Th24, FINSEQ_1:def 7;
then A28:
y1 = (len p) + y2
by A19, A23, A25, A27, FUNCT_1:def 8;
(
y1 <= len p &
len p <= (len p) + y2 )
by A26, FINSEQ_1:3, NAT_1:12;
then
(
y1 = len p &
y1 = y1 + 0 )
by A28, XXREAL_0:1;
hence
contradiction
by A26, A28, FINSEQ_1:3;
:: thesis: verum
end;
thus
p is one-to-one
:: thesis: q is one-to-one
let x be set ; :: according to FUNCT_1:def 8 :: thesis: for b1 being set holds
( not x in dom q or not b1 in dom q or not q . x = q . b1 or x = b1 )
let y be set ; :: thesis: ( not x in dom q or not y in dom q or not q . x = q . y or x = y )
assume that
A31:
x in dom q
and
A32:
y in dom q
and
A33:
q . x = q . y
; :: thesis: x = y
consider k being Nat such that
A34:
x = k
and
A35:
(len p) + k in dom (p ^ q)
by A31, FINSEQ_1:40;
consider l being Nat such that
A36:
y = l
and
A37:
(len p) + l in dom (p ^ q)
by A32, FINSEQ_1:40;
( (p ^ q) . ((len p) + k) = q . k & (p ^ q) . ((len p) + l) = q . l )
by A31, A32, A34, A36, FINSEQ_1:def 7;
then
(len p) + k = (len p) + l
by A19, A33, A34, A35, A36, A37, FUNCT_1:def 8;
hence
x = y
by A34, A36; :: thesis: verum