We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cbba1ca + 1f16fe5 commit 240d19cCopy full SHA for 240d19c
theories/Numbers/Natural/Abstract/NSub.v
@@ -66,6 +66,21 @@ intros n m. rewrite <- add_sub_assoc by (apply le_refl).
66
rewrite sub_diag; now rewrite add_0_r.
67
Qed.
68
69
+Definition add_simpl_r := add_sub.
70
+
71
+Theorem add_simpl_l : forall n m, (n + m) - n == m.
72
+Proof.
73
+intros n m. rewrite add_comm. apply add_sub.
74
+Qed.
75
76
+Theorem add_add_simpl_l_l n m p : (n + m) - (n + p) == m - p.
77
78
+induct n.
79
+ now rewrite 2!add_0_l.
80
+intros n Ih.
81
+rewrite 2!add_succ_l. now rewrite sub_succ.
82
83
84
Theorem sub_add : forall n m, n <= m -> (m - n) + n == m.
85
Proof.
86
intros n m H. rewrite add_comm. rewrite add_sub_assoc by assumption.
0 commit comments