reserve n,m for Nat,
  r,r1,r2,s,t for Real,
  x,y for set;

theorem Th28:
  for D be non empty set, d be Element of D, f be FinSequence of
  PFuncs(D,REAL) st len f <> 0 holds d is_common_for_dom f iff d in dom Sum(f)
proof
  let D be non empty set, d be Element of D;
  defpred P[Nat] means for f be FinSequence of PFuncs(D,REAL) st
  len f =$1 & len f <> 0 holds d is_common_for_dom f iff d in dom Sum(f);
  let f be FinSequence of PFuncs(D,REAL);
  assume
A1: len f <> 0;
A2: for n st P[n] holds P[n+1]
  proof
    let n;
    assume
A3: P[n];
    let f be FinSequence of PFuncs(D,REAL);
    assume that
A4: len f = n+1 and
    len f <> 0;
A5: dom f = Seg len f by FINSEQ_1:def 3;
    now
      per cases;
      case
A6:     n=0;
        then
A7:     1 in dom f by A4,FINSEQ_3:25;
        then reconsider G = f.1 as Element of PFuncs(D,REAL) by FINSEQ_2:11;
        f=<*G*> by A4,A6,FINSEQ_1:40;
        then
A8:     Sum(f) = G by FINSOP_1:11;
        hence d is_common_for_dom f implies d in dom Sum(f) by A7;
        assume d in dom Sum(f);
        then for m st m in dom f holds
        d in dom (f.m) by A4,A5,A6,A8,FINSEQ_1:2,TARSKI:def 1;
        hence d is_common_for_dom f;
      end;
      case
A9:     n <> 0;
A10:    n<=n+1 by NAT_1:11;
        0+1<=n by A9,NAT_1:13;
        then
A11:    n in dom f by A4,A10,FINSEQ_3:25;
        0+1<=n+1 by NAT_1:13;
        then
A12:    n+1 in dom f by A4,FINSEQ_3:25;
        then reconsider G=f.(n+1) as Element of PFuncs(D,REAL) by FINSEQ_2:11;
        set fn = f|n;
A13:    len fn = n by A4,FINSEQ_1:59,NAT_1:11;
        f = fn ^ <*G*> by A4,RFINSEQ:7;
        then
A14:    Sum(f) = Sum(fn) + G by Th20;
        thus d is_common_for_dom f implies d in dom Sum(f)
        proof
          assume
A15:      d is_common_for_dom f;
          then d is_common_for_dom fn by A9,Th26;
          then
A16:      d in dom Sum(fn) by A3,A9,A13;
          d in dom G by A12,A15;
          then d in dom(Sum(fn)) /\ dom G by A16,XBOOLE_0:def 4;
          hence thesis by A14,VALUED_1:def 1;
        end;
        assume d in dom Sum(f);
        then
A17:    d in dom(Sum(fn)) /\ dom G by A14,VALUED_1:def 1;
        then d in dom(Sum(fn)) by XBOOLE_0:def 4;
        then
A18:    d is_common_for_dom fn by A3,A9,A13;
        now
          let m;
          assume that
A19:      m in dom f;
          set F = f.m;
A20:      m<=len f by A19,FINSEQ_3:25;
A21:      1<=m by A19,FINSEQ_3:25;
          now
            per cases;
            case
              m=len f;
              hence d in dom F by A4,A17,XBOOLE_0:def 4;
            end;
            case
              m<>len f;
              then m<len f by A20,XXREAL_0:1;
              then m<=n by A4,NAT_1:13;
              then
A22:          m in Seg n by A21,FINSEQ_1:1;
              then dom fn = Seg len fn & F = fn.m
              by A11,FINSEQ_1:def 3,RFINSEQ:6;
              hence d in dom F by A13,A18,A22;
            end;
          end;
          hence d in dom F;
        end;
        hence d is_common_for_dom f;
      end;
    end;
    hence thesis;
  end;
A23: P[ 0 ];
  for n holds P[n] from NAT_1:sch 2(A23,A2);
  hence thesis by A1;
end;
