Users' Mathboxes Mathbox for Alexander van der Vekens < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  df-blen Structured version   Visualization version   GIF version

Definition df-blen 45804
Description: Define the binary length of an integer. Definition in section 1.3 of [AhoHopUll] p. 12. Although not restricted to integers, this definition is only meaningful for 𝑛 ∈ ℤ or even for 𝑛 ∈ ℂ. (Contributed by AV, 16-May-2020.)
Assertion
Ref Expression
df-blen #b = (𝑛 ∈ V ↦ if(𝑛 = 0, 1, ((⌊‘(2 logb (abs‘𝑛))) + 1)))

Detailed syntax breakdown of Definition df-blen
StepHypRef Expression
1 cblen 45803 . 2 class #b
2 vn . . 3 setvar 𝑛
3 cvv 3422 . . 3 class V
42cv 1538 . . . . 5 class 𝑛
5 cc0 10802 . . . . 5 class 0
64, 5wceq 1539 . . . 4 wff 𝑛 = 0
7 c1 10803 . . . 4 class 1
8 c2 11958 . . . . . . 7 class 2
9 cabs 14873 . . . . . . . 8 class abs
104, 9cfv 6418 . . . . . . 7 class (abs‘𝑛)
11 clogb 25819 . . . . . . 7 class logb
128, 10, 11co 7255 . . . . . 6 class (2 logb (abs‘𝑛))
13 cfl 13438 . . . . . 6 class
1412, 13cfv 6418 . . . . 5 class (⌊‘(2 logb (abs‘𝑛)))
15 caddc 10805 . . . . 5 class +
1614, 7, 15co 7255 . . . 4 class ((⌊‘(2 logb (abs‘𝑛))) + 1)
176, 7, 16cif 4456 . . 3 class if(𝑛 = 0, 1, ((⌊‘(2 logb (abs‘𝑛))) + 1))
182, 3, 17cmpt 5153 . 2 class (𝑛 ∈ V ↦ if(𝑛 = 0, 1, ((⌊‘(2 logb (abs‘𝑛))) + 1)))
191, 18wceq 1539 1 wff #b = (𝑛 ∈ V ↦ if(𝑛 = 0, 1, ((⌊‘(2 logb (abs‘𝑛))) + 1)))
Colors of variables: wff setvar class
This definition is referenced by:  blenval  45805
  Copyright terms: Public domain W3C validator