Streams a.k.a. infinite lists a.k.a. infinite sequences #
@[implicit_reducible]
@[simp]
Alias for Stream'.eta to match List API.
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
theorem
Stream'.cons_injective_left
{α : Type u}
(s : Stream' α)
:
Function.Injective fun (x : α) => cons x s
@[simp]
theorem
Stream'.mem_cons_of_mem
{α : Type u}
{a : α}
{s : Stream' α}
(b : α)
:
a ā s ā a ā cons b s
theorem
Stream'.eq_or_mem_of_mem_cons
{α : Type u}
{a b : α}
{s : Stream' α}
:
a ā cons b s ā a = b ⨠a ā s
theorem
Stream'.mem_of_get_eq
{α : Type u}
{n : ā}
{s : Stream' α}
{a : α}
:
a = s.get n ā a ā s
theorem
Stream'.mem_iff_exists_get_eq
{α : Type u}
{s : Stream' α}
{a : α}
:
a ā s ā ā (n : ā), a = s.get n
@[simp]
@[simp]
@[simp]
@[simp]
theorem
Stream'.mem_map
{α : Type u}
{β : Type v}
(f : α ā β)
{a : α}
{s : Stream' α}
:
a ā s ā f a ā map f s
theorem
Stream'.exists_of_mem_map
{α : Type u}
{β : Type v}
{f : α ā β}
{b : β}
{s : Stream' α}
:
b ā map f s ā ā a ā s, f a = b
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
Streams sā and sā are defined to be bisimulations if
their heads are equal and tails are bisimulations.
Instances For
theorem
Stream'.eq_of_bisim
{α : Type u}
(R : Stream' α ā Stream' α ā Prop)
(bisim : IsBisimulation R)
{sā sā : Stream' α}
:
R sā sā ā sā = sā
@[simp]
theorem
Stream'.mem_interleave_left
{α : Type u}
{a : α}
{sā : Stream' α}
(sā : Stream' α)
:
a ā sā ā a ā sā ā sā
theorem
Stream'.mem_interleave_right
{α : Type u}
{a : α}
{sā : Stream' α}
(sā : Stream' α)
:
a ā sā ā a ā sā ā sā
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
theorem
Stream'.mem_append_stream_right
{α : Type u}
{a : α}
(l : List α)
{s : Stream' α}
:
a ā s ā a ā l ++ā s
theorem
Stream'.mem_append_stream_left
{α : Type u}
{a : α}
{l : List α}
(s : Stream' α)
:
a ā l ā a ā l ++ā s
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
theorem
Stream'.cycle_g_cons
{α : Type u}
(a aā : α)
(lā : List α)
(aā : α)
(lā : List α)
:
Stream'.cycleG (a, aā :: lā, aā, lā) = (aā, lā, aā, lā)
theorem
Stream'.mem_cycle
{α : Type u}
{a : α}
{l : List α}
(h : l ā [])
:
a ā l ā a ā cycle l h
@[simp]
@[simp]
@[simp]
theorem
Stream'.zip_inits_tails
{α : Type u}
(s : Stream' α)
:
zip appendStream' s.inits s.tails = const s