fact: Definition lift_lemma : forall (A : Prop), A -> M (msigT tty) := let m := (mTele (fun (A : Prop) => (mTele (fun (a:A) => mBase)))) in @mfix' m (fun A (a:A) => msigT tty) (fun rec (A : Prop) => let m (A : Prop) := mTele (fun a:A => mBase) in mtmmatch' _ m (fun A a => msigT tty) A [m: (mtptele (fun B:Prop => mtptele (fun (C:Prop) => (mtpbase ( m:=fun A:Prop => A -> M _)) _ ( fun (f : B -> C) => M.nu (FreshFrom A) mNone (fun b : B => '(mexistT _ t X) <- rec C (f b); match t as t return tty t -> M (_) with | tttele _ => fun _ => M.failwith "Lemma to be lifted has dependent quantifiers after non-dependent ones. This is not supported." | ttbase P => fun f => let '(mexistT _ l f) := f in f' <- M.abs_fun b f; f' <- M.coerce f'; let T' := reduce (RedWhd RedAll) (TTele_bind' b (t0:=ttbase _) (mexistT _ l f')) in M.ret (mexistT tty (ttbase P) T') end X ) ) UniMatchNoRed)))%mtpattern | (mtptele (fun B:Type => mtptele (fun (C:B -> Prop) => (mtpbase ( m:=fun A:Prop => A -> M _)) _ ( fun (f : forall b:B, C b) => M.nu (FreshFrom A) mNone (fun b : B => '(mexistT _ t X) <- rec _ (f b); t' <- M.abs_fun b t; X <- M.coerce X; X' <- M.abs_fun (P:=fun b => tty (t' b)) b X; M.ret (mexistT tty (tttele t') (fun x => X' x)) ) ) UniMatchNoRed)))%mtpattern | (mtpbase ( m:=fun A:Prop => A -> M _) A (fun a:A => M.ret (mexistT tty (ttbase A) (mexistT _ mnil (M.ret (I,a)))) ) UniCoq )%mtpattern ]%with_mtpattern ) .
imports: Mtac2(Base Datatypes List MTele MTeleMatch MTeleMatchDef MFixDef Sorts tactics.Tactics) Strings.String