def
definition
ofInt
show as:
view math explainer →
open explainer
Read the cached plain-language explainer.
open lean source
IndisputableMonolith.Support.RungFractions on GitHub at line 25.
browse module
All declarations in this module, on Recognition.
explainer page
depends on
used by
formal source
22abbrev Rung := ℚ
23
24/-- Embed an integer rung into a rational rung. -/
25@[simp] def ofInt (z : ℤ) : Rung := (z : ℚ)
26
27/-- The quarter‑ladder embedding: `k ↦ k/4`. -/
28@[simp] def quarter (k : ℤ) : Rung := (k : ℚ) / 4
29
30/-- The half‑ladder embedding: `k ↦ k/2`. -/
31@[simp] def half (k : ℤ) : Rung := (k : ℚ) / 2
32
33/-- Convert a rational rung to a real exponent (for `Real.rpow`). -/
34@[simp] def toReal (r : Rung) : ℝ := (r : ℝ)
35
36theorem quarter_eq (k : ℤ) : quarter k = (k : ℚ) / 4 := rfl
37theorem half_eq (k : ℤ) : half k = (k : ℚ) / 2 := rfl
38
39end RungFractions
40end Support
41end IndisputableMonolith