Section inc_seq.
Definition CodeNat c := is_cipher_of (fun i => i) c.
Let IncSeq_dio_priv y : CodeNat y <-> l = 0 /\ 1 < q /\ y = 0
\/ 0 < l
/\ exists z v v1,
seqs_of_ones v v1
/\ Code y
/\ Code z
/\ y + l*(power (power (S l) 2) r) = (z*v)⇣((r-1) * v1)
/\ y+v1+power (power 1 2) r = z + power (power (S l) 2) r.

Lemma CodeNat_dio y : CodeNat y <-> l = 0 /\ 1 < q /\ y = 0
\/ 0 < l
/\ exists z v v1 p0 p1 p2 r1,
p0 = r
/\ r1+1 = p0
/\ p1 = power (1+l) 2
/\ p2 = power p1 p0
/\ seqs_of_ones v v1
/\ Code y
/\ Code z
/\ y + l*p2 = (z*v) ⇣ (r1 * v1)
/\ y + v1 + p0*p0 = z + p2.