End Z.
Section Sn.
(* The inductive step.  To keep things simple, we will put definitions first. *)
Variable f : K1.knot -> K2.knot.
Variable g : K2.knot -> K1.knot.
Definition f_Sn (k1 : K1.knot) : K2.knot :=
match K1.unsquash k1 with
(n, F_p1) => K2.squash (n, f_F' g F_p1)
end.
Definition g_Sn (k2 : K2.knot) : K1.knot :=
match K2.unsquash k2 with
(n, F_p2) => K1.squash (n, g_F' f F_p2)
end.
(* Now we include details relevant to the proof of the inductive step. *)
Variable n : nat.
Variable iso1 : forall k, level k <= n -> (g oo f) k = k.
Variable iso2 : forall k, level k <= n -> (f oo g) k = k.
(* These two properties are enough to prove a bijection up to level k *)

Lemma g_inj : forall ka kb,
level ka <= n ->
level kb <= n ->
g ka = g kb ->
ka = kb.