Metamath Proof Explorer


Definition df-sad

Description: Define the addition of two bit sequences, using df-had and df-cad bit operations. (Contributed by Mario Carneiro, 5-Sep-2016)

Ref Expression
Assertion df-sad sadd = x 𝒫 0 , y 𝒫 0 k 0 | hadd k x k y seq 0 c 2 𝑜 , m 0 if cadd m x m y c 1 𝑜 n 0 if n = 0 n 1 k

Detailed syntax breakdown

Step Hyp Ref Expression
0 csad class sadd
1 vx setvar x
2 cn0 class 0
3 2 cpw class 𝒫 0
4 vy setvar y
5 vk setvar k
6 5 cv setvar k
7 1 cv setvar x
8 6 7 wcel wff k x
9 4 cv setvar y
10 6 9 wcel wff k y
11 c0 class
12 cc0 class 0
13 vc setvar c
14 c2o class 2 𝑜
15 vm setvar m
16 15 cv setvar m
17 16 7 wcel wff m x
18 16 9 wcel wff m y
19 13 cv setvar c
20 11 19 wcel wff c
21 17 18 20 wcad wff cadd m x m y c
22 c1o class 1 𝑜
23 21 22 11 cif class if cadd m x m y c 1 𝑜
24 13 15 14 2 23 cmpo class c 2 𝑜 , m 0 if cadd m x m y c 1 𝑜
25 vn setvar n
26 25 cv setvar n
27 26 12 wceq wff n = 0
28 cmin class
29 c1 class 1
30 26 29 28 co class n 1
31 27 11 30 cif class if n = 0 n 1
32 25 2 31 cmpt class n 0 if n = 0 n 1
33 24 32 12 cseq class seq 0 c 2 𝑜 , m 0 if cadd m x m y c 1 𝑜 n 0 if n = 0 n 1
34 6 33 cfv class seq 0 c 2 𝑜 , m 0 if cadd m x m y c 1 𝑜 n 0 if n = 0 n 1 k
35 11 34 wcel wff seq 0 c 2 𝑜 , m 0 if cadd m x m y c 1 𝑜 n 0 if n = 0 n 1 k
36 8 10 35 whad wff hadd k x k y seq 0 c 2 𝑜 , m 0 if cadd m x m y c 1 𝑜 n 0 if n = 0 n 1 k
37 36 5 2 crab class k 0 | hadd k x k y seq 0 c 2 𝑜 , m 0 if cadd m x m y c 1 𝑜 n 0 if n = 0 n 1 k
38 1 4 3 3 37 cmpo class x 𝒫 0 , y 𝒫 0 k 0 | hadd k x k y seq 0 c 2 𝑜 , m 0 if cadd m x m y c 1 𝑜 n 0 if n = 0 n 1 k
39 0 38 wceq wff sadd = x 𝒫 0 , y 𝒫 0 k 0 | hadd k x k y seq 0 c 2 𝑜 , m 0 if cadd m x m y c 1 𝑜 n 0 if n = 0 n 1 k