Library Options


Inernalized Maybe type


Definition none : term := .\"s", "n"; "n".
Definition some : term := .\"t", "s", "n"; "s" "t".


Definition oenc t :=
  match t with
  | Some tlam(lam (#1 (tenc t)))
  | Nonenone
  end.

Lemma some_correct_enc s : some (tenc s) == oenc (Some s).

Lemma some_correct s t u: proc sproc t → (some s) t (lam u) == t s.

Lemma none_correct s t : lambda slambda tnone s t == t.

Lemma some_inj s t : lambda slambda tsome s == some ts = t.

Lemma oenc_correct_some (s v : term) : lambda voenc (Some s) == some vv == tenc s.

Lemma none_equiv_some v : ¬ none == some v.