l3lab/ntp-mathlib huggingface dataset:
/-- If the symmetric difference of two negative sets is a null-set, then so are the differences
between the two sets. -/
theorem of_diff_eq_zero_of_symmDiff_eq_zero_negative (hu : MeasurableSet u) (hv : MeasurableSet v)
    (hsu : s ≤[u] 0) (hsv : s ≤[v] 0) (hs : s (u ∆ v) = 0) : s (u \ v) = 0 ∧ s (v \ u) = 0 := by
  rw [← s.neg_le_neg_iff _ hu, neg_zero] at hsu
  rw [← s.neg_le_neg_iff _ hv, neg_zero] at hsv
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
s : SignedMeasure α
μ ν : Measure α
inst✝¹ : IsFiniteMeasure μ
inst✝ : IsFiniteMeasure ν
u v w : Set α
hu : MeasurableSet u
hv : MeasurableSet v
hsu : VectorMeasure.restrict 0 u ≤ VectorMeasure.restrict (-s) u
hsv : VectorMeasure.restrict 0 v ≤ VectorMeasure.restrict (-s) v
hs : ↑s (u ∆ v) = 0
⊢ ↑s (u \ v) = 0 ∧ ↑s (v \ u) = 0

Next tactic:
have := of_diff_eq_zero_of_symmDiff_eq_zero_positive hu hv hsu hsv
/-- If the symmetric difference of two negative sets is a null-set, then so are the differences
between the two sets. -/
theorem of_diff_eq_zero_of_symmDiff_eq_zero_negative (hu : MeasurableSet u) (hv : MeasurableSet v)
    (hsu : s ≤[u] 0) (hsv : s ≤[v] 0) (hs : s (u ∆ v) = 0) : s (u \ v) = 0 ∧ s (v \ u) = 0 := by
  rw [← s.neg_le_neg_iff _ hu, neg_zero] at hsu
  rw [← s.neg_le_neg_iff _ hv, neg_zero] at hsv
  have := of_diff_eq_zero_of_symmDiff_eq_zero_positive hu hv hsu hsv
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
s : SignedMeasure α
μ ν : Measure α
inst✝¹ : IsFiniteMeasure μ
inst✝ : IsFiniteMeasure ν
u v w : Set α
hu : MeasurableSet u
hv : MeasurableSet v
hsu : VectorMeasure.restrict 0 u ≤ VectorMeasure.restrict (-s) u
hsv : VectorMeasure.restrict 0 v ≤ VectorMeasure.restrict (-s) v
hs : ↑s (u ∆ v) = 0
this : ↑(-s) (u ∆ v) = 0 → ↑(-s) (u \ v) = 0 ∧ ↑(-s) (v \ u) = 0
⊢ ↑s (u \ v) = 0 ∧ ↑s (v \ u) = 0

Next tactic:
simp only [Pi.neg_apply, neg_eq_zero, coe_neg] at this
/-- If the symmetric difference of two negative sets is a null-set, then so are the differences
between the two sets. -/
theorem of_diff_eq_zero_of_symmDiff_eq_zero_negative (hu : MeasurableSet u) (hv : MeasurableSet v)
    (hsu : s ≤[u] 0) (hsv : s ≤[v] 0) (hs : s (u ∆ v) = 0) : s (u \ v) = 0 ∧ s (v \ u) = 0 := by
  rw [← s.neg_le_neg_iff _ hu, neg_zero] at hsu
  rw [← s.neg_le_neg_iff _ hv, neg_zero] at hsv
  have := of_diff_eq_zero_of_symmDiff_eq_zero_positive hu hv hsu hsv
  simp only [Pi.neg_apply, neg_eq_zero, coe_neg] at this
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
s : SignedMeasure α
μ ν : Measure α
inst✝¹ : IsFiniteMeasure μ
inst✝ : IsFiniteMeasure ν
u v w : Set α
hu : MeasurableSet u
hv : MeasurableSet v
hsu : VectorMeasure.restrict 0 u ≤ VectorMeasure.restrict (-s) u
hsv : VectorMeasure.restrict 0 v ≤ VectorMeasure.restrict (-s) v
hs : ↑s (u ∆ v) = 0
this : ↑s (u ∆ v) = 0 → ↑s (u \ v) = 0 ∧ ↑s (v \ u) = 0
⊢ ↑s (u \ v) = 0 ∧ ↑s (v \ u) = 0

Next tactic:
exact this hs
theorem of_inter_eq_of_symmDiff_eq_zero_positive (hu : MeasurableSet u) (hv : MeasurableSet v)
    (hw : MeasurableSet w) (hsu : 0 ≤[u] s) (hsv : 0 ≤[v] s) (hs : s (u ∆ v) = 0) :
    s (w ∩ u) = s (w ∩ v) := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
s : SignedMeasure α
μ ν : Measure α
inst✝¹ : IsFiniteMeasure μ
inst✝ : IsFiniteMeasure ν
u v w : Set α
hu : MeasurableSet u
hv : MeasurableSet v
hw : MeasurableSet w
hsu : VectorMeasure.restrict 0 u ≤ VectorMeasure.restrict s u
hsv : VectorMeasure.restrict 0 v ≤ VectorMeasure.restrict s v
hs : ↑s (u ∆ v) = 0
⊢ ↑s (w ∩ u) = ↑s (w ∩ v)

Next tactic:
have hwuv : s ((w ∩ u) ∆ (w ∩ v)) = 0 := by
    refine'
      subset_positive_null_set (hu.union hv) ((hw.inter hu).symmDiff (hw.inter hv))
        (hu.symmDiff hv) (restrict_le_restrict_union _ _ hu hsu hv hsv) hs
        Set.symmDiff_subset_union _
    rw [← Set.inter_symmDiff_distrib_left]
    exact Set.inter_subset_right _ _
theorem of_inter_eq_of_symmDiff_eq_zero_positive (hu : MeasurableSet u) (hv : MeasurableSet v)
    (hw : MeasurableSet w) (hsu : 0 ≤[u] s) (hsv : 0 ≤[v] s) (hs : s (u ∆ v) = 0) :
    s (w ∩ u) = s (w ∩ v) := by
  have hwuv : s ((w ∩ u) ∆ (w ∩ v)) = 0 := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
s : SignedMeasure α
μ ν : Measure α
inst✝¹ : IsFiniteMeasure μ
inst✝ : IsFiniteMeasure ν
u v w : Set α
hu : MeasurableSet u
hv : MeasurableSet v
hw : MeasurableSet w
hsu : VectorMeasure.restrict 0 u ≤ VectorMeasure.restrict s u
hsv : VectorMeasure.restrict 0 v ≤ VectorMeasure.restrict s v
hs : ↑s (u ∆ v) = 0
⊢ ↑s ((w ∩ u) ∆ (w ∩ v)) = 0

Next tactic:
refine'
      subset_positive_null_set (hu.union hv) ((hw.inter hu).symmDiff (hw.inter hv))
        (hu.symmDiff hv) (restrict_le_restrict_union _ _ hu hsu hv hsv) hs
        Set.symmDiff_subset_union _
theorem of_inter_eq_of_symmDiff_eq_zero_positive (hu : MeasurableSet u) (hv : MeasurableSet v)
    (hw : MeasurableSet w) (hsu : 0 ≤[u] s) (hsv : 0 ≤[v] s) (hs : s (u ∆ v) = 0) :
    s (w ∩ u) = s (w ∩ v) := by
  have hwuv : s ((w ∩ u) ∆ (w ∩ v)) = 0 := by
    refine'
      subset_positive_null_set (hu.union hv) ((hw.inter hu).symmDiff (hw.inter hv))
        (hu.symmDiff hv) (restrict_le_restrict_union _ _ hu hsu hv hsv) hs
        Set.symmDiff_subset_union _
    

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
s : SignedMeasure α
μ ν : Measure α
inst✝¹ : IsFiniteMeasure μ
inst✝ : IsFiniteMeasure ν
u v w : Set α
hu : MeasurableSet u
hv : MeasurableSet v
hw : MeasurableSet w
hsu : VectorMeasure.restrict 0 u ≤ VectorMeasure.restrict s u
hsv : VectorMeasure.restrict 0 v ≤ VectorMeasure.restrict s v
hs : ↑s (u ∆ v) = 0
⊢ (w ∩ u) ∆ (w ∩ v) ⊆ u ∆ v

Next tactic:
rw [← Set.inter_symmDiff_distrib_left]
theorem of_inter_eq_of_symmDiff_eq_zero_positive (hu : MeasurableSet u) (hv : MeasurableSet v)
    (hw : MeasurableSet w) (hsu : 0 ≤[u] s) (hsv : 0 ≤[v] s) (hs : s (u ∆ v) = 0) :
    s (w ∩ u) = s (w ∩ v) := by
  have hwuv : s ((w ∩ u) ∆ (w ∩ v)) = 0 := by
    refine'
      subset_positive_null_set (hu.union hv) ((hw.inter hu).symmDiff (hw.inter hv))
        (hu.symmDiff hv) (restrict_le_restrict_union _ _ hu hsu hv hsv) hs
        Set.symmDiff_subset_union _
    rw [← Set.inter_symmDiff_distrib_left]
    

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
s : SignedMeasure α
μ ν : Measure α
inst✝¹ : IsFiniteMeasure μ
inst✝ : IsFiniteMeasure ν
u v w : Set α
hu : MeasurableSet u
hv : MeasurableSet v
hw : MeasurableSet w
hsu : VectorMeasure.restrict 0 u ≤ VectorMeasure.restrict s u
hsv : VectorMeasure.restrict 0 v ≤ VectorMeasure.restrict s v
hs : ↑s (u ∆ v) = 0
⊢ w ∩ u ∆ v ⊆ u ∆ v

Next tactic:
exact Set.inter_subset_right _ _
theorem of_inter_eq_of_symmDiff_eq_zero_positive (hu : MeasurableSet u) (hv : MeasurableSet v)
    (hw : MeasurableSet w) (hsu : 0 ≤[u] s) (hsv : 0 ≤[v] s) (hs : s (u ∆ v) = 0) :
    s (w ∩ u) = s (w ∩ v) := by
  have hwuv : s ((w ∩ u) ∆ (w ∩ v)) = 0 := by
    refine'
      subset_positive_null_set (hu.union hv) ((hw.inter hu).symmDiff (hw.inter hv))
        (hu.symmDiff hv) (restrict_le_restrict_union _ _ hu hsu hv hsv) hs
        Set.symmDiff_subset_union _
    rw [← Set.inter_symmDiff_distrib_left]
    exact Set.inter_subset_right _ _
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
s : SignedMeasure α
μ ν : Measure α
inst✝¹ : IsFiniteMeasure μ
inst✝ : IsFiniteMeasure ν
u v w : Set α
hu : MeasurableSet u
hv : MeasurableSet v
hw : MeasurableSet w
hsu : VectorMeasure.restrict 0 u ≤ VectorMeasure.restrict s u
hsv : VectorMeasure.restrict 0 v ≤ VectorMeasure.restrict s v
hs : ↑s (u ∆ v) = 0
hwuv : ↑s ((w ∩ u) ∆ (w ∩ v)) = 0
⊢ ↑s (w ∩ u) = ↑s (w ∩ v)

Next tactic:
obtain ⟨huv, hvu⟩ :=
    of_diff_eq_zero_of_symmDiff_eq_zero_positive (hw.inter hu) (hw.inter hv)
      (restrict_le_restrict_subset _ _ hu hsu (w.inter_subset_right u))
      (restrict_le_restrict_subset _ _ hv hsv (w.inter_subset_right v)) hwuv
theorem of_inter_eq_of_symmDiff_eq_zero_positive (hu : MeasurableSet u) (hv : MeasurableSet v)
    (hw : MeasurableSet w) (hsu : 0 ≤[u] s) (hsv : 0 ≤[v] s) (hs : s (u ∆ v) = 0) :
    s (w ∩ u) = s (w ∩ v) := by
  have hwuv : s ((w ∩ u) ∆ (w ∩ v)) = 0 := by
    refine'
      subset_positive_null_set (hu.union hv) ((hw.inter hu).symmDiff (hw.inter hv))
        (hu.symmDiff hv) (restrict_le_restrict_union _ _ hu hsu hv hsv) hs
        Set.symmDiff_subset_union _
    rw [← Set.inter_symmDiff_distrib_left]
    exact Set.inter_subset_right _ _
  obtain ⟨huv, hvu⟩ :=
    of_diff_eq_zero_of_symmDiff_eq_zero_positive (hw.inter hu) (hw.inter hv)
      (restrict_le_restrict_subset _ _ hu hsu (w.inter_subset_right u))
      (restrict_le_restrict_subset _ _ hv hsv (w.inter_subset_right v)) hwuv
  

Proof state:
case intro
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
s : SignedMeasure α
μ ν : Measure α
inst✝¹ : IsFiniteMeasure μ
inst✝ : IsFiniteMeasure ν
u v w : Set α
hu : MeasurableSet u
hv : MeasurableSet v
hw : MeasurableSet w
hsu : VectorMeasure.restrict 0 u ≤ VectorMeasure.restrict s u
hsv : VectorMeasure.restrict 0 v ≤ VectorMeasure.restrict s v
hs : ↑s (u ∆ v) = 0
hwuv : ↑s ((w ∩ u) ∆ (w ∩ v)) = 0
huv : ↑s ((w ∩ u) \ (w ∩ v)) = 0
hvu : ↑s ((w ∩ v) \ (w ∩ u)) = 0
⊢ ↑s (w ∩ u) = ↑s (w ∩ v)

Next tactic:
rw [← of_diff_of_diff_eq_zero (hw.inter hu) (hw.inter hv) hvu, huv, zero_add]
theorem of_inter_eq_of_symmDiff_eq_zero_negative (hu : MeasurableSet u) (hv : MeasurableSet v)
    (hw : MeasurableSet w) (hsu : s ≤[u] 0) (hsv : s ≤[v] 0) (hs : s (u ∆ v) = 0) :
    s (w ∩ u) = s (w ∩ v) := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
s : SignedMeasure α
μ ν : Measure α
inst✝¹ : IsFiniteMeasure μ
inst✝ : IsFiniteMeasure ν
u v w : Set α
hu : MeasurableSet u
hv : MeasurableSet v
hw : MeasurableSet w
hsu : VectorMeasure.restrict s u ≤ VectorMeasure.restrict 0 u
hsv : VectorMeasure.restrict s v ≤ VectorMeasure.restrict 0 v
hs : ↑s (u ∆ v) = 0
⊢ ↑s (w ∩ u) = ↑s (w ∩ v)

Next tactic:
rw [← s.neg_le_neg_iff _ hu, neg_zero] at hsu
theorem of_inter_eq_of_symmDiff_eq_zero_negative (hu : MeasurableSet u) (hv : MeasurableSet v)
    (hw : MeasurableSet w) (hsu : s ≤[u] 0) (hsv : s ≤[v] 0) (hs : s (u ∆ v) = 0) :
    s (w ∩ u) = s (w ∩ v) := by
  rw [← s.neg_le_neg_iff _ hu, neg_zero] at hsu
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
s : SignedMeasure α
μ ν : Measure α
inst✝¹ : IsFiniteMeasure μ
inst✝ : IsFiniteMeasure ν
u v w : Set α
hu : MeasurableSet u
hv : MeasurableSet v
hw : MeasurableSet w
hsu : VectorMeasure.restrict 0 u ≤ VectorMeasure.restrict (-s) u
hsv : VectorMeasure.restrict s v ≤ VectorMeasure.restrict 0 v
hs : ↑s (u ∆ v) = 0
⊢ ↑s (w ∩ u) = ↑s (w ∩ v)

Next tactic:
rw [← s.neg_le_neg_iff _ hv, neg_zero] at hsv
theorem of_inter_eq_of_symmDiff_eq_zero_negative (hu : MeasurableSet u) (hv : MeasurableSet v)
    (hw : MeasurableSet w) (hsu : s ≤[u] 0) (hsv : s ≤[v] 0) (hs : s (u ∆ v) = 0) :
    s (w ∩ u) = s (w ∩ v) := by
  rw [← s.neg_le_neg_iff _ hu, neg_zero] at hsu
  rw [← s.neg_le_neg_iff _ hv, neg_zero] at hsv
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
s : SignedMeasure α
μ ν : Measure α
inst✝¹ : IsFiniteMeasure μ
inst✝ : IsFiniteMeasure ν
u v w : Set α
hu : MeasurableSet u
hv : MeasurableSet v
hw : MeasurableSet w
hsu : VectorMeasure.restrict 0 u ≤ VectorMeasure.restrict (-s) u
hsv : VectorMeasure.restrict 0 v ≤ VectorMeasure.restrict (-s) v
hs : ↑s (u ∆ v) = 0
⊢ ↑s (w ∩ u) = ↑s (w ∩ v)

Next tactic:
have := of_inter_eq_of_symmDiff_eq_zero_positive hu hv hw hsu hsv
theorem of_inter_eq_of_symmDiff_eq_zero_negative (hu : MeasurableSet u) (hv : MeasurableSet v)
    (hw : MeasurableSet w) (hsu : s ≤[u] 0) (hsv : s ≤[v] 0) (hs : s (u ∆ v) = 0) :
    s (w ∩ u) = s (w ∩ v) := by
  rw [← s.neg_le_neg_iff _ hu, neg_zero] at hsu
  rw [← s.neg_le_neg_iff _ hv, neg_zero] at hsv
  have := of_inter_eq_of_symmDiff_eq_zero_positive hu hv hw hsu hsv
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
s : SignedMeasure α
μ ν : Measure α
inst✝¹ : IsFiniteMeasure μ
inst✝ : IsFiniteMeasure ν
u v w : Set α
hu : MeasurableSet u
hv : MeasurableSet v
hw : MeasurableSet w
hsu : VectorMeasure.restrict 0 u ≤ VectorMeasure.restrict (-s) u
hsv : VectorMeasure.restrict 0 v ≤ VectorMeasure.restrict (-s) v
hs : ↑s (u ∆ v) = 0
this : ↑(-s) (u ∆ v) = 0 → ↑(-s) (w ∩ u) = ↑(-s) (w ∩ v)
⊢ ↑s (w ∩ u) = ↑s (w ∩ v)

Next tactic:
simp only [Pi.neg_apply, neg_inj, neg_eq_zero, coe_neg] at this
theorem of_inter_eq_of_symmDiff_eq_zero_negative (hu : MeasurableSet u) (hv : MeasurableSet v)
    (hw : MeasurableSet w) (hsu : s ≤[u] 0) (hsv : s ≤[v] 0) (hs : s (u ∆ v) = 0) :
    s (w ∩ u) = s (w ∩ v) := by
  rw [← s.neg_le_neg_iff _ hu, neg_zero] at hsu
  rw [← s.neg_le_neg_iff _ hv, neg_zero] at hsv
  have := of_inter_eq_of_symmDiff_eq_zero_positive hu hv hw hsu hsv
  simp only [Pi.neg_apply, neg_inj, neg_eq_zero, coe_neg] at this
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
s : SignedMeasure α
μ ν : Measure α
inst✝¹ : IsFiniteMeasure μ
inst✝ : IsFiniteMeasure ν
u v w : Set α
hu : MeasurableSet u
hv : MeasurableSet v
hw : MeasurableSet w
hsu : VectorMeasure.restrict 0 u ≤ VectorMeasure.restrict (-s) u
hsv : VectorMeasure.restrict 0 v ≤ VectorMeasure.restrict (-s) v
hs : ↑s (u ∆ v) = 0
this : ↑s (u ∆ v) = 0 → ↑s (w ∩ u) = ↑s (w ∩ v)
⊢ ↑s (w ∩ u) = ↑s (w ∩ v)

Next tactic:
exact this hs
private theorem eq_of_posPart_eq_posPart {j₁ j₂ : JordanDecomposition α}
    (hj : j₁.posPart = j₂.posPart) (hj' : j₁.toSignedMeasure = j₂.toSignedMeasure) : j₁ = j₂ := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
j₁ j₂ : JordanDecomposition α
hj : j₁.posPart = j₂.posPart
hj' : toSignedMeasure j₁ = toSignedMeasure j₂
⊢ j₁ = j₂

Next tactic:
ext1
private theorem eq_of_posPart_eq_posPart {j₁ j₂ : JordanDecomposition α}
    (hj : j₁.posPart = j₂.posPart) (hj' : j₁.toSignedMeasure = j₂.toSignedMeasure) : j₁ = j₂ := by
  ext1
  · 

Proof state:
case posPart
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
j₁ j₂ : JordanDecomposition α
hj : j₁.posPart = j₂.posPart
hj' : toSignedMeasure j₁ = toSignedMeasure j₂
⊢ j₁.posPart = j₂.posPart

Next tactic:
exact hj
private theorem eq_of_posPart_eq_posPart {j₁ j₂ : JordanDecomposition α}
    (hj : j₁.posPart = j₂.posPart) (hj' : j₁.toSignedMeasure = j₂.toSignedMeasure) : j₁ = j₂ := by
  ext1
  · exact hj
  · 

Proof state:
case negPart
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
j₁ j₂ : JordanDecomposition α
hj : j₁.posPart = j₂.posPart
hj' : toSignedMeasure j₁ = toSignedMeasure j₂
⊢ j₁.negPart = j₂.negPart

Next tactic:
rw [← toSignedMeasure_eq_toSignedMeasure_iff]
private theorem eq_of_posPart_eq_posPart {j₁ j₂ : JordanDecomposition α}
    (hj : j₁.posPart = j₂.posPart) (hj' : j₁.toSignedMeasure = j₂.toSignedMeasure) : j₁ = j₂ := by
  ext1
  · exact hj
  · rw [← toSignedMeasure_eq_toSignedMeasure_iff]
    -- Porting note: golfed
    

Proof state:
case negPart
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
j₁ j₂ : JordanDecomposition α
hj : j₁.posPart = j₂.posPart
hj' : toSignedMeasure j₁ = toSignedMeasure j₂
⊢ Measure.toSignedMeasure j₁.negPart = Measure.toSignedMeasure j₂.negPart

Next tactic:
unfold toSignedMeasure at hj'
private theorem eq_of_posPart_eq_posPart {j₁ j₂ : JordanDecomposition α}
    (hj : j₁.posPart = j₂.posPart) (hj' : j₁.toSignedMeasure = j₂.toSignedMeasure) : j₁ = j₂ := by
  ext1
  · exact hj
  · rw [← toSignedMeasure_eq_toSignedMeasure_iff]
    -- Porting note: golfed
    unfold toSignedMeasure at hj'
    

Proof state:
case negPart
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
j₁ j₂ : JordanDecomposition α
hj : j₁.posPart = j₂.posPart
hj' :
  Measure.toSignedMeasure j₁.posPart - Measure.toSignedMeasure j₁.negPart =
    Measure.toSignedMeasure j₂.posPart - Measure.toSignedMeasure j₂.negPart
⊢ Measure.toSignedMeasure j₁.negPart = Measure.toSignedMeasure j₂.negPart

Next tactic:
simp_rw [hj, sub_right_inj] at hj'
private theorem eq_of_posPart_eq_posPart {j₁ j₂ : JordanDecomposition α}
    (hj : j₁.posPart = j₂.posPart) (hj' : j₁.toSignedMeasure = j₂.toSignedMeasure) : j₁ = j₂ := by
  ext1
  · exact hj
  · rw [← toSignedMeasure_eq_toSignedMeasure_iff]
    -- Porting note: golfed
    unfold toSignedMeasure at hj'
    simp_rw [hj, sub_right_inj] at hj'
    

Proof state:
case negPart
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
j₁ j₂ : JordanDecomposition α
hj : j₁.posPart = j₂.posPart
hj' : Measure.toSignedMeasure j₁.negPart = Measure.toSignedMeasure j₂.negPart
⊢ Measure.toSignedMeasure j₁.negPart = Measure.toSignedMeasure j₂.negPart

Next tactic:
exact hj'
/-- The Jordan decomposition of a signed measure is unique. -/
theorem toSignedMeasure_injective : Injective <| @JordanDecomposition.toSignedMeasure α _ := by
  /- The main idea is that two Jordan decompositions of a signed measure provide two
    Hahn decompositions for that measure. Then, from `of_symmDiff_compl_positive_negative`,
    the symmetric difference of the two Hahn decompositions has measure zero, thus, allowing us to
    show the equality of the underlying measures of the Jordan decompositions. -/
  

Proof state:
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
⊢ Injective toSignedMeasure

Next tactic:
intro j₁ j₂ hj
/-- The Jordan decomposition of a signed measure is unique. -/
theorem toSignedMeasure_injective : Injective <| @JordanDecomposition.toSignedMeasure α _ := by
  /- The main idea is that two Jordan decompositions of a signed measure provide two
    Hahn decompositions for that measure. Then, from `of_symmDiff_compl_positive_negative`,
    the symmetric difference of the two Hahn decompositions has measure zero, thus, allowing us to
    show the equality of the underlying measures of the Jordan decompositions. -/
  intro j₁ j₂ hj
  -- obtain the two Hahn decompositions from the Jordan decompositions
  

Proof state:
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
j₁ j₂ : JordanDecomposition α
hj : toSignedMeasure j₁ = toSignedMeasure j₂
⊢ j₁ = j₂

Next tactic:
obtain ⟨S, hS₁, hS₂, hS₃, hS₄, hS₅⟩ := j₁.exists_compl_positive_negative
/-- The Jordan decomposition of a signed measure is unique. -/
theorem toSignedMeasure_injective : Injective <| @JordanDecomposition.toSignedMeasure α _ := by
  /- The main idea is that two Jordan decompositions of a signed measure provide two
    Hahn decompositions for that measure. Then, from `of_symmDiff_compl_positive_negative`,
    the symmetric difference of the two Hahn decompositions has measure zero, thus, allowing us to
    show the equality of the underlying measures of the Jordan decompositions. -/
  intro j₁ j₂ hj
  -- obtain the two Hahn decompositions from the Jordan decompositions
  obtain ⟨S, hS₁, hS₂, hS₃, hS₄, hS₅⟩ := j₁.exists_compl_positive_negative
  

Proof state:
case intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
j₁ j₂ : JordanDecomposition α
hj : toSignedMeasure j₁ = toSignedMeasure j₂
S : Set α
hS₁ : MeasurableSet S
hS₂ : VectorMeasure.restrict (toSignedMeasure j₁) S ≤ VectorMeasure.restrict 0 S
hS₃ : VectorMeasure.restrict 0 Sᶜ ≤ VectorMeasure.restrict (toSignedMeasure j₁) Sᶜ
hS₄ : ↑↑j₁.posPart S = 0
hS₅ : ↑↑j₁.negPart Sᶜ = 0
⊢ j₁ = j₂

Next tactic:
obtain ⟨T, hT₁, hT₂, hT₃, hT₄, hT₅⟩ := j₂.exists_compl_positive_negative
/-- The Jordan decomposition of a signed measure is unique. -/
theorem toSignedMeasure_injective : Injective <| @JordanDecomposition.toSignedMeasure α _ := by
  /- The main idea is that two Jordan decompositions of a signed measure provide two
    Hahn decompositions for that measure. Then, from `of_symmDiff_compl_positive_negative`,
    the symmetric difference of the two Hahn decompositions has measure zero, thus, allowing us to
    show the equality of the underlying measures of the Jordan decompositions. -/
  intro j₁ j₂ hj
  -- obtain the two Hahn decompositions from the Jordan decompositions
  obtain ⟨S, hS₁, hS₂, hS₃, hS₄, hS₅⟩ := j₁.exists_compl_positive_negative
  obtain ⟨T, hT₁, hT₂, hT₃, hT₄, hT₅⟩ := j₂.exists_compl_positive_negative
  

Proof state:
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
j₁ j₂ : JordanDecomposition α
hj : toSignedMeasure j₁ = toSignedMeasure j₂
S : Set α
hS₁ : MeasurableSet S
hS₂ : VectorMeasure.restrict (toSignedMeasure j₁) S ≤ VectorMeasure.restrict 0 S
hS₃ : VectorMeasure.restrict 0 Sᶜ ≤ VectorMeasure.restrict (toSignedMeasure j₁) Sᶜ
hS₄ : ↑↑j₁.posPart S = 0
hS₅ : ↑↑j₁.negPart Sᶜ = 0
T : Set α
hT₁ : MeasurableSet T
hT₂ : VectorMeasure.restrict (toSignedMeasure j₂) T ≤ VectorMeasure.restrict 0 T
hT₃ : VectorMeasure.restrict 0 Tᶜ ≤ VectorMeasure.restrict (toSignedMeasure j₂) Tᶜ
hT₄ : ↑↑j₂.posPart T = 0
hT₅ : ↑↑j₂.negPart Tᶜ = 0
⊢ j₁ = j₂

Next tactic:
rw [← hj] at hT₂ hT₃
/-- The Jordan decomposition of a signed measure is unique. -/
theorem toSignedMeasure_injective : Injective <| @JordanDecomposition.toSignedMeasure α _ := by
  /- The main idea is that two Jordan decompositions of a signed measure provide two
    Hahn decompositions for that measure. Then, from `of_symmDiff_compl_positive_negative`,
    the symmetric difference of the two Hahn decompositions has measure zero, thus, allowing us to
    show the equality of the underlying measures of the Jordan decompositions. -/
  intro j₁ j₂ hj
  -- obtain the two Hahn decompositions from the Jordan decompositions
  obtain ⟨S, hS₁, hS₂, hS₃, hS₄, hS₅⟩ := j₁.exists_compl_positive_negative
  obtain ⟨T, hT₁, hT₂, hT₃, hT₄, hT₅⟩ := j₂.exists_compl_positive_negative
  rw [← hj] at hT₂ hT₃
  -- the symmetric differences of the two Hahn decompositions have measure zero
  

Proof state:
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
j₁ j₂ : JordanDecomposition α
hj : toSignedMeasure j₁ = toSignedMeasure j₂
S : Set α
hS₁ : MeasurableSet S
hS₂ : VectorMeasure.restrict (toSignedMeasure j₁) S ≤ VectorMeasure.restrict 0 S
hS₃ : VectorMeasure.restrict 0 Sᶜ ≤ VectorMeasure.restrict (toSignedMeasure j₁) Sᶜ
hS₄ : ↑↑j₁.posPart S = 0
hS₅ : ↑↑j₁.negPart Sᶜ = 0
T : Set α
hT₁ : MeasurableSet T
hT₂ : VectorMeasure.restrict (toSignedMeasure j₁) T ≤ VectorMeasure.restrict 0 T
hT₃ : VectorMeasure.restrict 0 Tᶜ ≤ VectorMeasure.restrict (toSignedMeasure j₁) Tᶜ
hT₄ : ↑↑j₂.posPart T = 0
hT₅ : ↑↑j₂.negPart Tᶜ = 0
⊢ j₁ = j₂

Next tactic:
obtain ⟨hST₁, -⟩ :=
    of_symmDiff_compl_positive_negative hS₁.compl hT₁.compl ⟨hS₃, (compl_compl S).symm ▸ hS₂⟩
      ⟨hT₃, (compl_compl T).symm ▸ hT₂⟩
/-- The Jordan decomposition of a signed measure is unique. -/
theorem toSignedMeasure_injective : Injective <| @JordanDecomposition.toSignedMeasure α _ := by
  /- The main idea is that two Jordan decompositions of a signed measure provide two
    Hahn decompositions for that measure. Then, from `of_symmDiff_compl_positive_negative`,
    the symmetric difference of the two Hahn decompositions has measure zero, thus, allowing us to
    show the equality of the underlying measures of the Jordan decompositions. -/
  intro j₁ j₂ hj
  -- obtain the two Hahn decompositions from the Jordan decompositions
  obtain ⟨S, hS₁, hS₂, hS₃, hS₄, hS₅⟩ := j₁.exists_compl_positive_negative
  obtain ⟨T, hT₁, hT₂, hT₃, hT₄, hT₅⟩ := j₂.exists_compl_positive_negative
  rw [← hj] at hT₂ hT₃
  -- the symmetric differences of the two Hahn decompositions have measure zero
  obtain ⟨hST₁, -⟩ :=
    of_symmDiff_compl_positive_negative hS₁.compl hT₁.compl ⟨hS₃, (compl_compl S).symm ▸ hS₂⟩
      ⟨hT₃, (compl_compl T).symm ▸ hT₂⟩
  -- it suffices to show the Jordan decompositions have the same positive parts
  

Proof state:
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
j₁ j₂ : JordanDecomposition α
hj : toSignedMeasure j₁ = toSignedMeasure j₂
S : Set α
hS₁ : MeasurableSet S
hS₂ : VectorMeasure.restrict (toSignedMeasure j₁) S ≤ VectorMeasure.restrict 0 S
hS₃ : VectorMeasure.restrict 0 Sᶜ ≤ VectorMeasure.restrict (toSignedMeasure j₁) Sᶜ
hS₄ : ↑↑j₁.posPart S = 0
hS₅ : ↑↑j₁.negPart Sᶜ = 0
T : Set α
hT₁ : MeasurableSet T
hT₂ : VectorMeasure.restrict (toSignedMeasure j₁) T ≤ VectorMeasure.restrict 0 T
hT₃ : VectorMeasure.restrict 0 Tᶜ ≤ VectorMeasure.restrict (toSignedMeasure j₁) Tᶜ
hT₄ : ↑↑j₂.posPart T = 0
hT₅ : ↑↑j₂.negPart Tᶜ = 0
hST₁ : ↑(toSignedMeasure j₁) (Sᶜ ∆ Tᶜ) = 0
⊢ j₁ = j₂

Next tactic:
refine' eq_of_posPart_eq_posPart _ hj