naxiom Qmult_one: ∀q:Q. 1 * q = q.
naxiom Qdivides_mult: ∀q1,q2. (q1 * q2) / q1 = q2.
+(* naxiom Ndivides_mult: ∀n:nat.∀q. (n * q) / n = q. *)
+
+ntheorem lem1: ∀n:nat.∀q:Q. (n * q + q) = (S n) * q.
+#n; #q; ncut (plus n 1 = S n);##[//##]
+//; nqed.
+
(*ndefinition aaa ≝ Qtimes_distr.
ndefinition bbb ≝ Qmult_one.
ndefinition ccc ≝ Qdivides_mult.*)
nlet corec Q_to_locate q : locate q q ≝ L q q ?.
ncut (locate q q = locate q ((2*q+q)/3))
[##2: #H; ncases H; (*NOT WORKING: nrewrite > H;*) napply Q_to_locate
- | napply eq_f;
- ncut ((2 * q + q) = ((2 * q + 1 * q))); //; #H;
- ncut (q = ((2 * q + q) / 3)); //;
- ncut (2 * q + 1 * q = 3 * q); //;
- /4/ (*CSC: basta applicare la distributivita' a meno di riduzione, altro
- che 4!*) ]
+ | //;
+ ##]
nqed.
ndefinition Q_to_R : Q → R.