Skip to content

Commit

Permalink
Fix one warning
Browse files Browse the repository at this point in the history
  • Loading branch information
tchajed committed Nov 28, 2023
1 parent bec3ff6 commit 47459bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Function.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Require Import Recdef Div2 Lia FunctionalExtensionality.
From Coq Require Import PeanoNat Recdef Lia FunctionalExtensionality.

(** Counting the number of digits in binary representation. *)

Expand All @@ -17,7 +17,7 @@ Function attempt_2 (n r : nat) {measure (fun x => x) n} : nat :=
| _ => attempt_2 (Nat.div2 n) (r + 1)
end.
Proof.
intros. apply lt_div2. lia.
intros. apply Nat.lt_div2. lia.
Defined.

Compute attempt_2 1024 0.
Expand All @@ -29,7 +29,7 @@ Function attempt_3 (n r : nat) {wf lt n} : nat :=
| _ => attempt_3 (Nat.div2 n) (r + 1)
end.
Proof.
+ intros. apply lt_div2. lia.
+ intros. apply Nat.lt_div2. lia.
+ apply Wf_nat.lt_wf.
Defined.

Expand Down Expand Up @@ -90,7 +90,7 @@ Lemma div2_smaller : forall n n',
Proof.
destruct n; intros.
discriminate.
apply lt_div2; lia.
apply Nat.lt_div2; lia.
Qed.

Definition numdigits (n: nat) : nat.
Expand Down

0 comments on commit 47459bd

Please sign in to comment.