l3lab/ntp-mathlib huggingface dataset:
theorem iff_unop {A B X Y : Cᵒᵖ} {f : A ⟶ X} {i : A ⟶ B} {p : X ⟶ Y} {g : B ⟶ Y}
    (sq : CommSq f i p g) : HasLift sq ↔ HasLift sq.unop := by
  

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
A✝ B✝ X✝ Y✝ : C
f✝ : A✝ ⟶ X✝
i✝ : A✝ ⟶ B✝
p✝ : X✝ ⟶ Y✝
g✝ : B✝ ⟶ Y✝
sq✝ : CommSq f✝ i✝ p✝ g✝
A B X Y : Cᵒᵖ
f : A ⟶ X
i : A ⟶ B
p : X ⟶ Y
g : B ⟶ Y
sq : CommSq f i p g
⊢ HasLift sq ↔ HasLift (_ : CommSq g.unop p.unop i.unop f.unop)

Next tactic:
rw [iff, iff]
theorem iff_unop {A B X Y : Cᵒᵖ} {f : A ⟶ X} {i : A ⟶ B} {p : X ⟶ Y} {g : B ⟶ Y}
    (sq : CommSq f i p g) : HasLift sq ↔ HasLift sq.unop := by
  rw [iff, iff]
  

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
A✝ B✝ X✝ Y✝ : C
f✝ : A✝ ⟶ X✝
i✝ : A✝ ⟶ B✝
p✝ : X✝ ⟶ Y✝
g✝ : B✝ ⟶ Y✝
sq✝ : CommSq f✝ i✝ p✝ g✝
A B X Y : Cᵒᵖ
f : A ⟶ X
i : A ⟶ B
p : X ⟶ Y
g : B ⟶ Y
sq : CommSq f i p g
⊢ Nonempty (LiftStruct sq) ↔ Nonempty (LiftStruct (_ : CommSq g.unop p.unop i.unop f.unop))

Next tactic:
exact Nonempty.congr (LiftStruct.unopEquiv sq).toFun (LiftStruct.unopEquiv sq).invFun
/-- We put a partial order on ℂ so that `z ≤ w` exactly if `w - z` is real and nonnegative.
Complex numbers with different imaginary parts are incomparable.
-/
protected def partialOrder : PartialOrder ℂ where
  le z w := z.re ≤ w.re ∧ z.im = w.im
  lt z w := z.re < w.re ∧ z.im = w.im
  lt_iff_le_not_le z w := by
    

Proof state:
z w : ℂ
⊢ z < w ↔ z ≤ w ∧ ¬w ≤ z

Next tactic:
dsimp
/-- We put a partial order on ℂ so that `z ≤ w` exactly if `w - z` is real and nonnegative.
Complex numbers with different imaginary parts are incomparable.
-/
protected def partialOrder : PartialOrder ℂ where
  le z w := z.re ≤ w.re ∧ z.im = w.im
  lt z w := z.re < w.re ∧ z.im = w.im
  lt_iff_le_not_le z w := by
    dsimp
    

Proof state:
z w : ℂ
⊢ z.re < w.re ∧ z.im = w.im ↔ (z.re ≤ w.re ∧ z.im = w.im) ∧ ¬(w.re ≤ z.re ∧ w.im = z.im)

Next tactic:
rw [lt_iff_le_not_le]
/-- We put a partial order on ℂ so that `z ≤ w` exactly if `w - z` is real and nonnegative.
Complex numbers with different imaginary parts are incomparable.
-/
protected def partialOrder : PartialOrder ℂ where
  le z w := z.re ≤ w.re ∧ z.im = w.im
  lt z w := z.re < w.re ∧ z.im = w.im
  lt_iff_le_not_le z w := by
    dsimp
    rw [lt_iff_le_not_le]
    

Proof state:
z w : ℂ
⊢ (z.re ≤ w.re ∧ ¬w.re ≤ z.re) ∧ z.im = w.im ↔ (z.re ≤ w.re ∧ z.im = w.im) ∧ ¬(w.re ≤ z.re ∧ w.im = z.im)

Next tactic:
tauto
@[simp, norm_cast]
theorem real_le_real {x y : ℝ} : (x : ℂ) ≤ (y : ℂ) ↔ x ≤ y := by 

Proof state:
x y : ℝ
⊢ ↑x ≤ ↑y ↔ x ≤ y

Next tactic:
simp [le_def, ofReal']
@[simp, norm_cast]
theorem real_lt_real {x y : ℝ} : (x : ℂ) < (y : ℂ) ↔ x < y := by 

Proof state:
x y : ℝ
⊢ ↑x < ↑y ↔ x < y

Next tactic:
simp [lt_def, ofReal']
theorem not_le_iff {z w : ℂ} : ¬z ≤ w ↔ w.re < z.re ∨ z.im ≠ w.im := by
  

Proof state:
z w : ℂ
⊢ ¬z ≤ w ↔ w.re < z.re ∨ z.im ≠ w.im

Next tactic:
rw [le_def, not_and_or, not_le]
theorem not_lt_iff {z w : ℂ} : ¬z < w ↔ w.re ≤ z.re ∨ z.im ≠ w.im := by
  

Proof state:
z w : ℂ
⊢ ¬z < w ↔ w.re ≤ z.re ∨ z.im ≠ w.im

Next tactic:
rw [lt_def, not_and_or, not_lt]
theorem eq_re_of_ofReal_le {r : ℝ} {z : ℂ} (hz : (r : ℂ) ≤ z) : z = z.re := by
  

Proof state:
r : ℝ
z : ℂ
hz : ↑r ≤ z
⊢ z = ↑z.re

Next tactic:
apply Complex.ext
theorem eq_re_of_ofReal_le {r : ℝ} {z : ℂ} (hz : (r : ℂ) ≤ z) : z = z.re := by
  apply Complex.ext
  

Proof state:
case a
r : ℝ
z : ℂ
hz : ↑r ≤ z
⊢ z.re = (↑z.re).re
case a r : ℝ z : ℂ hz : ↑r ≤ z ⊢ z.im = (↑z.re).im

Next tactic:
rfl
theorem eq_re_of_ofReal_le {r : ℝ} {z : ℂ} (hz : (r : ℂ) ≤ z) : z = z.re := by
  apply Complex.ext
  rfl
  

Proof state:
case a
r : ℝ
z : ℂ
hz : ↑r ≤ z
⊢ z.im = (↑z.re).im

Next tactic:
simp only [← (Complex.le_def.1 hz).2, Complex.zero_im, Complex.ofReal_im]
@[simp]
lemma re_eq_abs {z : ℂ} : z.re = abs z ↔ 0 ≤ z :=
  have : 0 ≤ abs z := map_nonneg abs z
  ⟨fun h ↦ ⟨h.symm ▸ this, (abs_re_eq_abs.1 <| h.symm ▸ _root_.abs_of_nonneg this).symm⟩,
    fun ⟨h₁, h₂⟩ ↦ by 

Proof state:
z : ℂ
this : 0 ≤ abs z
x✝ : 0 ≤ z
h₁ : 0.re ≤ z.re
h₂ : 0.im = z.im
⊢ z.re = abs z

Next tactic:
rw [← abs_re_eq_abs.2 h₂.symm, _root_.abs_of_nonneg h₁]
@[simp]
lemma neg_re_eq_abs {z : ℂ} : -z.re = abs z ↔ z ≤ 0 := by
  

Proof state:
z : ℂ
⊢ -z.re = abs z ↔ z ≤ 0

Next tactic:
rw [← neg_re, ← abs.map_neg, re_eq_abs]
@[simp]
lemma neg_re_eq_abs {z : ℂ} : -z.re = abs z ↔ z ≤ 0 := by
  rw [← neg_re, ← abs.map_neg, re_eq_abs]
  

Proof state:
z : ℂ
⊢ 0 ≤ -z ↔ z ≤ 0

Next tactic:
exact neg_nonneg.and <| eq_comm.trans neg_eq_zero
@[simp]
lemma re_eq_neg_abs {z : ℂ} : z.re = -abs z ↔ z ≤ 0 := by 

Proof state:
z : ℂ
⊢ z.re = -abs z ↔ z ≤ 0

Next tactic:
rw [← neg_eq_iff_eq_neg, neg_re_eq_abs]
theorem finite_stableUnderComposition : StableUnderComposition @Finite := by
  

Proof state:
⊢ StableUnderComposition @Finite

Next tactic:
introv R hf hg
theorem finite_stableUnderComposition : StableUnderComposition @Finite := by
  introv R hf hg
  

Proof state:
R S T : Type u_1
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : CommRing T
f : R →+* S
g : S →+* T
hf : Finite f
hg : Finite g
⊢ Finite (comp g f)

Next tactic:
exact hg.comp hf
theorem finite_respectsIso : RespectsIso @Finite := by
  

Proof state:
⊢ RespectsIso @Finite

Next tactic:
apply finite_stableUnderComposition.respectsIso
theorem finite_respectsIso : RespectsIso @Finite := by
  apply finite_stableUnderComposition.respectsIso
  

Proof state:
⊢ ∀ {R S : Type u_1} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), Finite (RingEquiv.toRingHom e)

Next tactic:
intros
theorem finite_respectsIso : RespectsIso @Finite := by
  apply finite_stableUnderComposition.respectsIso
  intros
  

Proof state:
R✝ S✝ : Type u_1
inst✝¹ : CommRing R✝
inst✝ : CommRing S✝
e✝ : R✝ ≃+* S✝
⊢ Finite (RingEquiv.toRingHom e✝)

Next tactic:
exact Finite.of_surjective _ (RingEquiv.toEquiv _).surjective
theorem finite_stableUnderBaseChange : StableUnderBaseChange @Finite := by
  

Proof state:
⊢ StableUnderBaseChange @Finite

Next tactic:
refine StableUnderBaseChange.mk _ finite_respectsIso ?_
theorem finite_stableUnderBaseChange : StableUnderBaseChange @Finite := by
  refine StableUnderBaseChange.mk _ finite_respectsIso ?_
  

Proof state:
⊢ ∀ ⦃R S T : Type u_1⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]
    [inst_4 : Algebra R T], Finite (algebraMap R T) → Finite includeLeftRingHom

Next tactic:
classical
  introv h
  replace h : Module.Finite R T := by
    rw [RingHom.Finite] at h; convert h; ext; intros; simp_rw [Algebra.smul_def]; rfl
  suffices Module.Finite S (S ⊗[R] T) by
    rw [RingHom.Finite]; convert this; congr; ext; intros; simp_rw [Algebra.smul_def]; rfl
  exact inferInstance
theorem finite_stableUnderBaseChange : StableUnderBaseChange @Finite := by
  refine StableUnderBaseChange.mk _ finite_respectsIso ?_
  classical
  

Proof state:
⊢ ∀ ⦃R S T : Type u_1⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]
    [inst_4 : Algebra R T], Finite (algebraMap R T) → Finite includeLeftRingHom

Next tactic:
introv h
theorem finite_stableUnderBaseChange : StableUnderBaseChange @Finite := by
  refine StableUnderBaseChange.mk _ finite_respectsIso ?_
  classical
  introv h
  

Proof state:
R S T : Type u_1
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : CommRing T
inst✝¹ : Algebra R S
inst✝ : Algebra R T
h : Finite (algebraMap R T)
⊢ Finite includeLeftRingHom

Next tactic:
replace h : Module.Finite R T := by
    rw [RingHom.Finite] at h; convert h; ext; intros; simp_rw [Algebra.smul_def]; rfl
theorem finite_stableUnderBaseChange : StableUnderBaseChange @Finite := by
  refine StableUnderBaseChange.mk _ finite_respectsIso ?_
  classical
  introv h
  replace h : Module.Finite R T := by
    

Proof state:
R S T : Type u_1
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : CommRing T
inst✝¹ : Algebra R S
inst✝ : Algebra R T
h : Finite (algebraMap R T)
⊢ Module.Finite R T

Next tactic:
rw [RingHom.Finite] at h
theorem finite_stableUnderBaseChange : StableUnderBaseChange @Finite := by
  refine StableUnderBaseChange.mk _ finite_respectsIso ?_
  classical
  introv h
  replace h : Module.Finite R T := by
    rw [RingHom.Finite] at h; 

Proof state:
R S T : Type u_1
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : CommRing T
inst✝¹ : Algebra R S
inst✝ : Algebra R T
h : Module.Finite R T
⊢ Module.Finite R T

Next tactic:
convert h
theorem finite_stableUnderBaseChange : StableUnderBaseChange @Finite := by
  refine StableUnderBaseChange.mk _ finite_respectsIso ?_
  classical
  introv h
  replace h : Module.Finite R T := by
    rw [RingHom.Finite] at h; convert h; 

Proof state:
case h.e'_5.h.e'_5
R S T : Type u_1
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : CommRing T
inst✝¹ : Algebra R S
inst✝ : Algebra R T
h : Module.Finite R T
⊢ inst✝ = toAlgebra (algebraMap R T)

Next tactic:
ext
theorem finite_stableUnderBaseChange : StableUnderBaseChange @Finite := by
  refine StableUnderBaseChange.mk _ finite_respectsIso ?_
  classical
  introv h
  replace h : Module.Finite R T := by
    rw [RingHom.Finite] at h; convert h; ext; 

Proof state:
case h.e'_5.h.e'_5.h
R S T : Type u_1
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : CommRing T
inst✝¹ : Algebra R S
inst✝ : Algebra R T
h : Module.Finite R T
r✝ : R
x✝ : T
⊢ (let_fun I := inst✝;
    r✝ • x✝) =
    r✝ • x✝

Next tactic:
intros
theorem finite_stableUnderBaseChange : StableUnderBaseChange @Finite := by
  refine StableUnderBaseChange.mk _ finite_respectsIso ?_
  classical
  introv h
  replace h : Module.Finite R T := by
    rw [RingHom.Finite] at h; convert h; ext; intros; 

Proof state:
case h.e'_5.h.e'_5.h
R S T : Type u_1
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : CommRing T
inst✝¹ : Algebra R S
inst✝ : Algebra R T
h : Module.Finite R T
r✝ : R
x✝ : T
⊢ (let_fun I := inst✝;
    r✝ • x✝) =
    r✝ • x✝

Next tactic:
simp_rw [Algebra.smul_def]
theorem finite_stableUnderBaseChange : StableUnderBaseChange @Finite := by
  refine StableUnderBaseChange.mk _ finite_respectsIso ?_
  classical
  introv h
  replace h : Module.Finite R T := by
    rw [RingHom.Finite] at h; convert h; ext; intros; simp_rw [Algebra.smul_def]; 

Proof state:
case h.e'_5.h.e'_5.h
R S T : Type u_1
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : CommRing T
inst✝¹ : Algebra R S
inst✝ : Algebra R T
h : Module.Finite R T
r✝ : R
x✝ : T
⊢ (algebraMap R T) r✝ * x✝ = r✝ • x✝

Next tactic:
rfl
theorem finite_stableUnderBaseChange : StableUnderBaseChange @Finite := by
  refine StableUnderBaseChange.mk _ finite_respectsIso ?_
  classical
  introv h
  replace h : Module.Finite R T := by
    rw [RingHom.Finite] at h; convert h; ext; intros; simp_rw [Algebra.smul_def]; rfl
  

Proof state:
R S T : Type u_1
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : CommRing T
inst✝¹ : Algebra R S
inst✝ : Algebra R T
h : Module.Finite R T
⊢ Finite includeLeftRingHom

Next tactic:
suffices Module.Finite S (S ⊗[R] T) by
    rw [RingHom.Finite]; convert this; congr; ext; intros; simp_rw [Algebra.smul_def]; rfl
theorem finite_stableUnderBaseChange : StableUnderBaseChange @Finite := by
  refine StableUnderBaseChange.mk _ finite_respectsIso ?_
  classical
  introv h
  replace h : Module.Finite R T := by
    rw [RingHom.Finite] at h; convert h; ext; intros; simp_rw [Algebra.smul_def]; rfl
  suffices Module.Finite S (S ⊗[R] T) by
    

Proof state:
R S T : Type u_1
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : CommRing T
inst✝¹ : Algebra R S
inst✝ : Algebra R T
h : Module.Finite R T
this : Module.Finite S (S ⊗[R] T)
⊢ Finite includeLeftRingHom

Next tactic:
rw [RingHom.Finite]
theorem finite_stableUnderBaseChange : StableUnderBaseChange @Finite := by
  refine StableUnderBaseChange.mk _ finite_respectsIso ?_
  classical
  introv h
  replace h : Module.Finite R T := by
    rw [RingHom.Finite] at h; convert h; ext; intros; simp_rw [Algebra.smul_def]; rfl
  suffices Module.Finite S (S ⊗[R] T) by
    rw [RingHom.Finite]; 

Proof state:
R S T : Type u_1
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : CommRing T
inst✝¹ : Algebra R S
inst✝ : Algebra R T
h : Module.Finite R T
this : Module.Finite S (S ⊗[R] T)
⊢ Module.Finite S (S ⊗[R] T)

Next tactic:
convert this
theorem finite_stableUnderBaseChange : StableUnderBaseChange @Finite := by
  refine StableUnderBaseChange.mk _ finite_respectsIso ?_
  classical
  introv h
  replace h : Module.Finite R T := by
    rw [RingHom.Finite] at h; convert h; ext; intros; simp_rw [Algebra.smul_def]; rfl
  suffices Module.Finite S (S ⊗[R] T) by
    rw [RingHom.Finite]; convert this; 

Proof state:
case h.e'_5.h
R S T : Type u_1
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : CommRing T
inst✝¹ : Algebra R S
inst✝ : Algebra R T
h : Module.Finite R T
this : Module.Finite S (S ⊗[R] T)
e_4✝ : NonUnitalNonAssocSemiring.toAddCommMonoid = addCommMonoid
⊢ Algebra.toModule = leftModule

Next tactic:
congr
theorem finite_stableUnderBaseChange : StableUnderBaseChange @Finite := by
  refine StableUnderBaseChange.mk _ finite_respectsIso ?_
  classical
  introv h
  replace h : Module.Finite R T := by
    rw [RingHom.Finite] at h; convert h; ext; intros; simp_rw [Algebra.smul_def]; rfl
  suffices Module.Finite S (S ⊗[R] T) by
    rw [RingHom.Finite]; convert this; congr; 

Proof state:
case h.e'_5.h.h.e_5.h
R S T : Type u_1
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : CommRing T
inst✝¹ : Algebra R S
inst✝ : Algebra R T
h : Module.Finite R T
this : Module.Finite S (S ⊗[R] T)
e_4✝ : NonUnitalNonAssocSemiring.toAddCommMonoid = addCommMonoid
⊢ toAlgebra includeLeftRingHom = leftAlgebra

Next tactic:
ext
theorem finite_stableUnderBaseChange : StableUnderBaseChange @Finite := by
  refine StableUnderBaseChange.mk _ finite_respectsIso ?_
  classical
  introv h
  replace h : Module.Finite R T := by
    rw [RingHom.Finite] at h; convert h; ext; intros; simp_rw [Algebra.smul_def]; rfl
  suffices Module.Finite S (S ⊗[R] T) by
    rw [RingHom.Finite]; convert this; congr; ext; 

Proof state:
case h.e'_5.h.h.e_5.h.h
R S T : Type u_1
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : CommRing T
inst✝¹ : Algebra R S
inst✝ : Algebra R T
h : Module.Finite R T
this : Module.Finite S (S ⊗[R] T)
e_4✝ : NonUnitalNonAssocSemiring.toAddCommMonoid = addCommMonoid
r✝ : S
x✝ : S ⊗[R] T
⊢ (let_fun I := toAlgebra includeLeftRingHom;
    r✝ • x✝) =
    r✝ • x✝

Next tactic:
intros
theorem finite_stableUnderBaseChange : StableUnderBaseChange @Finite := by
  refine StableUnderBaseChange.mk _ finite_respectsIso ?_
  classical
  introv h
  replace h : Module.Finite R T := by
    rw [RingHom.Finite] at h; convert h; ext; intros; simp_rw [Algebra.smul_def]; rfl
  suffices Module.Finite S (S ⊗[R] T) by
    rw [RingHom.Finite]; convert this; congr; ext; intros; 

Proof state:
case h.e'_5.h.h.e_5.h.h
R S T : Type u_1
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : CommRing T
inst✝¹ : Algebra R S
inst✝ : Algebra R T
h : Module.Finite R T
this : Module.Finite S (S ⊗[R] T)
e_4✝ : NonUnitalNonAssocSemiring.toAddCommMonoid = addCommMonoid
r✝ : S
x✝ : S ⊗[R] T
⊢ (let_fun I := toAlgebra includeLeftRingHom;
    r✝ • x✝) =
    r✝ • x✝

Next tactic:
simp_rw [Algebra.smul_def]
theorem finite_stableUnderBaseChange : StableUnderBaseChange @Finite := by
  refine StableUnderBaseChange.mk _ finite_respectsIso ?_
  classical
  introv h
  replace h : Module.Finite R T := by
    rw [RingHom.Finite] at h; convert h; ext; intros; simp_rw [Algebra.smul_def]; rfl
  suffices Module.Finite S (S ⊗[R] T) by
    rw [RingHom.Finite]; convert this; congr; ext; intros; simp_rw [Algebra.smul_def]; 

Proof state:
case h.e'_5.h.h.e_5.h.h
R S T : Type u_1
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : CommRing T
inst✝¹ : Algebra R S
inst✝ : Algebra R T
h : Module.Finite R T
this : Module.Finite S (S ⊗[R] T)
e_4✝ : NonUnitalNonAssocSemiring.toAddCommMonoid = addCommMonoid
r✝ : S
x✝ : S ⊗[R] T
⊢ r✝ • x✝ = (algebraMap S (S ⊗[R] T)) r✝ * x✝

Next tactic:
rfl
theorem finite_stableUnderBaseChange : StableUnderBaseChange @Finite := by
  refine StableUnderBaseChange.mk _ finite_respectsIso ?_
  classical
  introv h
  replace h : Module.Finite R T := by
    rw [RingHom.Finite] at h; convert h; ext; intros; simp_rw [Algebra.smul_def]; rfl
  suffices Module.Finite S (S ⊗[R] T) by
    rw [RingHom.Finite]; convert this; congr; ext; intros; simp_rw [Algebra.smul_def]; rfl
  

Proof state:
R S T : Type u_1
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : CommRing T
inst✝¹ : Algebra R S
inst✝ : Algebra R T
h : Module.Finite R T
⊢ Module.Finite S (S ⊗[R] T)

Next tactic:
exact inferInstance
theorem apply_mono (μ : FiniteMeasure Ω) {s₁ s₂ : Set Ω} (h : s₁ ⊆ s₂) : μ s₁ ≤ μ s₂ := by
  

Proof state:
Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ : FiniteMeasure Ω
s₁ s₂ : Set Ω
h : s₁ ⊆ s₂
⊢ (fun s => ENNReal.toNNReal (↑↑↑μ s)) s₁ ≤ (fun s => ENNReal.toNNReal (↑↑↑μ s)) s₂

Next tactic:
change ((μ : Measure Ω) s₁).toNNReal ≤ ((μ : Measure Ω) s₂).toNNReal
theorem apply_mono (μ : FiniteMeasure Ω) {s₁ s₂ : Set Ω} (h : s₁ ⊆ s₂) : μ s₁ ≤ μ s₂ := by
  change ((μ : Measure Ω) s₁).toNNReal ≤ ((μ : Measure Ω) s₂).toNNReal
  

Proof state:
Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ : FiniteMeasure Ω
s₁ s₂ : Set Ω
h : s₁ ⊆ s₂
⊢ ENNReal.toNNReal (↑↑↑μ s₁) ≤ ENNReal.toNNReal (↑↑↑μ s₂)

Next tactic:
have key : (μ : Measure Ω) s₁ ≤ (μ : Measure Ω) s₂ := (μ : Measure Ω).mono h
theorem apply_mono (μ : FiniteMeasure Ω) {s₁ s₂ : Set Ω} (h : s₁ ⊆ s₂) : μ s₁ ≤ μ s₂ := by
  change ((μ : Measure Ω) s₁).toNNReal ≤ ((μ : Measure Ω) s₂).toNNReal
  have key : (μ : Measure Ω) s₁ ≤ (μ : Measure Ω) s₂ := (μ : Measure Ω).mono h
  

Proof state:
Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ : FiniteMeasure Ω
s₁ s₂ : Set Ω
h : s₁ ⊆ s₂
key : ↑↑↑μ s₁ ≤ ↑↑↑μ s₂
⊢ ENNReal.toNNReal (↑↑↑μ s₁) ≤ ENNReal.toNNReal (↑↑↑μ s₂)

Next tactic:
apply (ENNReal.toNNReal_le_toNNReal (measure_ne_top _ s₁) (measure_ne_top _ s₂)).mpr key
@[simp] theorem apply_le_mass (μ : FiniteMeasure Ω) (s : Set Ω) : μ s ≤ μ.mass := by
  

Proof state:
Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ : FiniteMeasure Ω
s : Set Ω
⊢ (fun s => ENNReal.toNNReal (↑↑↑μ s)) s ≤ mass μ

Next tactic:
simpa using apply_mono μ (subset_univ s)
@[simp]
theorem mass_zero_iff (μ : FiniteMeasure Ω) : μ.mass = 0 ↔ μ = 0 := by
  

Proof state:
Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ : FiniteMeasure Ω
⊢ mass μ = 0 ↔ μ = 0

Next tactic:
refine' ⟨fun μ_mass => _, fun hμ => by simp only [hμ, zero_mass]⟩
@[simp]
theorem mass_zero_iff (μ : FiniteMeasure Ω) : μ.mass = 0 ↔ μ = 0 := by
  refine' ⟨fun μ_mass => _, fun hμ => by 

Proof state:
Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ : FiniteMeasure Ω
hμ : μ = 0
⊢ mass μ = 0

Next tactic:
simp only [hμ, zero_mass]
@[simp]
theorem mass_zero_iff (μ : FiniteMeasure Ω) : μ.mass = 0 ↔ μ = 0 := by
  refine' ⟨fun μ_mass => _, fun hμ => by simp only [hμ, zero_mass]⟩
  

Proof state:
Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ : FiniteMeasure Ω
μ_mass : mass μ = 0
⊢ μ = 0

Next tactic:
apply toMeasure_injective
@[simp]
theorem mass_zero_iff (μ : FiniteMeasure Ω) : μ.mass = 0 ↔ μ = 0 := by
  refine' ⟨fun μ_mass => _, fun hμ => by simp only [hμ, zero_mass]⟩
  apply toMeasure_injective
  

Proof state:
case a
Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ : FiniteMeasure Ω
μ_mass : mass μ = 0
⊢ ↑μ = ↑0

Next tactic:
apply Measure.measure_univ_eq_zero.mp
@[simp]
theorem mass_zero_iff (μ : FiniteMeasure Ω) : μ.mass = 0 ↔ μ = 0 := by
  refine' ⟨fun μ_mass => _, fun hμ => by simp only [hμ, zero_mass]⟩
  apply toMeasure_injective
  apply Measure.measure_univ_eq_zero.mp
  

Proof state:
case a
Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ : FiniteMeasure Ω
μ_mass : mass μ = 0
⊢ ↑↑↑μ univ = 0

Next tactic:
rwa [← ennreal_mass, ENNReal.coe_eq_zero]
theorem mass_nonzero_iff (μ : FiniteMeasure Ω) : μ.mass ≠ 0 ↔ μ ≠ 0 := by
  

Proof state:
Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ : FiniteMeasure Ω
⊢ mass μ ≠ 0 ↔ μ ≠ 0

Next tactic:
rw [not_iff_not]
theorem mass_nonzero_iff (μ : FiniteMeasure Ω) : μ.mass ≠ 0 ↔ μ ≠ 0 := by
  rw [not_iff_not]
  

Proof state:
Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ : FiniteMeasure Ω
⊢ mass μ = 0 ↔ μ = 0

Next tactic:
exact FiniteMeasure.mass_zero_iff μ
@[ext]
theorem eq_of_forall_toMeasure_apply_eq (μ ν : FiniteMeasure Ω)
    (h : ∀ s : Set Ω, MeasurableSet s → (μ : Measure Ω) s = (ν : Measure Ω) s) : μ = ν := by
  

Proof state:
Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ ν : FiniteMeasure Ω
h : ∀ (s : Set Ω), MeasurableSet s → ↑↑↑μ s = ↑↑↑ν s
⊢ μ = ν

Next tactic:
apply Subtype.ext
@[ext]
theorem eq_of_forall_toMeasure_apply_eq (μ ν : FiniteMeasure Ω)
    (h : ∀ s : Set Ω, MeasurableSet s → (μ : Measure Ω) s = (ν : Measure Ω) s) : μ = ν := by
  apply Subtype.ext
  

Proof state:
case a
Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ ν : FiniteMeasure Ω
h : ∀ (s : Set Ω), MeasurableSet s → ↑↑↑μ s = ↑↑↑ν s
⊢ ↑μ = ↑ν

Next tactic:
ext1 s s_mble
@[ext]
theorem eq_of_forall_toMeasure_apply_eq (μ ν : FiniteMeasure Ω)
    (h : ∀ s : Set Ω, MeasurableSet s → (μ : Measure Ω) s = (ν : Measure Ω) s) : μ = ν := by
  apply Subtype.ext
  ext1 s s_mble
  

Proof state:
case a.h
Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ ν : FiniteMeasure Ω
h : ∀ (s : Set Ω), MeasurableSet s → ↑↑↑μ s = ↑↑↑ν s
s : Set Ω
s_mble : MeasurableSet s
⊢ ↑↑↑μ s = ↑↑↑ν s

Next tactic:
exact h s s_mble
theorem eq_of_forall_apply_eq (μ ν : FiniteMeasure Ω)
    (h : ∀ s : Set Ω, MeasurableSet s → μ s = ν s) : μ = ν := by
  

Proof state:
Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ ν : FiniteMeasure Ω
h : ∀ (s : Set Ω), MeasurableSet s → (fun s => ENNReal.toNNReal (↑↑↑μ s)) s = (fun s => ENNReal.toNNReal (↑↑↑ν s)) s
⊢ μ = ν

Next tactic:
ext1 s s_mble
theorem eq_of_forall_apply_eq (μ ν : FiniteMeasure Ω)
    (h : ∀ s : Set Ω, MeasurableSet s → μ s = ν s) : μ = ν := by
  ext1 s s_mble
  

Proof state:
case h
Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ ν : FiniteMeasure Ω
h : ∀ (s : Set Ω), MeasurableSet s → (fun s => ENNReal.toNNReal (↑↑↑μ s)) s = (fun s => ENNReal.toNNReal (↑↑↑ν s)) s
s : Set Ω
s_mble : MeasurableSet s
⊢ ↑↑↑μ s = ↑↑↑ν s

Next tactic:
simpa [ennreal_coeFn_eq_coeFn_toMeasure] using congr_arg ((↑) : ℝ≥0 → ℝ≥0∞) (h s s_mble)
@[simp, norm_cast]
theorem coeFn_zero : (⇑(0 : FiniteMeasure Ω) : Set Ω → ℝ≥0) = (0 : Set Ω → ℝ≥0) := by
  

Proof state:
Ω : Type u_1
inst✝⁴ : MeasurableSpace Ω
R : Type u_2
inst✝³ : SMul R ℝ≥0
inst✝² : SMul R ℝ≥0∞
inst✝¹ : IsScalarTower R ℝ≥0 ℝ≥0∞
inst✝ : IsScalarTower R ℝ≥0∞ ℝ≥0∞
⊢ (fun s => ENNReal.toNNReal (↑↑↑0 s)) = 0

Next tactic:
funext
@[simp, norm_cast]
theorem coeFn_zero : (⇑(0 : FiniteMeasure Ω) : Set Ω → ℝ≥0) = (0 : Set Ω → ℝ≥0) := by
  funext; 

Proof state:
case h
Ω : Type u_1
inst✝⁴ : MeasurableSpace Ω
R : Type u_2
inst✝³ : SMul R ℝ≥0
inst✝² : SMul R ℝ≥0∞
inst✝¹ : IsScalarTower R ℝ≥0 ℝ≥0∞
inst✝ : IsScalarTower R ℝ≥0∞ ℝ≥0∞
x✝ : Set Ω
⊢ ENNReal.toNNReal (↑↑↑0 x✝) = OfNat.ofNat 0 x✝

Next tactic:
rfl
@[simp, norm_cast]
theorem coeFn_add (μ ν : FiniteMeasure Ω) : (⇑(μ + ν) : Set Ω → ℝ≥0) = (⇑μ + ⇑ν : Set Ω → ℝ≥0) := by
  

Proof state:
Ω : Type u_1
inst✝⁴ : MeasurableSpace Ω
R : Type u_2
inst✝³ : SMul R ℝ≥0
inst✝² : SMul R ℝ≥0∞
inst✝¹ : IsScalarTower R ℝ≥0 ℝ≥0∞
inst✝ : IsScalarTower R ℝ≥0∞ ℝ≥0∞
μ ν : FiniteMeasure Ω
⊢ (fun s => ENNReal.toNNReal (↑↑↑(μ + ν) s)) = (fun s => ENNReal.toNNReal (↑↑↑μ s)) + fun s => ENNReal.toNNReal (↑↑↑ν s)

Next tactic:
funext
@[simp, norm_cast]
theorem coeFn_add (μ ν : FiniteMeasure Ω) : (⇑(μ + ν) : Set Ω → ℝ≥0) = (⇑μ + ⇑ν : Set Ω → ℝ≥0) := by
  funext
  

Proof state:
case h
Ω : Type u_1
inst✝⁴ : MeasurableSpace Ω
R : Type u_2
inst✝³ : SMul R ℝ≥0
inst✝² : SMul R ℝ≥0∞
inst✝¹ : IsScalarTower R ℝ≥0 ℝ≥0∞
inst✝ : IsScalarTower R ℝ≥0∞ ℝ≥0∞
μ ν : FiniteMeasure Ω
x✝ : Set Ω
⊢ ENNReal.toNNReal (↑↑↑(μ + ν) x✝) = ((fun s => ENNReal.toNNReal (↑↑↑μ s)) + fun s => ENNReal.toNNReal (↑↑↑ν s)) x✝

Next tactic:
simp only [Pi.add_apply, ← ENNReal.coe_eq_coe, ne_eq, ennreal_coeFn_eq_coeFn_toMeasure,
    ENNReal.coe_add]
@[simp, norm_cast]
theorem coeFn_add (μ ν : FiniteMeasure Ω) : (⇑(μ + ν) : Set Ω → ℝ≥0) = (⇑μ + ⇑ν : Set Ω → ℝ≥0) := by
  funext
  simp only [Pi.add_apply, ← ENNReal.coe_eq_coe, ne_eq, ennreal_coeFn_eq_coeFn_toMeasure,
    ENNReal.coe_add]
  

Proof state:
case h
Ω : Type u_1
inst✝⁴ : MeasurableSpace Ω
R : Type u_2
inst✝³ : SMul R ℝ≥0
inst✝² : SMul R ℝ≥0∞
inst✝¹ : IsScalarTower R ℝ≥0 ℝ≥0∞
inst✝ : IsScalarTower R ℝ≥0∞ ℝ≥0∞
μ ν : FiniteMeasure Ω
x✝ : Set Ω
⊢ ↑↑↑(μ + ν) x✝ = ↑↑↑μ x✝ + ↑↑↑ν x✝

Next tactic:
norm_cast