proposition: Lemma Goldfarb : H10 ⪯ OU 2 ag.
proof: Proof. unshelve eexists. - intros E. unshelve econstructor. exact (Gamma__deq E). 1: eapply fst. 2: eapply snd. 1 - 2: eapply foldeqs, (H10_to_SOU E). exact (alpha → alpha → alpha). all: eapply foldeqs_typing; cbn -[Gamma__deq]. all: eapply H10_to_SOU. - intros E. split. + intros H % H10_SU. destruct H as (Delta & sigma & H1 & H2). exists Delta. exists sigma. intuition idtac. eapply foldeqs_correct, equiv_pointwise_eqs; (eauto 2). cbn. intros s1 s2 (d&H3&H4) % in_flat_map. destruct d; cbn in H4; intuition idtac. all: change s1 with (fst (s1, s2)); rewrite <-?H, <-?H0. all: change s2 with (snd (s1, s2)); rewrite <-?H, <-?H0. all: cbn; (eauto 2). + intros (Delta & sigma & T & EQ). eapply SU_H10. exists Delta, sigma. intuition idtac. eapply equiv_eqs_pointwise; (eauto 1); eapply foldeqs_correct; (eauto 2). cbn. intros s1 s2 (d&H3&H4) % in_flat_map. destruct d; cbn in H4; intuition idtac. all: change s1 with (fst (s1, s2)); rewrite <-?H1, <-?H0. all: change s2 with (snd (s1, s2)); rewrite <-?H1, <-?H0. all: cbn; (eauto 2). Qed.
imports: RelationClasses Morphisms Init.Wf List Lia Init.Nat Setoid Undecidability.HOU(calculus.calculus unification.unification)