(q r : Q) : q + ((r - q) / 2) = (r + q) / 2. Proof. pattern q at 1. rewrite <- (mult_1_r q). pattern (1 : Q) at 1. rewrite <- (dec_recip_inverse 2) by solve_propholds. rewrite (associativity q 2 (/2)). rewrite <- (distribute_r (q*2) (r-q) (/2)). rewrite (distribute_l q 1 1). rewrite (mult_1_r q). rewrite (commutativity (q+q) (r-q)). rewrite <- (associativity r (-q) (q+q)). rewrite (associativity (-q) q q). rewrite (plus_negate_l q). rewrite (plus_0_l q). reflexivity. Qed.
Require Import Import Quoting.Instances. Import NatPair.Instances.