l3lab/ntp-mathlib huggingface dataset:
lemma indicator_le_indicator_nonneg (s : Set α) (f : α → M) :
    s.indicator f ≤ {a | 0 ≤ f a}.indicator f := by
  intro a
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝¹ : Zero M
inst✝ : LinearOrder M
s : Set α
f : α → M
a : α
⊢ indicator s f a ≤ indicator {a | 0 ≤ f a} f a

Next tactic:
classical
  simp_rw [indicator_apply]
  split_ifs
  exacts [le_rfl, (not_le.1 ‹_›).le, ‹_›, le_rfl]
lemma indicator_le_indicator_nonneg (s : Set α) (f : α → M) :
    s.indicator f ≤ {a | 0 ≤ f a}.indicator f := by
  intro a
  classical
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝¹ : Zero M
inst✝ : LinearOrder M
s : Set α
f : α → M
a : α
⊢ indicator s f a ≤ indicator {a | 0 ≤ f a} f a

Next tactic:
simp_rw [indicator_apply]
lemma indicator_le_indicator_nonneg (s : Set α) (f : α → M) :
    s.indicator f ≤ {a | 0 ≤ f a}.indicator f := by
  intro a
  classical
  simp_rw [indicator_apply]
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝¹ : Zero M
inst✝ : LinearOrder M
s : Set α
f : α → M
a : α
⊢ (if a ∈ s then f a else 0) ≤ if a ∈ {a | 0 ≤ f a} then f a else 0

Next tactic:
split_ifs
lemma indicator_le_indicator_nonneg (s : Set α) (f : α → M) :
    s.indicator f ≤ {a | 0 ≤ f a}.indicator f := by
  intro a
  classical
  simp_rw [indicator_apply]
  split_ifs
  

Proof state:
case pos
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝¹ : Zero M
inst✝ : LinearOrder M
s : Set α
f : α → M
a : α
h✝¹ : a ∈ s
h✝ : a ∈ {a | 0 ≤ f a}
⊢ f a ≤ f a
case neg
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝¹ : Zero M
inst✝ : LinearOrder M
s : Set α
f : α → M
a : α
h✝¹ : a ∈ s
h✝ : a ∉ {a | 0 ≤ f a}
⊢ f a ≤ 0
case pos
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝¹ : Zero M
inst✝ : LinearOrder M
s : Set α
f : α → M
a : α
h✝¹ : a ∉ s
h✝ : a ∈ {a | 0 ≤ f a}
⊢ 0 ≤ f a
case neg
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝¹ : Zero M
inst✝ : LinearOrder M
s : Set α
f : α → M
a : α
h✝¹ : a ∉ s
h✝ : a ∉ {a | 0 ≤ f a}
⊢ 0 ≤ 0

Next tactic:
exacts [le_rfl, (not_le.1 ‹_›).le, ‹_›, le_rfl]
@[to_additive]
lemma mulIndicator_iUnion_apply (h1 : (⊥ : M) = 1) (s : ι → Set α) (f : α → M) (x : α) :
    mulIndicator (⋃ i, s i) f x = ⨆ i, mulIndicator (s i) f x := by
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝¹ : CompleteLattice M
inst✝ : One M
s✝ t : Set α
f✝ g : α → M
a : α
y : M
h1 : ⊥ = 1
s : ι → Set α
f : α → M
x : α
⊢ mulIndicator (⋃ i, s i) f x = ⨆ i, mulIndicator (s i) f x

Next tactic:
by_cases hx : x ∈ ⋃ i, s i
@[to_additive]
lemma mulIndicator_iUnion_apply (h1 : (⊥ : M) = 1) (s : ι → Set α) (f : α → M) (x : α) :
    mulIndicator (⋃ i, s i) f x = ⨆ i, mulIndicator (s i) f x := by
  by_cases hx : x ∈ ⋃ i, s i
  · 

Proof state:
case pos
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝¹ : CompleteLattice M
inst✝ : One M
s✝ t : Set α
f✝ g : α → M
a : α
y : M
h1 : ⊥ = 1
s : ι → Set α
f : α → M
x : α
hx : x ∈ ⋃ i, s i
⊢ mulIndicator (⋃ i, s i) f x = ⨆ i, mulIndicator (s i) f x

Next tactic:
rw [mulIndicator_of_mem hx]
@[to_additive]
lemma mulIndicator_iUnion_apply (h1 : (⊥ : M) = 1) (s : ι → Set α) (f : α → M) (x : α) :
    mulIndicator (⋃ i, s i) f x = ⨆ i, mulIndicator (s i) f x := by
  by_cases hx : x ∈ ⋃ i, s i
  · rw [mulIndicator_of_mem hx]
    

Proof state:
case pos
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝¹ : CompleteLattice M
inst✝ : One M
s✝ t : Set α
f✝ g : α → M
a : α
y : M
h1 : ⊥ = 1
s : ι → Set α
f : α → M
x : α
hx : x ∈ ⋃ i, s i
⊢ f x = ⨆ i, mulIndicator (s i) f x

Next tactic:
rw [mem_iUnion] at hx
@[to_additive]
lemma mulIndicator_iUnion_apply (h1 : (⊥ : M) = 1) (s : ι → Set α) (f : α → M) (x : α) :
    mulIndicator (⋃ i, s i) f x = ⨆ i, mulIndicator (s i) f x := by
  by_cases hx : x ∈ ⋃ i, s i
  · rw [mulIndicator_of_mem hx]
    rw [mem_iUnion] at hx
    

Proof state:
case pos
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝¹ : CompleteLattice M
inst✝ : One M
s✝ t : Set α
f✝ g : α → M
a : α
y : M
h1 : ⊥ = 1
s : ι → Set α
f : α → M
x : α
hx : ∃ i, x ∈ s i
⊢ f x = ⨆ i, mulIndicator (s i) f x

Next tactic:
refine' le_antisymm _ (iSup_le fun i ↦ mulIndicator_le_self' (fun x _ ↦ h1 ▸ bot_le) x)
@[to_additive]
lemma mulIndicator_iUnion_apply (h1 : (⊥ : M) = 1) (s : ι → Set α) (f : α → M) (x : α) :
    mulIndicator (⋃ i, s i) f x = ⨆ i, mulIndicator (s i) f x := by
  by_cases hx : x ∈ ⋃ i, s i
  · rw [mulIndicator_of_mem hx]
    rw [mem_iUnion] at hx
    refine' le_antisymm _ (iSup_le fun i ↦ mulIndicator_le_self' (fun x _ ↦ h1 ▸ bot_le) x)
    

Proof state:
case pos
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝¹ : CompleteLattice M
inst✝ : One M
s✝ t : Set α
f✝ g : α → M
a : α
y : M
h1 : ⊥ = 1
s : ι → Set α
f : α → M
x : α
hx : ∃ i, x ∈ s i
⊢ f x ≤ ⨆ i, mulIndicator (s i) f x

Next tactic:
rcases hx with ⟨i, hi⟩
@[to_additive]
lemma mulIndicator_iUnion_apply (h1 : (⊥ : M) = 1) (s : ι → Set α) (f : α → M) (x : α) :
    mulIndicator (⋃ i, s i) f x = ⨆ i, mulIndicator (s i) f x := by
  by_cases hx : x ∈ ⋃ i, s i
  · rw [mulIndicator_of_mem hx]
    rw [mem_iUnion] at hx
    refine' le_antisymm _ (iSup_le fun i ↦ mulIndicator_le_self' (fun x _ ↦ h1 ▸ bot_le) x)
    rcases hx with ⟨i, hi⟩
    

Proof state:
case pos.intro
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝¹ : CompleteLattice M
inst✝ : One M
s✝ t : Set α
f✝ g : α → M
a : α
y : M
h1 : ⊥ = 1
s : ι → Set α
f : α → M
x : α
i : ι
hi : x ∈ s i
⊢ f x ≤ ⨆ i, mulIndicator (s i) f x

Next tactic:
exact le_iSup_of_le i (ge_of_eq <| mulIndicator_of_mem hi _)
@[to_additive]
lemma mulIndicator_iUnion_apply (h1 : (⊥ : M) = 1) (s : ι → Set α) (f : α → M) (x : α) :
    mulIndicator (⋃ i, s i) f x = ⨆ i, mulIndicator (s i) f x := by
  by_cases hx : x ∈ ⋃ i, s i
  · rw [mulIndicator_of_mem hx]
    rw [mem_iUnion] at hx
    refine' le_antisymm _ (iSup_le fun i ↦ mulIndicator_le_self' (fun x _ ↦ h1 ▸ bot_le) x)
    rcases hx with ⟨i, hi⟩
    exact le_iSup_of_le i (ge_of_eq <| mulIndicator_of_mem hi _)
  · 

Proof state:
case neg
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝¹ : CompleteLattice M
inst✝ : One M
s✝ t : Set α
f✝ g : α → M
a : α
y : M
h1 : ⊥ = 1
s : ι → Set α
f : α → M
x : α
hx : x ∉ ⋃ i, s i
⊢ mulIndicator (⋃ i, s i) f x = ⨆ i, mulIndicator (s i) f x

Next tactic:
rw [mulIndicator_of_not_mem hx]
@[to_additive]
lemma mulIndicator_iUnion_apply (h1 : (⊥ : M) = 1) (s : ι → Set α) (f : α → M) (x : α) :
    mulIndicator (⋃ i, s i) f x = ⨆ i, mulIndicator (s i) f x := by
  by_cases hx : x ∈ ⋃ i, s i
  · rw [mulIndicator_of_mem hx]
    rw [mem_iUnion] at hx
    refine' le_antisymm _ (iSup_le fun i ↦ mulIndicator_le_self' (fun x _ ↦ h1 ▸ bot_le) x)
    rcases hx with ⟨i, hi⟩
    exact le_iSup_of_le i (ge_of_eq <| mulIndicator_of_mem hi _)
  · rw [mulIndicator_of_not_mem hx]
    

Proof state:
case neg
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝¹ : CompleteLattice M
inst✝ : One M
s✝ t : Set α
f✝ g : α → M
a : α
y : M
h1 : ⊥ = 1
s : ι → Set α
f : α → M
x : α
hx : x ∉ ⋃ i, s i
⊢ 1 = ⨆ i, mulIndicator (s i) f x

Next tactic:
simp only [mem_iUnion, not_exists] at hx
@[to_additive]
lemma mulIndicator_iUnion_apply (h1 : (⊥ : M) = 1) (s : ι → Set α) (f : α → M) (x : α) :
    mulIndicator (⋃ i, s i) f x = ⨆ i, mulIndicator (s i) f x := by
  by_cases hx : x ∈ ⋃ i, s i
  · rw [mulIndicator_of_mem hx]
    rw [mem_iUnion] at hx
    refine' le_antisymm _ (iSup_le fun i ↦ mulIndicator_le_self' (fun x _ ↦ h1 ▸ bot_le) x)
    rcases hx with ⟨i, hi⟩
    exact le_iSup_of_le i (ge_of_eq <| mulIndicator_of_mem hi _)
  · rw [mulIndicator_of_not_mem hx]
    simp only [mem_iUnion, not_exists] at hx
    

Proof state:
case neg
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝¹ : CompleteLattice M
inst✝ : One M
s✝ t : Set α
f✝ g : α → M
a : α
y : M
h1 : ⊥ = 1
s : ι → Set α
f : α → M
x : α
hx : ∀ (x_1 : ι), x ∉ s x_1
⊢ 1 = ⨆ i, mulIndicator (s i) f x

Next tactic:
simp [hx, ← h1]
@[to_additive]
lemma mulIndicator_iInter_apply (h1 : (⊥ : M) = 1) (s : ι → Set α) (f : α → M) (x : α) :
    mulIndicator (⋂ i, s i) f x = ⨅ i, mulIndicator (s i) f x := by
  

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝² : CompleteLattice M
inst✝¹ : One M
s✝ t : Set α
f✝ g : α → M
a : α
y : M
inst✝ : Nonempty ι
h1 : ⊥ = 1
s : ι → Set α
f : α → M
x : α
⊢ mulIndicator (⋂ i, s i) f x = ⨅ i, mulIndicator (s i) f x

Next tactic:
by_cases hx : x ∈ ⋂ i, s i
@[to_additive]
lemma mulIndicator_iInter_apply (h1 : (⊥ : M) = 1) (s : ι → Set α) (f : α → M) (x : α) :
    mulIndicator (⋂ i, s i) f x = ⨅ i, mulIndicator (s i) f x := by
  by_cases hx : x ∈ ⋂ i, s i
  · 

Proof state:
case pos
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝² : CompleteLattice M
inst✝¹ : One M
s✝ t : Set α
f✝ g : α → M
a : α
y : M
inst✝ : Nonempty ι
h1 : ⊥ = 1
s : ι → Set α
f : α → M
x : α
hx : x ∈ ⋂ i, s i
⊢ mulIndicator (⋂ i, s i) f x = ⨅ i, mulIndicator (s i) f x

Next tactic:
rw [mulIndicator_of_mem hx]
@[to_additive]
lemma mulIndicator_iInter_apply (h1 : (⊥ : M) = 1) (s : ι → Set α) (f : α → M) (x : α) :
    mulIndicator (⋂ i, s i) f x = ⨅ i, mulIndicator (s i) f x := by
  by_cases hx : x ∈ ⋂ i, s i
  · rw [mulIndicator_of_mem hx]
    

Proof state:
case pos
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝² : CompleteLattice M
inst✝¹ : One M
s✝ t : Set α
f✝ g : α → M
a : α
y : M
inst✝ : Nonempty ι
h1 : ⊥ = 1
s : ι → Set α
f : α → M
x : α
hx : x ∈ ⋂ i, s i
⊢ f x = ⨅ i, mulIndicator (s i) f x

Next tactic:
rw [mem_iInter] at hx
@[to_additive]
lemma mulIndicator_iInter_apply (h1 : (⊥ : M) = 1) (s : ι → Set α) (f : α → M) (x : α) :
    mulIndicator (⋂ i, s i) f x = ⨅ i, mulIndicator (s i) f x := by
  by_cases hx : x ∈ ⋂ i, s i
  · rw [mulIndicator_of_mem hx]
    rw [mem_iInter] at hx
    

Proof state:
case pos
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝² : CompleteLattice M
inst✝¹ : One M
s✝ t : Set α
f✝ g : α → M
a : α
y : M
inst✝ : Nonempty ι
h1 : ⊥ = 1
s : ι → Set α
f : α → M
x : α
hx : ∀ (i : ι), x ∈ s i
⊢ f x = ⨅ i, mulIndicator (s i) f x

Next tactic:
refine le_antisymm ?_ (by simp only [mulIndicator_of_mem (hx _), ciInf_const, le_refl])
@[to_additive]
lemma mulIndicator_iInter_apply (h1 : (⊥ : M) = 1) (s : ι → Set α) (f : α → M) (x : α) :
    mulIndicator (⋂ i, s i) f x = ⨅ i, mulIndicator (s i) f x := by
  by_cases hx : x ∈ ⋂ i, s i
  · rw [mulIndicator_of_mem hx]
    rw [mem_iInter] at hx
    refine le_antisymm ?_ (by 

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝² : CompleteLattice M
inst✝¹ : One M
s✝ t : Set α
f✝ g : α → M
a : α
y : M
inst✝ : Nonempty ι
h1 : ⊥ = 1
s : ι → Set α
f : α → M
x : α
hx : ∀ (i : ι), x ∈ s i
⊢ ⨅ i, mulIndicator (s i) f x ≤ f x

Next tactic:
simp only [mulIndicator_of_mem (hx _), ciInf_const, le_refl]
@[to_additive]
lemma mulIndicator_iInter_apply (h1 : (⊥ : M) = 1) (s : ι → Set α) (f : α → M) (x : α) :
    mulIndicator (⋂ i, s i) f x = ⨅ i, mulIndicator (s i) f x := by
  by_cases hx : x ∈ ⋂ i, s i
  · rw [mulIndicator_of_mem hx]
    rw [mem_iInter] at hx
    refine le_antisymm ?_ (by simp only [mulIndicator_of_mem (hx _), ciInf_const, le_refl])
    

Proof state:
case pos
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝² : CompleteLattice M
inst✝¹ : One M
s✝ t : Set α
f✝ g : α → M
a : α
y : M
inst✝ : Nonempty ι
h1 : ⊥ = 1
s : ι → Set α
f : α → M
x : α
hx : ∀ (i : ι), x ∈ s i
⊢ f x ≤ ⨅ i, mulIndicator (s i) f x

Next tactic:
exact le_iInf (fun j ↦ by simp only [mulIndicator_of_mem (hx j), le_refl])
@[to_additive]
lemma mulIndicator_iInter_apply (h1 : (⊥ : M) = 1) (s : ι → Set α) (f : α → M) (x : α) :
    mulIndicator (⋂ i, s i) f x = ⨅ i, mulIndicator (s i) f x := by
  by_cases hx : x ∈ ⋂ i, s i
  · rw [mulIndicator_of_mem hx]
    rw [mem_iInter] at hx
    refine le_antisymm ?_ (by simp only [mulIndicator_of_mem (hx _), ciInf_const, le_refl])
    exact le_iInf (fun j ↦ by 

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝² : CompleteLattice M
inst✝¹ : One M
s✝ t : Set α
f✝ g : α → M
a : α
y : M
inst✝ : Nonempty ι
h1 : ⊥ = 1
s : ι → Set α
f : α → M
x : α
hx : ∀ (i : ι), x ∈ s i
j : ι
⊢ f x ≤ mulIndicator (s j) f x

Next tactic:
simp only [mulIndicator_of_mem (hx j), le_refl]
@[to_additive]
lemma mulIndicator_iInter_apply (h1 : (⊥ : M) = 1) (s : ι → Set α) (f : α → M) (x : α) :
    mulIndicator (⋂ i, s i) f x = ⨅ i, mulIndicator (s i) f x := by
  by_cases hx : x ∈ ⋂ i, s i
  · rw [mulIndicator_of_mem hx]
    rw [mem_iInter] at hx
    refine le_antisymm ?_ (by simp only [mulIndicator_of_mem (hx _), ciInf_const, le_refl])
    exact le_iInf (fun j ↦ by simp only [mulIndicator_of_mem (hx j), le_refl])
  · 

Proof state:
case neg
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝² : CompleteLattice M
inst✝¹ : One M
s✝ t : Set α
f✝ g : α → M
a : α
y : M
inst✝ : Nonempty ι
h1 : ⊥ = 1
s : ι → Set α
f : α → M
x : α
hx : x ∉ ⋂ i, s i
⊢ mulIndicator (⋂ i, s i) f x = ⨅ i, mulIndicator (s i) f x

Next tactic:
rw [mulIndicator_of_not_mem hx]
@[to_additive]
lemma mulIndicator_iInter_apply (h1 : (⊥ : M) = 1) (s : ι → Set α) (f : α → M) (x : α) :
    mulIndicator (⋂ i, s i) f x = ⨅ i, mulIndicator (s i) f x := by
  by_cases hx : x ∈ ⋂ i, s i
  · rw [mulIndicator_of_mem hx]
    rw [mem_iInter] at hx
    refine le_antisymm ?_ (by simp only [mulIndicator_of_mem (hx _), ciInf_const, le_refl])
    exact le_iInf (fun j ↦ by simp only [mulIndicator_of_mem (hx j), le_refl])
  · rw [mulIndicator_of_not_mem hx]
    

Proof state:
case neg
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝² : CompleteLattice M
inst✝¹ : One M
s✝ t : Set α
f✝ g : α → M
a : α
y : M
inst✝ : Nonempty ι
h1 : ⊥ = 1
s : ι → Set α
f : α → M
x : α
hx : x ∉ ⋂ i, s i
⊢ 1 = ⨅ i, mulIndicator (s i) f x

Next tactic:
simp only [mem_iInter, not_exists, not_forall] at hx
@[to_additive]
lemma mulIndicator_iInter_apply (h1 : (⊥ : M) = 1) (s : ι → Set α) (f : α → M) (x : α) :
    mulIndicator (⋂ i, s i) f x = ⨅ i, mulIndicator (s i) f x := by
  by_cases hx : x ∈ ⋂ i, s i
  · rw [mulIndicator_of_mem hx]
    rw [mem_iInter] at hx
    refine le_antisymm ?_ (by simp only [mulIndicator_of_mem (hx _), ciInf_const, le_refl])
    exact le_iInf (fun j ↦ by simp only [mulIndicator_of_mem (hx j), le_refl])
  · rw [mulIndicator_of_not_mem hx]
    simp only [mem_iInter, not_exists, not_forall] at hx
    

Proof state:
case neg
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝² : CompleteLattice M
inst✝¹ : One M
s✝ t : Set α
f✝ g : α → M
a : α
y : M
inst✝ : Nonempty ι
h1 : ⊥ = 1
s : ι → Set α
f : α → M
x : α
hx : ∃ x_1, x ∉ s x_1
⊢ 1 = ⨅ i, mulIndicator (s i) f x

Next tactic:
rcases hx with ⟨j, hj⟩
@[to_additive]
lemma mulIndicator_iInter_apply (h1 : (⊥ : M) = 1) (s : ι → Set α) (f : α → M) (x : α) :
    mulIndicator (⋂ i, s i) f x = ⨅ i, mulIndicator (s i) f x := by
  by_cases hx : x ∈ ⋂ i, s i
  · rw [mulIndicator_of_mem hx]
    rw [mem_iInter] at hx
    refine le_antisymm ?_ (by simp only [mulIndicator_of_mem (hx _), ciInf_const, le_refl])
    exact le_iInf (fun j ↦ by simp only [mulIndicator_of_mem (hx j), le_refl])
  · rw [mulIndicator_of_not_mem hx]
    simp only [mem_iInter, not_exists, not_forall] at hx
    rcases hx with ⟨j, hj⟩
    

Proof state:
case neg.intro
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝² : CompleteLattice M
inst✝¹ : One M
s✝ t : Set α
f✝ g : α → M
a : α
y : M
inst✝ : Nonempty ι
h1 : ⊥ = 1
s : ι → Set α
f : α → M
x : α
j : ι
hj : x ∉ s j
⊢ 1 = ⨅ i, mulIndicator (s i) f x

Next tactic:
refine le_antisymm (by simp only [← h1, le_iInf_iff, bot_le, forall_const]) ?_
@[to_additive]
lemma mulIndicator_iInter_apply (h1 : (⊥ : M) = 1) (s : ι → Set α) (f : α → M) (x : α) :
    mulIndicator (⋂ i, s i) f x = ⨅ i, mulIndicator (s i) f x := by
  by_cases hx : x ∈ ⋂ i, s i
  · rw [mulIndicator_of_mem hx]
    rw [mem_iInter] at hx
    refine le_antisymm ?_ (by simp only [mulIndicator_of_mem (hx _), ciInf_const, le_refl])
    exact le_iInf (fun j ↦ by simp only [mulIndicator_of_mem (hx j), le_refl])
  · rw [mulIndicator_of_not_mem hx]
    simp only [mem_iInter, not_exists, not_forall] at hx
    rcases hx with ⟨j, hj⟩
    refine le_antisymm (by 

Proof state:
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝² : CompleteLattice M
inst✝¹ : One M
s✝ t : Set α
f✝ g : α → M
a : α
y : M
inst✝ : Nonempty ι
h1 : ⊥ = 1
s : ι → Set α
f : α → M
x : α
j : ι
hj : x ∉ s j
⊢ 1 ≤ ⨅ i, mulIndicator (s i) f x

Next tactic:
simp only [← h1, le_iInf_iff, bot_le, forall_const]
@[to_additive]
lemma mulIndicator_iInter_apply (h1 : (⊥ : M) = 1) (s : ι → Set α) (f : α → M) (x : α) :
    mulIndicator (⋂ i, s i) f x = ⨅ i, mulIndicator (s i) f x := by
  by_cases hx : x ∈ ⋂ i, s i
  · rw [mulIndicator_of_mem hx]
    rw [mem_iInter] at hx
    refine le_antisymm ?_ (by simp only [mulIndicator_of_mem (hx _), ciInf_const, le_refl])
    exact le_iInf (fun j ↦ by simp only [mulIndicator_of_mem (hx j), le_refl])
  · rw [mulIndicator_of_not_mem hx]
    simp only [mem_iInter, not_exists, not_forall] at hx
    rcases hx with ⟨j, hj⟩
    refine le_antisymm (by simp only [← h1, le_iInf_iff, bot_le, forall_const]) ?_
    

Proof state:
case neg.intro
ι : Sort u_1
α : Type u_2
β : Type u_3
M : Type u_4
inst✝² : CompleteLattice M
inst✝¹ : One M
s✝ t : Set α
f✝ g : α → M
a : α
y : M
inst✝ : Nonempty ι
h1 : ⊥ = 1
s : ι → Set α
f : α → M
x : α
j : ι
hj : x ∉ s j
⊢ ⨅ i, mulIndicator (s i) f x ≤ 1

Next tactic:
simpa [mulIndicator_of_not_mem hj] using (iInf_le (fun i ↦ (s i).mulIndicator f) j) x
/-- To show that `ε_X` is a coequalizer for `(FUε_X, ε_FUX)`, it suffices to assume it's always a
coequalizer of something (i.e. a regular epi).
-/
def counitCoequalises [∀ X : B, RegularEpi (adj₁.counit.app X)] (X : B) :
    IsColimit (Cofork.ofπ (adj₁.counit.app X) (adj₁.counit_naturality _)) :=
  Cofork.IsColimit.mk' _ fun s => by
    

Proof state:
A : Type u₁
B : Type u₂
C : Type u₃
inst✝³ : Category.{v₁, u₁} A
inst✝² : Category.{v₂, u₂} B
inst✝¹ : Category.{v₃, u₃} C
U : B ⥤ C
F : C ⥤ B
R : A ⥤ B
F' : C ⥤ A
adj₁ : F ⊣ U
adj₂ : F' ⊣ R ⋙ U
inst✝ : (X : B) → RegularEpi (adj₁.counit.app X)
X : B
s : Cofork (F.map (U.map (adj₁.counit.app X))) (adj₁.counit.app (F.obj (U.obj X)))
⊢ { l //
    Cofork.π
            (Cofork.ofπ (adj₁.counit.app X)
              (_ :
                F.map (U.map (adj₁.counit.app X)) ≫ adj₁.counit.app X =
                  adj₁.counit.app (F.obj (U.obj X)) ≫ adj₁.counit.app X)) ≫
          l =
        Cofork.π s ∧
      ∀
        {m :
          ((Functor.const WalkingParallelPair).obj
                  (Cofork.ofπ (adj₁.counit.app X)
                      (_ :
                        F.map (U.map (adj₁.counit.app X)) ≫ adj₁.counit.app X =
                          adj₁.counit.app (F.obj (U.obj X)) ≫ adj₁.counit.app X)).pt).obj
              WalkingParallelPair.one ⟶
            ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},
        Cofork.π
                (Cofork.ofπ (adj₁.counit.app X)
                  (_ :
                    F.map (U.map (adj₁.counit.app X)) ≫ adj₁.counit.app X =
                      adj₁.counit.app (F.obj (U.obj X)) ≫ adj₁.counit.app X)) ≫
              m =
            Cofork.π s →
          m = l }

Next tactic:
refine' ⟨(RegularEpi.desc' (adj₁.counit.app X) s.π _).1, _, _⟩
/-- To show that `ε_X` is a coequalizer for `(FUε_X, ε_FUX)`, it suffices to assume it's always a
coequalizer of something (i.e. a regular epi).
-/
def counitCoequalises [∀ X : B, RegularEpi (adj₁.counit.app X)] (X : B) :
    IsColimit (Cofork.ofπ (adj₁.counit.app X) (adj₁.counit_naturality _)) :=
  Cofork.IsColimit.mk' _ fun s => by
    refine' ⟨(RegularEpi.desc' (adj₁.counit.app X) s.π _).1, _, _⟩
    · 

Proof state:
case refine'_1
A : Type u₁
B : Type u₂
C : Type u₃
inst✝³ : Category.{v₁, u₁} A
inst✝² : Category.{v₂, u₂} B
inst✝¹ : Category.{v₃, u₃} C
U : B ⥤ C
F : C ⥤ B
R : A ⥤ B
F' : C ⥤ A
adj₁ : F ⊣ U
adj₂ : F' ⊣ R ⋙ U
inst✝ : (X : B) → RegularEpi (adj₁.counit.app X)
X : B
s : Cofork (F.map (U.map (adj₁.counit.app X))) (adj₁.counit.app (F.obj (U.obj X)))
⊢ RegularEpi.left ≫ Cofork.π s = RegularEpi.right ≫ Cofork.π s

Next tactic:
rw [← cancel_epi (adj₁.counit.app (RegularEpi.W (adj₁.counit.app X)))]
/-- To show that `ε_X` is a coequalizer for `(FUε_X, ε_FUX)`, it suffices to assume it's always a
coequalizer of something (i.e. a regular epi).
-/
def counitCoequalises [∀ X : B, RegularEpi (adj₁.counit.app X)] (X : B) :
    IsColimit (Cofork.ofπ (adj₁.counit.app X) (adj₁.counit_naturality _)) :=
  Cofork.IsColimit.mk' _ fun s => by
    refine' ⟨(RegularEpi.desc' (adj₁.counit.app X) s.π _).1, _, _⟩
    · rw [← cancel_epi (adj₁.counit.app (RegularEpi.W (adj₁.counit.app X)))]
      

Proof state:
case refine'_1
A : Type u₁
B : Type u₂
C : Type u₃
inst✝³ : Category.{v₁, u₁} A
inst✝² : Category.{v₂, u₂} B
inst✝¹ : Category.{v₃, u₃} C
U : B ⥤ C
F : C ⥤ B
R : A ⥤ B
F' : C ⥤ A
adj₁ : F ⊣ U
adj₂ : F' ⊣ R ⋙ U
inst✝ : (X : B) → RegularEpi (adj₁.counit.app X)
X : B
s : Cofork (F.map (U.map (adj₁.counit.app X))) (adj₁.counit.app (F.obj (U.obj X)))
⊢ adj₁.counit.app (RegularEpi.W (adj₁.counit.app X)) ≫ RegularEpi.left ≫ Cofork.π s =
    adj₁.counit.app (RegularEpi.W (adj₁.counit.app X)) ≫ RegularEpi.right ≫ Cofork.π s

Next tactic:
rw [← adj₁.counit_naturality_assoc RegularEpi.left]
/-- To show that `ε_X` is a coequalizer for `(FUε_X, ε_FUX)`, it suffices to assume it's always a
coequalizer of something (i.e. a regular epi).
-/
def counitCoequalises [∀ X : B, RegularEpi (adj₁.counit.app X)] (X : B) :
    IsColimit (Cofork.ofπ (adj₁.counit.app X) (adj₁.counit_naturality _)) :=
  Cofork.IsColimit.mk' _ fun s => by
    refine' ⟨(RegularEpi.desc' (adj₁.counit.app X) s.π _).1, _, _⟩
    · rw [← cancel_epi (adj₁.counit.app (RegularEpi.W (adj₁.counit.app X)))]
      rw [← adj₁.counit_naturality_assoc RegularEpi.left]
      

Proof state:
case refine'_1
A : Type u₁
B : Type u₂
C : Type u₃
inst✝³ : Category.{v₁, u₁} A
inst✝² : Category.{v₂, u₂} B
inst✝¹ : Category.{v₃, u₃} C
U : B ⥤ C
F : C ⥤ B
R : A ⥤ B
F' : C ⥤ A
adj₁ : F ⊣ U
adj₂ : F' ⊣ R ⋙ U
inst✝ : (X : B) → RegularEpi (adj₁.counit.app X)
X : B
s : Cofork (F.map (U.map (adj₁.counit.app X))) (adj₁.counit.app (F.obj (U.obj X)))
⊢ F.map (U.map RegularEpi.left) ≫ adj₁.counit.app ((U ⋙ F).obj X) ≫ Cofork.π s =
    adj₁.counit.app (RegularEpi.W (adj₁.counit.app X)) ≫ RegularEpi.right ≫ Cofork.π s

Next tactic:
dsimp only [Functor.comp_obj]
/-- To show that `ε_X` is a coequalizer for `(FUε_X, ε_FUX)`, it suffices to assume it's always a
coequalizer of something (i.e. a regular epi).
-/
def counitCoequalises [∀ X : B, RegularEpi (adj₁.counit.app X)] (X : B) :
    IsColimit (Cofork.ofπ (adj₁.counit.app X) (adj₁.counit_naturality _)) :=
  Cofork.IsColimit.mk' _ fun s => by
    refine' ⟨(RegularEpi.desc' (adj₁.counit.app X) s.π _).1, _, _⟩
    · rw [← cancel_epi (adj₁.counit.app (RegularEpi.W (adj₁.counit.app X)))]
      rw [← adj₁.counit_naturality_assoc RegularEpi.left]
      dsimp only [Functor.comp_obj]
      

Proof state:
case refine'_1
A : Type u₁
B : Type u₂
C : Type u₃
inst✝³ : Category.{v₁, u₁} A
inst✝² : Category.{v₂, u₂} B
inst✝¹ : Category.{v₃, u₃} C
U : B ⥤ C
F : C ⥤ B
R : A ⥤ B
F' : C ⥤ A
adj₁ : F ⊣ U
adj₂ : F' ⊣ R ⋙ U
inst✝ : (X : B) → RegularEpi (adj₁.counit.app X)
X : B
s : Cofork (F.map (U.map (adj₁.counit.app X))) (adj₁.counit.app (F.obj (U.obj X)))
⊢ F.map (U.map RegularEpi.left) ≫ adj₁.counit.app (F.obj (U.obj X)) ≫ Cofork.π s =
    adj₁.counit.app (RegularEpi.W (adj₁.counit.app X)) ≫ RegularEpi.right ≫ Cofork.π s

Next tactic:
rw [← s.condition, ← F.map_comp_assoc, ← U.map_comp, RegularEpi.w, U.map_comp,
        F.map_comp_assoc, s.condition, ← adj₁.counit_naturality_assoc RegularEpi.right]