End KNOT__COVARIANT_HERED_PROP_OTH_REL.
Module Type KNOT_INPUT__COVARIANT_HERED_PROP_OTH.
Parameter F : functor.
Parameter other : Type.
End KNOT_INPUT__COVARIANT_HERED_PROP_OTH.
Module Type KNOT__COVARIANT_HERED_PROP_OTH.
Declare Module KI : KNOT_INPUT__COVARIANT_HERED_PROP_OTH.
Parameter knot : Type.
Parameter ageable_knot : ageable knot.
Existing Instance ageable_knot.
Definition ag_knot_other := ag_prod knot other ageable_knot.
Existing Instance ag_knot_other.
Parameter squash : (nat * F (pred (knot * other))) -> knot.
Parameter unsquash : knot -> (nat * F (pred (knot * other))).
Parameter approx : nat -> pred (knot * other) -> pred (knot * other).

(* Specifications: *)
Axiom approx_spec : forall n p k,
approx n p k = (level (fst 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) 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.