Skip to content

Commit bfe0594

Browse files
committed
Use floor from Coqlib
1 parent 5272294 commit bfe0594

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

cfrontend/Ctypes.v

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -460,8 +460,6 @@ Definition bitalignof_intsize (sz: intsize) : Z :=
460460
| I32 => 32
461461
end.
462462

463-
Definition floor (n: Z) (amount: Z) := (n / amount) * amount.
464-
465463
Definition next_field (pos: Z) (m: member) : Z :=
466464
match m with
467465
| Member_plain _ t =>
@@ -495,20 +493,6 @@ Definition layout_field (pos: Z) (m: member) : res (Z * bitfield) :=
495493

496494
(** Some properties *)
497495

498-
Lemma floor_interval:
499-
forall x y, y > 0 -> floor x y <= x < floor x y + y.
500-
Proof.
501-
unfold floor; intros.
502-
generalize (Z_div_mod_eq x y H) (Z_mod_lt x y H).
503-
set (q := x / y). set (r := x mod y). intros. lia.
504-
Qed.
505-
506-
Lemma floor_divides:
507-
forall x y, y > 0 -> (y | floor x y).
508-
Proof.
509-
unfold floor; intros. exists (x / y); auto.
510-
Qed.
511-
512496
Lemma bitalignof_intsize_pos:
513497
forall sz, bitalignof_intsize sz > 0.
514498
Proof.

0 commit comments

Comments
 (0)