Debian Codegraph @

reals/faster/ARsign.v

raw
1 Require Import CoRN.algebra.RSetoid.
2 Require Import CoRN.metric2.Metric.
3 Require Import CoRN.metric2.UniformContinuity.
4 From Coq Require Import ZArith.
5 Require Import CoRN.reals.faster.ARArith.
6
7 Ltac AR_solve_pos_loop k :=
8 (apply AR_epsilon_sign_dec_pos with k;
9 vm_compute;
10 match goal with
11 | |- Gt ≡ Gt => reflexivity
12 | |- Lt ≡ Gt => fail 2 "AR number is negative"
13 end) || AR_solve_pos_loop (k - 8)%Z.
14
15 Tactic Notation "AR_solve_pos" constr(k) := AR_solve_pos_loop k.
16 Tactic Notation "AR_solve_pos" := AR_solve_pos 0%Z.
17
18 Tactic Notation "AR_solve_ltT" constr(k) :=
19 match goal with
20 | |- ARltT ?X ?Y => change (ARpos (Y - X)); AR_solve_pos_loop k
21 end.
22 Tactic Notation "AR_solve_ltT" := AR_solve_ltT 0%Z.
23
24 Ltac AR_solve_apartT_loop k :=
25 (apply AR_epsilon_sign_dec_apartT with k; vm_compute; discriminate) || AR_solve_apartT_loop (k - 8)%Z.
26
27 Tactic Notation "AR_solve_apartT" constr(k) := AR_solve_apartT_loop k.
28 Tactic Notation "AR_solve_apartT" := AR_solve_apartT 0%Z.