Module Type KNOT.
Declare Module TF:TY_FUNCTOR.
Parameter knot : Type.
Instance knotS : Setoid knot.
Definition koS : Setoid (knot * other) := @ProdSetoid knot knotS other otherS.
Definition predicate := Mor koS Ts.
Definition predS : Setoid predicate := MorSetoid koS Ts.
Definition natFS : Setoid (nat * F predicate) := @ProdSetoid nat (EqSetoid nat) (F predicate) (Fs predS).
Existing Instance koS.
Existing Instance predS.
Existing Instance natFS.
Parameter squash : Mor natFS knotS.
Parameter unsquash : Mor knotS natFS.
Definition level : Mor knotS (EqSetoid nat) := fstM oo unsquash.
Parameter approx : forall n:nat, Mor predS predS.

Axiom approx_spec : forall n p w, approx n p w ==
if (le_gt_dec n (level (fst w))) then T_bot else p w.