-- Mathlib/MeasureTheory/Function/AEEqOfLIntegral.lean
theorem ae_const_le_iff_forall_lt_measure_zero {β} [LinearOrder β] [TopologicalSpace β]
    [OrderTopology β] [FirstCountableTopology β] (f : α → β) (c : β) :
    (∀ᵐ x ∂μ, c ≤ f x) ↔ ∀ b < c, μ {x | f x ≤ b} = 0

Proof state:
case pos
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
β : Type u_2
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : FirstCountableTopology β
f : α → β
c : β
hc : ∀ b < c, μ {x | f x ≤ b} = 0
h : ∀ (b : β), c ≤ b
⊢ μ {a | f a < c} = 0

Tactic:
have : {a : α | f a < c} = ∅ := by
  apply Set.eq_empty_iff_forall_not_mem.2 fun x hx => ?_
  exact (lt_irrefl _ (lt_of_lt_of_le hx (h (f x)))).elim

Result:
case pos
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
β : Type u_2
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : FirstCountableTopology β
f : α → β
c : β
hc : ∀ b < c, μ {x | f x ≤ b} = 0
h : ∀ (b : β), c ≤ b
this : {a | f a < c} = ∅
⊢ μ {a | f a < c} = 0

Proof state:
case h
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
β : Type u_2
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : FirstCountableTopology β
f : α → β
c : β
hc : ∀ b < c, μ {x | f x ≤ b} = 0
H : IsLUB (Set.Iio c) c
h : ∃ b, b < c
u : ℕ → β
left✝ : StrictMono u
u_lt : ∀ (n : ℕ), u n < c
u_lim : Tendsto u atTop (𝓝 c)
x : α
⊢ x ∈ {x | f x < c} ↔ x ∈ ⋃ n, {x | f x ≤ u n}

Tactic:
simp_rw [Set.mem_iUnion, Set.mem_setOf_eq]

Result:
case h
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
β : Type u_2
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : FirstCountableTopology β
f : α → β
c : β
hc : ∀ b < c, μ {x | f x ≤ b} = 0
H : IsLUB (Set.Iio c) c
h : ∃ b, b < c
u : ℕ → β
left✝ : StrictMono u
u_lt : ∀ (n : ℕ), u n < c
u_lim : Tendsto u atTop (𝓝 c)
x : α
⊢ f x < c ↔ ∃ i, f x ≤ u i

Proof state:
case mp
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
β : Type u_2
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : FirstCountableTopology β
f : α → β
c : β
⊢ μ {a | f a < c} = 0 → ∀ b < c, μ {x | f x ≤ b} = 0

Tactic:
intro h b hb

Result:
case mp
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
β : Type u_2
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : FirstCountableTopology β
f : α → β
c : β
h : μ {a | f a < c} = 0
b : β
hb : b < c
⊢ μ {x | f x ≤ b} = 0

Proof state:
case h.mp
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
β : Type u_2
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : FirstCountableTopology β
f : α → β
c : β
hc : ∀ b < c, μ {x | f x ≤ b} = 0
H : IsLUB (Set.Iio c) c
h✝ : ∃ b, b < c
u : ℕ → β
left✝ : StrictMono u
u_lt : ∀ (n : ℕ), u n < c
u_lim : Tendsto u atTop (𝓝 c)
x : α
h : f x < c
⊢ ∃ i, f x ≤ u i

Tactic:
obtain ⟨n, hn⟩ := ((tendsto_order.1 u_lim).1 _ h).exists

Result:
case h.mp.intro
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
β : Type u_2
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : FirstCountableTopology β
f : α → β
c : β
hc : ∀ b < c, μ {x | f x ≤ b} = 0
H : IsLUB (Set.Iio c) c
h✝ : ∃ b, b < c
u : ℕ → β
left✝ : StrictMono u
u_lt : ∀ (n : ℕ), u n < c
u_lim : Tendsto u atTop (𝓝 c)
x : α
h : f x < c
n : ℕ
hn : f x < u n
⊢ ∃ i, f x ≤ u i

Proof state:
case mpr
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
β : Type u_2
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : FirstCountableTopology β
f : α → β
c : β
hc : ∀ b < c, μ {x | f x ≤ b} = 0
⊢ μ {a | f a < c} = 0

Tactic:
by_cases h : ∀ b, c ≤ b

Result:
case pos
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
β : Type u_2
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : FirstCountableTopology β
f : α → β
c : β
hc : ∀ b < c, μ {x | f x ≤ b} = 0
h : ∀ (b : β), c ≤ b
⊢ μ {a | f a < c} = 0

case neg
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
β : Type u_2
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : FirstCountableTopology β
f : α → β
c : β
hc : ∀ b < c, μ {x | f x ≤ b} = 0
h : ¬∀ (b : β), c ≤ b
⊢ μ {a | f a < c} = 0

Proof state:
case neg.intro.intro.intro.intro
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
β : Type u_2
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : FirstCountableTopology β
f : α → β
c : β
hc : ∀ b < c, μ {x | f x ≤ b} = 0
H : IsLUB (Set.Iio c) c
h : ∃ b, b < c
u : ℕ → β
left✝ : StrictMono u
u_lt : ∀ (n : ℕ), u n < c
u_lim : Tendsto u atTop (𝓝 c)
h_Union : {x | f x < c} = ⋃ n, {x | f x ≤ u n}
⊢ ∀ (i : ℕ), μ {x | f x ≤ u i} = 0

Tactic:
intro n

Result:
case neg.intro.intro.intro.intro
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
β : Type u_2
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : FirstCountableTopology β
f : α → β
c : β
hc : ∀ b < c, μ {x | f x ≤ b} = 0
H : IsLUB (Set.Iio c) c
h : ∃ b, b < c
u : ℕ → β
left✝ : StrictMono u
u_lt : ∀ (n : ℕ), u n < c
u_lim : Tendsto u atTop (𝓝 c)
h_Union : {x | f x < c} = ⋃ n, {x | f x ≤ u n}
n : ℕ
⊢ μ {x | f x ≤ u n} = 0

Proof state:
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
β : Type u_2
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : FirstCountableTopology β
f : α → β
c : β
hc : ∀ b < c, μ {x | f x ≤ b} = 0
h : ∀ (b : β), c ≤ b
x : α
hx : x ∈ {a | f a < c}
⊢ False

Tactic:
exact (lt_irrefl _ (lt_of_lt_of_le hx (h (f x)))).elim

Result:
no goals

Proof state:
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
β : Type u_2
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : FirstCountableTopology β
f : α → β
c : β
hc : ∀ b < c, μ {x | f x ≤ b} = 0
H : IsLUB (Set.Iio c) c
h : ∃ b, b < c
u : ℕ → β
left✝ : StrictMono u
u_lt : ∀ (n : ℕ), u n < c
u_lim : Tendsto u atTop (𝓝 c)
⊢ {x | f x < c} = ⋃ n, {x | f x ≤ u n}

Tactic:
ext1 x

Result:
case h
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
β : Type u_2
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : FirstCountableTopology β
f : α → β
c : β
hc : ∀ b < c, μ {x | f x ≤ b} = 0
H : IsLUB (Set.Iio c) c
h : ∃ b, b < c
u : ℕ → β
left✝ : StrictMono u
u_lt : ∀ (n : ℕ), u n < c
u_lim : Tendsto u atTop (𝓝 c)
x : α
⊢ x ∈ {x | f x < c} ↔ x ∈ ⋃ n, {x | f x ≤ u n}

Proof state:
case mp
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
β : Type u_2
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : FirstCountableTopology β
f : α → β
c : β
h : μ {a | f a < c} = 0
b : β
hb : b < c
⊢ μ {x | f x ≤ b} = 0

Tactic:
exact measure_mono_null (fun y hy => (lt_of_le_of_lt hy hb : _)) h

Result:
no goals

Proof state:
case mpr
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
β : Type u_2
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : FirstCountableTopology β
f : α → β
c : β
⊢ (∀ b < c, μ {x | f x ≤ b} = 0) → μ {a | f a < c} = 0

Tactic:
intro hc

Result:
case mpr
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
β : Type u_2
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : FirstCountableTopology β
f : α → β
c : β
hc : ∀ b < c, μ {x | f x ≤ b} = 0
⊢ μ {a | f a < c} = 0

Proof state:
case h.mpr.intro
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
β : Type u_2
inst✝³ : LinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderTopology β
inst✝ : FirstCountableTopology β
f : α → β
c : β
hc : ∀ b < c, μ {x | f x ≤ b} = 0
H : IsLUB (Set.Iio c) c
h : ∃ b, b < c
u : ℕ → β
left✝ : StrictMono u
u_lt : ∀ (n : ℕ), u n < c
u_lim : Tendsto u atTop (𝓝 c)
x : α
n : ℕ
hn : f x ≤ u n
⊢ f x < c

Tactic:
exact hn.trans_lt (u_lt _)

Result:
no goals