-class tacticCommand ~(tactic:ProofEngineTypes.tactic) (status: proofStatus) =
- object
- val statusBackup = status#status
-
- method execute () =
- let (new_proof, new_goals) = tactic status#status in
- status#setProof new_proof;
- status#setGoal
- (match new_goals, new_proof with
- | goal :: _, _ -> Some goal
- | [], (_, (goal, _, _) :: _, _, _) ->
- (* the tactic left no open goal: let's choose the first open goal *)
- (* TODO CSC: here we could implement and use a proof-tree like
- * notion... *)
- Some goal
- | _, _ -> None);
- status#notify ()
-
- method undo () =
- status#setStatus statusBackup;
- status#notify ()
- end
-
-let intros ?namer =
- new tacticCommand
- ~tactic:(PrimitiveTactics.intros_tac ?mk_fresh_name_callback:namer ())
-
-let reflexivity = new tacticCommand ~tactic:EqualityTactics.reflexivity_tac
-let symmetry = new tacticCommand ~tactic:EqualityTactics.symmetry_tac
-let transitivity term =
- new tacticCommand ~tactic:(EqualityTactics.transitivity_tac ~term)
-
-let exists = new tacticCommand ~tactic:IntroductionTactics.exists_tac
-let split = new tacticCommand ~tactic:IntroductionTactics.split_tac
-let left = new tacticCommand ~tactic:IntroductionTactics.left_tac
-let right = new tacticCommand ~tactic:IntroductionTactics.right_tac
-
-let assumption = new tacticCommand ~tactic:VariousTactics.assumption_tac
+let proof ?uri ~metasenv ~typ () =
+ let metasenv = (1, [], typ) :: metasenv in
+ let body = Cic.Meta (1,[]) in
+ let _ = CicTypeChecker.type_of_aux' metasenv [] typ in
+ new proof ~typ ~metasenv ~body ?uri ()