End KnotLemmas_MixVariantHeredTOthRel.
Module Type KNOT_FULL_OUTPUT.
Declare Module KI: KNOT_INPUT__MIXVARIANT_HERED_T_OTH_REL.
Declare Module K0: KNOT__MIXVARIANT_HERED_T_OTH_REL with Module KI := KI.
Parameter predicate: Type.
Parameter pkp: bijection predicate K0.predicate.
End KNOT_FULL_OUTPUT.
Module Type KNOT_FULL.
Declare Module KI: KNOT_INPUT__MIXVARIANT_HERED_T_OTH_REL.
Declare Module KO: KNOT_FULL_OUTPUT with Module KI := KI.
Definition knot : Type := KO.K0.knot.
Definition ageable_knot : ageable knot := KO.K0.ageable_knot.
Existing Instance ageable_knot.
Definition predicate: Type := KO.predicate.
Parameter squash : (nat * F predicate) -> knot.
Parameter unsquash : knot -> (nat * F predicate).
Parameter approx : nat -> predicate -> predicate.

(* Specifications: *)
Axiom squash_unsquash : forall k:knot, squash (unsquash k) = k.
Axiom unsquash_squash : forall (n:nat) (f:F predicate),
unsquash (squash (n,f)) = (n, fmap F (approx n) (approx n) f).
Axiom approx_spec : forall n p ko,
proj1_sig (bij_f _ _ KO.pkp (approx n p)) ko =
if (le_gt_dec n (level (fst ko)))
then KI.T_bot
else proj1_sig (bij_f _ _ KO.pkp p) ko.
Axiom knot_age1 : forall k:knot,
age1 k =
match unsquash k with
| (O,_) => None
| (S n,x) => Some (squash (n,x))
end.
Axiom knot_level : forall k:knot,
level k = fst (unsquash k).