:: BINARI_3 semantic presentation  Show TPTP formulae Show IDV graph for whole article:: Showing IDV graph ... (Click the Palm Trees again to close it)

theorem Th1: :: BINARI_3:1  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being non empty Nat
for F being Tuple of n,BOOLEAN holds Absval F < 2 to_power n
proof end;

theorem Th2: :: BINARI_3:2  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being non empty Nat
for F1, F2 being Tuple of n,BOOLEAN st Absval F1 = Absval F2 holds
F1 = F2
proof end;

theorem :: BINARI_3:3  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for t1, t2 being FinSequence st Rev t1 = Rev t2 holds
t1 = t2
proof end;

theorem Th4: :: BINARI_3:4  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being Nat holds 0* (n + 1) = (0* n) ^ <*0*>
proof end;

theorem Th5: :: BINARI_3:5  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being Nat holds 0* n in BOOLEAN *
proof end;

theorem Th6: :: BINARI_3:6  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being Nat
for y being Tuple of n,BOOLEAN st y = 0* n holds
'not' y = n |-> 1
proof end;

theorem Th7: :: BINARI_3:7  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being non empty Nat
for F being Tuple of n,BOOLEAN st F = 0* n holds
Absval F = 0
proof end;

theorem :: BINARI_3:8  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being non empty Nat
for F being Tuple of n,BOOLEAN st F = 0* n holds
Absval ('not' F) = (2 to_power n) - 1
proof end;

theorem :: BINARI_3:9  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being Nat holds Rev (0* n) = 0* n
proof end;

theorem :: BINARI_3:10  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being Nat
for y being Tuple of n,BOOLEAN st y = 0* n holds
Rev ('not' y) = 'not' y
proof end;

theorem Th11: :: BINARI_3:11  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
Bin1 1 = <*TRUE *>
proof end;

theorem Th12: :: BINARI_3:12  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being non empty Nat holds Absval (Bin1 n) = 1
proof end;

theorem Th13: :: BINARI_3:13  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for x, y being Element of BOOLEAN holds
( ( not x 'or' y = TRUE or x = TRUE or y = TRUE ) & ( ( x = TRUE or y = TRUE ) implies x 'or' y = TRUE ) & ( x 'or' y = FALSE implies ( x = FALSE & y = FALSE ) ) & ( x = FALSE & y = FALSE implies x 'or' y = FALSE ) )
proof end;

theorem Th14: :: BINARI_3:14  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for x, y being Element of BOOLEAN holds
( add_ovfl <*x*>,<*y*> = TRUE iff ( x = TRUE & y = TRUE ) )
proof end;

theorem Th15: :: BINARI_3:15  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
'not' <*FALSE *> = <*TRUE *>
proof end;

theorem :: BINARI_3:16  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
'not' <*TRUE *> = <*FALSE *>
proof end;

theorem :: BINARI_3:17  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
<*FALSE *> + <*FALSE *> = <*FALSE *>
proof end;

theorem Th18: :: BINARI_3:18  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
( <*FALSE *> + <*TRUE *> = <*TRUE *> & <*TRUE *> + <*FALSE *> = <*TRUE *> )
proof end;

theorem :: BINARI_3:19  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
<*TRUE *> + <*TRUE *> = <*FALSE *>
proof end;

theorem Th20: :: BINARI_3:20  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being non empty Nat
for x, y being Tuple of n,BOOLEAN st x /. n = TRUE & (carry x,(Bin1 n)) /. n = TRUE holds
for k being non empty Nat st k <> 1 & k <= n holds
( x /. k = TRUE & (carry x,(Bin1 n)) /. k = TRUE )
proof end;

theorem Th21: :: BINARI_3:21  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being non empty Nat
for x being Tuple of n,BOOLEAN st x /. n = TRUE & (carry x,(Bin1 n)) /. n = TRUE holds
carry x,(Bin1 n) = 'not' (Bin1 n)
proof end;

theorem Th22: :: BINARI_3:22  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being non empty Nat
for x, y being Tuple of n,BOOLEAN st y = 0* n & x /. n = TRUE & (carry x,(Bin1 n)) /. n = TRUE holds
x = 'not' y
proof end;

theorem Th23: :: BINARI_3:23  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being non empty Nat
for y being Tuple of n,BOOLEAN st y = 0* n holds
carry ('not' y),(Bin1 n) = 'not' (Bin1 n)
proof end;

theorem Th24: :: BINARI_3:24  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being non empty Nat
for x, y being Tuple of n,BOOLEAN st y = 0* n holds
( add_ovfl x,(Bin1 n) = TRUE iff x = 'not' y )
proof end;

theorem Th25: :: BINARI_3:25  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being non empty Nat
for z being Tuple of n,BOOLEAN st z = 0* n holds
('not' z) + (Bin1 n) = z
proof end;

definition
let n, k be Nat;
func n -BinarySequence k -> Tuple of n,BOOLEAN means :Def1: :: BINARI_3:def 1
for i being Nat st i in Seg n holds
it /. i = IFEQ ((k div (2 to_power (i -' 1))) mod 2),0,FALSE ,TRUE ;
existence
ex b1 being Tuple of n,BOOLEAN st
for i being Nat st i in Seg n holds
b1 /. i = IFEQ ((k div (2 to_power (i -' 1))) mod 2),0,FALSE ,TRUE
proof end;
uniqueness
for b1, b2 being Tuple of n,BOOLEAN st ( for i being Nat st i in Seg n holds
b1 /. i = IFEQ ((k div (2 to_power (i -' 1))) mod 2),0,FALSE ,TRUE ) & ( for i being Nat st i in Seg n holds
b2 /. i = IFEQ ((k div (2 to_power (i -' 1))) mod 2),0,FALSE ,TRUE ) holds
b1 = b2
proof end;
end;

:: deftheorem Def1 defines -BinarySequence BINARI_3:def 1 :
for n, k being Nat
for b3 being Tuple of n,BOOLEAN holds
( b3 = n -BinarySequence k iff for i being Nat st i in Seg n holds
b3 /. i = IFEQ ((k div (2 to_power (i -' 1))) mod 2),0,FALSE ,TRUE );

theorem Th26: :: BINARI_3:26  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being Nat holds n -BinarySequence 0 = 0* n
proof end;

theorem Th27: :: BINARI_3:27  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n, k being Nat st k < 2 to_power n holds
((n + 1) -BinarySequence k) . (n + 1) = FALSE
proof end;

theorem Th28: :: BINARI_3:28  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being non empty Nat
for k being Nat st k < 2 to_power n holds
(n + 1) -BinarySequence k = (n -BinarySequence k) ^ <*FALSE *>
proof end;

Lm1: for n being non empty Nat holds (n + 1) -BinarySequence (2 to_power n) = (0* n) ^ <*TRUE *>
proof end;

Lm2: for n being non empty Nat
for k being Nat st 2 to_power n <= k & k < 2 to_power (n + 1) holds
((n + 1) -BinarySequence k) . (n + 1) = TRUE
proof end;

Lm3: for n being non empty Nat
for k being Nat st 2 to_power n <= k & k < 2 to_power (n + 1) holds
(n + 1) -BinarySequence k = (n -BinarySequence (k -' (2 to_power n))) ^ <*TRUE *>
proof end;

Lm4: for n being non empty Nat
for k being Nat st k < 2 to_power n holds
for x being Tuple of n,BOOLEAN st x = 0* n holds
( n -BinarySequence k = 'not' x iff k = (2 to_power n) - 1 )
proof end;

theorem Th29: :: BINARI_3:29  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for i being Nat holds (i + 1) -BinarySequence (2 to_power i) = (0* i) ^ <*1*>
proof end;

theorem :: BINARI_3:30  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being non empty Nat
for k being Nat st 2 to_power n <= k & k < 2 to_power (n + 1) holds
((n + 1) -BinarySequence k) . (n + 1) = TRUE by Lm2;

theorem Th31: :: BINARI_3:31  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being non empty Nat
for k being Nat st 2 to_power n <= k & k < 2 to_power (n + 1) holds
(n + 1) -BinarySequence k = (n -BinarySequence (k -' (2 to_power n))) ^ <*TRUE *> by Lm3;

theorem Th32: :: BINARI_3:32  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being non empty Nat
for k being Nat st k < 2 to_power n holds
for x being Tuple of n,BOOLEAN st x = 0* n holds
( n -BinarySequence k = 'not' x iff k = (2 to_power n) - 1 ) by Lm4;

theorem Th33: :: BINARI_3:33  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being non empty Nat
for k being Nat st k + 1 < 2 to_power n holds
add_ovfl (n -BinarySequence k),(Bin1 n) = FALSE
proof end;

theorem Th34: :: BINARI_3:34  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being non empty Nat
for k being Nat st k + 1 < 2 to_power n holds
n -BinarySequence (k + 1) = (n -BinarySequence k) + (Bin1 n)
proof end;

theorem :: BINARI_3:35  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n, i being Nat holds (n + 1) -BinarySequence i = <*(i mod 2)*> ^ (n -BinarySequence (i div 2))
proof end;

theorem Th36: :: BINARI_3:36  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being non empty Nat
for k being Nat st k < 2 to_power n holds
Absval (n -BinarySequence k) = k
proof end;

theorem :: BINARI_3:37  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being non empty Nat
for x being Tuple of n,BOOLEAN holds n -BinarySequence (Absval x) = x
proof end;