Notation mul_eq_1 := mul_eq_1_l.

(* Specifications: *)
Lemma square_xO p : p~0 * p~0 = (p*p)~0~0.
Lemma square_xI p : p~1 * p~1 = (p*p+p)~0~1.
Lemma iter_swap_gen A B (f:A->B)(g:A->A)(h:B->B) : (forall a, f (g a) = h (f a)) -> forall p a, f (iter g a p) = iter h (f a) p.
Theorem iter_swap : forall p (A:Type) (f:A -> A) (x:A), iter f (f x) p = f (iter f x p).
Theorem iter_succ : forall p (A:Type) (f:A -> A) (x:A), iter f x (succ p) = f (iter f x p).
Theorem iter_succ_r : forall p (A:Type) (f:A -> A) (x:A), iter f x (succ p) = iter f (f x) p.
Theorem iter_add : forall p q (A:Type) (f:A -> A) (x:A), iter f x (p+q) = iter f (iter f x q) p.
Theorem iter_ind (A:Type) (f:A -> A) (a:A) (P:positive -> A -> Prop) : P 1 (f a) -> (forall p a', P p a' -> P (succ p) (f a')) -> forall p, P p (iter f a p).
Theorem iter_invariant : forall (p:positive) (A:Type) (f:A -> A) (Inv:A -> Prop), (forall x:A, Inv x -> Inv (f x)) -> forall x:A, Inv x -> Inv (iter f x p).
Lemma pow_1_r p : p^1 = p.
Lemma pow_succ_r p q : p^(succ q) = p * p^q.
Lemma square_spec p : square p = p * p.
Lemma sub_mask_succ_r p q : sub_mask p (succ q) = sub_mask_carry p q.
Theorem sub_mask_carry_spec p q : sub_mask_carry p q = pred_mask (sub_mask p q).