Skip to content

Commit 1d65c7f

Browse files
authored
Merge pull request #8 from coq-community/even-odd-t
use Nat.Even_EvenT and Nat.Odd_OddT
2 parents 641eef1 + 692008e commit 1d65c7f

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

Reals/Rsequence/Rsequence_usual_facts.v

+3-15
Original file line numberDiff line numberDiff line change
@@ -270,18 +270,6 @@ clear Hn HN; induction n; simpl; try rewrite IHn; field.
270270
unfold k; field; apply Rgt_not_eq; eapply Rle_lt_trans; [eexact Hp|eexact Hr].
271271
Qed.
272272

273-
Lemma even_2n : forall n : nat, Nat.Even n -> {p : nat | n = Nat.double p}.
274-
Proof.
275-
intros n H_even; exists (Nat.div2 n).
276-
apply Nat.Even_double; assumption.
277-
Defined.
278-
279-
Lemma odd_S2n : forall n : nat, Nat.Odd n -> {p : nat | n = S (Nat.double p)}.
280-
Proof.
281-
intros n H_odd; exists (Nat.div2 n).
282-
apply Nat.Odd_double; assumption.
283-
Defined.
284-
285273
(**********)
286274
Lemma Rseq_poly_pow_gt_1_little_O : forall d r, r > 1 -> (Rseq_poly d) = o(Rseq_pow r).
287275
Proof.
@@ -389,12 +377,12 @@ exists (2 * N)%nat; intros n Hn.
389377
unfold Rseq_poly; unfold Rseq_pow.
390378
pose (m :=
391379
match Nat.Even_Odd_dec n with
392-
| left evn => proj1_sig (even_2n n evn)
393-
| right odd => S (proj1_sig (odd_S2n n odd))
380+
| left evn => proj1_sig (Nat.Even_EvenT n evn)
381+
| right odd => S (proj1_sig (Nat.Odd_OddT n odd))
394382
end).
395383
assert (Hm : (n <= 2 * m /\ 2 * m <= S n)%nat).
396384
destruct (Nat.Even_Odd_dec n) as [Hm|Hm];
397-
[destruct (even_2n n Hm) as [p Hp]|destruct (odd_S2n n Hm) as [p Hp]];
385+
[destruct (Nat.Even_EvenT n Hm) as [p Hp]|destruct (Nat.Odd_OddT n Hm) as [p Hp]];
398386
simpl in m; unfold Nat.double in Hp; unfold m; lia.
399387
destruct Hm as [Hml Hmr].
400388
apply Rle_trans with (Rabs (INR (2 * m) ^ (2 * kk))).

0 commit comments

Comments
 (0)