(* Now we show that k1_pred and k2_pred are the identity under approximation. *)
(* Not clear that we need this. *)
(* Lemma k1_pred_iso: K1.approx (n+1) oo k1_pred = K1.approx (n+1).  Lemma k2_pred_iso: K2.approx (n+1) oo k2_pred = K2.approx (n+1). *)
(* What we would like to show next is that f and g preserve the level of the knot, even in their (unfortunately non-unique over level n) inverses. Unfortunately, this is not possible:  Lemma f_level: forall k, K1.level k = K2.level (f k).  This is clearly impossible since we don't know anything about the behavior of f for knots above level n.  Actually, even this weaker version is not provable:  Lemma f_level: forall k, (K1.level k <= n \/ K2.level (f k) <= n) -> K1.level k = K2.level (f k).  Counterexample: K1.knot = K2.knot = nat; K1.level = K2.level = id; f = inc, g = dec; *)
(* So we must assert them as axioms, which means a bigger induction *)
Variable f_level: forall k, level k = level (f k).
Variable g_level: forall k, level k = level (g k).

(* Specifications: *)
(* However, using them we can prove pred_iso1 and pred_iso2, which are vital. *)
Lemma predn_iso1: forall m,
m <= (n+1) ->
g_pred' f oo K2.approx m oo f_pred' g = K1.approx m.
Lemma predn_iso2: forall m,
m <= (n+1) ->
f_pred' g oo K1.approx m oo g_pred' f = K2.approx m.
(* Now we can prove that f_Sn and g_Sn preserve the isomorphism. *)
Lemma iso1_Sn : forall k, level k <= n + 1 -> (g_Sn oo f_Sn) k = k.
Lemma iso2_Sn : forall k, level k <= n + 1 -> (f_Sn oo g_Sn) k = k.
(* We must also prove that f_Sn and g_Sn preserve the level property. *)
Lemma f_level_Sn: forall k, level k = level (f_Sn k).
Lemma g_level_Sn: forall k, level k = level (g_Sn k).
Variable fn_unsquash : forall k1,
level k1 <= n ->
forall U1,
U1 = K1.unsquash k1 ->
K2.unsquash (f k1) = (fst U1, f_F' g (snd U1)).