Section TWILIGHT.
Definition twilight (sigma : hsubst) : subst L' :=
fun z : ivar => sigma (enum (isEnumerable := @sum_isEnumerable ivar Henkin_constants nat_isEnumerable nat_isEnumerable) z).
Fixpoint twilight_trm (t : trm L') : trm L' :=
match t with
| Var_trm x => Var_trm (x * 2)
| Fun_trm f ts => Fun_trm f (twilight_trms ts)
| Con_trm c =>
match c with
| inl cc => Con_trm c
| inr hc => Var_trm (hc * 2 + 1)
end
end
with twilight_trms {n : nat} (ts : trms L' n) : trms L' n :=
match ts with
| O_trms => O_trms
| S_trms n t ts => S_trms n (twilight_trm t) (twilight_trms ts)
end.

Lemma twilight_trm_HC z (t : trm L')
: HC_occurs_in_trm z t = is_free_in_trm (z * 2 + 1) (twilight_trm t)
with twilight_trms_HC n z (ts : trms L' n)
: HC_occurs_in_trms z ts = is_free_in_trms (z * 2 + 1) (twilight_trms ts).