Built with
doc-gen4 , running Lean4.
Bubbles (
) indicate interactive fragments: hover for details, tap to reveal contents.
Use
Ctrl+↑ Ctrl+↓ to navigate,
Ctrl+🖱️ to focus.
On Mac, use
Cmd instead of
Ctrl .
/-
Copyright (c) 2020 Floris van Doorn. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Floris van Doorn
Ported by: Anatole Dedecker
! This file was ported from Lean 3 source module data.set.accumulate
! leanprover-community/mathlib commit 207cfac9fcd06138865b5d04f7091e46d9320432
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathlib.Data.Set.Lattice
/-!
# Accumulate
The function `Accumulate` takes a set `s` and returns `⋃ y ≤ x, s y`.
-/
variable { α β γ : Type _ } { s : α → Set β } { t : α → Set γ }
namespace Set
/-- `Accumulate s` is the union of `s y` for `y ≤ x`. -/
def Accumulate : [inst : LE α ] → (α → Set β ) → α → Set β Accumulate [ LE α ] ( s : α → Set β ) ( x : α ) : Set β :=
⋃ y ≤ x , s y
#align set.accumulate Set.Accumulate : {α : Type u_1} → {β : Type u_2} → [inst : LE α ] → (α → Set β ) → α → Set β Set.Accumulate
theorem accumulate_def [ LE α ] { x : α } : Accumulate : {α : Type ?u.147} → {β : Type ?u.146} → [inst : LE α ] → (α → Set β ) → α → Set β Accumulate s x = ⋃ y ≤ x , s y :=
rfl : ∀ {α : Sort ?u.194} {a : α }, a = a rfl
#align set.accumulate_def Set.accumulate_def
@[ simp ]
theorem mem_accumulate [ LE α ] { x : α } { z : β } : z ∈ Accumulate : {α : Type ?u.242} → {β : Type ?u.241} → [inst : LE α ] → (α → Set β ) → α → Set β Accumulate s x ↔ ∃ y ≤ x , z ∈ s y := by
simp_rw [ accumulate_def , mem_iUnion₂ : ∀ {γ : Type ?u.563} {ι : Sort ?u.564} {κ : ι → Sort ?u.565 } {x : γ } {s : (i : ι ) → κ i → Set γ },
(x ∈ iUnion fun i => iUnion fun j => s i j ) ↔ ∃ i j , x ∈ s i j mem_iUnion₂, (∃ i j , z ∈ s i ) ↔ ∃ y , y ≤ x ∧ z ∈ s y exists_prop : ∀ {b a : Prop }, (∃ _h , b ) ↔ a ∧ b exists_prop]
#align set.mem_accumulate Set.mem_accumulate : ∀ {α : Type u_1} {β : Type u_2} {s : α → Set β } [inst : LE α ] {x : α } {z : β }, z ∈ Accumulate s x ↔ ∃ y , y ≤ x ∧ z ∈ s y Set.mem_accumulate
theorem subset_accumulate [ Preorder α ] { x : α } : s x ⊆ Accumulate : {α : Type ?u.1143} → {β : Type ?u.1142} → [inst : LE α ] → (α → Set β ) → α → Set β Accumulate s x := fun _ => mem_biUnion : ∀ {α : Type ?u.1191} {β : Type ?u.1192} {s : Set α } {t : α → Set β } {x : α } {y : β },
x ∈ s → y ∈ t x → y ∈ iUnion fun x => iUnion fun h => t x mem_biUnion le_rfl
#align set.subset_accumulate Set.subset_accumulate
theorem monotone_accumulate [ Preorder α ] : Monotone ( Accumulate : {α : Type ?u.1349} → {β : Type ?u.1348} → [inst : LE α ] → (α → Set β ) → α → Set β Accumulate s ) := fun _ _ hxy =>
biUnion_subset_biUnion_left fun _ hz => le_trans : ∀ {α : Type ?u.1492} [inst : Preorder α ] {a b c : α }, a ≤ b → b ≤ c → a ≤ c le_trans hz hxy
#align set.monotone_accumulate Set.monotone_accumulate
theorem biUnion_accumulate [ Preorder α ] ( x : α ) : (⋃ y ≤ x , Accumulate : {α : Type ?u.1647} → {β : Type ?u.1646} → [inst : LE α ] → (α → Set β ) → α → Set β Accumulate s y ) = ⋃ y ≤ x , s y := by
apply Subset.antisymm : ∀ {α : Type ?u.1715} {a b : Set α }, a ⊆ b → b ⊆ a → a = b Subset.antisymm
· exact iUnion₂_subset : ∀ {α : Type ?u.1730} {ι : Sort ?u.1731} {κ : ι → Sort ?u.1732 } {s : (i : ι ) → κ i → Set α } {t : Set α },
(∀ (i : ι ) (j : κ i ), s i j ⊆ t ) → (iUnion fun i => iUnion fun j => s i j ) ⊆ t iUnion₂_subset fun y hy => monotone_accumulate hy
· exact iUnion₂_mono : ∀ {α : Type ?u.1837} {ι : Sort ?u.1838} {κ : ι → Sort ?u.1839 } {s t : (i : ι ) → κ i → Set α },
(∀ (i : ι ) (j : κ i ), s i j ⊆ t i j ) → (iUnion fun i => iUnion fun j => s i j ) ⊆ iUnion fun i => iUnion fun j => t i j iUnion₂_mono fun y _ => subset_accumulate
#align set.bUnion_accumulate Set.biUnion_accumulate
theorem iUnion_accumulate [ Preorder α ] : (⋃ x , Accumulate : {α : Type ?u.1944} → {β : Type ?u.1943} → [inst : LE α ] → (α → Set β ) → α → Set β Accumulate s x ) = ⋃ x , s x := by
apply Subset.antisymm : ∀ {α : Type ?u.2003} {a b : Set α }, a ⊆ b → b ⊆ a → a = b Subset.antisymm
· simp only [ subset_def : ∀ {α : Type ?u.2029} {s t : Set α }, (s ⊆ t ) = ∀ (x : α ), x ∈ s → x ∈ t subset_def, mem_iUnion : ∀ {α : Type ?u.2042} {ι : Sort ?u.2043} {x : α } {s : ι → Set α }, (x ∈ iUnion fun i => s i ) ↔ ∃ i , x ∈ s i mem_iUnion, exists_imp : ∀ {α : Sort ?u.2071} {p : α → Prop } {b : Prop }, (∃ x , p x ) → b ↔ ∀ (x : α ), p x → b exists_imp, mem_accumulate : ∀ {α : Type ?u.2092} {β : Type ?u.2093} {s : α → Set β } [inst : LE α ] {x : α } {z : β },
z ∈ Accumulate s x ↔ ∃ y , y ≤ x ∧ z ∈ s y mem_accumulate] h₁ ∀ (x : β ) (x_1 x_2 : α ), x_2 ≤ x_1 ∧ x ∈ s x_2 → ∃ i , x ∈ s i
intro z x x' ⟨_, hz ⟩
exact ⟨ x' , hz ⟩
· exact iUnion_mono : ∀ {α : Type ?u.2674} {ι : Sort ?u.2675} {s t : ι → Set α },
(∀ (i : ι ), s i ⊆ t i ) → (iUnion fun i => s i ) ⊆ iUnion fun i => t i iUnion_mono fun i => subset_accumulate
#align set.Union_accumulate Set.iUnion_accumulate
end Set