Skip to content

Commit

Permalink
update tutorial with new examples by Damien Pous
Browse files Browse the repository at this point in the history
  • Loading branch information
palmskog committed Oct 10, 2021
1 parent 37bbfc2 commit 874d255
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions theories/Tutorial.v
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,30 @@ Section introduction.
- here, ring would have done the job.
*)

(** several associative/commutative operations can be used at the same time.
here, [Zmult] and [Zplus], which are both associative and commutative (AC)
*)
Goal (b + c) * (c + b) + a + Z.opp ((c + b) * (b + c)) = a.
aac_rewrite H.
aac_reflexivity.
Qed.

(** some commutative operations can be declared as idempotent, here [Z.max]
which is taken into account by the [aac_normalise] and [aac_reflexivity] tactics.
Note however that [aac_rewrite] does not match modulo idempotency.
*)
Goal Z.max (b + c) (c + b) + a + Z.opp (c + b) = a.
aac_normalise.
aac_rewrite H.
aac_reflexivity.
Qed.

Goal Z.max c (Z.max b c) + a + Z.opp (Z.max c b) = a.
aac_normalise.
aac_rewrite H.
aac_reflexivity.
Qed.

End introduction.


Expand Down

0 comments on commit 874d255

Please sign in to comment.