Documentation

Cslib.Foundations.Data.SetRel

Set-based relations #

def SetRel.map {α : Type u_1} {β : Type u_2} {α' : Type u_4} {β' : Type u_5} (f : α → α') (g : β → β') (r : SetRel α β) :
SetRel α' β'

Map set-based relations along a pair of functions.

@[simp]
theorem SetRel.mem_map {α : Type u_1} {β : Type u_2} {α' : Type u_4} {β' : Type u_5} {f : α → α'} {g : β → β'} {r : SetRel α β} {c : α'} {d : β'} :
(c, d) ∈ SetRel.map f g r ↔ ∃ (a : α) (b : β), (a, b) ∈ r ∧ f a = c ∧ g b = d
theorem SetRel.map_mem_map {α : Type u_1} {β : Type u_2} {α' : Type u_4} {β' : Type u_5} {f : α → α'} {g : β → β'} {r : SetRel α β} {a : α} {b : β} (h : (a, b) ∈ r) :
(f a, g b) ∈ SetRel.map f g r
@[simp]
theorem SetRel.map_inv {α : Type u_1} {β : Type u_2} {α' : Type u_4} {β' : Type u_5} {f : α → α'} {g : β → β'} {s : SetRel α β} :
(SetRel.map f g s).inv = SetRel.map g f s.inv
theorem SetRel.map_subset_map {α : Type u_1} {β : Type u_2} {α' : Type u_4} {β' : Type u_5} {f : α → α'} {g : β → β'} {s r : SetRel α β} (h : s ⊆ r) :
SetRel.map f g s ⊆ SetRel.map f g r
theorem SetRel.map_subset_map_iff {α : Type u_1} {β : Type u_2} {α' : Type u_4} {β' : Type u_5} {f : α → α'} {g : β → β'} {s r : SetRel α β} (hf : Function.Injective f) (hg : Function.Injective g) :
SetRel.map f g s ⊆ SetRel.map f g r ↔ s ⊆ r
@[simp]
theorem SetRel.map_union {α : Type u_1} {β : Type u_2} {α' : Type u_4} {β' : Type u_5} {f : α → α'} {g : β → β'} {s r : SetRel α β} :
SetRel.map f g (s ∪ r) = SetRel.map f g s ∪ SetRel.map f g r
theorem SetRel.map_inter_of_injective_prodMap {α : Type u_1} {β : Type u_2} {α' : Type u_4} {β' : Type u_5} {f : α → α'} {g : β → β'} {s r : SetRel α β} (h : Function.Injective (Prod.map f g)) :
SetRel.map f g (s ∩ r) = SetRel.map f g s ∩ SetRel.map f g r
theorem SetRel.map_inter_of_injective {α : Type u_1} {β : Type u_2} {α' : Type u_4} {β' : Type u_5} {f : α → α'} {g : β → β'} {s r : SetRel α β} (hf : Function.Injective f) (hg : Function.Injective g) :
SetRel.map f g (s ∩ r) = SetRel.map f g s ∩ SetRel.map f g r
@[simp]
theorem SetRel.map_bot {α : Type u_1} {β : Type u_2} {α' : Type u_4} {β' : Type u_5} {f : α → α'} {g : β → β'} :
theorem SetRel.map_top_of_surjective_prodMap {α : Type u_1} {β : Type u_2} {α' : Type u_4} {β' : Type u_5} {f : α → α'} {g : β → β'} (h : Function.Surjective (Prod.map f g)) :
theorem SetRel.map_top_of_surjective {α : Type u_1} {β : Type u_2} {α' : Type u_4} {β' : Type u_5} {f : α → α'} {g : β → β'} (hf : Function.Surjective f) (hg : Function.Surjective g) :
theorem SetRel.map_id_of_surjective {α : Type u_1} {α' : Type u_4} {f : α → α'} (hf : Function.Surjective f) :
theorem SetRel.map_comp_of_injective {α : Type u_1} {β : Type u_2} {γ : Type u_3} {α' : Type u_4} {β' : Type u_5} {γ' : Type u_6} {f : α → α'} {g : β → β'} {h : γ → γ'} (hg : Function.Injective g) {s : SetRel α β} {r : SetRel β γ} :
SetRel.map f h (s.comp r) = (SetRel.map f g s).comp (SetRel.map g h r)
@[simp]
theorem SetRel.map_id_fun {α : Type u_1} {β : Type u_2} {s : SetRel α β} :
@[simp]
theorem SetRel.map_comp_fun {α₁ : Type u_7} {α₂ : Type u_8} {α₃ : Type u_9} {β₁ : Type u_10} {β₂ : Type u_11} {β₃ : Type u_12} {f₁ : α₁ → α₂} {f₂ : α₂ → α₃} {g₁ : β₁ → β₂} {g₂ : β₂ → β₃} {s : SetRel α₁ β₁} :
SetRel.map f₂ g₂ (SetRel.map f₁ g₁ s) = SetRel.map (f₂ ∘ f₁) (g₂ ∘ g₁) s
def SetRel.mapEquiv {α : Type u_1} {β : Type u_2} {α' : Type u_4} {β' : Type u_5} (eα : α ≃ α') (eβ : β ≃ β') :
SetRel α β ≃ SetRel α' β'

Equivalences between types lift the their types of set-based relations.

@[simp]
theorem SetRel.mapEquiv_symm_apply {α : Type u_1} {β : Type u_2} {α' : Type u_4} {β' : Type u_5} (eα : α ≃ α') (eβ : β ≃ β') (s : SetRel α' β') :
(mapEquiv eα eβ).symm s = SetRel.map (⇑eα.symm) (⇑eβ.symm) s
@[simp]
theorem SetRel.mapEquiv_apply {α : Type u_1} {β : Type u_2} {α' : Type u_4} {β' : Type u_5} (eα : α ≃ α') (eβ : β ≃ β') (s : SetRel α β) :
(mapEquiv eα eβ) s = SetRel.map (⇑eα) (⇑eβ) s