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 45916
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 45915 . 2 class #b
2 vn . . 3 setvar 𝑛
3 cvv 3432 . . 3 class V
42cv 1538 . . . . 5 class 𝑛
5 cc0 10871 . . . . 5 class 0
64, 5wceq 1539 . . . 4 wff 𝑛 = 0
7 c1 10872 . . . 4 class 1
8 c2 12028 . . . . . . 7 class 2
9 cabs 14945 . . . . . . . 8 class abs
104, 9cfv 6433 . . . . . . 7 class (abs‘𝑛)
11 clogb 25914 . . . . . . 7 class logb
128, 10, 11co 7275 . . . . . 6 class (2 logb (abs‘𝑛))
13 cfl 13510 . . . . . 6 class
1412, 13cfv 6433 . . . . 5 class (⌊‘(2 logb (abs‘𝑛)))
15 caddc 10874 . . . . 5 class +
1614, 7, 15co 7275 . . . 4 class ((⌊‘(2 logb (abs‘𝑛))) + 1)
176, 7, 16cif 4459 . . 3 class if(𝑛 = 0, 1, ((⌊‘(2 logb (abs‘𝑛))) + 1))
182, 3, 17cmpt 5157 . 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  45917
  Copyright terms: Public domain W3C validator