bit
def
The real embedding of a Boolean value, sending false to 0 and true to 1.
Statement
def bit (b : Bool) : ℝ- Defined in
- arXiv:2610.19174, Listing A.1
- Verified
- 21 Oct 2026
- Axioms
- none listed
- Used by 19
- hasTorusApproximation_of_hasRationalTorusApproximationFor any Boolean function f on n variables, natural degree d, and error ε, if f has a rational torus approximation of degree d with error…
- explicitApproximant_mem_degreeSpaceFor any Boolean function f : (Fin n → Bool) → Bool on n > 0 variables, the explicit approximant P_f belongs to degreeSpace (K := ℝ) (Fin…
- brgc_inverse_concatThe inverse Gray rank of a concatenation has the prefix inverse rank followed by the suffix inverse rank, complemented exactly when the…
- HasRealApproximationFor a Boolean function f : (Fin n → Bool) → Bool, natural number d, and real error ε, HasRealApproximation f d ε asserts the existence of…
- op_729_case_n_twoFor every Boolean function f : (Fin 2 → Bool) → Bool on 2 variables, optimalTorusError f 0 = predictedTorusError 2 f and…
- explicitApproximant_torusDistanceFor any Boolean function f : (Fin n → Bool) → Bool on n > 0 variables and any x : Fin n → Bool, torusDistance (explicitApproximant f x -…
- forest_carpool_component_coin_localityTwo coin assignments that agree on every edge in the final connected component of a fixed vertex give the same final greedy discrepancy at…
- fullMonomialThe full monomial x_[n] = ∏_{i=1}^n x_i evaluated at a point in {0,1}^n.
- HasTorusApproximationFor a Boolean function f : (Fin n → Bool) → Bool, natural number d, and real error ε, HasTorusApproximation f d ε asserts the existence of…
- ternary_two_pencils_unique_fibers_card_le_sixTake the seven residue columns x,y,z,y+z,y-z,x+z,x-z in F3^3, with the first three lifted to the exact standard basis modulo 9. Allow…
- HasRationalTorusApproximationFor a Boolean function f : (Fin n → Bool) → Bool on n variables, natural degree d, and error ε : ℝ, HasRationalTorusApproximation f d ε…
- ternary_lift_realApproxDegree_leSuppose n, d : ℕ with 40 ≤ n. If f : (Fin n → Bool) → Bool, P : (Fin n → Bool) → ℝ is in degreeSpace ℝ (Fin n) d, and Z : (Fin n → Bool) →…
- alpha_lexical_odd_completion_iff_rotation_max_of_primeThe proposed encoding bridge between positive lexical sequences and nonconstant odd-parity maximum-rank necklace representatives at odd…
- op_729_and3_has_rational_torus_approximationThe 3-variable conjunction function on Fin 3 → Bool has a degree 1 rational torus approximation with error 1/6:…
- zero_sum_w_three_threew_3(3) = 13: every admissible sequence (no term ≡ 0 mod 3) of 13 vectors in ℤ^3 has a nonempty subsequence whose sum is ≡ 0 (mod 3) but ≢…
- op_258_hypercube_bipartite_decompositionFor any l ≥ 1, the edge set of the complete graph on 2^l vertices can be partitioned into l bipartite layers (indexed by the first…
- quinticDecoder_eval_parityFor any integer z ∈ {-1, 0, 1} and any Boolean b, the formal polynomial quinticDecoder evaluated at 2 * (z : ℝ) + bit b equals bit b.
- simple_graph_equivalence_covering_number_cycle_power_dvdFor k ≥ 1 and q ≥ 2, the k-th power of the cycle on q(k + 1) vertices has equivalence covering number exactly 1 + ⌈log₂(k + 1)⌉.
- explicitApproximant_permFor any Boolean function f : (Fin n → Bool) → Bool on n variables, any permutation e : Equiv.Perm (Fin n), if f (x ∘ e) = f x for all x…
Read back from the Lean
The function bit maps a boolean b : Bool to the real number 1 : ℝ if b is true, and to 0 : ℝ if b is false.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- Convert a boolean value to a real number (0 or 1). -/ def bit (b : Bool) : ℝ := if b then 1 else 0