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𝒫0k0|haddkxkyseq0c2𝑜,m0ifcaddmxmyc1𝑜n0ifn=0n1k

Detailed syntax breakdown

Step Hyp Ref Expression
0 csad classsadd
1 vx setvarx
2 cn0 class0
3 2 cpw class𝒫0
4 vy setvary
5 vk setvark
6 5 cv setvark
7 1 cv setvarx
8 6 7 wcel wffkx
9 4 cv setvary
10 6 9 wcel wffky
11 c0 class
12 cc0 class0
13 vc setvarc
14 c2o class2𝑜
15 vm setvarm
16 15 cv setvarm
17 16 7 wcel wffmx
18 16 9 wcel wffmy
19 13 cv setvarc
20 11 19 wcel wffc
21 17 18 20 wcad wffcaddmxmyc
22 c1o class1𝑜
23 21 22 11 cif classifcaddmxmyc1𝑜
24 13 15 14 2 23 cmpo classc2𝑜,m0ifcaddmxmyc1𝑜
25 vn setvarn
26 25 cv setvarn
27 26 12 wceq wffn=0
28 cmin class
29 c1 class1
30 26 29 28 co classn1
31 27 11 30 cif classifn=0n1
32 25 2 31 cmpt classn0ifn=0n1
33 24 32 12 cseq classseq0c2𝑜,m0ifcaddmxmyc1𝑜n0ifn=0n1
34 6 33 cfv classseq0c2𝑜,m0ifcaddmxmyc1𝑜n0ifn=0n1k
35 11 34 wcel wffseq0c2𝑜,m0ifcaddmxmyc1𝑜n0ifn=0n1k
36 8 10 35 whad wffhaddkxkyseq0c2𝑜,m0ifcaddmxmyc1𝑜n0ifn=0n1k
37 36 5 2 crab classk0|haddkxkyseq0c2𝑜,m0ifcaddmxmyc1𝑜n0ifn=0n1k
38 1 4 3 3 37 cmpo classx𝒫0,y𝒫0k0|haddkxkyseq0c2𝑜,m0ifcaddmxmyc1𝑜n0ifn=0n1k
39 0 38 wceq wffsadd=x𝒫0,y𝒫0k0|haddkxkyseq0c2𝑜,m0ifcaddmxmyc1𝑜n0ifn=0n1k