fact: Fixpoint Term_requivT (G : ctxt2) {t1 t2} (e1 : Term fnvar1 t1) (e2 : Term fnvar2 t2) {struct e1} : option pointed_Prop := match e1, e2 return option _ with | RVar t0 x, RVar t1 y => match Nat.eqb (fst x) (fst y), List.nth_error G (List.length G - S (fst x)) with | true, Some v => eq_type_and_var v (existT _ (t0, t1) (snd x, snd y)) | _, _ => None end | RVar _ _, _ => None | RLambda A1 B1 f1, RLambda A2 B2 f2 => match TypeCode_eq_semidec_transparent A1 A2, TypeCode_eq_semidec_transparent B1 B2 with | Some _, Some _ => Some (inject (forall (v1 : var1 A1) (v2 : var2 A2), match @Term_requivT (vars2 v1 v2 :: G) B1 B2 (f1 (List.length G, v1)) (f2 (List.length G, v2)) with | Some p => to_prop p | None => False end)) | _, _ => None end | RLambda _ _ _, _ => None | RApp tx tC eC ex, RApp tx' tC' eC' ex' => match TypeCode_beq tx tx', TypeCode_beq tC tC', @Term_requivT G _ _ eC eC', @Term_requivT G _ _ ex ex' with | true, true, Some p, Some q => Some (p /\ q)%pointed_prop | _, _, _, _ => None end | RApp _ _ _ _, _ => None | RLiteralApp c1 t1 args1, RLiteralApp c2 t2 args2 => if RLiteralTerm_beq t1 t2 then args_for_requivT (@Term_requivT G) args1 args2 else None | RLiteralApp _ _ _, _ => None end.
imports: Coq.Lists.List Coq.Arith.EqNat Coq.Logic.Eqdep_dec Fiat.Parsers.Reflective.Syntax Fiat.Parsers.Reflective.SyntaxEquality Fiat.Parsers.Reflective.SyntaxEquivalence Fiat.Common.PointedProp Fiat.Common.OptionFacts Fiat.Common.Prod Fiat.Common.Sigma Fiat.Common