leanprover-community / mathlib

  • Home
  • Zulip archive
  • API documentation
  • Lean web editor
  • Links

Zulip Chat Archive

Stream: Is there code for X?

Topic: Vector of ones


Ashley Blacquiere (Oct 05 2022 at 01:50):

Is there any notion of a vector of ones, like docs#bitvec.one, but all ones?

Matt Diamond (Oct 05 2022 at 02:46):

Do you mean as a distinct type? You can do vector.repeat bool.tt n if you just want to generate a bitvec of n ones

Adam Topaz (Oct 05 2022 at 02:46):

import data.bitvec.basic
#eval (bitvec.zero 10).not

Or what Matt said ;)


Last updated: May 02 2025 at 03:31 UTC

Theme Simple by wildflame © 2016 Powered by jekyll