Equations
- Chapter3.snoc x xs = xs ++ [x]
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Chapter3.instReprSymList = { reprPrec := Chapter3.instReprSymList.repr }
Equations
- Chapter3.SymList.nil = { lhs := [], rhs := [], ok := Chapter3.SymList.nil._proof_1 }
Instances For
Equations
- Chapter3.SymList.instInhabited = { default := Chapter3.SymList.nil }
Equations
Instances For
Equations
Instances For
Equations
- [].toSL = Chapter3.SymList.nil
- (x_1 :: xs).toSL = Chapter3.SymList.consSL x_1 xs.toSL
Instances For
Equations
Instances For
Equations
- Chapter3.SymList.splitInTwoSL xs = { lhs := (List.MergeSort.Internal.splitInTwo ⟨xs, ⋯⟩).fst.val, rhs := (List.MergeSort.Internal.splitInTwo ⟨xs, ⋯⟩).snd.val.reverse, ok := ⋯ }
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instances For
Equations
Instances For
theorem
Chapter3.scanl_cons
{α : Type u_1}
{β : Type u_2}
(f : β → α → β)
(b : β)
(a : α)
(as : List α)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Chapter3.instReprTree = { reprPrec := Chapter3.instReprTree.repr }
Equations
Instances For
Equations
- Chapter3.instToStringTree = { toString := Chapter3.Tree.toString }
Equations
- (Chapter3.Tree.leaf a_1).size = 1
- (Chapter3.Tree.node a_1 a_2 a_3).size = a_1
Instances For
Equations
- (Chapter3.Tree.leaf a).height = 1
- (Chapter3.Tree.node a a_1 a_2).height = 1 + max a_1.height a_2.height
Instances For
Equations
- Chapter3.instReprDigit = { reprPrec := Chapter3.instReprDigit.repr }
Equations
- One or more equations did not get rendered due to their size.
- Chapter3.instReprDigit.repr Chapter3.Digit.zero prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Chapter3.Digit.zero")).group prec✝
Instances For
Equations
- Chapter3.instToStringDigit = { toString := Chapter3.Digit.toString }
Equations
Instances For
Equations
Instances For
Equations
- Chapter3.fromT (Chapter3.Tree.leaf a_1) = [a_1]
- Chapter3.fromT (Chapter3.Tree.node a_1 a_2 a_3) = Chapter3.fromT a_2 ++ Chapter3.fromT a_3
Instances For
Instances For
Equations
Instances For
Equations
- Chapter3.fetchT 0 (Chapter3.Tree.leaf x) = some x
- Chapter3.fetchT n (Chapter3.Tree.node n_2 t₁ t₂) = if n < n_2 / 2 then Chapter3.fetchT n t₁ else Chapter3.fetchT (n - n_2 / 2) t₂
- Chapter3.fetchT n (Chapter3.Tree.leaf n_2) = none
Instances For
Equations
- Chapter3.fetchRA n [] = none
- Chapter3.fetchRA n (Chapter3.Digit.zero :: xs) = Chapter3.fetchRA n xs
- Chapter3.fetchRA n (Chapter3.Digit.one t :: xs) = if n < t.size then Chapter3.fetchT n t else Chapter3.fetchRA (n - t.size) xs
Instances For
Equations
- Chapter3.consRA x xs = Chapter3.consRA.consT (Chapter3.Tree.leaf x) xs
Instances For
Equations
- Chapter3.consRA.consT x✝ [] = [Chapter3.Digit.one x✝]
- Chapter3.consRA.consT x✝ (Chapter3.Digit.zero :: xs) = Chapter3.Digit.one x✝ :: xs
- Chapter3.consRA.consT x✝ (Chapter3.Digit.one t2 :: xs) = Chapter3.Digit.zero :: Chapter3.consRA.consT (x✝.mk t2) xs
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- Chapter3.listArray bnds xs = ((Chapter3.Ix.range bnds).zip xs).toAssocList'
Instances For
def
Chapter3.accumArray
{i e v : Type}
[Ix i]
[BEq i]
(cmb : e → v → e)
(init : e)
(bounds : i × i)
(as : List (i × v))
:
Lean.AssocList i e
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Chapter3.assocs
{i e : Type}
[Ix i]
[BEq i]
(bounds : i × i)
(default : e)
(arr : Lean.AssocList i e)
:
Equations
- Chapter3.assocs bounds default arr = List.map (fun (i_1 : i) => (i_1, (Lean.AssocList.find? i_1 arr).getD default)) (Chapter3.Ix.range bounds)
Instances For
def
Chapter3.elems
{i e : Type}
[Ix i]
[BEq i]
(bnds : i × i)
(default : e)
(arr : Lean.AssocList i e)
:
List e
Equations
- Chapter3.elems bnds default arr = List.map Prod.snd (Chapter3.assocs bnds default arr)
Instances For
def
Chapter3.indices
{i e : Type}
[Ix i]
[BEq i]
(bnds : i × i)
(default : e)
(arr : Lean.AssocList i e)
:
List i
Equations
- Chapter3.indices bnds default arr = List.map Prod.fst (Chapter3.assocs bnds default arr)