l3lab/ntp-mathlib huggingface dataset:
@[to_additive]
theorem equicontinuous_of_equicontinuousAt_one {ι G M hom : Type*} [TopologicalSpace G]
    [UniformSpace M] [Group G] [Group M] [TopologicalGroup G] [UniformGroup M]
    [MonoidHomClass hom G M] (F : ι → hom)
    (hf : EquicontinuousAt ((↑) ∘ F) (1 : G)) :
    Equicontinuous ((↑) ∘ F) := by
  rw [equicontinuous_iff_continuous]
  rw [equicontinuousAt_iff_continuousAt] at hf
  let φ : G →* (ι →ᵤ M) :=
    { toFun := swap ((↑) ∘ F)
      map_one' := by dsimp [UniformFun]; ext; exact map_one _
      map_mul' := fun a b => by dsimp [UniformFun]; ext; exact map_mul _ _ _ }
  

Proof state:
ι : Type u_1
G : Type u_2
M : Type u_3
hom : Type u_4
inst✝⁶ : TopologicalSpace G
inst✝⁵ : UniformSpace M
inst✝⁴ : Group G
inst✝³ : Group M
inst✝² : TopologicalGroup G
inst✝¹ : UniformGroup M
inst✝ : MonoidHomClass hom G M
F : ι → hom
hf : ContinuousAt (⇑UniformFun.ofFun ∘ swap (FunLike.coe ∘ F)) 1
φ : G →* ι →ᵤ M :=
  { toOneHom := { toFun := swap (FunLike.coe ∘ F), map_one' := (_ : swap (FunLike.coe ∘ F) 1 = 1) },
    map_mul' :=
      (_ :
        ∀ (a b : G),
          OneHom.toFun { toFun := swap (FunLike.coe ∘ F), map_one' := (_ : swap (FunLike.coe ∘ F) 1 = 1) } (a * b) =
            OneHom.toFun { toFun := swap (FunLike.coe ∘ F), map_one' := (_ : swap (FunLike.coe ∘ F) 1 = 1) } a *
              OneHom.toFun { toFun := swap (FunLike.coe ∘ F), map_one' := (_ : swap (FunLike.coe ∘ F) 1 = 1) } b) }
⊢ Continuous (⇑UniformFun.ofFun ∘ swap (FunLike.coe ∘ F))

Next tactic:
exact continuous_of_continuousAt_one φ hf
@[to_additive]
theorem uniformEquicontinuous_of_equicontinuousAt_one {ι G M hom : Type*} [UniformSpace G]
    [UniformSpace M] [Group G] [Group M] [UniformGroup G] [UniformGroup M] [MonoidHomClass hom G M]
    (F : ι → hom) (hf : EquicontinuousAt ((↑) ∘ F) (1 : G)) :
    UniformEquicontinuous ((↑) ∘ F) := by
  

Proof state:
ι : Type u_1
G : Type u_2
M : Type u_3
hom : Type u_4
inst✝⁶ : UniformSpace G
inst✝⁵ : UniformSpace M
inst✝⁴ : Group G
inst✝³ : Group M
inst✝² : UniformGroup G
inst✝¹ : UniformGroup M
inst✝ : MonoidHomClass hom G M
F : ι → hom
hf : EquicontinuousAt (FunLike.coe ∘ F) 1
⊢ UniformEquicontinuous (FunLike.coe ∘ F)

Next tactic:
rw [uniformEquicontinuous_iff_uniformContinuous]
@[to_additive]
theorem uniformEquicontinuous_of_equicontinuousAt_one {ι G M hom : Type*} [UniformSpace G]
    [UniformSpace M] [Group G] [Group M] [UniformGroup G] [UniformGroup M] [MonoidHomClass hom G M]
    (F : ι → hom) (hf : EquicontinuousAt ((↑) ∘ F) (1 : G)) :
    UniformEquicontinuous ((↑) ∘ F) := by
  rw [uniformEquicontinuous_iff_uniformContinuous]
  

Proof state:
ι : Type u_1
G : Type u_2
M : Type u_3
hom : Type u_4
inst✝⁶ : UniformSpace G
inst✝⁵ : UniformSpace M
inst✝⁴ : Group G
inst✝³ : Group M
inst✝² : UniformGroup G
inst✝¹ : UniformGroup M
inst✝ : MonoidHomClass hom G M
F : ι → hom
hf : EquicontinuousAt (FunLike.coe ∘ F) 1
⊢ UniformContinuous (⇑UniformFun.ofFun ∘ swap (FunLike.coe ∘ F))

Next tactic:
rw [equicontinuousAt_iff_continuousAt] at hf
@[to_additive]
theorem uniformEquicontinuous_of_equicontinuousAt_one {ι G M hom : Type*} [UniformSpace G]
    [UniformSpace M] [Group G] [Group M] [UniformGroup G] [UniformGroup M] [MonoidHomClass hom G M]
    (F : ι → hom) (hf : EquicontinuousAt ((↑) ∘ F) (1 : G)) :
    UniformEquicontinuous ((↑) ∘ F) := by
  rw [uniformEquicontinuous_iff_uniformContinuous]
  rw [equicontinuousAt_iff_continuousAt] at hf
  

Proof state:
ι : Type u_1
G : Type u_2
M : Type u_3
hom : Type u_4
inst✝⁶ : UniformSpace G
inst✝⁵ : UniformSpace M
inst✝⁴ : Group G
inst✝³ : Group M
inst✝² : UniformGroup G
inst✝¹ : UniformGroup M
inst✝ : MonoidHomClass hom G M
F : ι → hom
hf : ContinuousAt (⇑UniformFun.ofFun ∘ swap (FunLike.coe ∘ F)) 1
⊢ UniformContinuous (⇑UniformFun.ofFun ∘ swap (FunLike.coe ∘ F))

Next tactic:
let φ : G →* (ι →ᵤ M) :=
    { toFun := swap ((↑) ∘ F)
      map_one' := by dsimp [UniformFun]; ext; exact map_one _
      map_mul' := fun a b => by dsimp [UniformFun]; ext; exact map_mul _ _ _ }
@[to_additive]
theorem uniformEquicontinuous_of_equicontinuousAt_one {ι G M hom : Type*} [UniformSpace G]
    [UniformSpace M] [Group G] [Group M] [UniformGroup G] [UniformGroup M] [MonoidHomClass hom G M]
    (F : ι → hom) (hf : EquicontinuousAt ((↑) ∘ F) (1 : G)) :
    UniformEquicontinuous ((↑) ∘ F) := by
  rw [uniformEquicontinuous_iff_uniformContinuous]
  rw [equicontinuousAt_iff_continuousAt] at hf
  let φ : G →* (ι →ᵤ M) :=
    { toFun := swap ((↑) ∘ F)
      map_one' := by 

Proof state:
ι : Type u_1
G : Type u_2
M : Type u_3
hom : Type u_4
inst✝⁶ : UniformSpace G
inst✝⁵ : UniformSpace M
inst✝⁴ : Group G
inst✝³ : Group M
inst✝² : UniformGroup G
inst✝¹ : UniformGroup M
inst✝ : MonoidHomClass hom G M
F : ι → hom
hf : ContinuousAt (⇑UniformFun.ofFun ∘ swap (FunLike.coe ∘ F)) 1
⊢ swap (FunLike.coe ∘ F) 1 = 1

Next tactic:
dsimp [UniformFun]
@[to_additive]
theorem uniformEquicontinuous_of_equicontinuousAt_one {ι G M hom : Type*} [UniformSpace G]
    [UniformSpace M] [Group G] [Group M] [UniformGroup G] [UniformGroup M] [MonoidHomClass hom G M]
    (F : ι → hom) (hf : EquicontinuousAt ((↑) ∘ F) (1 : G)) :
    UniformEquicontinuous ((↑) ∘ F) := by
  rw [uniformEquicontinuous_iff_uniformContinuous]
  rw [equicontinuousAt_iff_continuousAt] at hf
  let φ : G →* (ι →ᵤ M) :=
    { toFun := swap ((↑) ∘ F)
      map_one' := by dsimp [UniformFun]; 

Proof state:
ι : Type u_1
G : Type u_2
M : Type u_3
hom : Type u_4
inst✝⁶ : UniformSpace G
inst✝⁵ : UniformSpace M
inst✝⁴ : Group G
inst✝³ : Group M
inst✝² : UniformGroup G
inst✝¹ : UniformGroup M
inst✝ : MonoidHomClass hom G M
F : ι → hom
hf : ContinuousAt (⇑UniformFun.ofFun ∘ swap (FunLike.coe ∘ F)) 1
⊢ swap (FunLike.coe ∘ F) 1 = 1

Next tactic:
ext
@[to_additive]
theorem uniformEquicontinuous_of_equicontinuousAt_one {ι G M hom : Type*} [UniformSpace G]
    [UniformSpace M] [Group G] [Group M] [UniformGroup G] [UniformGroup M] [MonoidHomClass hom G M]
    (F : ι → hom) (hf : EquicontinuousAt ((↑) ∘ F) (1 : G)) :
    UniformEquicontinuous ((↑) ∘ F) := by
  rw [uniformEquicontinuous_iff_uniformContinuous]
  rw [equicontinuousAt_iff_continuousAt] at hf
  let φ : G →* (ι →ᵤ M) :=
    { toFun := swap ((↑) ∘ F)
      map_one' := by dsimp [UniformFun]; ext; 

Proof state:
case h
ι : Type u_1
G : Type u_2
M : Type u_3
hom : Type u_4
inst✝⁶ : UniformSpace G
inst✝⁵ : UniformSpace M
inst✝⁴ : Group G
inst✝³ : Group M
inst✝² : UniformGroup G
inst✝¹ : UniformGroup M
inst✝ : MonoidHomClass hom G M
F : ι → hom
hf : ContinuousAt (⇑UniformFun.ofFun ∘ swap (FunLike.coe ∘ F)) 1
x✝ : ι
⊢ swap (FunLike.coe ∘ F) 1 x✝ = OfNat.ofNat 1 x✝

Next tactic:
exact map_one _
@[to_additive]
theorem uniformEquicontinuous_of_equicontinuousAt_one {ι G M hom : Type*} [UniformSpace G]
    [UniformSpace M] [Group G] [Group M] [UniformGroup G] [UniformGroup M] [MonoidHomClass hom G M]
    (F : ι → hom) (hf : EquicontinuousAt ((↑) ∘ F) (1 : G)) :
    UniformEquicontinuous ((↑) ∘ F) := by
  rw [uniformEquicontinuous_iff_uniformContinuous]
  rw [equicontinuousAt_iff_continuousAt] at hf
  let φ : G →* (ι →ᵤ M) :=
    { toFun := swap ((↑) ∘ F)
      map_one' := by dsimp [UniformFun]; ext; exact map_one _
      map_mul' := fun a b => by 

Proof state:
ι : Type u_1
G : Type u_2
M : Type u_3
hom : Type u_4
inst✝⁶ : UniformSpace G
inst✝⁵ : UniformSpace M
inst✝⁴ : Group G
inst✝³ : Group M
inst✝² : UniformGroup G
inst✝¹ : UniformGroup M
inst✝ : MonoidHomClass hom G M
F : ι → hom
hf : ContinuousAt (⇑UniformFun.ofFun ∘ swap (FunLike.coe ∘ F)) 1
a b : G
⊢ OneHom.toFun { toFun := swap (FunLike.coe ∘ F), map_one' := (_ : swap (FunLike.coe ∘ F) 1 = 1) } (a * b) =
    OneHom.toFun { toFun := swap (FunLike.coe ∘ F), map_one' := (_ : swap (FunLike.coe ∘ F) 1 = 1) } a *
      OneHom.toFun { toFun := swap (FunLike.coe ∘ F), map_one' := (_ : swap (FunLike.coe ∘ F) 1 = 1) } b

Next tactic:
dsimp [UniformFun]
@[to_additive]
theorem uniformEquicontinuous_of_equicontinuousAt_one {ι G M hom : Type*} [UniformSpace G]
    [UniformSpace M] [Group G] [Group M] [UniformGroup G] [UniformGroup M] [MonoidHomClass hom G M]
    (F : ι → hom) (hf : EquicontinuousAt ((↑) ∘ F) (1 : G)) :
    UniformEquicontinuous ((↑) ∘ F) := by
  rw [uniformEquicontinuous_iff_uniformContinuous]
  rw [equicontinuousAt_iff_continuousAt] at hf
  let φ : G →* (ι →ᵤ M) :=
    { toFun := swap ((↑) ∘ F)
      map_one' := by dsimp [UniformFun]; ext; exact map_one _
      map_mul' := fun a b => by dsimp [UniformFun]; 

Proof state:
ι : Type u_1
G : Type u_2
M : Type u_3
hom : Type u_4
inst✝⁶ : UniformSpace G
inst✝⁵ : UniformSpace M
inst✝⁴ : Group G
inst✝³ : Group M
inst✝² : UniformGroup G
inst✝¹ : UniformGroup M
inst✝ : MonoidHomClass hom G M
F : ι → hom
hf : ContinuousAt (⇑UniformFun.ofFun ∘ swap (FunLike.coe ∘ F)) 1
a b : G
⊢ swap (FunLike.coe ∘ F) (a * b) = swap (FunLike.coe ∘ F) a * swap (FunLike.coe ∘ F) b

Next tactic:
ext
@[to_additive]
theorem uniformEquicontinuous_of_equicontinuousAt_one {ι G M hom : Type*} [UniformSpace G]
    [UniformSpace M] [Group G] [Group M] [UniformGroup G] [UniformGroup M] [MonoidHomClass hom G M]
    (F : ι → hom) (hf : EquicontinuousAt ((↑) ∘ F) (1 : G)) :
    UniformEquicontinuous ((↑) ∘ F) := by
  rw [uniformEquicontinuous_iff_uniformContinuous]
  rw [equicontinuousAt_iff_continuousAt] at hf
  let φ : G →* (ι →ᵤ M) :=
    { toFun := swap ((↑) ∘ F)
      map_one' := by dsimp [UniformFun]; ext; exact map_one _
      map_mul' := fun a b => by dsimp [UniformFun]; ext; 

Proof state:
case h
ι : Type u_1
G : Type u_2
M : Type u_3
hom : Type u_4
inst✝⁶ : UniformSpace G
inst✝⁵ : UniformSpace M
inst✝⁴ : Group G
inst✝³ : Group M
inst✝² : UniformGroup G
inst✝¹ : UniformGroup M
inst✝ : MonoidHomClass hom G M
F : ι → hom
hf : ContinuousAt (⇑UniformFun.ofFun ∘ swap (FunLike.coe ∘ F)) 1
a b : G
x✝ : ι
⊢ swap (FunLike.coe ∘ F) (a * b) x✝ = (swap (FunLike.coe ∘ F) a * swap (FunLike.coe ∘ F) b) x✝

Next tactic:
exact map_mul _ _ _
@[to_additive]
theorem uniformEquicontinuous_of_equicontinuousAt_one {ι G M hom : Type*} [UniformSpace G]
    [UniformSpace M] [Group G] [Group M] [UniformGroup G] [UniformGroup M] [MonoidHomClass hom G M]
    (F : ι → hom) (hf : EquicontinuousAt ((↑) ∘ F) (1 : G)) :
    UniformEquicontinuous ((↑) ∘ F) := by
  rw [uniformEquicontinuous_iff_uniformContinuous]
  rw [equicontinuousAt_iff_continuousAt] at hf
  let φ : G →* (ι →ᵤ M) :=
    { toFun := swap ((↑) ∘ F)
      map_one' := by dsimp [UniformFun]; ext; exact map_one _
      map_mul' := fun a b => by dsimp [UniformFun]; ext; exact map_mul _ _ _ }
  

Proof state:
ι : Type u_1
G : Type u_2
M : Type u_3
hom : Type u_4
inst✝⁶ : UniformSpace G
inst✝⁵ : UniformSpace M
inst✝⁴ : Group G
inst✝³ : Group M
inst✝² : UniformGroup G
inst✝¹ : UniformGroup M
inst✝ : MonoidHomClass hom G M
F : ι → hom
hf : ContinuousAt (⇑UniformFun.ofFun ∘ swap (FunLike.coe ∘ F)) 1
φ : G →* ι →ᵤ M :=
  { toOneHom := { toFun := swap (FunLike.coe ∘ F), map_one' := (_ : swap (FunLike.coe ∘ F) 1 = 1) },
    map_mul' :=
      (_ :
        ∀ (a b : G),
          OneHom.toFun { toFun := swap (FunLike.coe ∘ F), map_one' := (_ : swap (FunLike.coe ∘ F) 1 = 1) } (a * b) =
            OneHom.toFun { toFun := swap (FunLike.coe ∘ F), map_one' := (_ : swap (FunLike.coe ∘ F) 1 = 1) } a *
              OneHom.toFun { toFun := swap (FunLike.coe ∘ F), map_one' := (_ : swap (FunLike.coe ∘ F) 1 = 1) } b) }
⊢ UniformContinuous (⇑UniformFun.ofFun ∘ swap (FunLike.coe ∘ F))

Next tactic:
exact uniformContinuous_of_continuousAt_one φ hf
/-- The trace map from a finite field to its prime field is nongedenerate. -/
theorem trace_to_zmod_nondegenerate (F : Type*) [Field F] [Finite F]
    [Algebra (ZMod (ringChar F)) F] {a : F} (ha : a ≠ 0) :
    ∃ b : F, Algebra.trace (ZMod (ringChar F)) F (a * b) ≠ 0 := by
  

Proof state:
F : Type u_1
inst✝² : Field F
inst✝¹ : Finite F
inst✝ : Algebra (ZMod (ringChar F)) F
a : F
ha : a ≠ 0
⊢ ∃ b, (Algebra.trace (ZMod (ringChar F)) F) (a * b) ≠ 0

Next tactic:
haveI : Fact (ringChar F).Prime := ⟨CharP.char_is_prime F _⟩
/-- The trace map from a finite field to its prime field is nongedenerate. -/
theorem trace_to_zmod_nondegenerate (F : Type*) [Field F] [Finite F]
    [Algebra (ZMod (ringChar F)) F] {a : F} (ha : a ≠ 0) :
    ∃ b : F, Algebra.trace (ZMod (ringChar F)) F (a * b) ≠ 0 := by
  haveI : Fact (ringChar F).Prime := ⟨CharP.char_is_prime F _⟩
  

Proof state:
F : Type u_1
inst✝² : Field F
inst✝¹ : Finite F
inst✝ : Algebra (ZMod (ringChar F)) F
a : F
ha : a ≠ 0
this : Fact (Nat.Prime (ringChar F))
⊢ ∃ b, (Algebra.trace (ZMod (ringChar F)) F) (a * b) ≠ 0

Next tactic:
have htr := traceForm_nondegenerate (ZMod (ringChar F)) F a
/-- The trace map from a finite field to its prime field is nongedenerate. -/
theorem trace_to_zmod_nondegenerate (F : Type*) [Field F] [Finite F]
    [Algebra (ZMod (ringChar F)) F] {a : F} (ha : a ≠ 0) :
    ∃ b : F, Algebra.trace (ZMod (ringChar F)) F (a * b) ≠ 0 := by
  haveI : Fact (ringChar F).Prime := ⟨CharP.char_is_prime F _⟩
  have htr := traceForm_nondegenerate (ZMod (ringChar F)) F a
  

Proof state:
F : Type u_1
inst✝² : Field F
inst✝¹ : Finite F
inst✝ : Algebra (ZMod (ringChar F)) F
a : F
ha : a ≠ 0
this : Fact (Nat.Prime (ringChar F))
htr : (∀ (n : F), BilinForm.bilin (Algebra.traceForm (ZMod (ringChar F)) F) a n = 0) → a = 0
⊢ ∃ b, (Algebra.trace (ZMod (ringChar F)) F) (a * b) ≠ 0

Next tactic:
simp_rw [Algebra.traceForm_apply] at htr
/-- The trace map from a finite field to its prime field is nongedenerate. -/
theorem trace_to_zmod_nondegenerate (F : Type*) [Field F] [Finite F]
    [Algebra (ZMod (ringChar F)) F] {a : F} (ha : a ≠ 0) :
    ∃ b : F, Algebra.trace (ZMod (ringChar F)) F (a * b) ≠ 0 := by
  haveI : Fact (ringChar F).Prime := ⟨CharP.char_is_prime F _⟩
  have htr := traceForm_nondegenerate (ZMod (ringChar F)) F a
  simp_rw [Algebra.traceForm_apply] at htr
  

Proof state:
F : Type u_1
inst✝² : Field F
inst✝¹ : Finite F
inst✝ : Algebra (ZMod (ringChar F)) F
a : F
ha : a ≠ 0
this : Fact (Nat.Prime (ringChar F))
htr : (∀ (n : F), (Algebra.trace (ZMod (ringChar F)) F) (a * n) = 0) → a = 0
⊢ ∃ b, (Algebra.trace (ZMod (ringChar F)) F) (a * b) ≠ 0

Next tactic:
by_contra! hf
/-- The trace map from a finite field to its prime field is nongedenerate. -/
theorem trace_to_zmod_nondegenerate (F : Type*) [Field F] [Finite F]
    [Algebra (ZMod (ringChar F)) F] {a : F} (ha : a ≠ 0) :
    ∃ b : F, Algebra.trace (ZMod (ringChar F)) F (a * b) ≠ 0 := by
  haveI : Fact (ringChar F).Prime := ⟨CharP.char_is_prime F _⟩
  have htr := traceForm_nondegenerate (ZMod (ringChar F)) F a
  simp_rw [Algebra.traceForm_apply] at htr
  by_contra! hf
  

Proof state:
F : Type u_1
inst✝² : Field F
inst✝¹ : Finite F
inst✝ : Algebra (ZMod (ringChar F)) F
a : F
ha : a ≠ 0
this : Fact (Nat.Prime (ringChar F))
htr : (∀ (n : F), (Algebra.trace (ZMod (ringChar F)) F) (a * n) = 0) → a = 0
hf : ∀ (b : F), (Algebra.trace (ZMod (ringChar F)) F) (a * b) = 0
⊢ False

Next tactic:
exact ha (htr hf)
theorem _root_.IsOpen.measure_eq_zero_iff (hU : IsOpen U) : μ U = 0 ↔ U = ∅ := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
m : MeasurableSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : T2Space Y
μ ν : Measure X
inst✝ : IsOpenPosMeasure μ
s U F : Set X
x : X
hU : IsOpen U
⊢ ↑↑μ U = 0 ↔ U = ∅

Next tactic:
simpa only [not_lt, nonpos_iff_eq_zero, not_nonempty_iff_eq_empty] using
    not_congr (hU.measure_pos_iff μ)
theorem _root_.IsOpen.measure_zero_iff_eq_empty (hU : IsOpen U) :
    μ U = 0 ↔ U = ∅ :=
  ⟨fun h ↦ (hU.measure_eq_zero_iff μ).mp h, fun h ↦ by 

Proof state:
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
m : MeasurableSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : T2Space Y
μ ν : Measure X
inst✝ : IsOpenPosMeasure μ
s U F : Set X
x : X
hU : IsOpen U
h : U = ∅
⊢ ↑↑μ U = 0

Next tactic:
simp [h]
theorem _root_.IsOpen.ae_eq_empty_iff_eq (hU : IsOpen U) :
    U =ᵐ[μ] (∅ : Set X) ↔ U = ∅ := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
m : MeasurableSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : T2Space Y
μ ν : Measure X
inst✝ : IsOpenPosMeasure μ
s U F : Set X
x : X
hU : IsOpen U
⊢ U =ᶠ[ae μ] ∅ ↔ U = ∅

Next tactic:
rw [ae_eq_empty, hU.measure_zero_iff_eq_empty]
theorem _root_.IsClosed.ae_eq_univ_iff_eq (hF : IsClosed F) :
    F =ᵐ[μ] univ ↔ F = univ := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
m : MeasurableSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : T2Space Y
μ ν : Measure X
inst✝ : IsOpenPosMeasure μ
s U F : Set X
x : X
hF : IsClosed F
⊢ F =ᶠ[ae μ] univ ↔ F = univ

Next tactic:
refine' ⟨fun h ↦ _, fun h ↦ by rw [h]⟩
theorem _root_.IsClosed.ae_eq_univ_iff_eq (hF : IsClosed F) :
    F =ᵐ[μ] univ ↔ F = univ := by
  refine' ⟨fun h ↦ _, fun h ↦ by 

Proof state:
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
m : MeasurableSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : T2Space Y
μ ν : Measure X
inst✝ : IsOpenPosMeasure μ
s U F : Set X
x : X
hF : IsClosed F
h : F = univ
⊢ F =ᶠ[ae μ] univ

Next tactic:
rw [h]
theorem _root_.IsClosed.ae_eq_univ_iff_eq (hF : IsClosed F) :
    F =ᵐ[μ] univ ↔ F = univ := by
  refine' ⟨fun h ↦ _, fun h ↦ by rw [h]⟩
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
m : MeasurableSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : T2Space Y
μ ν : Measure X
inst✝ : IsOpenPosMeasure μ
s U F : Set X
x : X
hF : IsClosed F
h : F =ᶠ[ae μ] univ
⊢ F = univ

Next tactic:
rwa [ae_eq_univ, hF.isOpen_compl.measure_eq_zero_iff μ, compl_empty_iff] at h
theorem _root_.IsClosed.measure_eq_univ_iff_eq [OpensMeasurableSpace X] [IsFiniteMeasure μ]
    (hF : IsClosed F) :
    μ F = μ univ ↔ F = univ := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝⁵ : TopologicalSpace X
m : MeasurableSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : T2Space Y
μ ν : Measure X
inst✝² : IsOpenPosMeasure μ
s U F : Set X
x : X
inst✝¹ : OpensMeasurableSpace X
inst✝ : IsFiniteMeasure μ
hF : IsClosed F
⊢ ↑↑μ F = ↑↑μ univ ↔ F = univ

Next tactic:
rw [← ae_eq_univ_iff_measure_eq hF.measurableSet.nullMeasurableSet, hF.ae_eq_univ_iff_eq]
theorem _root_.IsClosed.measure_eq_one_iff_eq_univ [OpensMeasurableSpace X] [IsProbabilityMeasure μ]
    (hF : IsClosed F) :
    μ F = 1 ↔ F = univ := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝⁵ : TopologicalSpace X
m : MeasurableSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : T2Space Y
μ ν : Measure X
inst✝² : IsOpenPosMeasure μ
s U F : Set X
x : X
inst✝¹ : OpensMeasurableSpace X
inst✝ : IsProbabilityMeasure μ
hF : IsClosed F
⊢ ↑↑μ F = 1 ↔ F = univ

Next tactic:
rw [← measure_univ (μ := μ), hF.measure_eq_univ_iff_eq]
/-- If two functions are a.e. equal on an open set and are continuous on this set, then they are
equal on this set. -/
theorem eqOn_open_of_ae_eq {f g : X → Y} (h : f =ᵐ[μ.restrict U] g) (hU : IsOpen U)
    (hf : ContinuousOn f U) (hg : ContinuousOn g U) : EqOn f g U := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
m : MeasurableSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : T2Space Y
μ ν : Measure X
inst✝ : IsOpenPosMeasure μ
s U F : Set X
x : X
f g : X → Y
h : f =ᶠ[ae (restrict μ U)] g
hU : IsOpen U
hf : ContinuousOn f U
hg : ContinuousOn g U
⊢ EqOn f g U

Next tactic:
replace h := ae_imp_of_ae_restrict h
/-- If two functions are a.e. equal on an open set and are continuous on this set, then they are
equal on this set. -/
theorem eqOn_open_of_ae_eq {f g : X → Y} (h : f =ᵐ[μ.restrict U] g) (hU : IsOpen U)
    (hf : ContinuousOn f U) (hg : ContinuousOn g U) : EqOn f g U := by
  replace h := ae_imp_of_ae_restrict h
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
m : MeasurableSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : T2Space Y
μ ν : Measure X
inst✝ : IsOpenPosMeasure μ
s U F : Set X
x : X
f g : X → Y
hU : IsOpen U
hf : ContinuousOn f U
hg : ContinuousOn g U
h : ∀ᵐ (x : X) ∂μ, x ∈ U → f x = g x
⊢ EqOn f g U

Next tactic:
simp only [EventuallyEq, ae_iff, not_imp] at h
/-- If two functions are a.e. equal on an open set and are continuous on this set, then they are
equal on this set. -/
theorem eqOn_open_of_ae_eq {f g : X → Y} (h : f =ᵐ[μ.restrict U] g) (hU : IsOpen U)
    (hf : ContinuousOn f U) (hg : ContinuousOn g U) : EqOn f g U := by
  replace h := ae_imp_of_ae_restrict h
  simp only [EventuallyEq, ae_iff, not_imp] at h
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
m : MeasurableSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : T2Space Y
μ ν : Measure X
inst✝ : IsOpenPosMeasure μ
s U F : Set X
x : X
f g : X → Y
hU : IsOpen U
hf : ContinuousOn f U
hg : ContinuousOn g U
h : ↑↑μ {a | a ∈ U ∧ ¬f a = g a} = 0
⊢ EqOn f g U

Next tactic:
have : IsOpen (U ∩ { a | f a ≠ g a }) := by
    refine' isOpen_iff_mem_nhds.mpr fun a ha => inter_mem (hU.mem_nhds ha.1) _
    rcases ha with ⟨ha : a ∈ U, ha' : (f a, g a) ∈ (diagonal Y)ᶜ⟩
    exact
      (hf.continuousAt (hU.mem_nhds ha)).prod_mk_nhds (hg.continuousAt (hU.mem_nhds ha))
        (isClosed_diagonal.isOpen_compl.mem_nhds ha')
/-- If two functions are a.e. equal on an open set and are continuous on this set, then they are
equal on this set. -/
theorem eqOn_open_of_ae_eq {f g : X → Y} (h : f =ᵐ[μ.restrict U] g) (hU : IsOpen U)
    (hf : ContinuousOn f U) (hg : ContinuousOn g U) : EqOn f g U := by
  replace h := ae_imp_of_ae_restrict h
  simp only [EventuallyEq, ae_iff, not_imp] at h
  have : IsOpen (U ∩ { a | f a ≠ g a }) := by
    

Proof state:
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
m : MeasurableSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : T2Space Y
μ ν : Measure X
inst✝ : IsOpenPosMeasure μ
s U F : Set X
x : X
f g : X → Y
hU : IsOpen U
hf : ContinuousOn f U
hg : ContinuousOn g U
h : ↑↑μ {a | a ∈ U ∧ ¬f a = g a} = 0
⊢ IsOpen (U ∩ {a | f a ≠ g a})

Next tactic:
refine' isOpen_iff_mem_nhds.mpr fun a ha => inter_mem (hU.mem_nhds ha.1) _
/-- If two functions are a.e. equal on an open set and are continuous on this set, then they are
equal on this set. -/
theorem eqOn_open_of_ae_eq {f g : X → Y} (h : f =ᵐ[μ.restrict U] g) (hU : IsOpen U)
    (hf : ContinuousOn f U) (hg : ContinuousOn g U) : EqOn f g U := by
  replace h := ae_imp_of_ae_restrict h
  simp only [EventuallyEq, ae_iff, not_imp] at h
  have : IsOpen (U ∩ { a | f a ≠ g a }) := by
    refine' isOpen_iff_mem_nhds.mpr fun a ha => inter_mem (hU.mem_nhds ha.1) _
    

Proof state:
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
m : MeasurableSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : T2Space Y
μ ν : Measure X
inst✝ : IsOpenPosMeasure μ
s U F : Set X
x : X
f g : X → Y
hU : IsOpen U
hf : ContinuousOn f U
hg : ContinuousOn g U
h : ↑↑μ {a | a ∈ U ∧ ¬f a = g a} = 0
a : X
ha : a ∈ U ∩ {a | f a ≠ g a}
⊢ {a | f a ≠ g a} ∈ 𝓝 a

Next tactic:
rcases ha with ⟨ha : a ∈ U, ha' : (f a, g a) ∈ (diagonal Y)ᶜ⟩
/-- If two functions are a.e. equal on an open set and are continuous on this set, then they are
equal on this set. -/
theorem eqOn_open_of_ae_eq {f g : X → Y} (h : f =ᵐ[μ.restrict U] g) (hU : IsOpen U)
    (hf : ContinuousOn f U) (hg : ContinuousOn g U) : EqOn f g U := by
  replace h := ae_imp_of_ae_restrict h
  simp only [EventuallyEq, ae_iff, not_imp] at h
  have : IsOpen (U ∩ { a | f a ≠ g a }) := by
    refine' isOpen_iff_mem_nhds.mpr fun a ha => inter_mem (hU.mem_nhds ha.1) _
    rcases ha with ⟨ha : a ∈ U, ha' : (f a, g a) ∈ (diagonal Y)ᶜ⟩
    

Proof state:
case intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
m : MeasurableSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : T2Space Y
μ ν : Measure X
inst✝ : IsOpenPosMeasure μ
s U F : Set X
x : X
f g : X → Y
hU : IsOpen U
hf : ContinuousOn f U
hg : ContinuousOn g U
h : ↑↑μ {a | a ∈ U ∧ ¬f a = g a} = 0
a : X
ha : a ∈ U
ha' : (f a, g a) ∈ (diagonal Y)ᶜ
⊢ {a | f a ≠ g a} ∈ 𝓝 a

Next tactic:
exact
      (hf.continuousAt (hU.mem_nhds ha)).prod_mk_nhds (hg.continuousAt (hU.mem_nhds ha))
        (isClosed_diagonal.isOpen_compl.mem_nhds ha')