reserve n,n1,m,k for Nat;
reserve x,y for set;
reserve s,g,g1,g2,r,p,p2,q,t for Real;
reserve s1,s2,s3 for Real_Sequence;
reserve Nseq for increasing sequence of NAT;
reserve X for Subset of REAL;

theorem
  for r for N1,N2 being Neighbourhood of r ex N being Neighbourhood of r
  st N c= N1 & N c= N2
proof
  let r;
  let N1,N2 be Neighbourhood of r;
  consider g1 such that
A1: 0<g1 and
A2: ].r-g1,r+g1.[ = N1 by Def6;
  consider g2 such that
A3: 0<g2 and
A4: ].r-g2,r+g2.[ = N2 by Def6;
  set g = min(g1,g2);
  0<g by A1,A3,XXREAL_0:15;
  then reconsider N = ].r-g,r+g.[ as Neighbourhood of r by Def6;
  take N;
A5: g<=g1 by XXREAL_0:17;
  then
A6: r+g<=r+g1 by XREAL_1:7;
  -g1<=-g by A5,XREAL_1:24;
  then
A7: r+-g1<=r+-g by XREAL_1:7;
A8: g<=g2 by XXREAL_0:17;
  then -g2<=-g by XREAL_1:24;
  then
A9: r+-g2<=r+-g by XREAL_1:7;
A10: r+g<=r+g2 by A8,XREAL_1:7;
  now
    per cases;
    suppose
A11:  g1<=g2;
A12:  now
        let y be object;
        assume
A13:    y in ].r-g,r+g.[;
        then reconsider x1=y as Real;
        ex p2 st y = p2 & r-g<p2 & p2<r+g by A13;
        then x1<r+g2 & r-g2<x1 by A10,A9,XXREAL_0:2;
        hence y in ].r-g2,r+g2.[;
      end;
      g1=g by A11,XXREAL_0:def 9;
      hence ].r-g,r+g.[ c= N1 & ].r-g,r+g.[ c= N2 by A2,A4,A12;
    end;
    suppose
A14:  g2<=g1;
A15:  now
        let y be object;
        assume
A16:    y in ].r-g,r+g.[;
        then reconsider x1=y as Real;
        ex p2 st y = p2 & r-g<p2 & p2<r+g by A16;
        then x1<r+g1 & r-g1<x1 by A6,A7,XXREAL_0:2;
        hence y in ].r-g1,r+g1.[;
      end;
      g2=g by A14,XXREAL_0:def 9;
      hence ].r-g,r+g.[ c= N1 & ].r-g,r+g.[ c= N2 by A2,A4,A15;
    end;
  end;
  hence thesis;
end;
