Skip to content

Commit

Permalink
refactor(Probability/Kernel/CondCdf): mv some theorems (#10036)
Browse files Browse the repository at this point in the history
Co-authored-by: Moritz Firsching <[email protected]>
  • Loading branch information
mo271 and mo271 committed Jan 28, 2024
1 parent e8bfb67 commit 19b5ded
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
22 changes: 21 additions & 1 deletion Mathlib/Logic/Encodable/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,11 @@ theorem rel_sequence {r : β → β → Prop} {f : α → β} (hf : Directed r f
exact (Classical.choose_spec (hf _ a)).2
#align directed.rel_sequence Directed.rel_sequence

variable [Preorder β] {f : α → β} (hf : Directed (· ≤ ·) f)
variable [Preorder β] {f : α → β}

section

variable (hf : Directed (· ≤ ·) f)

theorem sequence_mono : Monotone (f ∘ hf.sequence f) :=
monotone_nat_of_le_succ <| hf.sequence_mono_nat
Expand All @@ -665,6 +669,22 @@ theorem le_sequence (a : α) : f a ≤ f (hf.sequence f (encode a + 1)) :=
hf.rel_sequence a
#align directed.le_sequence Directed.le_sequence

end

section

variable (hf : Directed (· ≥ ·) f)

theorem sequence_anti : Antitone (f ∘ hf.sequence f) :=
antitone_nat_of_succ_le <| hf.sequence_mono_nat
#align directed.sequence_anti Directed.sequence_anti

theorem sequence_le (a : α) : f (hf.sequence f (Encodable.encode a + 1)) ≤ f a :=
hf.rel_sequence a
#align directed.sequence_le Directed.sequence_le

end

end Directed

section Quotient
Expand Down
16 changes: 1 addition & 15 deletions Mathlib/Probability/Kernel/CondCdf.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Copyright (c) 2023 Rémy Degenne. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Rémy Degenne
-/
import Mathlib.Logic.Encodable.Basic
import Mathlib.Data.Set.Lattice
import Mathlib.MeasureTheory.Measure.Stieltjes
import Mathlib.MeasureTheory.Decomposition.RadonNikodym
Expand Down Expand Up @@ -52,21 +53,6 @@ section AuxLemmasToBeMoved

variable {α β ι : Type*}

namespace Directed

-- todo after the port: move this to logic.encodable.basic near sequence_mono
variable [Encodable α] [Inhabited α] [Preorder β] {f : α → β} (hf : Directed (· ≥ ·) f)

theorem sequence_anti : Antitone (f ∘ hf.sequence f) :=
antitone_nat_of_succ_le <| hf.sequence_mono_nat
#align directed.sequence_anti Directed.sequence_anti

theorem sequence_le (a : α) : f (hf.sequence f (Encodable.encode a + 1)) ≤ f a :=
hf.rel_sequence a
#align directed.sequence_le Directed.sequence_le

end Directed

theorem Real.iUnion_Iic_rat : ⋃ r : ℚ, Iic (r : ℝ) = univ := by
ext1 x
simp only [mem_iUnion, mem_Iic, mem_univ, iff_true_iff]
Expand Down

0 comments on commit 19b5ded

Please sign in to comment.