Lemmas about List.mapUnion operator #
List.mapUnion generically (f returning any collection type) #
List.mapUnion for sets (f returning Set) #
theorem
List.mapUnion_wf
{α : Type u_1}
{β : Type u_2}
[LT α]
[Cedar.Data.StrictLT α]
[DecidableLT α]
{f : β → Cedar.Data.Set α}
{xs : List β}
:
(mapUnion f xs).WellFormed
theorem
List.mapUnion_cons
{α : Type u_1}
{β : Type u_2}
[LT α]
[Cedar.Data.StrictLT α]
[DecidableLT α]
{f : β → Cedar.Data.Set α}
{hd : β}
{tl : List β}
:
@[simp]
theorem
List.mapUnion_singleton
{α : Type u_1}
{β : Type u_2}
[LT α]
[Cedar.Data.StrictLT α]
[DecidableLT α]
{f : β → Cedar.Data.Set α}
{x : β}
:
(f x).WellFormed → mapUnion f [x] = f x
@[simp]
theorem
List.mapUnion_map
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[LT α]
[Cedar.Data.StrictLT α]
[DecidableLT α]
{f : β → Cedar.Data.Set α}
{g : γ → β}
{xs : List γ}
:
theorem
List.mem_mapUnion_iff_mem_exists
{α : Type u_1}
{β : Type u_2}
[LT α]
[Cedar.Data.StrictLT α]
[DecidableLT α]
{f : β → Cedar.Data.Set α}
{xs : List β}
(e : α)
:
theorem
List.mem_mem_implies_mem_mapUnion
{α : Type u_1}
{β : Type u_2}
[LT α]
[Cedar.Data.StrictLT α]
[DecidableLT α]
{f : β → Cedar.Data.Set α}
{xs : List β}
{e : α}
{s : β}
:
theorem
List.mem_implies_subset_mapUnion
{α : Type u_1}
{β : Type u_2}
[LT α]
[Cedar.Data.StrictLT α]
[DecidableLT α]
[DecidableEq α]
(f : β → Cedar.Data.Set α)
{xs : List β}
{s : β}
:
@[simp]
theorem
List.mapUnion_filterMap
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[LT α]
[Cedar.Data.StrictLT α]
[DecidableLT α]
[DecidableEq α]
{f : β → Cedar.Data.Set α}
{g : γ → Option β}
{xs : List γ}
:
theorem
List.mapUnion_congr
{α : Type u_1}
{β : Type u_2}
[LT α]
[Cedar.Data.StrictLT α]
[DecidableLT α]
[DecidableEq α]
(f g : β → Cedar.Data.Set α)
{xs : List β}
:
theorem
List.mapUnion_eq_mapUnion_id_map
{α : Type u_1}
{β : Type u_2}
[LT α]
[Cedar.Data.StrictLT α]
[DecidableLT α]
[DecidableEq α]
(f : β → Cedar.Data.Set α)
{xs : List β}
:
theorem
List.mapUnion_append
{α : Type u_1}
{β : Type u_2}
[LT α]
[Cedar.Data.StrictLT α]
[DecidableLT α]
{f : β → Cedar.Data.Set α}
{xs ys : List β}
:
theorem
List.mapUnion_union_mapUnion
{α : Type u_1}
{β : Type u_2}
[LT α]
[Cedar.Data.StrictLT α]
[DecidableLT α]
(f : β → Cedar.Data.Set α)
(xs ys : List β)
:
Corollary of mapUnion_append, stated in reverse for some reason, and using ∪ instead of ++ (which are synonyms in the case of Data.Set)
theorem
List.mapUnion_union_mapUnion'
{α : Type u_1}
{β : Type u_2}
[LT α]
[Cedar.Data.StrictLT α]
[DecidableLT α]
{f g : β → Cedar.Data.Set α}
{xs : List β}
:
(∀ (x : β), x ∈ xs → (f x).WellFormed ∧ (g x).WellFormed) →
mapUnion f xs ∪ mapUnion g xs = mapUnion (fun (x : β) => f x ∪ g x) xs
mapUnion_union_mapUnion applies when you have the same function f and different input lists.
mapUnion_union_mapUnion' applies when you have different functions f/g and the same input list.
theorem
List.mapUnion_comm
{α : Type u_1}
{β : Type u_2}
[LT α]
[Cedar.Data.StrictLT α]
[DecidableLT α]
[DecidableEq α]
{f : β → Cedar.Data.Set α}
{xs ys : List β}
:
theorem
List.map_eqv_implies_mapUnion_eq
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[LT α]
[Cedar.Data.StrictLT α]
[DecidableLT α]
[DecidableEq α]
{f : β → Cedar.Data.Set α}
{g : γ → Cedar.Data.Set α}
{xs : List β}
{ys : List γ}
: