Require Export VST.msl.eq_dec.

(* Specifications: *)
Lemma max_two_power_nat: forall n1 n2, Z.max (two_power_nat n1) (two_power_nat n2) = two_power_nat (Nat.max n1 n2).
Lemma Z_max_two_p: forall m1 m2, (exists n, m1 = two_power_nat n) -> (exists n, m2 = two_power_nat n) -> (exists n, Z.max m1 m2 = two_power_nat n).
Lemma power_nat_divide: forall n m, two_power_nat n <= two_power_nat m -> Z.divide (two_power_nat n) (two_power_nat m).
Lemma power_nat_divide_ge: forall n m: Z,
(exists N, n = two_power_nat N) ->
(exists M, m = two_power_nat M) ->
(n >= m <-> (m | n)).
Lemma power_nat_divide_le: forall n m: Z,
(exists N, n = two_power_nat N) ->
(exists M, m = two_power_nat M) ->
(m <= n <-> (m | n)).
Lemma two_p_max_divide: forall m1 m2 m, (exists n, m1 = two_power_nat n) -> (exists n, m2 = two_power_nat n) -> ((Z.max m1 m2 | m) <-> (m1 | m) /\ (m2 | m)).
Lemma two_p_max_1: forall m1 m2, (exists n, m1 = two_power_nat n) -> (exists n, m2 = two_power_nat n) -> (Z.max m1 m2 = 1 <-> m1 = 1 /\ m2 = 1).
Lemma two_power_nat_0: forall x, (exists n, x = two_power_nat n) -> x <> 0.
Hint Rewrite andb_true_iff: align.