Section const_1_cn.
(* Perhaps you should encode the predicate that  w = ∑ {i=0..2^{l+1}} r^i u = ∑ {1..l} r^{2^i} and u1 = u*u ⇣ w  as diophantine and use that predicate because it is used for Const1 and the product and CodeNat *)
Variable (u u1 : nat) (Hu  : u = ∑ l (fun i => power (power (S i) 2) r))
(Hu1 : u1 = ∑ l (fun i => power (power (S (S i)) 2) r)).
Let w  := ∑ (S (power (S l) 2)) (fun i => power i r).
(*     Let u1 := ∑ l (fun i => power (power (S (S i)) 2) r). *)
Let u2 := ∑ l (fun i => ∑ i (fun j => 2*power (power (S i) 2 + power (S j) 2) r)).
Let H18 : 1+(r-1)*w = power (S (power (S l) 2)) r.
Let k := S (power (S l) 2).
Let f i := power (S i) 2.
Let Hf1 i : i < l -> 2*f i < k.
Let Hf2 i j : i < j < l -> f i < f j.
Let H20 : u1 = (u*u) ⇣ w.
Let H21 : u2 = (u*u) ⇣ (2*w).
Let H22 : power 2 r + u1 = u + power (power (S l) 2) r.
Let H23 : divides (power 4 r) u1.

Lemma const1_cn : exists w u2,    1+(r-1)*w = power (S (power (S l) 2)) r
/\ u*u = u1 + u2
/\ u1 = (u*u) ⇣ w
/\ u2 = (u*u) ⇣ (2*w)
/\ power 2 r + u1 = u + power (power (S l) 2) r
/\ divides (power 4 r) u1.