Equations
Instances For
Equations
- Duper.LazyList.instInhabited = { default := Duper.LazyList.nil }
@[irreducible]
Equations
- Duper.LazyList.nil.size = 0
- (Duper.LazyList.cons hd tl).size = tl.size + 1
- (Duper.LazyList.delayed t).size = t.get.size + 1
Instances For
@[inline]
Equations
Instances For
@[irreducible]
Equations
Instances For
@[irreducible]
Equations
- Duper.LazyList.nil.toList = []
- (Duper.LazyList.cons hd tl).toList = hd :: tl.toList
- (Duper.LazyList.delayed t).toList = t.get.toList
Instances For
@[irreducible]
Equations
- Duper.LazyList.nil.head = default
- (Duper.LazyList.cons hd tl).head = hd
- (Duper.LazyList.delayed t).head = t.get.head
Instances For
@[irreducible]
Equations
- Duper.LazyList.nil.tail = Duper.LazyList.nil
- (Duper.LazyList.cons hd tl).tail = tl
- (Duper.LazyList.delayed t).tail = t.get.tail
Instances For
@[irreducible]
Equations
- Duper.LazyList.nil.append x✝ = x✝
- (Duper.LazyList.cons a as).append x✝ = Duper.LazyList.cons a (Duper.LazyList.delayed { fn := fun (x : Unit) => as.append x✝ })
- (Duper.LazyList.delayed as).append x✝ = as.get.append x✝
Instances For
Equations
- Duper.LazyList.instAppend = { append := Duper.LazyList.append }
@[irreducible, specialize #[]]
Equations
- Duper.LazyList.map f Duper.LazyList.nil = Duper.LazyList.nil
- Duper.LazyList.map f (Duper.LazyList.cons hd tl) = Duper.LazyList.cons (f hd) (Duper.LazyList.map f tl)
- Duper.LazyList.map f (Duper.LazyList.delayed t) = Duper.LazyList.delayed { fn := fun (x : Unit) => Duper.LazyList.map f t.get }
Instances For
@[irreducible, specialize #[]]
Equations
- Duper.LazyList.map₂ f Duper.LazyList.nil x✝ = Duper.LazyList.nil
- Duper.LazyList.map₂ f x✝ Duper.LazyList.nil = Duper.LazyList.nil
- Duper.LazyList.map₂ f (Duper.LazyList.cons a as) (Duper.LazyList.cons b bs) = Duper.LazyList.cons (f a b) (Duper.LazyList.delayed { fn := fun (x : Unit) => Duper.LazyList.map₂ f as bs })
- Duper.LazyList.map₂ f (Duper.LazyList.delayed as) x✝ = Duper.LazyList.map₂ f as.get x✝
- Duper.LazyList.map₂ f x✝ (Duper.LazyList.delayed bs) = Duper.LazyList.map₂ f x✝ bs.get
Instances For
@[irreducible]
Equations
- Duper.LazyList.nil.interleave x✝ = x✝
- (Duper.LazyList.cons a as).interleave x✝ = Duper.LazyList.cons a (Duper.LazyList.delayed { fn := fun (x : Unit) => x✝.interleave as })
- (Duper.LazyList.delayed as).interleave x✝ = Duper.LazyList.delayed { fn := fun (x : Unit) => as.get.interleave x✝ }
Instances For
Equations
Instances For
Equations
Instances For
def
Duper.LazyList.bindω
{α : Type u}
{β : Type v}
(xs : LazyList α)
(f : α → LazyList β)
:
LazyList β
Equations
- xs.bindω f = (Duper.LazyList.map f xs).interleaveω
Instances For
@[inline]
Equations
Instances For
@[irreducible]
Equations
- Duper.LazyList.nil.join = Duper.LazyList.nil
- (Duper.LazyList.cons a as).join = a.append (Duper.LazyList.delayed { fn := fun (x : Unit) => as.join })
- (Duper.LazyList.delayed t).join = t.get.join
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.
@[irreducible]
Equations
- Duper.LazyList.approx 0 x✝ = []
- Duper.LazyList.approx x✝ Duper.LazyList.nil = []
- Duper.LazyList.approx i.succ (Duper.LazyList.cons a as) = a :: Duper.LazyList.approx i as
- Duper.LazyList.approx i.succ (Duper.LazyList.delayed as) = Duper.LazyList.approx (i + 1) as.get
Instances For
@[specialize #[]]
@[irreducible, specialize #[]]
Equations
- Duper.LazyList.filter p Duper.LazyList.nil = Duper.LazyList.nil
- Duper.LazyList.filter p (Duper.LazyList.cons hd tl) = if p hd = true then Duper.LazyList.cons hd (Duper.LazyList.filter p tl) else Duper.LazyList.filter p tl
- Duper.LazyList.filter p (Duper.LazyList.delayed t) = Duper.LazyList.delayed { fn := fun (x : Unit) => Duper.LazyList.filter p t.get }
Instances For
@[irreducible]
Equations
- One or more equations did not get rendered due to their size.
- Duper.LazyList.nil.inits = Duper.LazyList.cons Duper.LazyList.nil Duper.LazyList.nil
- (Duper.LazyList.delayed t).inits = t.get.inits
Instances For
@[irreducible]
Equations
- Duper.LazyList.approxToStringAux x✝¹ Duper.LazyList.nil x✝ = (if x✝.isEmpty = true then "[" else x✝) ++ "]"
- Duper.LazyList.approxToStringAux 0 x✝¹ x✝ = (if x✝.isEmpty = true then "[" else x✝) ++ ", ..]"
- Duper.LazyList.approxToStringAux n.succ (Duper.LazyList.cons a as) x✝ = Duper.LazyList.approxToStringAux n as ((if x✝.isEmpty = true then "[" else x✝ ++ ", ") ++ toString a)
- Duper.LazyList.approxToStringAux x✝¹ (Duper.LazyList.delayed as) x✝ = Duper.LazyList.approxToStringAux x✝¹ as.get x✝
Instances For
Equations
- as.approxToString n = Duper.LazyList.approxToStringAux n as ""
Instances For
Equations
- Duper.LazyList.instToString = { toString := fun (as : Duper.LazyList α) => as.approxToString }
Equations
- [].lazySubsequences = Duper.LazyList.cons [] Duper.LazyList.nil
- (h :: t).lazySubsequences = t.lazySubsequences ++ Duper.LazyList.delayed { fn := fun (x : Unit) => Duper.LazyList.map (List.cons h) t.lazySubsequences }