Well-formedness proofs for raw tree sets #
This file contains well-formedness proofs about Std.Data.TreeSet.Raw.Basic
. Most of the lemmas require
TransCmp cmp
for the comparison function cmp
.
theorem
Std.TreeSet.Raw.WF.containsThenInsert
{α : Type u}
{cmp : α → α → Ordering}
{t : Raw α cmp}
[TransCmp cmp]
{a : α}
(h : t.WF)
:
(t.containsThenInsert a).snd.WF
theorem
Std.TreeSet.Raw.WF.filter
{α : Type u}
{cmp : α → α → Ordering}
{t : Raw α cmp}
[TransCmp cmp]
{f : α → Bool}
(h : t.WF)
:
(Raw.filter f t).WF
theorem
Std.TreeSet.Raw.WF.ofList
{α : Type u}
{cmp : α → α → Ordering}
[TransCmp cmp]
{l : List α}
:
(Raw.ofList l cmp).WF
theorem
Std.TreeSet.Raw.WF.ofArray
{α : Type u}
{cmp : α → α → Ordering}
[TransCmp cmp]
{a : Array α}
:
(Raw.ofArray a cmp).WF