Equations
- Chapter3.snoc x xs = xs ++ [x]
Instances For
Equations
- Chapter3.DoesNotWork.fromSL sl = sl.1 ++ sl.2.reverse
Instances For
@[implicit_reducible]
Equations
- Chapter3.instReprSymList = { reprPrec := Chapter3.instReprSymList.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[implicit_reducible]
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, ⋯⟩).1, rhs := (↑(List.MergeSort.Internal.splitInTwo ⟨xs, ⋯⟩).2).reverse, ok := ⋯ }
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[implicit_reducible]
Equations
- Chapter3.RAList.instReprTree = { reprPrec := Chapter3.RAList.instReprTree.repr }
Equations
Instances For
@[implicit_reducible]
Equations
- Chapter3.RAList.instToStringTree = { toString := Chapter3.RAList.Tree.toString }
Equations
- (Chapter3.RAList.Tree.leaf a_1).size = 1
- (Chapter3.RAList.Tree.node a_1 a_2 a_3).size = a_1
Instances For
Equations
- (Chapter3.RAList.Tree.leaf a).height = 1
- (Chapter3.RAList.Tree.node a a_1 a_2).height = 1 + max a_1.height a_2.height
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[implicit_reducible]
Equations
@[implicit_reducible]
Equations
@[reducible, inline]
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
- Chapter3.RAList.fromT (Chapter3.RAList.Tree.leaf a_1) = [a_1]
- Chapter3.RAList.fromT (Chapter3.RAList.Tree.node a_1 a_2 a_3) = Chapter3.RAList.fromT a_2 ++ Chapter3.RAList.fromT a_3
Instances For
Instances For
Equations
Instances For
Equations
- Chapter3.RAList.fetchT 0 (Chapter3.RAList.Tree.leaf x) = some x
- Chapter3.RAList.fetchT n (Chapter3.RAList.Tree.node n_2 t₁ t₂) = if n < n_2 / 2 then Chapter3.RAList.fetchT n t₁ else Chapter3.RAList.fetchT (n - n_2 / 2) t₂
- Chapter3.RAList.fetchT n (Chapter3.RAList.Tree.leaf n_2) = none
Instances For
Equations
- Chapter3.RAList.fetchRA n [] = none
- Chapter3.RAList.fetchRA n (Chapter3.RAList.Digit.zero :: xs) = Chapter3.RAList.fetchRA n xs
- Chapter3.RAList.fetchRA n (Chapter3.RAList.Digit.one t :: xs) = if n < t.size then Chapter3.RAList.fetchT n t else Chapter3.RAList.fetchRA (n - t.size) xs
Instances For
Equations
Instances For
Equations
Instances For
Equations
- Chapter3.RAList.consRA.consT a✝ [] = [Chapter3.RAList.Digit.one a✝]
- Chapter3.RAList.consRA.consT a✝ (Chapter3.RAList.Digit.zero :: xs) = Chapter3.RAList.Digit.one a✝ :: xs
- Chapter3.RAList.consRA.consT a✝ (Chapter3.RAList.Digit.one t2 :: xs) = Chapter3.RAList.Digit.zero :: Chapter3.RAList.consRA.consT (a✝.mk t2) xs
Instances For
@[implicit_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[implicit_reducible]
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)