l3lab/ntp-mathlib huggingface dataset:
/-- A set is in the `countableInterFilter` generated by `g` if and only if
it contains a countable intersection of elements of `g`. -/
theorem mem_countableGenerate_iff {s : Set α} :
    s ∈ countableGenerate g ↔ ∃ S : Set (Set α), S ⊆ g ∧ S.Countable ∧ ⋂₀ S ⊆ s := by
  constructor <;> intro h
  · induction' h with s hs s t _ st ih S Sct _ ih
    · exact ⟨{s}, by simp [hs, subset_refl]⟩
    · exact ⟨∅, by simp⟩
    · refine' Exists.imp (fun S => _) ih
      tauto
    

Proof state:
case mp.sInter
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
g : Set (Set α)
s : Set α
S : Set (Set α)
Sct : Set.Countable S
a✝ : ∀ s ∈ S, CountableGenerateSets g s
ih : ∀ s ∈ S, ∃ S ⊆ g, Set.Countable S ∧ ⋂₀ S ⊆ s
⊢ ∃ S_1 ⊆ g, Set.Countable S_1 ∧ ⋂₀ S_1 ⊆ ⋂₀ S

Next tactic:
choose T Tg Tct hT using ih
/-- A set is in the `countableInterFilter` generated by `g` if and only if
it contains a countable intersection of elements of `g`. -/
theorem mem_countableGenerate_iff {s : Set α} :
    s ∈ countableGenerate g ↔ ∃ S : Set (Set α), S ⊆ g ∧ S.Countable ∧ ⋂₀ S ⊆ s := by
  constructor <;> intro h
  · induction' h with s hs s t _ st ih S Sct _ ih
    · exact ⟨{s}, by simp [hs, subset_refl]⟩
    · exact ⟨∅, by simp⟩
    · refine' Exists.imp (fun S => _) ih
      tauto
    choose T Tg Tct hT using ih
    

Proof state:
case mp.sInter
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
g : Set (Set α)
s : Set α
S : Set (Set α)
Sct : Set.Countable S
a✝ : ∀ s ∈ S, CountableGenerateSets g s
T : (s : Set α) → s ∈ S → Set (Set α)
Tg : ∀ (s : Set α) (a : s ∈ S), T s a ⊆ g
Tct : ∀ (s : Set α) (a : s ∈ S), Set.Countable (T s a)
hT : ∀ (s : Set α) (a : s ∈ S), ⋂₀ T s a ⊆ s
⊢ ∃ S_1 ⊆ g, Set.Countable S_1 ∧ ⋂₀ S_1 ⊆ ⋂₀ S

Next tactic:
refine' ⟨⋃ (s) (H : s ∈ S), T s H, by simpa, Sct.biUnion Tct, _⟩
/-- A set is in the `countableInterFilter` generated by `g` if and only if
it contains a countable intersection of elements of `g`. -/
theorem mem_countableGenerate_iff {s : Set α} :
    s ∈ countableGenerate g ↔ ∃ S : Set (Set α), S ⊆ g ∧ S.Countable ∧ ⋂₀ S ⊆ s := by
  constructor <;> intro h
  · induction' h with s hs s t _ st ih S Sct _ ih
    · exact ⟨{s}, by simp [hs, subset_refl]⟩
    · exact ⟨∅, by simp⟩
    · refine' Exists.imp (fun S => _) ih
      tauto
    choose T Tg Tct hT using ih
    refine' ⟨⋃ (s) (H : s ∈ S), T s H, by 

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
g : Set (Set α)
s : Set α
S : Set (Set α)
Sct : Set.Countable S
a✝ : ∀ s ∈ S, CountableGenerateSets g s
T : (s : Set α) → s ∈ S → Set (Set α)
Tg : ∀ (s : Set α) (a : s ∈ S), T s a ⊆ g
Tct : ∀ (s : Set α) (a : s ∈ S), Set.Countable (T s a)
hT : ∀ (s : Set α) (a : s ∈ S), ⋂₀ T s a ⊆ s
⊢ ⋃ s, ⋃ (H : s ∈ S), T s H ⊆ g

Next tactic:
simpa
/-- A set is in the `countableInterFilter` generated by `g` if and only if
it contains a countable intersection of elements of `g`. -/
theorem mem_countableGenerate_iff {s : Set α} :
    s ∈ countableGenerate g ↔ ∃ S : Set (Set α), S ⊆ g ∧ S.Countable ∧ ⋂₀ S ⊆ s := by
  constructor <;> intro h
  · induction' h with s hs s t _ st ih S Sct _ ih
    · exact ⟨{s}, by simp [hs, subset_refl]⟩
    · exact ⟨∅, by simp⟩
    · refine' Exists.imp (fun S => _) ih
      tauto
    choose T Tg Tct hT using ih
    refine' ⟨⋃ (s) (H : s ∈ S), T s H, by simpa, Sct.biUnion Tct, _⟩
    

Proof state:
case mp.sInter
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
g : Set (Set α)
s : Set α
S : Set (Set α)
Sct : Set.Countable S
a✝ : ∀ s ∈ S, CountableGenerateSets g s
T : (s : Set α) → s ∈ S → Set (Set α)
Tg : ∀ (s : Set α) (a : s ∈ S), T s a ⊆ g
Tct : ∀ (s : Set α) (a : s ∈ S), Set.Countable (T s a)
hT : ∀ (s : Set α) (a : s ∈ S), ⋂₀ T s a ⊆ s
⊢ ⋂₀ ⋃ s, ⋃ (H : s ∈ S), T s H ⊆ ⋂₀ S

Next tactic:
apply subset_sInter
/-- A set is in the `countableInterFilter` generated by `g` if and only if
it contains a countable intersection of elements of `g`. -/
theorem mem_countableGenerate_iff {s : Set α} :
    s ∈ countableGenerate g ↔ ∃ S : Set (Set α), S ⊆ g ∧ S.Countable ∧ ⋂₀ S ⊆ s := by
  constructor <;> intro h
  · induction' h with s hs s t _ st ih S Sct _ ih
    · exact ⟨{s}, by simp [hs, subset_refl]⟩
    · exact ⟨∅, by simp⟩
    · refine' Exists.imp (fun S => _) ih
      tauto
    choose T Tg Tct hT using ih
    refine' ⟨⋃ (s) (H : s ∈ S), T s H, by simpa, Sct.biUnion Tct, _⟩
    apply subset_sInter
    

Proof state:
case mp.sInter.h
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
g : Set (Set α)
s : Set α
S : Set (Set α)
Sct : Set.Countable S
a✝ : ∀ s ∈ S, CountableGenerateSets g s
T : (s : Set α) → s ∈ S → Set (Set α)
Tg : ∀ (s : Set α) (a : s ∈ S), T s a ⊆ g
Tct : ∀ (s : Set α) (a : s ∈ S), Set.Countable (T s a)
hT : ∀ (s : Set α) (a : s ∈ S), ⋂₀ T s a ⊆ s
⊢ ∀ t' ∈ S, ⋂₀ ⋃ s, ⋃ (H : s ∈ S), T s H ⊆ t'

Next tactic:
intro s H
/-- A set is in the `countableInterFilter` generated by `g` if and only if
it contains a countable intersection of elements of `g`. -/
theorem mem_countableGenerate_iff {s : Set α} :
    s ∈ countableGenerate g ↔ ∃ S : Set (Set α), S ⊆ g ∧ S.Countable ∧ ⋂₀ S ⊆ s := by
  constructor <;> intro h
  · induction' h with s hs s t _ st ih S Sct _ ih
    · exact ⟨{s}, by simp [hs, subset_refl]⟩
    · exact ⟨∅, by simp⟩
    · refine' Exists.imp (fun S => _) ih
      tauto
    choose T Tg Tct hT using ih
    refine' ⟨⋃ (s) (H : s ∈ S), T s H, by simpa, Sct.biUnion Tct, _⟩
    apply subset_sInter
    intro s H
    

Proof state:
case mp.sInter.h
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
g : Set (Set α)
s✝ : Set α
S : Set (Set α)
Sct : Set.Countable S
a✝ : ∀ s ∈ S, CountableGenerateSets g s
T : (s : Set α) → s ∈ S → Set (Set α)
Tg : ∀ (s : Set α) (a : s ∈ S), T s a ⊆ g
Tct : ∀ (s : Set α) (a : s ∈ S), Set.Countable (T s a)
hT : ∀ (s : Set α) (a : s ∈ S), ⋂₀ T s a ⊆ s
s : Set α
H : s ∈ S
⊢ ⋂₀ ⋃ s, ⋃ (H : s ∈ S), T s H ⊆ s

Next tactic:
refine' subset_trans (sInter_subset_sInter (subset_iUnion₂ s H)) (hT s H)
/-- A set is in the `countableInterFilter` generated by `g` if and only if
it contains a countable intersection of elements of `g`. -/
theorem mem_countableGenerate_iff {s : Set α} :
    s ∈ countableGenerate g ↔ ∃ S : Set (Set α), S ⊆ g ∧ S.Countable ∧ ⋂₀ S ⊆ s := by
  constructor <;> intro h
  · induction' h with s hs s t _ st ih S Sct _ ih
    · exact ⟨{s}, by simp [hs, subset_refl]⟩
    · exact ⟨∅, by simp⟩
    · refine' Exists.imp (fun S => _) ih
      tauto
    choose T Tg Tct hT using ih
    refine' ⟨⋃ (s) (H : s ∈ S), T s H, by simpa, Sct.biUnion Tct, _⟩
    apply subset_sInter
    intro s H
    refine' subset_trans (sInter_subset_sInter (subset_iUnion₂ s H)) (hT s H)
  

Proof state:
case mpr
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
g : Set (Set α)
s : Set α
h : ∃ S ⊆ g, Set.Countable S ∧ ⋂₀ S ⊆ s
⊢ s ∈ countableGenerate g

Next tactic:
rcases h with ⟨S, Sg, Sct, hS⟩
/-- A set is in the `countableInterFilter` generated by `g` if and only if
it contains a countable intersection of elements of `g`. -/
theorem mem_countableGenerate_iff {s : Set α} :
    s ∈ countableGenerate g ↔ ∃ S : Set (Set α), S ⊆ g ∧ S.Countable ∧ ⋂₀ S ⊆ s := by
  constructor <;> intro h
  · induction' h with s hs s t _ st ih S Sct _ ih
    · exact ⟨{s}, by simp [hs, subset_refl]⟩
    · exact ⟨∅, by simp⟩
    · refine' Exists.imp (fun S => _) ih
      tauto
    choose T Tg Tct hT using ih
    refine' ⟨⋃ (s) (H : s ∈ S), T s H, by simpa, Sct.biUnion Tct, _⟩
    apply subset_sInter
    intro s H
    refine' subset_trans (sInter_subset_sInter (subset_iUnion₂ s H)) (hT s H)
  rcases h with ⟨S, Sg, Sct, hS⟩
  

Proof state:
case mpr.intro.intro.intro
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
g : Set (Set α)
s : Set α
S : Set (Set α)
Sg : S ⊆ g
Sct : Set.Countable S
hS : ⋂₀ S ⊆ s
⊢ s ∈ countableGenerate g

Next tactic:
refine' mem_of_superset ((countable_sInter_mem Sct).mpr _) hS
/-- A set is in the `countableInterFilter` generated by `g` if and only if
it contains a countable intersection of elements of `g`. -/
theorem mem_countableGenerate_iff {s : Set α} :
    s ∈ countableGenerate g ↔ ∃ S : Set (Set α), S ⊆ g ∧ S.Countable ∧ ⋂₀ S ⊆ s := by
  constructor <;> intro h
  · induction' h with s hs s t _ st ih S Sct _ ih
    · exact ⟨{s}, by simp [hs, subset_refl]⟩
    · exact ⟨∅, by simp⟩
    · refine' Exists.imp (fun S => _) ih
      tauto
    choose T Tg Tct hT using ih
    refine' ⟨⋃ (s) (H : s ∈ S), T s H, by simpa, Sct.biUnion Tct, _⟩
    apply subset_sInter
    intro s H
    refine' subset_trans (sInter_subset_sInter (subset_iUnion₂ s H)) (hT s H)
  rcases h with ⟨S, Sg, Sct, hS⟩
  refine' mem_of_superset ((countable_sInter_mem Sct).mpr _) hS
  

Proof state:
case mpr.intro.intro.intro
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
g : Set (Set α)
s : Set α
S : Set (Set α)
Sg : S ⊆ g
Sct : Set.Countable S
hS : ⋂₀ S ⊆ s
⊢ ∀ s ∈ S, s ∈ countableGenerate g

Next tactic:
intro s H
/-- A set is in the `countableInterFilter` generated by `g` if and only if
it contains a countable intersection of elements of `g`. -/
theorem mem_countableGenerate_iff {s : Set α} :
    s ∈ countableGenerate g ↔ ∃ S : Set (Set α), S ⊆ g ∧ S.Countable ∧ ⋂₀ S ⊆ s := by
  constructor <;> intro h
  · induction' h with s hs s t _ st ih S Sct _ ih
    · exact ⟨{s}, by simp [hs, subset_refl]⟩
    · exact ⟨∅, by simp⟩
    · refine' Exists.imp (fun S => _) ih
      tauto
    choose T Tg Tct hT using ih
    refine' ⟨⋃ (s) (H : s ∈ S), T s H, by simpa, Sct.biUnion Tct, _⟩
    apply subset_sInter
    intro s H
    refine' subset_trans (sInter_subset_sInter (subset_iUnion₂ s H)) (hT s H)
  rcases h with ⟨S, Sg, Sct, hS⟩
  refine' mem_of_superset ((countable_sInter_mem Sct).mpr _) hS
  intro s H
  

Proof state:
case mpr.intro.intro.intro
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
g : Set (Set α)
s✝ : Set α
S : Set (Set α)
Sg : S ⊆ g
Sct : Set.Countable S
hS : ⋂₀ S ⊆ s✝
s : Set α
H : s ∈ S
⊢ s ∈ countableGenerate g

Next tactic:
exact CountableGenerateSets.basic (Sg H)
theorem le_countableGenerate_iff_of_countableInterFilter {f : Filter α} [CountableInterFilter f] :
    f ≤ countableGenerate g ↔ g ⊆ f.sets := by
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝¹ : CountableInterFilter l
g : Set (Set α)
f : Filter α
inst✝ : CountableInterFilter f
⊢ f ≤ countableGenerate g ↔ g ⊆ f.sets

Next tactic:
constructor
theorem le_countableGenerate_iff_of_countableInterFilter {f : Filter α} [CountableInterFilter f] :
    f ≤ countableGenerate g ↔ g ⊆ f.sets := by
  constructor <;> 

Proof state:
case mp
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝¹ : CountableInterFilter l
g : Set (Set α)
f : Filter α
inst✝ : CountableInterFilter f
⊢ f ≤ countableGenerate g → g ⊆ f.sets

Next tactic:
intro h
theorem le_countableGenerate_iff_of_countableInterFilter {f : Filter α} [CountableInterFilter f] :
    f ≤ countableGenerate g ↔ g ⊆ f.sets := by
  constructor <;> 

Proof state:
case mpr
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝¹ : CountableInterFilter l
g : Set (Set α)
f : Filter α
inst✝ : CountableInterFilter f
⊢ g ⊆ f.sets → f ≤ countableGenerate g

Next tactic:
intro h
theorem le_countableGenerate_iff_of_countableInterFilter {f : Filter α} [CountableInterFilter f] :
    f ≤ countableGenerate g ↔ g ⊆ f.sets := by
  constructor <;> intro h
  · 

Proof state:
case mp
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝¹ : CountableInterFilter l
g : Set (Set α)
f : Filter α
inst✝ : CountableInterFilter f
h : f ≤ countableGenerate g
⊢ g ⊆ f.sets

Next tactic:
exact subset_trans (fun s => CountableGenerateSets.basic) h
theorem le_countableGenerate_iff_of_countableInterFilter {f : Filter α} [CountableInterFilter f] :
    f ≤ countableGenerate g ↔ g ⊆ f.sets := by
  constructor <;> intro h
  · exact subset_trans (fun s => CountableGenerateSets.basic) h
  

Proof state:
case mpr
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝¹ : CountableInterFilter l
g : Set (Set α)
f : Filter α
inst✝ : CountableInterFilter f
h : g ⊆ f.sets
⊢ f ≤ countableGenerate g

Next tactic:
intro s hs
theorem le_countableGenerate_iff_of_countableInterFilter {f : Filter α} [CountableInterFilter f] :
    f ≤ countableGenerate g ↔ g ⊆ f.sets := by
  constructor <;> intro h
  · exact subset_trans (fun s => CountableGenerateSets.basic) h
  intro s hs
  

Proof state:
case mpr
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝¹ : CountableInterFilter l
g : Set (Set α)
f : Filter α
inst✝ : CountableInterFilter f
h : g ⊆ f.sets
s : Set α
hs : s ∈ countableGenerate g
⊢ s ∈ f

Next tactic:
induction' hs with s hs s t _ st ih S Sct _ ih
theorem le_countableGenerate_iff_of_countableInterFilter {f : Filter α} [CountableInterFilter f] :
    f ≤ countableGenerate g ↔ g ⊆ f.sets := by
  constructor <;> intro h
  · exact subset_trans (fun s => CountableGenerateSets.basic) h
  intro s hs
  induction' hs with s hs s t _ st ih S Sct _ ih
  · 

Proof state:
case mpr.basic
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝¹ : CountableInterFilter l
g : Set (Set α)
f : Filter α
inst✝ : CountableInterFilter f
h : g ⊆ f.sets
s✝ s : Set α
hs : s ∈ g
⊢ s ∈ f

Next tactic:
exact h hs
theorem le_countableGenerate_iff_of_countableInterFilter {f : Filter α} [CountableInterFilter f] :
    f ≤ countableGenerate g ↔ g ⊆ f.sets := by
  constructor <;> intro h
  · exact subset_trans (fun s => CountableGenerateSets.basic) h
  intro s hs
  induction' hs with s hs s t _ st ih S Sct _ ih
  · exact h hs
  · 

Proof state:
case mpr.univ
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝¹ : CountableInterFilter l
g : Set (Set α)
f : Filter α
inst✝ : CountableInterFilter f
h : g ⊆ f.sets
s : Set α
⊢ univ ∈ f

Next tactic:
exact univ_mem
theorem le_countableGenerate_iff_of_countableInterFilter {f : Filter α} [CountableInterFilter f] :
    f ≤ countableGenerate g ↔ g ⊆ f.sets := by
  constructor <;> intro h
  · exact subset_trans (fun s => CountableGenerateSets.basic) h
  intro s hs
  induction' hs with s hs s t _ st ih S Sct _ ih
  · exact h hs
  · exact univ_mem
  · 

Proof state:
case mpr.superset
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝¹ : CountableInterFilter l
g : Set (Set α)
f : Filter α
inst✝ : CountableInterFilter f
h : g ⊆ f.sets
s✝ s t : Set α
a✝ : CountableGenerateSets g s
st : s ⊆ t
ih : s ∈ f
⊢ t ∈ f

Next tactic:
exact mem_of_superset ih st
theorem le_countableGenerate_iff_of_countableInterFilter {f : Filter α} [CountableInterFilter f] :
    f ≤ countableGenerate g ↔ g ⊆ f.sets := by
  constructor <;> intro h
  · exact subset_trans (fun s => CountableGenerateSets.basic) h
  intro s hs
  induction' hs with s hs s t _ st ih S Sct _ ih
  · exact h hs
  · exact univ_mem
  · exact mem_of_superset ih st
  

Proof state:
case mpr.sInter
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝¹ : CountableInterFilter l
g : Set (Set α)
f : Filter α
inst✝ : CountableInterFilter f
h : g ⊆ f.sets
s : Set α
S : Set (Set α)
Sct : Set.Countable S
a✝ : ∀ s ∈ S, CountableGenerateSets g s
ih : ∀ s ∈ S, s ∈ f
⊢ ⋂₀ S ∈ f

Next tactic:
exact (countable_sInter_mem Sct).mpr ih
/-- `countableGenerate g` is the greatest `countableInterFilter` containing `g`.-/
theorem countableGenerate_isGreatest :
    IsGreatest { f : Filter α | CountableInterFilter f ∧ g ⊆ f.sets } (countableGenerate g) := by
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
g : Set (Set α)
⊢ IsGreatest {f | CountableInterFilter f ∧ g ⊆ f.sets} (countableGenerate g)

Next tactic:
refine' ⟨⟨inferInstance, fun s => CountableGenerateSets.basic⟩, _⟩
/-- `countableGenerate g` is the greatest `countableInterFilter` containing `g`.-/
theorem countableGenerate_isGreatest :
    IsGreatest { f : Filter α | CountableInterFilter f ∧ g ⊆ f.sets } (countableGenerate g) := by
  refine' ⟨⟨inferInstance, fun s => CountableGenerateSets.basic⟩, _⟩
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
g : Set (Set α)
⊢ countableGenerate g ∈ upperBounds {f | CountableInterFilter f ∧ g ⊆ f.sets}

Next tactic:
rintro f ⟨fct, hf⟩
/-- `countableGenerate g` is the greatest `countableInterFilter` containing `g`.-/
theorem countableGenerate_isGreatest :
    IsGreatest { f : Filter α | CountableInterFilter f ∧ g ⊆ f.sets } (countableGenerate g) := by
  refine' ⟨⟨inferInstance, fun s => CountableGenerateSets.basic⟩, _⟩
  rintro f ⟨fct, hf⟩
  

Proof state:
case intro
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
g : Set (Set α)
f : Filter α
fct : CountableInterFilter f
hf : g ⊆ f.sets
⊢ f ≤ countableGenerate g

Next tactic:
rwa [@le_countableGenerate_iff_of_countableInterFilter _ _ _ fct]
lemma MonotoneOn.mapsTo_Ici (h : MonotoneOn f (Ici a)) : MapsTo f (Ici a) (Ici (f a)) :=
  fun _ _ ↦ by 

Proof state:
α : Type u_1
β : Type u_2
f : α → β
inst✝¹ : Preorder α
inst✝ : Preorder β
a b : α
h : MonotoneOn f (Ici a)
x✝¹ : α
x✝ : x✝¹ ∈ Ici a
⊢ f x✝¹ ∈ Ici (f a)

Next tactic:
aesop
lemma MonotoneOn.mapsTo_Iic (h : MonotoneOn f (Iic b)) : MapsTo f (Iic b) (Iic (f b)) :=
  fun _ _ ↦ by 

Proof state:
α : Type u_1
β : Type u_2
f : α → β
inst✝¹ : Preorder α
inst✝ : Preorder β
a b : α
h : MonotoneOn f (Iic b)
x✝¹ : α
x✝ : x✝¹ ∈ Iic b
⊢ f x✝¹ ∈ Iic (f b)

Next tactic:
aesop
lemma AntitoneOn.mapsTo_Ici (h : AntitoneOn f (Ici a)) : MapsTo f (Ici a) (Iic (f a)) :=
  fun _ _ ↦ by 

Proof state:
α : Type u_1
β : Type u_2
f : α → β
inst✝¹ : Preorder α
inst✝ : Preorder β
a b : α
h : AntitoneOn f (Ici a)
x✝¹ : α
x✝ : x✝¹ ∈ Ici a
⊢ f x✝¹ ∈ Iic (f a)

Next tactic:
aesop
lemma AntitoneOn.mapsTo_Iic (h : AntitoneOn f (Iic b)) : MapsTo f (Iic b) (Ici (f b)) :=
  fun _ _ ↦ by 

Proof state:
α : Type u_1
β : Type u_2
f : α → β
inst✝¹ : Preorder α
inst✝ : Preorder β
a b : α
h : AntitoneOn f (Iic b)
x✝¹ : α
x✝ : x✝¹ ∈ Iic b
⊢ f x✝¹ ∈ Ici (f b)

Next tactic:
aesop
private lemma image_subtype_val_Ixx_Ixi {p q r : α → α → Prop} {a b : α} (c : {x // p a x ∧ q x b})
    (h : ∀ {x}, r c x → p a x) :
    Subtype.val '' {y : {x // p a x ∧ q x b} | r c.1 y.1} = {y : α | r c.1 y ∧ q y b} :=
  (Subtype.image_preimage_val {x | p a x ∧ q x b} {y | r c.1 y}).trans <| by
    

Proof state:
α : Type u_1
β : Sort ?u.27683
f : α → β
inst✝ : Preorder α
p✝ : α → Prop
p q r : α → α → Prop
a b : α
c : { x // p a x ∧ q x b }
h : ∀ {x : α}, r (↑c) x → p a x
⊢ {y | r (↑c) y} ∩ {x | p a x ∧ q x b} = {y | r (↑c) y ∧ q y b}

Next tactic:
ext
private lemma image_subtype_val_Ixx_Ixi {p q r : α → α → Prop} {a b : α} (c : {x // p a x ∧ q x b})
    (h : ∀ {x}, r c x → p a x) :
    Subtype.val '' {y : {x // p a x ∧ q x b} | r c.1 y.1} = {y : α | r c.1 y ∧ q y b} :=
  (Subtype.image_preimage_val {x | p a x ∧ q x b} {y | r c.1 y}).trans <| by
    ext; 

Proof state:
case h
α : Type u_1
β : Sort ?u.27683
f : α → β
inst✝ : Preorder α
p✝ : α → Prop
p q r : α → α → Prop
a b : α
c : { x // p a x ∧ q x b }
h : ∀ {x : α}, r (↑c) x → p a x
x✝ : α
⊢ x✝ ∈ {y | r (↑c) y} ∩ {x | p a x ∧ q x b} ↔ x✝ ∈ {y | r (↑c) y ∧ q y b}

Next tactic:
simp (config := { contextual := true }) [h]
private lemma image_subtype_val_Ixx_Iix {p q r : α → α → Prop} {a b : α} (c : {x // p a x ∧ q x b})
    (h : ∀ {x}, r x c → q x b) :
    Subtype.val '' {y : {x // p a x ∧ q x b} | r y.1 c.1} = {y : α | p a y ∧ r y c.1} :=
  (Subtype.image_preimage_val {x | p a x ∧ q x b} {y | r y c.1}).trans <| by
    

Proof state:
α : Type u_1
β : Sort ?u.28958
f : α → β
inst✝ : Preorder α
p✝ : α → Prop
p q r : α → α → Prop
a b : α
c : { x // p a x ∧ q x b }
h : ∀ {x : α}, r x ↑c → q x b
⊢ {y | r y ↑c} ∩ {x | p a x ∧ q x b} = {y | p a y ∧ r y ↑c}

Next tactic:
ext
private lemma image_subtype_val_Ixx_Iix {p q r : α → α → Prop} {a b : α} (c : {x // p a x ∧ q x b})
    (h : ∀ {x}, r x c → q x b) :
    Subtype.val '' {y : {x // p a x ∧ q x b} | r y.1 c.1} = {y : α | p a y ∧ r y c.1} :=
  (Subtype.image_preimage_val {x | p a x ∧ q x b} {y | r y c.1}).trans <| by
    ext; 

Proof state:
case h
α : Type u_1
β : Sort ?u.28958
f : α → β
inst✝ : Preorder α
p✝ : α → Prop
p q r : α → α → Prop
a b : α
c : { x // p a x ∧ q x b }
h : ∀ {x : α}, r x ↑c → q x b
x✝ : α
⊢ x✝ ∈ {y | r y ↑c} ∩ {x | p a x ∧ q x b} ↔ x✝ ∈ {y | p a y ∧ r y ↑c}

Next tactic:
simp (config := { contextual := true }) [@and_comm (p _ _), h]
theorem iUnion_null [Countable β] (m : OuterMeasure α) {s : β → Set α} (h : ∀ i, m (s i) = 0) :
    m (⋃ i, s i) = 0 := by 

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ : OuterMeasure α
inst✝ : Countable β
m : OuterMeasure α
s : β → Set α
h : ∀ (i : β), ↑m (s i) = 0
⊢ ↑m (⋃ i, s i) = 0

Next tactic:
simpa [h] using m.iUnion s
/-- A version of `iUnion_null_iff` for unions indexed by Props.
TODO: in the long run it would be better to combine this with `iUnion_null_iff` by
generalising to `Sort`. -/
@[simp]
theorem iUnion_null_iff' (m : OuterMeasure α) {ι : Prop} {s : ι → Set α} :
    m (⋃ i, s i) = 0 ↔ ∀ i, m (s i) = 0 :=
    ⟨ fun h i => mono_null m (subset_iUnion s i) h,
      by 

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ m : OuterMeasure α
ι : Prop
s : ι → Set α
⊢ (∀ (i : ι), ↑m (s i) = 0) → ↑m (⋃ (i : ι), s i) = 0

Next tactic:
by_cases i : ι
/-- A version of `iUnion_null_iff` for unions indexed by Props.
TODO: in the long run it would be better to combine this with `iUnion_null_iff` by
generalising to `Sort`. -/
@[simp]
theorem iUnion_null_iff' (m : OuterMeasure α) {ι : Prop} {s : ι → Set α} :
    m (⋃ i, s i) = 0 ↔ ∀ i, m (s i) = 0 :=
    ⟨ fun h i => mono_null m (subset_iUnion s i) h,
      by by_cases i : ι <;> 

Proof state:
case pos
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ m : OuterMeasure α
ι : Prop
s : ι → Set α
i : ι
⊢ (∀ (i : ι), ↑m (s i) = 0) → ↑m (⋃ (i : ι), s i) = 0

Next tactic:
simp [i]
/-- A version of `iUnion_null_iff` for unions indexed by Props.
TODO: in the long run it would be better to combine this with `iUnion_null_iff` by
generalising to `Sort`. -/
@[simp]
theorem iUnion_null_iff' (m : OuterMeasure α) {ι : Prop} {s : ι → Set α} :
    m (⋃ i, s i) = 0 ↔ ∀ i, m (s i) = 0 :=
    ⟨ fun h i => mono_null m (subset_iUnion s i) h,
      by by_cases i : ι <;> 

Proof state:
case neg
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ m : OuterMeasure α
ι : Prop
s : ι → Set α
i : ¬ι
⊢ (∀ (i : ι), ↑m (s i) = 0) → ↑m (⋃ (i : ι), s i) = 0

Next tactic:
simp [i]
theorem biUnion_null_iff (m : OuterMeasure α) {s : Set β} (hs : s.Countable) {t : β → Set α} :
    m (⋃ i ∈ s, t i) = 0 ↔ ∀ i ∈ s, m (t i) = 0 := by
  

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ m : OuterMeasure α
s : Set β
hs : Set.Countable s
t : β → Set α
⊢ ↑m (⋃ i ∈ s, t i) = 0 ↔ ∀ i ∈ s, ↑m (t i) = 0

Next tactic:
haveI := hs.toEncodable
theorem biUnion_null_iff (m : OuterMeasure α) {s : Set β} (hs : s.Countable) {t : β → Set α} :
    m (⋃ i ∈ s, t i) = 0 ↔ ∀ i ∈ s, m (t i) = 0 := by
  haveI := hs.toEncodable
  

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ m : OuterMeasure α
s : Set β
hs : Set.Countable s
t : β → Set α
this : Encodable ↑s
⊢ ↑m (⋃ i ∈ s, t i) = 0 ↔ ∀ i ∈ s, ↑m (t i) = 0

Next tactic:
rw [biUnion_eq_iUnion, iUnion_null_iff, SetCoe.forall']
theorem sUnion_null_iff (m : OuterMeasure α) {S : Set (Set α)} (hS : S.Countable) :
    m (⋃₀ S) = 0 ↔ ∀ s ∈ S, m s = 0 := by 

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ m : OuterMeasure α
S : Set (Set α)
hS : Set.Countable S
⊢ ↑m (⋃₀ S) = 0 ↔ ∀ s ∈ S, ↑m s = 0

Next tactic:
rw [sUnion_eq_biUnion, m.biUnion_null_iff hS]