
theorem Th1:
  for n be non zero Nat for F be Tuple of n,BOOLEAN holds Absval F
  < 2 to_power n
proof
  defpred P[non zero Nat] means for F be Tuple of $1,BOOLEAN holds Absval F <
  2 to_power $1;
A1: for n be non zero Nat st P[n] holds P[n+1]
  proof
    let n be non zero Nat;
    assume
A2: P[n];
    n < n+1 by NAT_1:13;
    then
A3: 2 to_power n < 2 to_power (n+1) by POWER:39;
    let F be Tuple of n+1,BOOLEAN;
    consider T be Element of n-tuples_on BOOLEAN,
         d be Element of BOOLEAN such that
A4: F = T^<*d*> by FINSEQ_2:117;
A5: Absval F = Absval T + IFEQ(d,FALSE,0,2 to_power n) by A4,BINARITH:20;
A6: Absval T < 2 to_power n by A2;
    per cases by XBOOLEAN:def 3;
    suppose
      d = FALSE;
      then Absval F = Absval T + 0 by A5,FUNCOP_1:def 8;
      then
      Absval F + 2 to_power n < 2 to_power n + 2 to_power (n+1) by A2,A3,
XREAL_1:8;
      hence thesis by XREAL_1:6;
    end;
    suppose
      d = TRUE;
      then Absval F = Absval T + 2 to_power n by A5,FUNCOP_1:def 8;
      then Absval F < 2 to_power n + 2 to_power n by A6,XREAL_1:6;
      then Absval F < 2 to_power n * 2;
      then Absval F < 2 to_power n * 2 to_power 1 by POWER:25;
      hence thesis by POWER:27;
    end;
  end;
A7: P[1]
  proof
    let F be Tuple of 1,BOOLEAN;
    consider d be Element of BOOLEAN such that
A8: F = <*d*> by FINSEQ_2:97;
    d = TRUE or d = FALSE by XBOOLEAN:def 3;
    then Absval F = 1 or Absval F = 0 by A8,BINARITH:15,16;
    then Absval F < 2;
    hence thesis by POWER:25;
  end;
  thus for n being non zero Nat holds P[n] from NAT_1:sch 10(A7,A1);
end;
