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 Th14:
  a <= b & modSeq(m,n).a = 0 implies modSeq(m,n).b = 0
proof
  set fm = modSeq(m,n);
  assume that
A1: a <= b and
A2: fm.a = 0;
A3: a < b or a = b by A1,XXREAL_0:1;
  defpred P[Nat] means a < $1 implies fm.$1 = 0;
A4: for k being Nat st P[k] holds P[k+1]
  proof
    let k be Nat such that
A5: P[k];
    assume
A6: a < k+1;
    then
A7: a <= k by NAT_1:13;
    per cases by NAT_1:25;
    suppose
A8:   k = 0;
      then
A9:   a = 0 by A6,NAT_1:13;
      thus fm.(k+1) = n mod fm.0 by A8,Th13
        .= 0 by A2,A9;
    end;
    suppose
A10:  k = 1;
      then
A11:  a = 0 or a = 1 by A7,NAT_1:25;
      2 = 2+0;
      hence fm.(k+1) = fm.0 mod fm.(0+1) by A10,Def1
        .= 0 by A2,A11;
    end;
    suppose k > 1;
      then reconsider k1 = k-1 as Nat;
      per cases by A7,XXREAL_0:1;
      suppose
A12:    a = k;
        thus fm.(k+1) = fm.(k1+2) .= fm.k1 mod fm.(k1+1) by Def1
          .= 0 by A2,A12;
      end;
      suppose
A13:    a < k;
        thus fm.(k+1) = fm.(k1+2) .= fm.k1 mod fm.(k1+1) by Def1
          .= 0 by A5,A13;
      end;
    end;
  end;
A14: P[0];
  for k being Nat holds P[k] from NAT_1:sch 2(A14,A4);
  hence thesis by A2,A3;
end;
