reserve a, b, k, n, m for Nat,
  i for Integer,
  r for Real,
  p for Rational,
  c for Complex,
  x for object,
  f for Function;

theorem Th15:
  a < b implies modSeq(m,n).a > modSeq(m,n).b or modSeq(m,n).a = 0
proof
  set fm = modSeq(m,n);
  assume
A1: a < b;
  per cases;
  suppose
    fm.a = 0;
    hence thesis;
  end;
  suppose
A2: fm.a > 0;
    defpred P[Nat] means a < $1 implies fm.a > fm.$1;
A3: for x being Nat st P[x] holds P[x+1]
    proof
      let x be Nat such that
A4:   P[x];
      assume a < x+1;
      then
A5:   a <= x by NAT_1:13;
      per cases by A5,XXREAL_0:1;
      suppose
        a = x;
        hence fm.a > fm.(x+1) by A2,Lm2;
      end;
      suppose
A6:     a < x;
        thus fm.a > fm.(x+1)
        proof
          per cases by Lm2;
          suppose
            fm.x > fm.(x+1);
            hence thesis by A4,A6,XXREAL_0:2;
          end;
          suppose
            fm.x = 0;
            hence thesis by A2,Th14,NAT_1:11;
          end;
        end;
      end;
    end;
A7: P[0];
    for x being Nat holds P[x] from NAT_1:sch 2(A7,A3);
    hence thesis by A1;
  end;
end;
