(********************************************)
(* code generation algorithm *)
(*****************************)
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 *)

(* Specifications: *)
Lemma chain_cases :
forall p : nat,
0 < p ->
{q : nat | q < p /\ two <= q} + {l : nat | p = two_power l} + {p = three}.