Metamath Proof Explorer


Theorem sadcf

Description: The carry sequence is a sequence of elements of 2o encoding a "sequence of wffs". (Contributed by Mario Carneiro, 5-Sep-2016)

Ref Expression
Hypotheses sadval.a φ A 0
sadval.b φ B 0
sadval.c C = seq 0 c 2 𝑜 , m 0 if cadd m A m B c 1 𝑜 n 0 if n = 0 n 1
Assertion sadcf φ C : 0 2 𝑜

Proof

Step Hyp Ref Expression
1 sadval.a φ A 0
2 sadval.b φ B 0
3 sadval.c C = seq 0 c 2 𝑜 , m 0 if cadd m A m B c 1 𝑜 n 0 if n = 0 n 1
4 0nn0 0 0
5 iftrue n = 0 if n = 0 n 1 =
6 eqid n 0 if n = 0 n 1 = n 0 if n = 0 n 1
7 0ex V
8 5 6 7 fvmpt 0 0 n 0 if n = 0 n 1 0 =
9 4 8 ax-mp n 0 if n = 0 n 1 0 =
10 7 prid1 1 𝑜
11 df2o3 2 𝑜 = 1 𝑜
12 10 11 eleqtrri 2 𝑜
13 9 12 eqeltri n 0 if n = 0 n 1 0 2 𝑜
14 13 a1i φ n 0 if n = 0 n 1 0 2 𝑜
15 df-ov x c 2 𝑜 , m 0 if cadd m A m B c 1 𝑜 y = c 2 𝑜 , m 0 if cadd m A m B c 1 𝑜 x y
16 1oex 1 𝑜 V
17 16 prid2 1 𝑜 1 𝑜
18 17 11 eleqtrri 1 𝑜 2 𝑜
19 18 12 ifcli if cadd m A m B c 1 𝑜 2 𝑜
20 19 rgen2w c 2 𝑜 m 0 if cadd m A m B c 1 𝑜 2 𝑜
21 eqid c 2 𝑜 , m 0 if cadd m A m B c 1 𝑜 = c 2 𝑜 , m 0 if cadd m A m B c 1 𝑜
22 21 fmpo c 2 𝑜 m 0 if cadd m A m B c 1 𝑜 2 𝑜 c 2 𝑜 , m 0 if cadd m A m B c 1 𝑜 : 2 𝑜 × 0 2 𝑜
23 20 22 mpbi c 2 𝑜 , m 0 if cadd m A m B c 1 𝑜 : 2 𝑜 × 0 2 𝑜
24 23 12 f0cli c 2 𝑜 , m 0 if cadd m A m B c 1 𝑜 x y 2 𝑜
25 15 24 eqeltri x c 2 𝑜 , m 0 if cadd m A m B c 1 𝑜 y 2 𝑜
26 25 a1i φ x 2 𝑜 y V x c 2 𝑜 , m 0 if cadd m A m B c 1 𝑜 y 2 𝑜
27 nn0uz 0 = 0
28 0zd φ 0
29 fvexd φ x 0 + 1 n 0 if n = 0 n 1 x V
30 14 26 27 28 29 seqf2 φ seq 0 c 2 𝑜 , m 0 if cadd m A m B c 1 𝑜 n 0 if n = 0 n 1 : 0 2 𝑜
31 3 feq1i C : 0 2 𝑜 seq 0 c 2 𝑜 , m 0 if cadd m A m B c 1 𝑜 n 0 if n = 0 n 1 : 0 2 𝑜
32 30 31 sylibr φ C : 0 2 𝑜