reserve X,Z for set;
reserve x,y,z for object;
reserve A,B,C for Subset of X;

theorem Th82:
  for A being RelStr, B being Subset of A,
    s being FinSequence of A, x being Element of A
  st B = {x} & s = <*x*> holds
    s is B-asc_ordering & s is B-desc_ordering
proof
  let A be RelStr;
  let B be Subset of A;
  let s be FinSequence of A;
  let x be Element of A;
  assume that
    A1: B={x} and
    A2: s=<*x*>;
  A3: rng s = B by A1, A2, FINSEQ_1:38;
  A4: s is one-to-one by A2;
  for n, m being Nat st n in dom s & m in dom s & n < m holds
    s/.n <= s/.m & s/.m <= s/.n
  proof
    let n, m be Nat such that
      A5: n in dom s and
      A6: m in dom s and
      A7: n < m;
    dom s = {1} by A2, FINSEQ_1:38, FINSEQ_1:2;
    then n = 1 & m = 1 by A5, A6, TARSKI:def 1;
    hence thesis by A7;
  end;
  then s is weakly-ascending & s is weakly-descending;
  hence thesis by A3, A4;
end;
