(***********************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* Idtac | [``1``] -> Idtac | [``?1+?2``] -> (Isrealint ?1);(Isrealint ?2) | [``?1-?2``] -> (Isrealint ?1);(Isrealint ?2) | [``?1*?2``] -> (Isrealint ?1);(Isrealint ?2) | [``-?1``] -> (Isrealint ?1) | _ -> Fail. Recursive Meta Definition ToINR trm:= Match trm With | [ ``1`` ] -> '(S O) | [ ``1 + ?1`` ] -> Let t=(ToINR ?1) In '(S t). Tactic Definition DiscrR := Try Match Context With | [ |- ~(?1==?2) ] -> Isrealint ?1;Isrealint ?2; Apply Rminus_not_eq; Ring ``?1-?2``; (Match Context With | [ |- [``-1``] ] -> Repeat Rewrite <- Ropp_distr1;Apply Ropp_neq | _ -> Idtac); (Match Context With | [ |- ``?1<>0``] -> Let nbr=(ToINR ?1) In Replace ?1 with (INR nbr); [Apply not_O_INR;Discriminate|Simpl;Ring]). Lemma Rlt_R0_R2 : ``0<2``. Replace ``2`` with (INR (2)); [Apply lt_INR_0; Apply lt_O_Sn | Reflexivity]. Qed. Lemma Rplus_lt_pos : (x,y:R) ``0 ``0 ``0 Repeat (Apply Rmult_lt_pos Orelse Apply Rplus_lt_pos; Try Apply Rlt_R0_R1 Orelse Apply Rlt_R0_R2) | [ |- ``?1>0`` ] -> Change ``0