fact: Definition open_branch {A P} (E : Exception) (b : branch A (fun a => t (P a))) : forall y, t (P y) := Eval lazy beta zeta iota delta [internal_meq_rew open_pattern] in match b in branch A' P' return forall (P_old : A' -> Type), P' =m= (fun a => t (P_old a)) -> forall y, t (P_old y) with | @branch_pattern A P p => fun P_old Peq z => let op := @open_pattern _ P_old z E in ltac:(rewrite Peq in p; refine (op p)) | @branch_app_static A B m U _ cont => fun P_old Peq z => let op := is_head (B:=P_old) U z _ in ltac:(rewrite Peq in cont; refine (op cont (raise E))) | branch_forallT cont => fun P_old Peq z => let op := decompose_forallT z in ltac:(rewrite Peq in cont; refine (op cont (raise E))) | branch_forallP cont => fun P_old Peq z => let op := decompose_forallP z in ltac:(rewrite Peq in cont; refine (op cont (raise E))) end P meq_refl.
imports: Strings.String NArith.BinNat Mtac2(Logic Datatypes Logic List Utils MTele Pattern Specif)