Skip to content
Open
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
5 changes: 3 additions & 2 deletions tuto1_nat.v
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ Qed.
Goal forall n m : nat, n = 2 * m -> m = 6 -> (n - 5) * m = 42.
Proof.
intros n m nE mE.
(* [rewrite] actually accepts any number of arguments, which are all equalities
that get rewritten one after the other. Try [rewrite nE mE.].
(* [rewrite] actually accepts any number of arguments, separated by commas,
which are all equalities that get rewritten one after the other.
Try [rewrite nE, mE.].
*)


Expand Down
11 changes: 11 additions & 0 deletions tuto1_nat_solution.v
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@ Goal forall n m : nat, n = 3 * m -> n + 1 = 3 * m + 1.
reflexivity.
Qed.

Goal forall n m : nat, n = 2 * m -> m = 6 -> (n - 5) * m = 42.
Proof.
intros n m nE mE.
(* [rewrite] actually accepts any number of arguments, separated by commas,
which are all equalities that get rewritten one after the other.
Try [rewrite nE, mE.].
*)
rewrite nE, mE.
reflexivity.
Qed.

(** Addition *)

(* Natural numbers are defined by two rules:
Expand Down
5 changes: 2 additions & 3 deletions tuto1_ssrnat.v
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@ Qed.
Goal forall n m : nat, n = 2 * m -> m = 6 -> (n - 5) * m = 42.
Proof.
move=> n m nE mE.
(* [rewrite] actually accepts any number of arguments, separated by commas,
which are all equalities that get rewritten one after the other.
Try [rewrite nE mE.].
(* [rewrite] actually accepts any number of arguments, which are all equalities
that get rewritten one after the other. Try [rewrite nE mE.].
*)


Expand Down