let n be Nat; :: thesis: for X being set
for f being PartFunc of REAL ,REAL st X c= Seg n & X c= dom f & f | X is increasing & f .: X c= NAT \ {0 } holds
Sgm (f .: X) = f * (Sgm X)

let X be set ; :: thesis: for f being PartFunc of REAL ,REAL st X c= Seg n & X c= dom f & f | X is increasing & f .: X c= NAT \ {0 } holds
Sgm (f .: X) = f * (Sgm X)

let f be PartFunc of REAL ,REAL ; :: thesis: ( X c= Seg n & X c= dom f & f | X is increasing & f .: X c= NAT \ {0 } implies Sgm (f .: X) = f * (Sgm X) )
assume A1: X c= Seg n ; :: thesis: ( not X c= dom f or not f | X is increasing or not f .: X c= NAT \ {0 } or Sgm (f .: X) = f * (Sgm X) )
then A2: rng (Sgm X) = X by FINSEQ_1:def 13;
assume A3: X c= dom f ; :: thesis: ( not f | X is increasing or not f .: X c= NAT \ {0 } or Sgm (f .: X) = f * (Sgm X) )
assume A4: f | X is increasing ; :: thesis: ( not f .: X c= NAT \ {0 } or Sgm (f .: X) = f * (Sgm X) )
assume A5: f .: X c= NAT \ {0 } ; :: thesis: Sgm (f .: X) = f * (Sgm X)
per cases ( X misses dom f or X meets dom f ) ;
suppose A6: X misses dom f ; :: thesis: Sgm (f .: X) = f * (Sgm X)
then X: f .: X = {} by RELAT_1:151;
then f .: X c= Seg 0 ;
then Sgm (f .: X) = {} by FINSEQ_1:72, X;
hence Sgm (f .: X) = f * (Sgm X) by A2, A6, RELAT_1:67; :: thesis: verum
end;
suppose A7: X meets dom f ; :: thesis: Sgm (f .: X) = f * (Sgm X)
reconsider X9 = X as finite set by A1;
set fX = f .: X;
reconsider f9 = f as Function ;
f9 .: X9 is finite ;
then reconsider fX = f .: X as non empty finite real-membered set by A7, RELAT_1:151;
set k = max fX;
reconsider k = max fX as Nat by A5;
set fs = f * (Sgm X);
rng (Sgm X) c= dom f by A1, A3, FINSEQ_1:def 13;
then reconsider fs = f * (Sgm X) as FinSequence by FINSEQ_1:20;
f .: (rng (Sgm X)) c= NAT \ {0 } by A1, A5, FINSEQ_1:def 13;
then A8: rng fs c= NAT \ {0 } by RELAT_1:160;
NAT \ {0 } c= NAT by XBOOLE_1:36;
then rng fs c= NAT by A8, XBOOLE_1:1;
then reconsider fs = fs as FinSequence of NAT by FINSEQ_1:def 4;
now
let x be set ; :: thesis: ( x in f .: X implies x in Seg k )
assume A9: x in f .: X ; :: thesis: x in Seg k
then reconsider k9 = x as Nat by A5;
not k9 in {0 } by A5, A9, XBOOLE_0:def 5;
then k9 <> 0 by TARSKI:def 1;
then 0 + 1 < k9 + 1 by XREAL_1:8;
then A10: 1 <= k9 by NAT_1:13;
k9 <= k by A9, XXREAL_2:def 8;
hence x in Seg k by A10, FINSEQ_1:3; :: thesis: verum
end;
then A11: f .: X c= Seg k by TARSKI:def 3;
A12: now
A13: dom fs = Seg (len fs) by FINSEQ_1:def 3;
let l, m, k1, k2 be Nat; :: thesis: ( 1 <= l & l < m & m <= len fs & k1 = fs . l & k2 = fs . m implies k1 < k2 )
assume that
A14: 1 <= l and
A15: l < m and
A16: m <= len fs ; :: thesis: ( k1 = fs . l & k2 = fs . m implies k1 < k2 )
set k19 = (Sgm X) . l;
l <= len fs by A15, A16, XXREAL_0:2;
then A17: l in dom fs by A14, A13, FINSEQ_1:3;
then l in dom (Sgm X) by FUNCT_1:21;
then A18: (Sgm X) . l in X by A2, FUNCT_1:12;
set k29 = (Sgm X) . m;
1 <= m by A14, A15, XXREAL_0:2;
then A19: m in dom fs by A16, A13, FINSEQ_1:3;
then A20: m in dom (Sgm X) by FUNCT_1:21;
then A21: (Sgm X) . m in X by A2, FUNCT_1:12;
reconsider k19 = (Sgm X) . l, k29 = (Sgm X) . m as Nat ;
m in Seg (len (Sgm X)) by A20, FINSEQ_1:def 3;
then m <= len (Sgm X) by FINSEQ_1:3;
then A22: k19 < k29 by A1, A14, A15, FINSEQ_1:def 13;
reconsider k19 = k19, k29 = k29 as Element of NAT by ORDINAL1:def 13;
reconsider k19 = k19, k29 = k29 as Element of REAL ;
(Sgm X) . l in dom f by A17, FUNCT_1:21;
then A23: k19 in X /\ (dom f) by A18, XBOOLE_0:def 4;
assume that
A24: k1 = fs . l and
A25: k2 = fs . m ; :: thesis: k1 < k2
A26: k2 = f . ((Sgm X) . m) by A25, A19, FUNCT_1:22;
(Sgm X) . m in dom f by A19, FUNCT_1:21;
then A27: k29 in X /\ (dom f) by A21, XBOOLE_0:def 4;
k1 = f . ((Sgm X) . l) by A24, A17, FUNCT_1:22;
hence k1 < k2 by A4, A26, A22, A23, A27, RFUNCT_2:43; :: thesis: verum
end;
rng fs = f .: X by A2, RELAT_1:160;
hence Sgm (f .: X) = f * (Sgm X) by A11, A12, FINSEQ_1:def 13; :: thesis: verum
end;
end;