Section generation.
Variable gamma : strategy.
Variable log2_r : forall n : nat, 0 < n -> log2_spec n.
(* treatment of the 3 cases for (Call_M p) - p = 3 - p is a power of 2 (q is the exponent) - we use (gamma p) as an intermediate value *)
(*******************************************************)
(* rougly speaking, COND3 can be used as a specialized control structure: In Real programs, (Cond3 A p case3 case_2q case_gamma) is equivalent to : "if p = 3 then case3 else if p is the q_th power of 2, then (case_2q q) else (case_gamma (gamma p))" *)

Lemma COND3 :
forall (A : nat -> Set) (p : nat),
(p = three -> A p) ->
(forall q : nat, p = two_power q -> A p) ->
(forall q : nat, q < p -> two <= q -> A p) -> 0 < p -> A p.