*)
End KNOT__COVARIANT_HERED_PROP.
Module Type KNOT_INPUT__MIXVARIANT_HERED_PROP.
Parameter F : functor.
End KNOT_INPUT__MIXVARIANT_HERED_PROP.
Module Type KNOT__MIXVARIANT_HERED_PROP.
Declare Module KI : KNOT_INPUT__MIXVARIANT_HERED_PROP.
Parameter knot : Type.
Parameter ageable_knot : ageable knot.
Existing Instance ageable_knot.
Definition predicate := pred knot.
Parameter squash : (nat * F (pred knot)) -> knot.
Parameter unsquash : knot -> (nat * F (pred knot)).
Parameter approx : nat -> pred knot -> pred knot.

(* Specifications: *)
Axiom approx_spec : forall n p k,
approx n p k = (level k < n /\ p k).
Axiom squash_unsquash : forall x,
squash (unsquash x) = x.
Axiom unsquash_squash : forall n x',
unsquash (squash (n,x')) = (n, fmap F (approx n) (approx n) x').
(* Definitions of the "ageable" operations *)
Axiom knot_level : forall (k:knot),
level k = fst (unsquash k).
Axiom knot_age1 : forall (k:knot),
age1 k =
match unsquash k with
| (O,_) => None
| (S n,x) => Some (squash (n,x))
end.