Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Ali Caglayan <[email protected]>
  • Loading branch information
Alizter committed May 17, 2024
1 parent 0fc785c commit 21ed27e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions theories/Spaces/Int.v
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@ Set Cumulativity Weak Constraints.

Declare Scope int_scope.

(** Things that need to go in nat *)

Notation nat_add_assoc := assoc_nat_add.

(** * The Integers *)

(** Definition *)
(** ** Definition *)

(** We define the integers as two copies of [nat] stuck together. This allows us to reuse many lemmas about arithmetic in nat to prove similar lemmas about integers. *)

Expand Down Expand Up @@ -92,7 +88,7 @@ Infix "-" := (fun x y => x + -y) : int_scope.

(** *** Multiplication *)

(** We define multiplication of integers by cases on the signs of the integers. *)
(** We define multiplication of integers by cases on the signs of the integers. Note that in the [negS y, pos x] case the order of the multplication is swapped. This is a trick so that the proof of commutativity becomes easier. *)
Definition int_mul@{} (x y : Int) : Int :=
match x, y with
| pos x, pos y => (x * y)%nat
Expand Down Expand Up @@ -361,7 +357,6 @@ Definition int_mul_comm@{} (x y : Int) : x * y = y * x.
Proof.
destruct x as [x | x], y as [y | y]; trivial; unfold "*";
by rewrite nat_mul_comm.
Set Printing Universes.
Defined.

(** Integer multiplication with one on the left is the identity. *)
Expand Down

0 comments on commit 21ed27e

Please sign in to comment.