From Undecidability.L Require Import InterpreterResults.
(** ** Parallel or *)
Definition H (s t : term) : term := Eval cbv in (.\ "z"; !E "z" !s !(lambda T) (!E "z" !t !(lambda T) !F)).
Definition O : term := Eval cbv in .\ "x", "y";
(.\ "z"; !E "z" "x" !(lambda T) (!E "z" "y" !(lambda F) !I)) (!C !(H 2 1)).

(* Specifications: *)
Lemma H_proc s t : proc (H (tenc s) (tenc t)).
Lemma H_rec s t n : (H (tenc s) (tenc t) (enc n) ≡ E (enc n) (tenc s) (lambda T) (E (enc n) (tenc t) (lambda T) F)).
Lemma H_test s t : test (H (tenc s) (tenc t)).
Lemma H_inv n s t : satis ( H (tenc s) (tenc t) ) n <-> eval n s <> None \/ eval n t <> None.
Lemma O_rec s t : O (tenc s) (tenc t) ≡ (lambda (E 0 (tenc s) (lambda T) (E 0 (tenc t) (lambda F) I))) (C (H (tenc s) (tenc t))).
Lemma O_complete s t : eva s \/ eva t -> eva (O (tenc s) (tenc t)).
Lemma O_sound s t : eva (O (tenc s) (tenc t)) -> eva s /\ O (tenc s) (tenc t) ▷ T \/ eva t /\ O (tenc s) (tenc t) ▷ F.
Proof with eauto.