order.filter.indicator_functionMathlib.Order.Filter.IndicatorFunction

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -3,7 +3,7 @@ Copyright (c) 2020 Zhouhang Zhou. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Yury Kudryashov
 -/
-import Algebra.IndicatorFunction
+import Algebra.Function.Indicator
 import Order.Filter.AtTopBot
 
 #align_import order.filter.indicator_function from "leanprover-community/mathlib"@"4d392a6c9c4539cbeca399b3ee0afea398fbd2eb"
Diff
@@ -78,7 +78,7 @@ theorem Monotone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set
   · rcases h with ⟨i, hi⟩
     refine' tendsto_pure.2 ((eventually_ge_at_top i).mono fun n hn => _)
     rw [indicator_of_mem (hs hn hi) _, indicator_of_mem ((subset_Union _ _) hi) _]
-  · rw [not_exists] at h 
+  · rw [not_exists] at h
     simp only [indicator_of_not_mem (h _)]
     convert tendsto_const_pure
     apply indicator_of_not_mem; simpa only [not_exists, mem_Union]
@@ -96,7 +96,7 @@ theorem Antitone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set
     rw [indicator_of_not_mem _ _, indicator_of_not_mem _ _]
     · simp only [mem_Inter, Classical.not_forall]; exact ⟨i, hi⟩
     · intro h; have := hs hn h; contradiction
-  · push_neg at h 
+  · push_neg at h
     simp only [indicator_of_mem, h, mem_Inter.2 h, tendsto_const_pure]
 #align antitone.tendsto_indicator Antitone.tendsto_indicator
 -/
Diff
@@ -94,7 +94,7 @@ theorem Antitone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set
   · rcases h with ⟨i, hi⟩
     refine' tendsto_pure.2 ((eventually_ge_at_top i).mono fun n hn => _)
     rw [indicator_of_not_mem _ _, indicator_of_not_mem _ _]
-    · simp only [mem_Inter, not_forall]; exact ⟨i, hi⟩
+    · simp only [mem_Inter, Classical.not_forall]; exact ⟨i, hi⟩
     · intro h; have := hs hn h; contradiction
   · push_neg at h 
     simp only [indicator_of_mem, h, mem_Inter.2 h, tendsto_const_pure]
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2020 Zhouhang Zhou. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Yury Kudryashov
 -/
-import Mathbin.Algebra.IndicatorFunction
-import Mathbin.Order.Filter.AtTopBot
+import Algebra.IndicatorFunction
+import Order.Filter.AtTopBot
 
 #align_import order.filter.indicator_function from "leanprover-community/mathlib"@"4d392a6c9c4539cbeca399b3ee0afea398fbd2eb"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2020 Zhouhang Zhou. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Yury Kudryashov
-
-! This file was ported from Lean 3 source module order.filter.indicator_function
-! leanprover-community/mathlib commit 4d392a6c9c4539cbeca399b3ee0afea398fbd2eb
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Algebra.IndicatorFunction
 import Mathbin.Order.Filter.AtTopBot
 
+#align_import order.filter.indicator_function from "leanprover-community/mathlib"@"4d392a6c9c4539cbeca399b3ee0afea398fbd2eb"
+
 /-!
 # Indicator function and filters
 
Diff
@@ -34,6 +34,7 @@ section Zero
 
 variable [Zero M] {s t : Set α} {f g : α → M} {a : α} {l : Filter α}
 
+#print indicator_eventuallyEq /-
 theorem indicator_eventuallyEq (hf : f =ᶠ[l ⊓ 𝓟 s] g) (hs : s =ᶠ[l] t) :
     indicator s f =ᶠ[l] indicator t g :=
   (eventually_inf_principal.1 hf).mp <|
@@ -41,6 +42,7 @@ theorem indicator_eventuallyEq (hf : f =ᶠ[l ⊓ 𝓟 s] g) (hs : s =ᶠ[l] t)
       by_cases (fun hxs : x ∈ s => by simp only [*, hst.1 hxs, indicator_of_mem]) fun hxs => by
         simp only [indicator_of_not_mem hxs, indicator_of_not_mem (mt hst.2 hxs)]
 #align indicator_eventually_eq indicator_eventuallyEq
+-/
 
 end Zero
 
@@ -48,10 +50,12 @@ section AddMonoid
 
 variable [AddMonoid M] {s t : Set α} {f g : α → M} {a : α} {l : Filter α}
 
+#print indicator_union_eventuallyEq /-
 theorem indicator_union_eventuallyEq (h : ∀ᶠ a in l, a ∉ s ∩ t) :
     indicator (s ∪ t) f =ᶠ[l] indicator s f + indicator t f :=
   h.mono fun a ha => indicator_union_of_not_mem_inter ha _
 #align indicator_union_eventually_eq indicator_union_eventuallyEq
+-/
 
 end AddMonoid
 
@@ -59,13 +63,16 @@ section Order
 
 variable [Zero β] [Preorder β] {s t : Set α} {f g : α → β} {a : α} {l : Filter α}
 
+#print indicator_eventuallyLE_indicator /-
 theorem indicator_eventuallyLE_indicator (h : f ≤ᶠ[l ⊓ 𝓟 s] g) :
     indicator s f ≤ᶠ[l] indicator s g :=
   (eventually_inf_principal.1 h).mono fun a h => indicator_rel_indicator le_rfl h
 #align indicator_eventually_le_indicator indicator_eventuallyLE_indicator
+-/
 
 end Order
 
+#print Monotone.tendsto_indicator /-
 theorem Monotone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set α) (hs : Monotone s)
     (f : α → β) (a : α) :
     Tendsto (fun i => indicator (s i) f a) atTop (pure <| indicator (⋃ i, s i) f a) :=
@@ -79,7 +86,9 @@ theorem Monotone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set
     convert tendsto_const_pure
     apply indicator_of_not_mem; simpa only [not_exists, mem_Union]
 #align monotone.tendsto_indicator Monotone.tendsto_indicator
+-/
 
+#print Antitone.tendsto_indicator /-
 theorem Antitone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set α) (hs : Antitone s)
     (f : α → β) (a : α) :
     Tendsto (fun i => indicator (s i) f a) atTop (pure <| indicator (⋂ i, s i) f a) :=
@@ -93,6 +102,7 @@ theorem Antitone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set
   · push_neg at h 
     simp only [indicator_of_mem, h, mem_Inter.2 h, tendsto_const_pure]
 #align antitone.tendsto_indicator Antitone.tendsto_indicator
+-/
 
 #print tendsto_indicator_biUnion_finset /-
 theorem tendsto_indicator_biUnion_finset {ι} [Zero β] (s : ι → Set α) (f : α → β) (a : α) :
Diff
@@ -90,7 +90,7 @@ theorem Antitone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set
     rw [indicator_of_not_mem _ _, indicator_of_not_mem _ _]
     · simp only [mem_Inter, not_forall]; exact ⟨i, hi⟩
     · intro h; have := hs hn h; contradiction
-  · push_neg  at h 
+  · push_neg at h 
     simp only [indicator_of_mem, h, mem_Inter.2 h, tendsto_const_pure]
 #align antitone.tendsto_indicator Antitone.tendsto_indicator
 
@@ -109,7 +109,7 @@ theorem tendsto_indicator_biUnion_finset {ι} [Zero β] (s : ι → Set α) (f :
 theorem Filter.EventuallyEq.support [Zero β] {f g : α → β} {l : Filter α} (h : f =ᶠ[l] g) :
     Function.support f =ᶠ[l] Function.support g :=
   by
-  filter_upwards [h]with x hx
+  filter_upwards [h] with x hx
   rw [eq_iff_iff]
   change f x ≠ 0 ↔ g x ≠ 0
   rw [hx]
@@ -120,7 +120,7 @@ theorem Filter.EventuallyEq.support [Zero β] {f g : α → β} {l : Filter α}
 theorem Filter.EventuallyEq.indicator [Zero β] {l : Filter α} {f g : α → β} {s : Set α}
     (hfg : f =ᶠ[l] g) : s.indicator f =ᶠ[l] s.indicator g :=
   by
-  filter_upwards [hfg]with x hx
+  filter_upwards [hfg] with x hx
   by_cases x ∈ s
   · rwa [indicator_of_mem h, indicator_of_mem h]
   · rw [indicator_of_not_mem h, indicator_of_not_mem h]
Diff
@@ -74,7 +74,7 @@ theorem Monotone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set
   · rcases h with ⟨i, hi⟩
     refine' tendsto_pure.2 ((eventually_ge_at_top i).mono fun n hn => _)
     rw [indicator_of_mem (hs hn hi) _, indicator_of_mem ((subset_Union _ _) hi) _]
-  · rw [not_exists] at h
+  · rw [not_exists] at h 
     simp only [indicator_of_not_mem (h _)]
     convert tendsto_const_pure
     apply indicator_of_not_mem; simpa only [not_exists, mem_Union]
@@ -90,7 +90,7 @@ theorem Antitone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set
     rw [indicator_of_not_mem _ _, indicator_of_not_mem _ _]
     · simp only [mem_Inter, not_forall]; exact ⟨i, hi⟩
     · intro h; have := hs hn h; contradiction
-  · push_neg  at h
+  · push_neg  at h 
     simp only [indicator_of_mem, h, mem_Inter.2 h, tendsto_const_pure]
 #align antitone.tendsto_indicator Antitone.tendsto_indicator
 
Diff
@@ -28,7 +28,7 @@ variable {α β M E : Type _}
 
 open Set Filter Classical
 
-open Filter Classical
+open scoped Filter Classical
 
 section Zero
 
Diff
@@ -34,12 +34,6 @@ section Zero
 
 variable [Zero M] {s t : Set α} {f g : α → M} {a : α} {l : Filter α}
 
-/- warning: indicator_eventually_eq -> indicator_eventuallyEq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {M : Type.{u2}} [_inst_1 : Zero.{u2} M] {s : Set.{u1} α} {t : Set.{u1} α} {f : α -> M} {g : α -> M} {l : Filter.{u1} α}, (Filter.EventuallyEq.{u1, u2} α M (Inf.inf.{u1} (Filter.{u1} α) (Filter.hasInf.{u1} α) l (Filter.principal.{u1} α s)) f g) -> (Filter.EventuallyEq.{u1, 0} α Prop l s t) -> (Filter.EventuallyEq.{u1, u2} α M l (Set.indicator.{u1, u2} α M _inst_1 s f) (Set.indicator.{u1, u2} α M _inst_1 t g))
-but is expected to have type
-  forall {α : Type.{u2}} {M : Type.{u1}} [_inst_1 : Zero.{u1} M] {s : Set.{u2} α} {t : Set.{u2} α} {f : α -> M} {g : α -> M} {l : Filter.{u2} α}, (Filter.EventuallyEq.{u2, u1} α M (Inf.inf.{u2} (Filter.{u2} α) (Filter.instInfFilter.{u2} α) l (Filter.principal.{u2} α s)) f g) -> (Filter.EventuallyEq.{u2, 0} α Prop l s t) -> (Filter.EventuallyEq.{u2, u1} α M l (Set.indicator.{u2, u1} α M _inst_1 s f) (Set.indicator.{u2, u1} α M _inst_1 t g))
-Case conversion may be inaccurate. Consider using '#align indicator_eventually_eq indicator_eventuallyEqₓ'. -/
 theorem indicator_eventuallyEq (hf : f =ᶠ[l ⊓ 𝓟 s] g) (hs : s =ᶠ[l] t) :
     indicator s f =ᶠ[l] indicator t g :=
   (eventually_inf_principal.1 hf).mp <|
@@ -54,12 +48,6 @@ section AddMonoid
 
 variable [AddMonoid M] {s t : Set α} {f g : α → M} {a : α} {l : Filter α}
 
-/- warning: indicator_union_eventually_eq -> indicator_union_eventuallyEq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {M : Type.{u2}} [_inst_1 : AddMonoid.{u2} M] {s : Set.{u1} α} {t : Set.{u1} α} {f : α -> M} {l : Filter.{u1} α}, (Filter.Eventually.{u1} α (fun (a : α) => Not (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) a (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s t))) l) -> (Filter.EventuallyEq.{u1, u2} α M l (Set.indicator.{u1, u2} α M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_1)) (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) s t) f) (HAdd.hAdd.{max u1 u2, max u1 u2, max u1 u2} (α -> M) (α -> M) (α -> M) (instHAdd.{max u1 u2} (α -> M) (Pi.instAdd.{u1, u2} α (fun (ᾰ : α) => M) (fun (i : α) => AddZeroClass.toHasAdd.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_1)))) (Set.indicator.{u1, u2} α M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_1)) s f) (Set.indicator.{u1, u2} α M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M _inst_1)) t f)))
-but is expected to have type
-  forall {α : Type.{u2}} {M : Type.{u1}} [_inst_1 : AddMonoid.{u1} M] {s : Set.{u2} α} {t : Set.{u2} α} {f : α -> M} {l : Filter.{u2} α}, (Filter.Eventually.{u2} α (fun (a : α) => Not (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) a (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) s t))) l) -> (Filter.EventuallyEq.{u2, u1} α M l (Set.indicator.{u2, u1} α M (AddMonoid.toZero.{u1} M _inst_1) (Union.union.{u2} (Set.{u2} α) (Set.instUnionSet.{u2} α) s t) f) (HAdd.hAdd.{max u2 u1, max u2 u1, max u2 u1} (α -> M) (α -> M) (α -> M) (instHAdd.{max u2 u1} (α -> M) (Pi.instAdd.{u2, u1} α (fun (ᾰ : α) => M) (fun (i : α) => AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M _inst_1)))) (Set.indicator.{u2, u1} α M (AddMonoid.toZero.{u1} M _inst_1) s f) (Set.indicator.{u2, u1} α M (AddMonoid.toZero.{u1} M _inst_1) t f)))
-Case conversion may be inaccurate. Consider using '#align indicator_union_eventually_eq indicator_union_eventuallyEqₓ'. -/
 theorem indicator_union_eventuallyEq (h : ∀ᶠ a in l, a ∉ s ∩ t) :
     indicator (s ∪ t) f =ᶠ[l] indicator s f + indicator t f :=
   h.mono fun a ha => indicator_union_of_not_mem_inter ha _
@@ -71,12 +59,6 @@ section Order
 
 variable [Zero β] [Preorder β] {s t : Set α} {f g : α → β} {a : α} {l : Filter α}
 
-/- warning: indicator_eventually_le_indicator -> indicator_eventuallyLE_indicator is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Zero.{u2} β] [_inst_2 : Preorder.{u2} β] {s : Set.{u1} α} {f : α -> β} {g : α -> β} {l : Filter.{u1} α}, (Filter.EventuallyLE.{u1, u2} α β (Preorder.toHasLe.{u2} β _inst_2) (Inf.inf.{u1} (Filter.{u1} α) (Filter.hasInf.{u1} α) l (Filter.principal.{u1} α s)) f g) -> (Filter.EventuallyLE.{u1, u2} α β (Preorder.toHasLe.{u2} β _inst_2) l (Set.indicator.{u1, u2} α β _inst_1 s f) (Set.indicator.{u1, u2} α β _inst_1 s g))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Zero.{u1} β] [_inst_2 : Preorder.{u1} β] {s : Set.{u2} α} {f : α -> β} {g : α -> β} {l : Filter.{u2} α}, (Filter.EventuallyLE.{u2, u1} α β (Preorder.toLE.{u1} β _inst_2) (Inf.inf.{u2} (Filter.{u2} α) (Filter.instInfFilter.{u2} α) l (Filter.principal.{u2} α s)) f g) -> (Filter.EventuallyLE.{u2, u1} α β (Preorder.toLE.{u1} β _inst_2) l (Set.indicator.{u2, u1} α β _inst_1 s f) (Set.indicator.{u2, u1} α β _inst_1 s g))
-Case conversion may be inaccurate. Consider using '#align indicator_eventually_le_indicator indicator_eventuallyLE_indicatorₓ'. -/
 theorem indicator_eventuallyLE_indicator (h : f ≤ᶠ[l ⊓ 𝓟 s] g) :
     indicator s f ≤ᶠ[l] indicator s g :=
   (eventually_inf_principal.1 h).mono fun a h => indicator_rel_indicator le_rfl h
@@ -84,12 +66,6 @@ theorem indicator_eventuallyLE_indicator (h : f ≤ᶠ[l ⊓ 𝓟 s] g) :
 
 end Order
 
-/- warning: monotone.tendsto_indicator -> Monotone.tendsto_indicator is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {ι : Type.{u3}} [_inst_1 : Preorder.{u3} ι] [_inst_2 : Zero.{u2} β] (s : ι -> (Set.{u1} α)), (Monotone.{u3, u1} ι (Set.{u1} α) _inst_1 (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.completeBooleanAlgebra.{u1} α))))))) s) -> (forall (f : α -> β) (a : α), Filter.Tendsto.{u3, u2} ι β (fun (i : ι) => Set.indicator.{u1, u2} α β _inst_2 (s i) f a) (Filter.atTop.{u3} ι _inst_1) (Pure.pure.{u2, u2} Filter.{u2} Filter.hasPure.{u2} β (Set.indicator.{u1, u2} α β _inst_2 (Set.iUnion.{u1, succ u3} α ι (fun (i : ι) => s i)) f a)))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} {ι : Type.{u3}} [_inst_1 : Preorder.{u3} ι] [_inst_2 : Zero.{u2} β] (s : ι -> (Set.{u1} α)), (Monotone.{u3, u1} ι (Set.{u1} α) _inst_1 (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α))))))) s) -> (forall (f : α -> β) (a : α), Filter.Tendsto.{u3, u2} ι β (fun (i : ι) => Set.indicator.{u1, u2} α β _inst_2 (s i) f a) (Filter.atTop.{u3} ι _inst_1) (Pure.pure.{u2, u2} Filter.{u2} Filter.instPureFilter.{u2} β (Set.indicator.{u1, u2} α β _inst_2 (Set.iUnion.{u1, succ u3} α ι (fun (i : ι) => s i)) f a)))
-Case conversion may be inaccurate. Consider using '#align monotone.tendsto_indicator Monotone.tendsto_indicatorₓ'. -/
 theorem Monotone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set α) (hs : Monotone s)
     (f : α → β) (a : α) :
     Tendsto (fun i => indicator (s i) f a) atTop (pure <| indicator (⋃ i, s i) f a) :=
@@ -104,12 +80,6 @@ theorem Monotone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set
     apply indicator_of_not_mem; simpa only [not_exists, mem_Union]
 #align monotone.tendsto_indicator Monotone.tendsto_indicator
 
-/- warning: antitone.tendsto_indicator -> Antitone.tendsto_indicator is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {ι : Type.{u3}} [_inst_1 : Preorder.{u3} ι] [_inst_2 : Zero.{u2} β] (s : ι -> (Set.{u1} α)), (Antitone.{u3, u1} ι (Set.{u1} α) _inst_1 (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.completeBooleanAlgebra.{u1} α))))))) s) -> (forall (f : α -> β) (a : α), Filter.Tendsto.{u3, u2} ι β (fun (i : ι) => Set.indicator.{u1, u2} α β _inst_2 (s i) f a) (Filter.atTop.{u3} ι _inst_1) (Pure.pure.{u2, u2} Filter.{u2} Filter.hasPure.{u2} β (Set.indicator.{u1, u2} α β _inst_2 (Set.iInter.{u1, succ u3} α ι (fun (i : ι) => s i)) f a)))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} {ι : Type.{u3}} [_inst_1 : Preorder.{u3} ι] [_inst_2 : Zero.{u2} β] (s : ι -> (Set.{u1} α)), (Antitone.{u3, u1} ι (Set.{u1} α) _inst_1 (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α))))))) s) -> (forall (f : α -> β) (a : α), Filter.Tendsto.{u3, u2} ι β (fun (i : ι) => Set.indicator.{u1, u2} α β _inst_2 (s i) f a) (Filter.atTop.{u3} ι _inst_1) (Pure.pure.{u2, u2} Filter.{u2} Filter.instPureFilter.{u2} β (Set.indicator.{u1, u2} α β _inst_2 (Set.iInter.{u1, succ u3} α ι (fun (i : ι) => s i)) f a)))
-Case conversion may be inaccurate. Consider using '#align antitone.tendsto_indicator Antitone.tendsto_indicatorₓ'. -/
 theorem Antitone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set α) (hs : Antitone s)
     (f : α → β) (a : α) :
     Tendsto (fun i => indicator (s i) f a) atTop (pure <| indicator (⋂ i, s i) f a) :=
Diff
@@ -101,8 +101,7 @@ theorem Monotone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set
   · rw [not_exists] at h
     simp only [indicator_of_not_mem (h _)]
     convert tendsto_const_pure
-    apply indicator_of_not_mem
-    simpa only [not_exists, mem_Union]
+    apply indicator_of_not_mem; simpa only [not_exists, mem_Union]
 #align monotone.tendsto_indicator Monotone.tendsto_indicator
 
 /- warning: antitone.tendsto_indicator -> Antitone.tendsto_indicator is a dubious translation:
@@ -119,11 +118,8 @@ theorem Antitone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set
   · rcases h with ⟨i, hi⟩
     refine' tendsto_pure.2 ((eventually_ge_at_top i).mono fun n hn => _)
     rw [indicator_of_not_mem _ _, indicator_of_not_mem _ _]
-    · simp only [mem_Inter, not_forall]
-      exact ⟨i, hi⟩
-    · intro h
-      have := hs hn h
-      contradiction
+    · simp only [mem_Inter, not_forall]; exact ⟨i, hi⟩
+    · intro h; have := hs hn h; contradiction
   · push_neg  at h
     simp only [indicator_of_mem, h, mem_Inter.2 h, tendsto_const_pure]
 #align antitone.tendsto_indicator Antitone.tendsto_indicator
Diff
@@ -73,7 +73,7 @@ variable [Zero β] [Preorder β] {s t : Set α} {f g : α → β} {a : α} {l :
 
 /- warning: indicator_eventually_le_indicator -> indicator_eventuallyLE_indicator is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Zero.{u2} β] [_inst_2 : Preorder.{u2} β] {s : Set.{u1} α} {f : α -> β} {g : α -> β} {l : Filter.{u1} α}, (Filter.EventuallyLE.{u1, u2} α β (Preorder.toLE.{u2} β _inst_2) (Inf.inf.{u1} (Filter.{u1} α) (Filter.hasInf.{u1} α) l (Filter.principal.{u1} α s)) f g) -> (Filter.EventuallyLE.{u1, u2} α β (Preorder.toLE.{u2} β _inst_2) l (Set.indicator.{u1, u2} α β _inst_1 s f) (Set.indicator.{u1, u2} α β _inst_1 s g))
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Zero.{u2} β] [_inst_2 : Preorder.{u2} β] {s : Set.{u1} α} {f : α -> β} {g : α -> β} {l : Filter.{u1} α}, (Filter.EventuallyLE.{u1, u2} α β (Preorder.toHasLe.{u2} β _inst_2) (Inf.inf.{u1} (Filter.{u1} α) (Filter.hasInf.{u1} α) l (Filter.principal.{u1} α s)) f g) -> (Filter.EventuallyLE.{u1, u2} α β (Preorder.toHasLe.{u2} β _inst_2) l (Set.indicator.{u1, u2} α β _inst_1 s f) (Set.indicator.{u1, u2} α β _inst_1 s g))
 but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Zero.{u1} β] [_inst_2 : Preorder.{u1} β] {s : Set.{u2} α} {f : α -> β} {g : α -> β} {l : Filter.{u2} α}, (Filter.EventuallyLE.{u2, u1} α β (Preorder.toLE.{u1} β _inst_2) (Inf.inf.{u2} (Filter.{u2} α) (Filter.instInfFilter.{u2} α) l (Filter.principal.{u2} α s)) f g) -> (Filter.EventuallyLE.{u2, u1} α β (Preorder.toLE.{u1} β _inst_2) l (Set.indicator.{u2, u1} α β _inst_1 s f) (Set.indicator.{u2, u1} α β _inst_1 s g))
 Case conversion may be inaccurate. Consider using '#align indicator_eventually_le_indicator indicator_eventuallyLE_indicatorₓ'. -/
Diff
@@ -86,9 +86,9 @@ end Order
 
 /- warning: monotone.tendsto_indicator -> Monotone.tendsto_indicator is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {ι : Type.{u3}} [_inst_1 : Preorder.{u3} ι] [_inst_2 : Zero.{u2} β] (s : ι -> (Set.{u1} α)), (Monotone.{u3, u1} ι (Set.{u1} α) _inst_1 (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.completeBooleanAlgebra.{u1} α))))))) s) -> (forall (f : α -> β) (a : α), Filter.Tendsto.{u3, u2} ι β (fun (i : ι) => Set.indicator.{u1, u2} α β _inst_2 (s i) f a) (Filter.atTop.{u3} ι _inst_1) (Pure.pure.{u2, u2} Filter.{u2} Filter.hasPure.{u2} β (Set.indicator.{u1, u2} α β _inst_2 (Set.unionᵢ.{u1, succ u3} α ι (fun (i : ι) => s i)) f a)))
+  forall {α : Type.{u1}} {β : Type.{u2}} {ι : Type.{u3}} [_inst_1 : Preorder.{u3} ι] [_inst_2 : Zero.{u2} β] (s : ι -> (Set.{u1} α)), (Monotone.{u3, u1} ι (Set.{u1} α) _inst_1 (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.completeBooleanAlgebra.{u1} α))))))) s) -> (forall (f : α -> β) (a : α), Filter.Tendsto.{u3, u2} ι β (fun (i : ι) => Set.indicator.{u1, u2} α β _inst_2 (s i) f a) (Filter.atTop.{u3} ι _inst_1) (Pure.pure.{u2, u2} Filter.{u2} Filter.hasPure.{u2} β (Set.indicator.{u1, u2} α β _inst_2 (Set.iUnion.{u1, succ u3} α ι (fun (i : ι) => s i)) f a)))
 but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} {ι : Type.{u3}} [_inst_1 : Preorder.{u3} ι] [_inst_2 : Zero.{u2} β] (s : ι -> (Set.{u1} α)), (Monotone.{u3, u1} ι (Set.{u1} α) _inst_1 (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α))))))) s) -> (forall (f : α -> β) (a : α), Filter.Tendsto.{u3, u2} ι β (fun (i : ι) => Set.indicator.{u1, u2} α β _inst_2 (s i) f a) (Filter.atTop.{u3} ι _inst_1) (Pure.pure.{u2, u2} Filter.{u2} Filter.instPureFilter.{u2} β (Set.indicator.{u1, u2} α β _inst_2 (Set.unionᵢ.{u1, succ u3} α ι (fun (i : ι) => s i)) f a)))
+  forall {α : Type.{u1}} {β : Type.{u2}} {ι : Type.{u3}} [_inst_1 : Preorder.{u3} ι] [_inst_2 : Zero.{u2} β] (s : ι -> (Set.{u1} α)), (Monotone.{u3, u1} ι (Set.{u1} α) _inst_1 (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α))))))) s) -> (forall (f : α -> β) (a : α), Filter.Tendsto.{u3, u2} ι β (fun (i : ι) => Set.indicator.{u1, u2} α β _inst_2 (s i) f a) (Filter.atTop.{u3} ι _inst_1) (Pure.pure.{u2, u2} Filter.{u2} Filter.instPureFilter.{u2} β (Set.indicator.{u1, u2} α β _inst_2 (Set.iUnion.{u1, succ u3} α ι (fun (i : ι) => s i)) f a)))
 Case conversion may be inaccurate. Consider using '#align monotone.tendsto_indicator Monotone.tendsto_indicatorₓ'. -/
 theorem Monotone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set α) (hs : Monotone s)
     (f : α → β) (a : α) :
@@ -107,9 +107,9 @@ theorem Monotone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set
 
 /- warning: antitone.tendsto_indicator -> Antitone.tendsto_indicator is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {ι : Type.{u3}} [_inst_1 : Preorder.{u3} ι] [_inst_2 : Zero.{u2} β] (s : ι -> (Set.{u1} α)), (Antitone.{u3, u1} ι (Set.{u1} α) _inst_1 (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.completeBooleanAlgebra.{u1} α))))))) s) -> (forall (f : α -> β) (a : α), Filter.Tendsto.{u3, u2} ι β (fun (i : ι) => Set.indicator.{u1, u2} α β _inst_2 (s i) f a) (Filter.atTop.{u3} ι _inst_1) (Pure.pure.{u2, u2} Filter.{u2} Filter.hasPure.{u2} β (Set.indicator.{u1, u2} α β _inst_2 (Set.interᵢ.{u1, succ u3} α ι (fun (i : ι) => s i)) f a)))
+  forall {α : Type.{u1}} {β : Type.{u2}} {ι : Type.{u3}} [_inst_1 : Preorder.{u3} ι] [_inst_2 : Zero.{u2} β] (s : ι -> (Set.{u1} α)), (Antitone.{u3, u1} ι (Set.{u1} α) _inst_1 (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.completeBooleanAlgebra.{u1} α))))))) s) -> (forall (f : α -> β) (a : α), Filter.Tendsto.{u3, u2} ι β (fun (i : ι) => Set.indicator.{u1, u2} α β _inst_2 (s i) f a) (Filter.atTop.{u3} ι _inst_1) (Pure.pure.{u2, u2} Filter.{u2} Filter.hasPure.{u2} β (Set.indicator.{u1, u2} α β _inst_2 (Set.iInter.{u1, succ u3} α ι (fun (i : ι) => s i)) f a)))
 but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} {ι : Type.{u3}} [_inst_1 : Preorder.{u3} ι] [_inst_2 : Zero.{u2} β] (s : ι -> (Set.{u1} α)), (Antitone.{u3, u1} ι (Set.{u1} α) _inst_1 (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α))))))) s) -> (forall (f : α -> β) (a : α), Filter.Tendsto.{u3, u2} ι β (fun (i : ι) => Set.indicator.{u1, u2} α β _inst_2 (s i) f a) (Filter.atTop.{u3} ι _inst_1) (Pure.pure.{u2, u2} Filter.{u2} Filter.instPureFilter.{u2} β (Set.indicator.{u1, u2} α β _inst_2 (Set.interᵢ.{u1, succ u3} α ι (fun (i : ι) => s i)) f a)))
+  forall {α : Type.{u1}} {β : Type.{u2}} {ι : Type.{u3}} [_inst_1 : Preorder.{u3} ι] [_inst_2 : Zero.{u2} β] (s : ι -> (Set.{u1} α)), (Antitone.{u3, u1} ι (Set.{u1} α) _inst_1 (PartialOrder.toPreorder.{u1} (Set.{u1} α) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} α) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} α) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} α) (Set.instCompleteBooleanAlgebraSet.{u1} α))))))) s) -> (forall (f : α -> β) (a : α), Filter.Tendsto.{u3, u2} ι β (fun (i : ι) => Set.indicator.{u1, u2} α β _inst_2 (s i) f a) (Filter.atTop.{u3} ι _inst_1) (Pure.pure.{u2, u2} Filter.{u2} Filter.instPureFilter.{u2} β (Set.indicator.{u1, u2} α β _inst_2 (Set.iInter.{u1, succ u3} α ι (fun (i : ι) => s i)) f a)))
 Case conversion may be inaccurate. Consider using '#align antitone.tendsto_indicator Antitone.tendsto_indicatorₓ'. -/
 theorem Antitone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set α) (hs : Antitone s)
     (f : α → β) (a : α) :
@@ -128,15 +128,15 @@ theorem Antitone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set
     simp only [indicator_of_mem, h, mem_Inter.2 h, tendsto_const_pure]
 #align antitone.tendsto_indicator Antitone.tendsto_indicator
 
-#print tendsto_indicator_bunionᵢ_finset /-
-theorem tendsto_indicator_bunionᵢ_finset {ι} [Zero β] (s : ι → Set α) (f : α → β) (a : α) :
+#print tendsto_indicator_biUnion_finset /-
+theorem tendsto_indicator_biUnion_finset {ι} [Zero β] (s : ι → Set α) (f : α → β) (a : α) :
     Tendsto (fun n : Finset ι => indicator (⋃ i ∈ n, s i) f a) atTop
-      (pure <| indicator (unionᵢ s) f a) :=
+      (pure <| indicator (iUnion s) f a) :=
   by
   rw [Union_eq_Union_finset s]
   refine' Monotone.tendsto_indicator (fun n : Finset ι => ⋃ i ∈ n, s i) _ f a
   exact fun t₁ t₂ => bUnion_subset_bUnion_left
-#align tendsto_indicator_bUnion_finset tendsto_indicator_bunionᵢ_finset
+#align tendsto_indicator_bUnion_finset tendsto_indicator_biUnion_finset
 -/
 
 #print Filter.EventuallyEq.support /-
Diff
@@ -71,16 +71,16 @@ section Order
 
 variable [Zero β] [Preorder β] {s t : Set α} {f g : α → β} {a : α} {l : Filter α}
 
-/- warning: indicator_eventually_le_indicator -> indicator_eventuallyLe_indicator is a dubious translation:
+/- warning: indicator_eventually_le_indicator -> indicator_eventuallyLE_indicator is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Zero.{u2} β] [_inst_2 : Preorder.{u2} β] {s : Set.{u1} α} {f : α -> β} {g : α -> β} {l : Filter.{u1} α}, (Filter.EventuallyLe.{u1, u2} α β (Preorder.toLE.{u2} β _inst_2) (Inf.inf.{u1} (Filter.{u1} α) (Filter.hasInf.{u1} α) l (Filter.principal.{u1} α s)) f g) -> (Filter.EventuallyLe.{u1, u2} α β (Preorder.toLE.{u2} β _inst_2) l (Set.indicator.{u1, u2} α β _inst_1 s f) (Set.indicator.{u1, u2} α β _inst_1 s g))
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Zero.{u2} β] [_inst_2 : Preorder.{u2} β] {s : Set.{u1} α} {f : α -> β} {g : α -> β} {l : Filter.{u1} α}, (Filter.EventuallyLE.{u1, u2} α β (Preorder.toLE.{u2} β _inst_2) (Inf.inf.{u1} (Filter.{u1} α) (Filter.hasInf.{u1} α) l (Filter.principal.{u1} α s)) f g) -> (Filter.EventuallyLE.{u1, u2} α β (Preorder.toLE.{u2} β _inst_2) l (Set.indicator.{u1, u2} α β _inst_1 s f) (Set.indicator.{u1, u2} α β _inst_1 s g))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Zero.{u1} β] [_inst_2 : Preorder.{u1} β] {s : Set.{u2} α} {f : α -> β} {g : α -> β} {l : Filter.{u2} α}, (Filter.EventuallyLe.{u2, u1} α β (Preorder.toLE.{u1} β _inst_2) (Inf.inf.{u2} (Filter.{u2} α) (Filter.instInfFilter.{u2} α) l (Filter.principal.{u2} α s)) f g) -> (Filter.EventuallyLe.{u2, u1} α β (Preorder.toLE.{u1} β _inst_2) l (Set.indicator.{u2, u1} α β _inst_1 s f) (Set.indicator.{u2, u1} α β _inst_1 s g))
-Case conversion may be inaccurate. Consider using '#align indicator_eventually_le_indicator indicator_eventuallyLe_indicatorₓ'. -/
-theorem indicator_eventuallyLe_indicator (h : f ≤ᶠ[l ⊓ 𝓟 s] g) :
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Zero.{u1} β] [_inst_2 : Preorder.{u1} β] {s : Set.{u2} α} {f : α -> β} {g : α -> β} {l : Filter.{u2} α}, (Filter.EventuallyLE.{u2, u1} α β (Preorder.toLE.{u1} β _inst_2) (Inf.inf.{u2} (Filter.{u2} α) (Filter.instInfFilter.{u2} α) l (Filter.principal.{u2} α s)) f g) -> (Filter.EventuallyLE.{u2, u1} α β (Preorder.toLE.{u1} β _inst_2) l (Set.indicator.{u2, u1} α β _inst_1 s f) (Set.indicator.{u2, u1} α β _inst_1 s g))
+Case conversion may be inaccurate. Consider using '#align indicator_eventually_le_indicator indicator_eventuallyLE_indicatorₓ'. -/
+theorem indicator_eventuallyLE_indicator (h : f ≤ᶠ[l ⊓ 𝓟 s] g) :
     indicator s f ≤ᶠ[l] indicator s g :=
   (eventually_inf_principal.1 h).mono fun a h => indicator_rel_indicator le_rfl h
-#align indicator_eventually_le_indicator indicator_eventuallyLe_indicator
+#align indicator_eventually_le_indicator indicator_eventuallyLE_indicator
 
 end Order
 
Diff
@@ -36,9 +36,9 @@ variable [Zero M] {s t : Set α} {f g : α → M} {a : α} {l : Filter α}
 
 /- warning: indicator_eventually_eq -> indicator_eventuallyEq is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {M : Type.{u2}} [_inst_1 : Zero.{u2} M] {s : Set.{u1} α} {t : Set.{u1} α} {f : α -> M} {g : α -> M} {l : Filter.{u1} α}, (Filter.EventuallyEq.{u1, u2} α M (HasInf.inf.{u1} (Filter.{u1} α) (Filter.hasInf.{u1} α) l (Filter.principal.{u1} α s)) f g) -> (Filter.EventuallyEq.{u1, 0} α Prop l s t) -> (Filter.EventuallyEq.{u1, u2} α M l (Set.indicator.{u1, u2} α M _inst_1 s f) (Set.indicator.{u1, u2} α M _inst_1 t g))
+  forall {α : Type.{u1}} {M : Type.{u2}} [_inst_1 : Zero.{u2} M] {s : Set.{u1} α} {t : Set.{u1} α} {f : α -> M} {g : α -> M} {l : Filter.{u1} α}, (Filter.EventuallyEq.{u1, u2} α M (Inf.inf.{u1} (Filter.{u1} α) (Filter.hasInf.{u1} α) l (Filter.principal.{u1} α s)) f g) -> (Filter.EventuallyEq.{u1, 0} α Prop l s t) -> (Filter.EventuallyEq.{u1, u2} α M l (Set.indicator.{u1, u2} α M _inst_1 s f) (Set.indicator.{u1, u2} α M _inst_1 t g))
 but is expected to have type
-  forall {α : Type.{u2}} {M : Type.{u1}} [_inst_1 : Zero.{u1} M] {s : Set.{u2} α} {t : Set.{u2} α} {f : α -> M} {g : α -> M} {l : Filter.{u2} α}, (Filter.EventuallyEq.{u2, u1} α M (HasInf.inf.{u2} (Filter.{u2} α) (Filter.instHasInfFilter.{u2} α) l (Filter.principal.{u2} α s)) f g) -> (Filter.EventuallyEq.{u2, 0} α Prop l s t) -> (Filter.EventuallyEq.{u2, u1} α M l (Set.indicator.{u2, u1} α M _inst_1 s f) (Set.indicator.{u2, u1} α M _inst_1 t g))
+  forall {α : Type.{u2}} {M : Type.{u1}} [_inst_1 : Zero.{u1} M] {s : Set.{u2} α} {t : Set.{u2} α} {f : α -> M} {g : α -> M} {l : Filter.{u2} α}, (Filter.EventuallyEq.{u2, u1} α M (Inf.inf.{u2} (Filter.{u2} α) (Filter.instInfFilter.{u2} α) l (Filter.principal.{u2} α s)) f g) -> (Filter.EventuallyEq.{u2, 0} α Prop l s t) -> (Filter.EventuallyEq.{u2, u1} α M l (Set.indicator.{u2, u1} α M _inst_1 s f) (Set.indicator.{u2, u1} α M _inst_1 t g))
 Case conversion may be inaccurate. Consider using '#align indicator_eventually_eq indicator_eventuallyEqₓ'. -/
 theorem indicator_eventuallyEq (hf : f =ᶠ[l ⊓ 𝓟 s] g) (hs : s =ᶠ[l] t) :
     indicator s f =ᶠ[l] indicator t g :=
@@ -73,9 +73,9 @@ variable [Zero β] [Preorder β] {s t : Set α} {f g : α → β} {a : α} {l :
 
 /- warning: indicator_eventually_le_indicator -> indicator_eventuallyLe_indicator is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Zero.{u2} β] [_inst_2 : Preorder.{u2} β] {s : Set.{u1} α} {f : α -> β} {g : α -> β} {l : Filter.{u1} α}, (Filter.EventuallyLe.{u1, u2} α β (Preorder.toLE.{u2} β _inst_2) (HasInf.inf.{u1} (Filter.{u1} α) (Filter.hasInf.{u1} α) l (Filter.principal.{u1} α s)) f g) -> (Filter.EventuallyLe.{u1, u2} α β (Preorder.toLE.{u2} β _inst_2) l (Set.indicator.{u1, u2} α β _inst_1 s f) (Set.indicator.{u1, u2} α β _inst_1 s g))
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Zero.{u2} β] [_inst_2 : Preorder.{u2} β] {s : Set.{u1} α} {f : α -> β} {g : α -> β} {l : Filter.{u1} α}, (Filter.EventuallyLe.{u1, u2} α β (Preorder.toLE.{u2} β _inst_2) (Inf.inf.{u1} (Filter.{u1} α) (Filter.hasInf.{u1} α) l (Filter.principal.{u1} α s)) f g) -> (Filter.EventuallyLe.{u1, u2} α β (Preorder.toLE.{u2} β _inst_2) l (Set.indicator.{u1, u2} α β _inst_1 s f) (Set.indicator.{u1, u2} α β _inst_1 s g))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Zero.{u1} β] [_inst_2 : Preorder.{u1} β] {s : Set.{u2} α} {f : α -> β} {g : α -> β} {l : Filter.{u2} α}, (Filter.EventuallyLe.{u2, u1} α β (Preorder.toLE.{u1} β _inst_2) (HasInf.inf.{u2} (Filter.{u2} α) (Filter.instHasInfFilter.{u2} α) l (Filter.principal.{u2} α s)) f g) -> (Filter.EventuallyLe.{u2, u1} α β (Preorder.toLE.{u1} β _inst_2) l (Set.indicator.{u2, u1} α β _inst_1 s f) (Set.indicator.{u2, u1} α β _inst_1 s g))
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Zero.{u1} β] [_inst_2 : Preorder.{u1} β] {s : Set.{u2} α} {f : α -> β} {g : α -> β} {l : Filter.{u2} α}, (Filter.EventuallyLe.{u2, u1} α β (Preorder.toLE.{u1} β _inst_2) (Inf.inf.{u2} (Filter.{u2} α) (Filter.instInfFilter.{u2} α) l (Filter.principal.{u2} α s)) f g) -> (Filter.EventuallyLe.{u2, u1} α β (Preorder.toLE.{u1} β _inst_2) l (Set.indicator.{u2, u1} α β _inst_1 s f) (Set.indicator.{u2, u1} α β _inst_1 s g))
 Case conversion may be inaccurate. Consider using '#align indicator_eventually_le_indicator indicator_eventuallyLe_indicatorₓ'. -/
 theorem indicator_eventuallyLe_indicator (h : f ≤ᶠ[l ⊓ 𝓟 s] g) :
     indicator s f ≤ᶠ[l] indicator s g :=

Changes in mathlib4

mathlib3
mathlib4
chore: Sink Algebra.Support down the import tree (#8919)

Function.support is a very basic definition. Nevertheless, it is a pretty heavy import because it imports most objects a support lemma can be written about.

This PR reverses the dependencies between those objects and Function.support, so that the latter can become a much more lightweight import.

Only two import could not easily be reversed, namely the ones to Data.Set.Finite and Order.ConditionallyCompleteLattice.Basic, so I created two new files instead.

I credit:

Diff
@@ -3,7 +3,7 @@ Copyright (c) 2020 Zhouhang Zhou. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Yury Kudryashov
 -/
-import Mathlib.Algebra.IndicatorFunction
+import Mathlib.Algebra.Function.Indicator
 import Mathlib.Order.Filter.AtTopBot
 
 #align_import order.filter.indicator_function from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
chore: bump to v4.3.0-rc2 (#8366)

PR contents

This is the supremum of

along with some minor fixes from failures on nightly-testing as Mathlib master is merged into it.

Note that some PRs for changes that are already compatible with the current toolchain and will be necessary have already been split out: #8380.

I am hopeful that in future we will be able to progressively merge adaptation PRs into a bump/v4.X.0 branch, so we never end up with a "big merge" like this. However one of these adaptation PRs (#8056) predates my new scheme for combined CI, and it wasn't possible to keep that PR viable in the meantime.

Lean PRs involved in this bump

In particular this includes adjustments for the Lean PRs

leanprover/lean4#2778

We can get rid of all the

local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue [lean4#2220](https://github.com/leanprover/lean4/pull/2220)

macros across Mathlib (and in any projects that want to write natural number powers of reals).

leanprover/lean4#2722

Changes the default behaviour of simp to (config := {decide := false}). This makes simp (and consequentially norm_num) less powerful, but also more consistent, and less likely to blow up in long failures. This requires a variety of changes: changing some previously by simp or norm_num to decide or rfl, or adding (config := {decide := true}).

leanprover/lean4#2783

This changed the behaviour of simp so that simp [f] will only unfold "fully applied" occurrences of f. The old behaviour can be recovered with simp (config := { unfoldPartialApp := true }). We may in future add a syntax for this, e.g. simp [!f]; please provide feedback! In the meantime, we have made the following changes:

  • switching to using explicit lemmas that have the intended level of application
  • (config := { unfoldPartialApp := true }) in some places, to recover the old behaviour
  • Using @[eqns] to manually adjust the equation lemmas for a particular definition, recovering the old behaviour just for that definition. See #8371, where we do this for Function.comp and Function.flip.

This change in Lean may require further changes down the line (e.g. adding the !f syntax, and/or upstreaming the special treatment for Function.comp and Function.flip, and/or removing this special treatment). Please keep an open and skeptical mind about these changes!

Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Mauricio Collares <mauricio@collares.org>

Diff
@@ -31,7 +31,7 @@ theorem mulIndicator_eventuallyEq (hf : f =ᶠ[l ⊓ 𝓟 s] g) (hs : s =ᶠ[l]
   (eventually_inf_principal.1 hf).mp <| hs.mem_iff.mono fun x hst hfg =>
     by_cases
       (fun hxs : x ∈ s => by simp only [*, hst.1 hxs, mulIndicator_of_mem])
-      (fun hxs => by simp only [mulIndicator_of_not_mem, hxs, mt hst.2 hxs])
+      (fun hxs => by simp only [mulIndicator_of_not_mem, hxs, mt hst.2 hxs, not_false_eq_true])
 #align indicator_eventually_eq indicator_eventuallyEq
 
 end One
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -17,7 +17,7 @@ Properties of additive and multiplicative indicator functions involving `=ᶠ` a
 indicator, characteristic, filter
 -/
 
-variable {α β M E : Type _}
+variable {α β M E : Type*}
 
 open Set Filter
 
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2020 Zhouhang Zhou. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Yury Kudryashov
-
-! This file was ported from Lean 3 source module order.filter.indicator_function
-! leanprover-community/mathlib commit 8631e2d5ea77f6c13054d9151d82b83069680cb1
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Algebra.IndicatorFunction
 import Mathlib.Order.Filter.AtTopBot
 
+#align_import order.filter.indicator_function from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
+
 /-!
 # Indicator function and filters
 
feat: add lemmas about Filters and Set.indicator (#5240)
  • Add multiplicative versions of all lemmas in Order.Filter.IndicatorFunction.
  • Add several new lemmas.
Diff
@@ -14,104 +14,125 @@ import Mathlib.Order.Filter.AtTopBot
 /-!
 # Indicator function and filters
 
-Properties of indicator functions involving `=ᶠ` and `≤ᶠ`.
+Properties of additive and multiplicative indicator functions involving `=ᶠ` and `≤ᶠ`.
 
 ## Tags
 indicator, characteristic, filter
 -/
 
-
 variable {α β M E : Type _}
 
 open Set Filter
 
-section Zero
+section One
 
-variable [Zero M] {s t : Set α} {f g : α → M} {a : α} {l : Filter α}
+variable [One M] {s t : Set α} {f g : α → M} {a : α} {l : Filter α}
 
-theorem indicator_eventuallyEq (hf : f =ᶠ[l ⊓ 𝓟 s] g) (hs : s =ᶠ[l] t) :
-    indicator s f =ᶠ[l] indicator t g :=
-  (eventually_inf_principal.1 hf).mp <|
-    hs.mem_iff.mono fun x hst hfg =>
-      by_cases (fun hxs : x ∈ s => by simp only [*, hst.1 hxs, indicator_of_mem]) fun hxs => by
-        simp only [indicator_of_not_mem hxs, indicator_of_not_mem (mt hst.2 hxs)]
+@[to_additive]
+theorem mulIndicator_eventuallyEq (hf : f =ᶠ[l ⊓ 𝓟 s] g) (hs : s =ᶠ[l] t) :
+    mulIndicator s f =ᶠ[l] mulIndicator t g :=
+  (eventually_inf_principal.1 hf).mp <| hs.mem_iff.mono fun x hst hfg =>
+    by_cases
+      (fun hxs : x ∈ s => by simp only [*, hst.1 hxs, mulIndicator_of_mem])
+      (fun hxs => by simp only [mulIndicator_of_not_mem, hxs, mt hst.2 hxs])
 #align indicator_eventually_eq indicator_eventuallyEq
 
-end Zero
+end One
 
-section AddMonoid
+section Monoid
 
-variable [AddMonoid M] {s t : Set α} {f g : α → M} {a : α} {l : Filter α}
+variable [Monoid M] {s t : Set α} {f g : α → M} {a : α} {l : Filter α}
 
-theorem indicator_union_eventuallyEq (h : ∀ᶠ a in l, a ∉ s ∩ t) :
-    indicator (s ∪ t) f =ᶠ[l] indicator s f + indicator t f :=
-  h.mono fun _a ha => indicator_union_of_not_mem_inter ha _
+@[to_additive]
+theorem mulIndicator_union_eventuallyEq (h : ∀ᶠ a in l, a ∉ s ∩ t) :
+    mulIndicator (s ∪ t) f =ᶠ[l] mulIndicator s f * mulIndicator t f :=
+  h.mono fun _a ha => mulIndicator_union_of_not_mem_inter ha _
 #align indicator_union_eventually_eq indicator_union_eventuallyEq
 
-end AddMonoid
+end Monoid
 
 section Order
 
-variable [Zero β] [Preorder β] {s t : Set α} {f g : α → β} {a : α} {l : Filter α}
+variable [One β] [Preorder β] {s t : Set α} {f g : α → β} {a : α} {l : Filter α}
 
-theorem indicator_eventuallyLE_indicator (h : f ≤ᶠ[l ⊓ 𝓟 s] g) :
-    indicator s f ≤ᶠ[l] indicator s g :=
-  (eventually_inf_principal.1 h).mono fun _ => indicator_rel_indicator le_rfl
+@[to_additive]
+theorem mulIndicator_eventuallyLE_mulIndicator (h : f ≤ᶠ[l ⊓ 𝓟 s] g) :
+    mulIndicator s f ≤ᶠ[l] mulIndicator s g :=
+  (eventually_inf_principal.1 h).mono fun _ => mulIndicator_rel_mulIndicator le_rfl
 #align indicator_eventually_le_indicator indicator_eventuallyLE_indicator
 
 end Order
 
-theorem Monotone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set α) (hs : Monotone s)
+@[to_additive]
+theorem Monotone.mulIndicator_eventuallyEq_iUnion {ι} [Preorder ι] [One β] (s : ι → Set α)
+    (hs : Monotone s) (f : α → β) (a : α) :
+    (fun i => mulIndicator (s i) f a) =ᶠ[atTop] fun _ ↦ mulIndicator (⋃ i, s i) f a := by
+  classical exact hs.piecewise_eventually_eq_iUnion f 1 a
+
+@[to_additive]
+theorem Monotone.tendsto_mulIndicator {ι} [Preorder ι] [One β] (s : ι → Set α) (hs : Monotone s)
     (f : α → β) (a : α) :
-    Tendsto (fun i => indicator (s i) f a) atTop (pure <| indicator (⋃ i, s i) f a) := by
-  by_cases h : ∃ i, a ∈ s i
-  · rcases h with ⟨i, hi⟩
-    refine' tendsto_pure.2 ((eventually_ge_atTop i).mono fun n hn => _)
-    rw [indicator_of_mem (hs hn hi) _, indicator_of_mem ((subset_iUnion _ _) hi) _]
-  · have h' : a ∉ ⋃ i, s i := mt mem_iUnion.1 h
-    rw [not_exists] at h
-    simpa only [indicator_of_not_mem, *] using tendsto_const_pure
+    Tendsto (fun i => mulIndicator (s i) f a) atTop (pure <| mulIndicator (⋃ i, s i) f a) :=
+  tendsto_pure.2 <| hs.mulIndicator_eventuallyEq_iUnion s f a
 #align monotone.tendsto_indicator Monotone.tendsto_indicator
 
-theorem Antitone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set α) (hs : Antitone s)
+@[to_additive]
+theorem Antitone.mulIndicator_eventuallyEq_iInter {ι} [Preorder ι] [One β] (s : ι → Set α)
+    (hs : Antitone s) (f : α → β) (a : α) :
+    (fun i => mulIndicator (s i) f a) =ᶠ[atTop] fun _ ↦ mulIndicator (⋂ i, s i) f a := by
+  classical exact hs.piecewise_eventually_eq_iInter f 1 a
+
+@[to_additive]
+theorem Antitone.tendsto_mulIndicator {ι} [Preorder ι] [One β] (s : ι → Set α) (hs : Antitone s)
     (f : α → β) (a : α) :
-    Tendsto (fun i => indicator (s i) f a) atTop (pure <| indicator (⋂ i, s i) f a) := by
-  by_cases h : ∃ i, a ∉ s i
-  · rcases h with ⟨i, hi⟩
-    refine' tendsto_pure.2 ((eventually_ge_atTop i).mono fun n hn => _)
-    rw [indicator_of_not_mem _ _, indicator_of_not_mem _ _]
-    · simp only [mem_iInter, not_forall]
-      exact ⟨i, hi⟩
-    · intro h
-      have := hs hn h
-      contradiction
-  · push_neg at h
-    simp only [indicator_of_mem, h, mem_iInter.2 h, tendsto_const_pure]
+    Tendsto (fun i => mulIndicator (s i) f a) atTop (pure <| mulIndicator (⋂ i, s i) f a) :=
+  tendsto_pure.2 <| hs.mulIndicator_eventuallyEq_iInter s f a
 #align antitone.tendsto_indicator Antitone.tendsto_indicator
 
-theorem tendsto_indicator_biUnion_finset {ι} [Zero β] (s : ι → Set α) (f : α → β) (a : α) :
-    Tendsto (fun n : Finset ι => indicator (⋃ i ∈ n, s i) f a) atTop
-      (pure <| indicator (iUnion s) f a) := by
+@[to_additive]
+theorem mulIndicator_biUnion_finset_eventuallyEq {ι} [One β] (s : ι → Set α) (f : α → β) (a : α) :
+    (fun n : Finset ι => mulIndicator (⋃ i ∈ n, s i) f a) =ᶠ[atTop]
+      fun _ ↦ mulIndicator (iUnion s) f a := by
   rw [iUnion_eq_iUnion_finset s]
-  refine' Monotone.tendsto_indicator (fun n : Finset ι => ⋃ i ∈ n, s i) _ f a
-  exact fun t₁ t₂ => biUnion_subset_biUnion_left
+  apply Monotone.mulIndicator_eventuallyEq_iUnion
+  exact fun _ _ ↦ biUnion_subset_biUnion_left
+
+@[to_additive]
+theorem tendsto_mulIndicator_biUnion_finset {ι} [One β] (s : ι → Set α) (f : α → β) (a : α) :
+    Tendsto (fun n : Finset ι => mulIndicator (⋃ i ∈ n, s i) f a) atTop
+      (pure <| mulIndicator (iUnion s) f a) :=
+  tendsto_pure.2 <| mulIndicator_biUnion_finset_eventuallyEq s f a
 #align tendsto_indicator_bUnion_finset tendsto_indicator_biUnion_finset
 
-theorem Filter.EventuallyEq.support [Zero β] {f g : α → β} {l : Filter α} (h : f =ᶠ[l] g) :
-    Function.support f =ᶠ[l] Function.support g := by
-  filter_upwards [h]with x hx
-  rw [eq_iff_iff]
-  change f x ≠ 0 ↔ g x ≠ 0
-  rw [hx]
+@[to_additive]
+protected theorem Filter.EventuallyEq.mulSupport [One β] {f g : α → β} {l : Filter α}
+    (h : f =ᶠ[l] g) :
+    Function.mulSupport f =ᶠ[l] Function.mulSupport g :=
+  h.preimage ({1}ᶜ : Set β)
 #align filter.eventually_eq.support Filter.EventuallyEq.support
 
-theorem Filter.EventuallyEq.indicator [Zero β] {l : Filter α} {f g : α → β} {s : Set α}
-    (hfg : f =ᶠ[l] g) : s.indicator f =ᶠ[l] s.indicator g :=
-  indicator_eventuallyEq (hfg.filter_mono inf_le_left) EventuallyEq.rfl
+@[to_additive]
+protected theorem Filter.EventuallyEq.mulIndicator [One β] {l : Filter α} {f g : α → β} {s : Set α}
+    (hfg : f =ᶠ[l] g) : s.mulIndicator f =ᶠ[l] s.mulIndicator g :=
+  mulIndicator_eventuallyEq (hfg.filter_mono inf_le_left) EventuallyEq.rfl
 #align filter.eventually_eq.indicator Filter.EventuallyEq.indicator
 
-theorem Filter.EventuallyEq.indicator_zero [Zero β] {l : Filter α} {f : α → β} {s : Set α}
-    (hf : f =ᶠ[l] 0) : s.indicator f =ᶠ[l] 0 := by
-  refine' hf.indicator.trans _
-  rw [indicator_zero']
+@[to_additive]
+theorem Filter.EventuallyEq.mulIndicator_one [One β] {l : Filter α} {f : α → β} {s : Set α}
+    (hf : f =ᶠ[l] 1) : s.mulIndicator f =ᶠ[l] 1 :=
+  hf.mulIndicator.trans <| by rw [mulIndicator_one']
 #align filter.eventually_eq.indicator_zero Filter.EventuallyEq.indicator_zero
+
+@[to_additive]
+theorem Filter.EventuallyEq.of_mulIndicator [One β] {l : Filter α} {f : α → β}
+    (hf : ∀ᶠ x in l, f x ≠ 1) {s t : Set α} (h : s.mulIndicator f =ᶠ[l] t.mulIndicator f) :
+    s =ᶠ[l] t := by
+  have : ∀ {s : Set α}, Function.mulSupport (s.mulIndicator f) =ᶠ[l] s := fun {s} ↦ by
+    rw [mulSupport_mulIndicator]
+    exact (hf.mono fun x hx ↦ and_iff_left hx).set_eq
+  exact this.symm.trans <| h.mulSupport.trans this
+
+@[to_additive]
+theorem Filter.EventuallyEq.of_mulIndicator_const [One β] {l : Filter α} {c : β} (hc : c ≠ 1)
+    {s t : Set α} (h : s.mulIndicator (fun _ ↦ c) =ᶠ[l] t.mulIndicator fun _ ↦ c) : s =ᶠ[l] t :=
+  .of_mulIndicator (eventually_of_forall fun _ ↦ hc) h
chore: clean up spacing around at and goals (#5387)

Changes are of the form

  • some_tactic at h⊢ -> some_tactic at h ⊢
  • some_tactic at h -> some_tactic at h
Diff
@@ -85,7 +85,7 @@ theorem Antitone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set
     · intro h
       have := hs hn h
       contradiction
-  · push_neg  at h
+  · push_neg at h
     simp only [indicator_of_mem, h, mem_iInter.2 h, tendsto_const_pure]
 #align antitone.tendsto_indicator Antitone.tendsto_indicator
 
chore: Rename to sSup/iSup (#3938)

As discussed on Zulip

Renames

  • supₛsSup
  • infₛsInf
  • supᵢiSup
  • infᵢiInf
  • bsupₛbsSup
  • binfₛbsInf
  • bsupᵢbiSup
  • binfᵢbiInf
  • csupₛcsSup
  • cinfₛcsInf
  • csupᵢciSup
  • cinfᵢciInf
  • unionₛsUnion
  • interₛsInter
  • unionᵢiUnion
  • interᵢiInter
  • bunionₛbsUnion
  • binterₛbsInter
  • bunionᵢbiUnion
  • binterᵢbiInter

Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Diff
@@ -67,8 +67,8 @@ theorem Monotone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set
   by_cases h : ∃ i, a ∈ s i
   · rcases h with ⟨i, hi⟩
     refine' tendsto_pure.2 ((eventually_ge_atTop i).mono fun n hn => _)
-    rw [indicator_of_mem (hs hn hi) _, indicator_of_mem ((subset_unionᵢ _ _) hi) _]
-  · have h' : a ∉ ⋃ i, s i := mt mem_unionᵢ.1 h
+    rw [indicator_of_mem (hs hn hi) _, indicator_of_mem ((subset_iUnion _ _) hi) _]
+  · have h' : a ∉ ⋃ i, s i := mt mem_iUnion.1 h
     rw [not_exists] at h
     simpa only [indicator_of_not_mem, *] using tendsto_const_pure
 #align monotone.tendsto_indicator Monotone.tendsto_indicator
@@ -80,22 +80,22 @@ theorem Antitone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set
   · rcases h with ⟨i, hi⟩
     refine' tendsto_pure.2 ((eventually_ge_atTop i).mono fun n hn => _)
     rw [indicator_of_not_mem _ _, indicator_of_not_mem _ _]
-    · simp only [mem_interᵢ, not_forall]
+    · simp only [mem_iInter, not_forall]
       exact ⟨i, hi⟩
     · intro h
       have := hs hn h
       contradiction
   · push_neg  at h
-    simp only [indicator_of_mem, h, mem_interᵢ.2 h, tendsto_const_pure]
+    simp only [indicator_of_mem, h, mem_iInter.2 h, tendsto_const_pure]
 #align antitone.tendsto_indicator Antitone.tendsto_indicator
 
-theorem tendsto_indicator_bunionᵢ_finset {ι} [Zero β] (s : ι → Set α) (f : α → β) (a : α) :
+theorem tendsto_indicator_biUnion_finset {ι} [Zero β] (s : ι → Set α) (f : α → β) (a : α) :
     Tendsto (fun n : Finset ι => indicator (⋃ i ∈ n, s i) f a) atTop
-      (pure <| indicator (unionᵢ s) f a) := by
-  rw [unionᵢ_eq_unionᵢ_finset s]
+      (pure <| indicator (iUnion s) f a) := by
+  rw [iUnion_eq_iUnion_finset s]
   refine' Monotone.tendsto_indicator (fun n : Finset ι => ⋃ i ∈ n, s i) _ f a
-  exact fun t₁ t₂ => bunionᵢ_subset_bunionᵢ_left
-#align tendsto_indicator_bUnion_finset tendsto_indicator_bunionᵢ_finset
+  exact fun t₁ t₂ => biUnion_subset_biUnion_left
+#align tendsto_indicator_bUnion_finset tendsto_indicator_biUnion_finset
 
 theorem Filter.EventuallyEq.support [Zero β] {f g : α → β} {l : Filter α} (h : f =ᶠ[l] g) :
     Function.support f =ᶠ[l] Function.support g := by
chore: rename Filter.EventuallyLe (#2464)
Diff
@@ -54,10 +54,10 @@ section Order
 
 variable [Zero β] [Preorder β] {s t : Set α} {f g : α → β} {a : α} {l : Filter α}
 
-theorem indicator_eventuallyLe_indicator (h : f ≤ᶠ[l ⊓ 𝓟 s] g) :
+theorem indicator_eventuallyLE_indicator (h : f ≤ᶠ[l ⊓ 𝓟 s] g) :
     indicator s f ≤ᶠ[l] indicator s g :=
   (eventually_inf_principal.1 h).mono fun _ => indicator_rel_indicator le_rfl
-#align indicator_eventually_le_indicator indicator_eventuallyLe_indicator
+#align indicator_eventually_le_indicator indicator_eventuallyLE_indicator
 
 end Order
 
chore: tidy various files (#2236)
Diff
@@ -89,13 +89,13 @@ theorem Antitone.tendsto_indicator {ι} [Preorder ι] [Zero β] (s : ι → Set
     simp only [indicator_of_mem, h, mem_interᵢ.2 h, tendsto_const_pure]
 #align antitone.tendsto_indicator Antitone.tendsto_indicator
 
-theorem tendsto_indicator_bUnion_finset {ι} [Zero β] (s : ι → Set α) (f : α → β) (a : α) :
+theorem tendsto_indicator_bunionᵢ_finset {ι} [Zero β] (s : ι → Set α) (f : α → β) (a : α) :
     Tendsto (fun n : Finset ι => indicator (⋃ i ∈ n, s i) f a) atTop
       (pure <| indicator (unionᵢ s) f a) := by
   rw [unionᵢ_eq_unionᵢ_finset s]
   refine' Monotone.tendsto_indicator (fun n : Finset ι => ⋃ i ∈ n, s i) _ f a
   exact fun t₁ t₂ => bunionᵢ_subset_bunionᵢ_left
-#align tendsto_indicator_bUnion_finset tendsto_indicator_bUnion_finset
+#align tendsto_indicator_bUnion_finset tendsto_indicator_bunionᵢ_finset
 
 theorem Filter.EventuallyEq.support [Zero β] {f g : α → β} {l : Filter α} (h : f =ᶠ[l] g) :
     Function.support f =ᶠ[l] Function.support g := by
@@ -115,4 +115,3 @@ theorem Filter.EventuallyEq.indicator_zero [Zero β] {l : Filter α} {f : α →
   refine' hf.indicator.trans _
   rw [indicator_zero']
 #align filter.eventually_eq.indicator_zero Filter.EventuallyEq.indicator_zero
-
feat: port Order.Filter.IndicatorFunction (#1821)

Dependencies 7 + 266

267 files ported (97.4%)
114824 lines ported (97.4%)
Show graph

The unported dependencies are