Skip to content
Snippets Groups Projects

WIP: bitvector library

Closed Michael Sammler requested to merge msammler/bitvector into master

Merge request reports

Merge request pipeline #58531 passed

Merge request pipeline passed for b8a40f8a

Approval is optional

Closed by Michael SammlerMichael Sammler 3 years ago (Dec 8, 2021 4:36pm UTC)

Merge details

  • The changes were not merged into master.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 1 commit

    • c52ee310 - add automation and lemmas about operations

    Compare with previous version

  • added 1 commit

    • f4f4b0da - add automation and lemmas about operations

    Compare with previous version

  • added 1 commit

    • 9b5a6095 - added conversion functions for little endian

    Compare with previous version

  • Michael Sammler added 20 commits

    added 20 commits

    Compare with previous version

  • 119 induction Hall as [|b bs Hb ? IH]; [done|]; simpl.
    120 apply Z_bounded_iff_bits_nonneg'; [ nia | |].
    121 - apply Z.lor_nonneg. split; [|lia]. apply Z.shiftl_nonneg. lia.
    122 - intros l ?. rewrite Z.lor_spec.
    123 eapply Z_bounded_iff_bits_nonneg' in Hb.
    124 + erewrite Hb, orb_false_r.
    125 rewrite Z.shiftl_spec by nia.
    126 eapply Z_bounded_iff_bits_nonneg'; [| | done |]; nia.
    127 + lia.
    128 + lia.
    129 + nia.
    130 Qed.
    131
    132
    133 (** * Preliminary definitions *)
    134 Definition bv_modulus (n : N) : Z := 2 ^ (Z.of_N n).
    • What's the reason we use N instead of nat here?

      Wouldn't nat be easier, then we only use 2 number types, so that causes less confusion? The numbers seem to be small enough, so I suppose nat would be fine?

    • This file only uses Z and N (ignoring Z_to_little which is part of !254 (merged)) at the moment. We could switch to N to nat, but isla-coq needs bitsizes up to 128 and I fear that this might be a large number for nat.

    • Please register or sign in to reply
  • added 1 commit

    Compare with previous version

  • Robbert Krebbers
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading