proposition: Theorem exists_example_2 : forall n, (exists m, n = 4 + m) -> (exists o, n = 2 + o).
proof: Proof. MProof. intros n. cintros m {- destruct m -}. Abort. Example fubar (T : Type) (A : T) : M Prop:= oeq <- M.unify Prop T UniCoq; match oeq with | mSome eq => M.ret (meq_rect Prop (fun T=>T -> Prop) id T eq A) | _ => M.raise exception end. Definition fubarType := Eval compute in ltac:(mrun (mtry fubar Type (True <-> True) with _ => M.ret True end)%MC). Definition destcase_fail := ltac:(mrun (r <- M.ret (match 3 with 0 => true | _ => false end); _ <- M.destcase r; M.ret I)%MC). Definition destcase_work := ltac:(mrun (M.bind (M.destcase (match 3 with 0 => true | _ => false end)) (fun _=> M.ret I))). Definition faulty_exact {A} (x : A) : tactic := fun g => (match g with | Metavar _ _ g' => M.cumul UniCoq x g';; M.ret [m: (m: tt, AnyMetavar _ _ g')] end)%MC. Goal True /\ 1=1. MProof. (fun g => r<- M.map (fun '(m: x,g') => open_and_apply ((faulty_exact) I) g') =<< apply conj g; M.ret (mconcat r) )%MC &> (fun g : goal gs_open => (is_open g >>= M.print_term);; M.print_term g;; reflexivity g)%MC. Qed.
imports: Mtac2(Logic Datatypes Mtac2) Bool.Bool