Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecating notation #195

Merged
merged 17 commits into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion algebra/CGroups.v
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ Qed.
End Assoc_properties.

#[global]
Hint Resolve assoc_2 minus_plus zero_minus cg_cancel_mixed plus_resp_eq:
Hint Resolve assoc_2 Nat.add_sub zero_minus cg_cancel_mixed plus_resp_eq:
algebra.


Expand Down
2 changes: 1 addition & 1 deletion algebra/CPoly_Degree.v
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ Proof.
lia. lia. lia.
apply H4; auto.
intro. induction k as [| k Hreck]; intros.
apply H4. rewrite <- minus_n_O in H5; auto.
apply H4. rewrite Nat.sub_0_r in H5; auto.
elim (le_lt_eq_dec (N - k) i); try intro y. auto. rewrite y in Hreck.
apply mult_cancel_lft with (nth_coeff m p). auto. astepr ([0]:F).
apply eq_transitive_unfolded with
Expand Down
4 changes: 2 additions & 2 deletions fta/KeyLemma.v
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ Proof.
elim (le_gt_dec i j).
auto.
intro y.
elim (le_not_gt _ _ H y).
elim (proj1 (Nat.le_ngt _ _) H y).
Qed.

Lemma chfun_2 : forall k j a i, j < i -> a = chfun k a j i.
Expand All @@ -330,7 +330,7 @@ Proof.
unfold chfun in |- *.
elim (le_gt_dec i j).
intro y.
elim (le_not_gt _ _ y H).
elim (proj1 (Nat.le_ngt _ _) y H).
auto.
Qed.

Expand Down
2 changes: 1 addition & 1 deletion ftc/FunctSeries.v
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ Proof.
exists N.
exists 0.
intro.
rewrite Nat.add_comm; rewrite Minus.minus_plus.
rewrite Nat.add_sub.
algebra.
Contin.
intros x H0 n; induction n as [| n Hrecn].
Expand Down
4 changes: 2 additions & 2 deletions ftc/Partitions.v
Original file line number Diff line number Diff line change
Expand Up @@ -705,9 +705,9 @@ Proof.
exists (fun i : nat => i * k); repeat split.
symmetry in |- *; assumption.
intros.
apply mult_lt_compat_r.
assumption.
apply Nat.mul_lt_mono_pos_r.
apply Nat.neq_0_lt_0; auto.
assumption.
intros.
cut (i * k <= m).
intro.
Expand Down
14 changes: 7 additions & 7 deletions ftc/RefSepRef.v
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,8 @@ Proof.
elim (le_lt_dec n i); elim (le_lt_dec j 0); intros; simpl in |- *.
elim (Nat.lt_irrefl 0); apply Nat.lt_le_trans with j; try apply Nat.le_lt_trans with i; auto with arith.
elim (le_lt_dec n j); intro; simpl in |- *.
apply plus_lt_compat_l.
apply plus_lt_reg_l with n.
apply Nat.add_lt_mono_l.
apply Nat.add_lt_mono_l with n.
repeat (rewrite Nat.add_comm; rewrite Nat.sub_add); auto.
lia; auto; apply Nat.lt_trans with j; auto.
elim (Nat.lt_irrefl 0); apply Nat.lt_trans with i; auto; apply Nat.lt_le_trans with j; auto.
Expand Down Expand Up @@ -479,7 +479,7 @@ Proof.
intros.
simpl in b0; rewrite <- b0; auto.
elim (le_lt_eq_dec _ _ H); intro.
cut (pred i < pred n); [ intro | apply lt_pred; rewrite Nat.lt_succ_pred with 0 i; auto ].
cut (pred i < pred n); [ intro | apply Nat.lt_succ_lt_pred; rewrite Nat.lt_succ_pred with 0 i; auto ].
cut (RSR_auxP i <= pred (m + n)).
intro; exists H1.
elim le_lt_eq_dec; intro; simpl in |- *.
Expand Down Expand Up @@ -590,8 +590,8 @@ Proof.
elim (le_lt_dec m i); elim (le_lt_dec j 0); intros; simpl in |- *.
elim (Nat.lt_irrefl 0); apply Nat.le_lt_trans with i; try apply Nat.lt_le_trans with j; auto with arith.
elim (le_lt_dec m j); intro; simpl in |- *.
apply plus_lt_compat_l.
apply plus_lt_reg_l with m.
apply Nat.add_lt_mono_l.
apply Nat.add_lt_mono_l with m.
repeat (rewrite Nat.add_comm; rewrite Nat.sub_add); auto.
lia; auto; apply Nat.lt_trans with j; auto.
elim (Nat.lt_irrefl 0); apply Nat.lt_trans with i; auto; apply Nat.lt_le_trans with j; auto.
Expand Down Expand Up @@ -702,9 +702,9 @@ Proof.
elim (le_lt_dec j 0); intro; simpl in |- *.
apply Nat.le_0_l.
elim (le_lt_dec m j); intro; simpl in |- *.
rewrite not_le_minus_0.
rewrite (proj2 (Nat.sub_0_le j m)).
rewrite <- plus_n_O; auto with arith.
apply Nat.lt_nge; auto.
assumption.
apply plus_pred_pred_plus.
elim (ProjT2 (RSR_h_g' _ (lt_pred' _ _ b1 b2))); intros.
assumption.
Expand Down
2 changes: 1 addition & 1 deletion ftc/RefSeparating.v
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ Proof.
apply less_wdl with (P (pred j) Hi'[-]P _ a0); intros.
2: apply cg_minus_wd; apply prf1; auto.
apply H0.
apply lt_pred_n_n.
apply Nat.lt_pred_l. apply Nat.neq_0_lt_0.
apply Nat.le_lt_trans with (sep__part_h i).
apply Nat.le_0_l.
apply Partition_Points_mon with (P := P) (Hi := a0) (Hj := Hj).
Expand Down
4 changes: 2 additions & 2 deletions liouville/nat_Q_lists.v
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,14 @@ Proof.
rewrite H0.
simpl.
rewrite <- (Nat.add_0_r (Z.abs_nat a)) at 1.
apply plus_le_compat_l.
apply Nat.add_le_mono_l.
apply Nat.le_0_l.
simpl.
destruct (ZL4 p).
rewrite H0.
simpl.
rewrite <- (Nat.add_0_r (Z.abs_nat a)) at 1.
apply plus_le_compat_l.
apply Nat.add_le_mono_l.
apply Nat.le_0_l.
Qed.

Expand Down
4 changes: 2 additions & 2 deletions logic/CLogic.v
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ Lemma lt_5 : forall i n : nat, i < n -> pred i < n.
Proof.
intros; apply Nat.le_lt_trans with (pred n).
apply Nat.pred_le_mono; auto with arith.
apply lt_pred_n_n; apply Nat.le_lt_trans with i; auto with arith.
apply Nat.lt_pred_l; apply Nat.neq_0_lt_0. apply Nat.le_lt_trans with i; auto with arith.
Qed.

Lemma lt_8 : forall m n : nat, m < pred n -> m < n.
Expand All @@ -762,7 +762,7 @@ Qed.
Lemma pred_lt : forall m n : nat, m < pred n -> S m < n.
Proof.
intros; apply Nat.le_lt_trans with (pred n); auto with arith.
apply lt_pred_n_n; apply Nat.le_lt_trans with m.
apply Nat.lt_pred_l; apply Nat.neq_0_lt_0. apply Nat.le_lt_trans with m.
auto with arith.
apply Nat.lt_le_trans with (pred n); auto with arith.
Qed.
Expand Down
2 changes: 1 addition & 1 deletion model/Zmod/ZBasics.v
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Lemma minus_n_minus_n_k : forall k n : nat, k <= n -> k = n - (n - k).
Proof.
intros k n Hle.
induction k as [| k Hreck].
rewrite <- minus_n_O.
rewrite Nat.sub_0_r.
symmetry in |- *.
apply Nat.sub_diag.
set (K := k) in |- * at 2.
Expand Down
14 changes: 3 additions & 11 deletions model/structures/Npossec.v
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,7 @@ Proof.
cut ((x*S y0+x) > 0).
unfold gt in |- *.
intuition.
apply gt_trans with (x*S y0).
apply gt_le_trans with (x*S y0+0).
apply plus_gt_compat_l.
lia.
lia.
unfold gt in |- *.
apply Nat.neq_0_lt_0.
cut ((x*S y0) <> 0).
auto.
apply Hrecy0.
auto.
apply Nat.lt_trans with (x*S y0).
apply Nat.lt_le_trans with (x*S y0+0).
lia. lia. lia. lia.
Qed.
6 changes: 3 additions & 3 deletions reals/Series.v
Original file line number Diff line number Diff line change
Expand Up @@ -804,15 +804,15 @@ Proof.
(seq_part_sum x M[-]seq_part_sum x (S (Nat.max N M + k) - k))).
apply AbsSmall_plus.
apply HM.
apply (fun p n m : nat => plus_le_reg_l n m p) with k.
apply (fun p n m : nat => Nat.add_le_mono_l n m p) with k.
rewrite (Nat.add_comm k (m- k)).
rewrite Nat.sub_add.
apply Nat.le_trans with (Nat.max N M + k); auto with arith.
rewrite Nat.add_comm; auto with arith.
apply Nat.le_trans with (S (Nat.max N M + k)); auto with arith.
apply AbsSmall_minus.
apply HM.
apply (fun p n m : nat => plus_le_reg_l n m p) with k.
apply (fun p n m : nat => Nat.add_le_mono_l n m p) with k.
rewrite (Nat.add_comm k (S (Nat.max N M + k) - k)).
rewrite Nat.sub_add.
apply Nat.le_trans with (Nat.max N M + k); auto.
Expand Down Expand Up @@ -874,7 +874,7 @@ Proof.
exists N.
exists 0.
intro.
rewrite Nat.add_comm; rewrite Minus.minus_plus.
rewrite Nat.add_sub.
algebra.
simple induction n.
intro.
Expand Down
8 changes: 5 additions & 3 deletions reals/fast/MultivariatePolynomials.v
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,9 @@ Proof.
rewrite <- (MVP_mult_apply Q_as_CRing).
apply: MVP_apply_wd; try reflexivity.
replace (proj1 (Nat.lt_succ_r n1 m) (Nat.lt_le_trans n1 (S n1) (S m) (Nat.lt_succ_diag_r n1) l))
with (Le.le_S_n n1 m l) by apply le_irrelevent.
apply c_mult_apply.
with (proj2 (Nat.succ_le_mono n1 m) l) by apply le_irrelevent.
replace (le_S_n n1 m l) with (proj2 (Nat.succ_le_mono n1 m) l) by apply le_irrelevent.
apply c_mult_apply.
apply MVP_BernsteinNonNeg; auto.
eapply Qle_trans;[|apply Qmax_ub_r].
set (R:=Vector.t_rec (MultivariatePolynomial Q_as_CRing n)
Expand Down Expand Up @@ -434,7 +435,8 @@ Proof.
rewrite <- (MVP_mult_apply Q_as_CRing).
apply: MVP_apply_wd; try reflexivity.
replace (proj1 (Nat.lt_succ_r n1 m) (Nat.lt_le_trans n1 (S n1) (S m) (Nat.lt_succ_diag_r n1) l))
with (Le.le_S_n n1 m l) by apply le_irrelevent.
with (proj2 (Nat.succ_le_mono n1 m) l) by apply le_irrelevent.
replace (le_S_n n1 m l) with (proj2 (Nat.succ_le_mono n1 m) l) by apply le_irrelevent.
apply c_mult_apply.
apply MVP_BernsteinNonNeg; auto.
eapply Qle_trans;[apply Qmin_lb_r|].
Expand Down
2 changes: 1 addition & 1 deletion reals/stdlib/CMTFullSets.v
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@ Proof.
unfold lt in l. simpl in xnlim.
pose proof (xnlim (j - S i)%nat) as H0.
replace (S (i + (j - S i)))%nat with j in H0. exact H0.
symmetry. exact (le_plus_minus_r (S i) j l). }
symmetry. rewrite Nat.add_comm. rewrite <- Nat.add_succ_r. exact (Nat.sub_add (S i) j l). }
destruct (series_cv_abs
(fun n0 : nat => CRabs _ (partialApply (IntFn intRepres (S (i + n0))) x (xnlim n0)))
cau) as [x0 s].
Expand Down
2 changes: 1 addition & 1 deletion stdlib_omissions/Z.v
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Qed.
Lemma lt_Zlt_to_nat (n : nat) (z : Z) : Z.of_nat n < z <-> (n < Z.to_nat z)%nat.
Proof.
assert (A : forall (m n : nat), not (m <= n)%nat <-> (n < m)%nat).
+ intros; split; [apply not_le | apply gt_not_le].
+ intros; split; [apply not_le | apply Nat.lt_nge].
+ assert (A1 := le_Zle_to_nat n z). apply iff_not in A1.
now rewrite A, Z.nle_gt in A1.
Qed.
Expand Down
2 changes: 1 addition & 1 deletion util/Extract.v
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Extract Inlined Constant minus => "fun n m -> max 0 (n - m)".
Extract Inlined Constant mult => "(*)".
Extract Inlined Constant max => max.
Extract Inlined Constant min => min.
Extract Inlined Constant EqNat.beq_nat => "(==)".
Extract Inlined Constant Nat.eqb => "(==)".
Extract Inlined Constant EqNat.eq_nat_decide => "(==)".
Extract Inlined Constant Peano_dec.eq_nat_dec => "(==)".

Expand Down
Loading