reserve i,k,l,m,n for Nat,
  x for set;
reserve R for non empty ZeroStr;
reserve p,q for AlgSequence of R;
reserve x for Element of R;

theorem
  p=<%0.R%> iff rng p = {0.R}
proof
  thus p=<%0.R%> implies rng p= {0.R}
  proof
    assume
A1: p=<%0.R%>;
    thus rng p c= {0.R}
    proof
      let x be object;
      assume x in rng p;
      then consider i being object such that
A2:   i in dom p and
A3:   x = p.i by FUNCT_1:def 3;
      reconsider i as Element of NAT by A2,FUNCT_2:def 1;
      p.i=0.R by A1,Th7;
      hence thesis by A3,TARSKI:def 1;
    end;
    thus {0.R} c= rng p
    proof
      let x be object;
      assume x in {0.R};
      then x = 0.R by TARSKI:def 1;
      then
A4:   p.0 = x by A1,Def4;
      dom p = NAT by FUNCT_2:def 1;
      hence thesis by A4,FUNCT_1:def 3;
    end;
  end;
  thus rng p={0.R} implies p=<%0.R%>
  proof
    assume
A5: rng p={0.R};
A6: for k st k>=0 holds p.k=0.R
    proof
      let k;
      k in NAT by ORDINAL1:def 12;
      then k in dom p by FUNCT_2:def 1;
      then p.k in rng p by FUNCT_1:def 3;
      hence thesis by A5,TARSKI:def 1;
    end;
    for m st m is_at_least_length_of p holds 0<=m by NAT_1:2;
    then len p=0 by A6,Def2,Def3;
    hence thesis by Th6;
  end;
end;
