The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V03. Sets, finite structures and big operators

Mathlib.Data.Set.BoolIndicator

7 declarations. Mathlib docs · Source

def Set.boolIndicator E1 #

{α : Type u_1} → Set α → α → Bool

boolIndicator maps x to true if x ∈ s, else to false

theorem Set.mem_iff_boolIndicator E0 #

∀ {α : Type u_1} (s : Set α) (x : α), x ∈ s ↔ s.boolIndicator x = true

theorem Set.notMem_iff_boolIndicator E1 #

∀ {α : Type u_1} (s : Set α) (x : α), x ∉ s ↔ s.boolIndicator x = false

theorem Set.preimage_boolIndicator_true E1 #

∀ {α : Type u_1} (s : Set α), s.boolIndicator ⁻¹' {true} = s

theorem Set.preimage_boolIndicator_false E1 #

∀ {α : Type u_1} (s : Set α), s.boolIndicator ⁻¹' {false} = sᶜ

theorem Set.preimage_boolIndicator_eq_union E1 #

∀ {α : Type u_1} (s : Set α) (t : Set Bool),
  s.boolIndicator ⁻¹' t = (if true ∈ t then s else ∅) ∪ if false ∈ t then sᶜ else ∅

theorem Set.preimage_boolIndicator E1 #

∀ {α : Type u_1} (s : Set α) (t : Set Bool),
  s.boolIndicator ⁻¹' t = Set.univ ∨ s.boolIndicator ⁻¹' t = s ∨ s.boolIndicator ⁻¹' t = sᶜ ∨ s.boolIndicator ⁻¹' t = ∅