topology.metric_space.gromov_hausdorff_realizedMathlib.Topology.MetricSpace.GromovHausdorffRealized

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -341,7 +341,7 @@ technical lemmas -/
 theorem HD_below_aux1 {f : Cb X Y} (C : ℝ) {x : X} :
     BddBelow (range fun y : Y => f (inl x, inr y) + C) :=
   let ⟨cf, hcf⟩ := (Real.isBounded_iff_bddBelow_bddAbove.1 f.isBounded_range).1
-  ⟨cf + C, forall_range_iff.2 fun i => add_le_add_right ((fun x => hcf (mem_range_self x)) _) _⟩
+  ⟨cf + C, forall_mem_range.2 fun i => add_le_add_right ((fun x => hcf (mem_range_self x)) _) _⟩
 #align Gromov_Hausdorff.HD_below_aux1 GromovHausdorff.HD_below_aux1
 -/
 
@@ -358,7 +358,7 @@ private theorem HD_bound_aux1 (f : Cb X Y) (C : ℝ) :
 theorem HD_below_aux2 {f : Cb X Y} (C : ℝ) {y : Y} :
     BddBelow (range fun x : X => f (inl x, inr y) + C) :=
   let ⟨cf, hcf⟩ := (Real.isBounded_iff_bddBelow_bddAbove.1 f.isBounded_range).1
-  ⟨cf + C, forall_range_iff.2 fun i => add_le_add_right ((fun x => hcf (mem_range_self x)) _) _⟩
+  ⟨cf + C, forall_mem_range.2 fun i => add_le_add_right ((fun x => hcf (mem_range_self x)) _) _⟩
 #align Gromov_Hausdorff.HD_below_aux2 GromovHausdorff.HD_below_aux2
 -/
 
@@ -521,7 +521,7 @@ attribute [local instance] premetric_optimal_GH_dist
 /-- A metric space which realizes the optimal coupling between `X` and `Y` -/
 @[nolint has_nonempty_instance]
 def OptimalGHCoupling : Type _ :=
-  @UniformSpace.SeparationQuotient (Sum X Y) (premetricOptimalGHDist X Y).toUniformSpace
+  @SeparationQuotient (Sum X Y) (premetricOptimalGHDist X Y).toUniformSpace
 deriving MetricSpace
 #align Gromov_Hausdorff.optimal_GH_coupling GromovHausdorff.OptimalGHCoupling
 -/
Diff
@@ -388,8 +388,8 @@ theorem HD_candidatesBDist_le :
           by
           apply add_le_add (add_le_add _ le_rfl)
           exact dist_le_diam_of_mem bounded_of_compact_space (mem_univ _) (mem_univ _)
-          any_goals exact OrderedAddCommMonoid.to_covariantClass_left ℝ
-          any_goals exact OrderedAddCommMonoid.to_covariantClass_right ℝ
+          any_goals exact OrderedAddCommMonoid.toCovariantClassLeft ℝ
+          any_goals exact OrderedAddCommMonoid.toCovariantClassRight ℝ
           exact dist_le_diam_of_mem bounded_of_compact_space (mem_univ _) (mem_univ _)
     exact le_trans A B
   · have A :
@@ -402,8 +402,8 @@ theorem HD_candidatesBDist_le :
           by
           apply add_le_add (add_le_add _ le_rfl)
           exact dist_le_diam_of_mem bounded_of_compact_space (mem_univ _) (mem_univ _)
-          any_goals exact OrderedAddCommMonoid.to_covariantClass_left ℝ
-          any_goals exact OrderedAddCommMonoid.to_covariantClass_right ℝ
+          any_goals exact OrderedAddCommMonoid.toCovariantClassLeft ℝ
+          any_goals exact OrderedAddCommMonoid.toCovariantClassRight ℝ
           exact dist_le_diam_of_mem bounded_of_compact_space (mem_univ _) (mem_univ _)
     exact le_trans A B
 #align Gromov_Hausdorff.HD_candidates_b_dist_le GromovHausdorff.HD_candidatesBDist_le
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sébastien Gouëzel
 -/
-import Mathbin.Topology.MetricSpace.Gluing
-import Mathbin.Topology.MetricSpace.HausdorffDistance
-import Mathbin.Topology.ContinuousFunction.Bounded
+import Topology.MetricSpace.Gluing
+import Topology.MetricSpace.HausdorffDistance
+import Topology.ContinuousFunction.Bounded
 
 #align_import topology.metric_space.gromov_hausdorff_realized from "leanprover-community/mathlib"@"a87d22575d946e1e156fc1edd1e1269600a8a282"
 
Diff
@@ -112,7 +112,7 @@ attribute [local instance 10] inhabited_of_nonempty'
 private theorem max_var_bound : dist x y ≤ maxVar X Y :=
   calc
     dist x y ≤ diam (univ : Set (Sum X Y)) :=
-      dist_le_diam_of_mem bounded_of_compactSpace (mem_univ _) (mem_univ _)
+      dist_le_diam_of_mem isBounded_of_compactSpace (mem_univ _) (mem_univ _)
     _ = diam (range inl ∪ range inr : Set (Sum X Y)) := by rw [range_inl_union_range_inr]
     _ ≤
         diam (range inl : Set (Sum X Y)) + dist (inl default) (inr default) +
@@ -340,7 +340,7 @@ to check that the defining sets are bounded below or above. This is done in the
 technical lemmas -/
 theorem HD_below_aux1 {f : Cb X Y} (C : ℝ) {x : X} :
     BddBelow (range fun y : Y => f (inl x, inr y) + C) :=
-  let ⟨cf, hcf⟩ := (Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).1
+  let ⟨cf, hcf⟩ := (Real.isBounded_iff_bddBelow_bddAbove.1 f.isBounded_range).1
   ⟨cf + C, forall_range_iff.2 fun i => add_le_add_right ((fun x => hcf (mem_range_self x)) _) _⟩
 #align Gromov_Hausdorff.HD_below_aux1 GromovHausdorff.HD_below_aux1
 -/
@@ -348,7 +348,7 @@ theorem HD_below_aux1 {f : Cb X Y} (C : ℝ) {x : X} :
 private theorem HD_bound_aux1 (f : Cb X Y) (C : ℝ) :
     BddAbove (range fun x : X => ⨅ y, f (inl x, inr y) + C) :=
   by
-  rcases(Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).2 with ⟨Cf, hCf⟩
+  rcases(Real.isBounded_iff_bddBelow_bddAbove.1 f.bounded_range).2 with ⟨Cf, hCf⟩
   refine' ⟨Cf + C, forall_range_iff.2 fun x => _⟩
   calc
     (⨅ y, f (inl x, inr y) + C) ≤ f (inl x, inr default) + C := ciInf_le (HD_below_aux1 C) default
@@ -357,7 +357,7 @@ private theorem HD_bound_aux1 (f : Cb X Y) (C : ℝ) :
 #print GromovHausdorff.HD_below_aux2 /-
 theorem HD_below_aux2 {f : Cb X Y} (C : ℝ) {y : Y} :
     BddBelow (range fun x : X => f (inl x, inr y) + C) :=
-  let ⟨cf, hcf⟩ := (Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).1
+  let ⟨cf, hcf⟩ := (Real.isBounded_iff_bddBelow_bddAbove.1 f.isBounded_range).1
   ⟨cf + C, forall_range_iff.2 fun i => add_le_add_right ((fun x => hcf (mem_range_self x)) _) _⟩
 #align Gromov_Hausdorff.HD_below_aux2 GromovHausdorff.HD_below_aux2
 -/
@@ -365,7 +365,7 @@ theorem HD_below_aux2 {f : Cb X Y} (C : ℝ) {y : Y} :
 private theorem HD_bound_aux2 (f : Cb X Y) (C : ℝ) :
     BddAbove (range fun y : Y => ⨅ x, f (inl x, inr y) + C) :=
   by
-  rcases(Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).2 with ⟨Cf, hCf⟩
+  rcases(Real.isBounded_iff_bddBelow_bddAbove.1 f.bounded_range).2 with ⟨Cf, hCf⟩
   refine' ⟨Cf + C, forall_range_iff.2 fun y => _⟩
   calc
     (⨅ x, f (inl x, inr y) + C) ≤ f (inl default, inr y) + C := ciInf_le (HD_below_aux2 C) default
@@ -414,9 +414,9 @@ prove separately inequalities controlling the two terms (relying too heavily on
 private theorem HD_lipschitz_aux1 (f g : Cb X Y) :
     (⨆ x, ⨅ y, f (inl x, inr y)) ≤ (⨆ x, ⨅ y, g (inl x, inr y)) + dist f g :=
   by
-  rcases(Real.bounded_iff_bddBelow_bddAbove.1 g.bounded_range).1 with ⟨cg, hcg⟩
+  rcases(Real.isBounded_iff_bddBelow_bddAbove.1 g.bounded_range).1 with ⟨cg, hcg⟩
   have Hcg : ∀ x, cg ≤ g x := fun x => hcg (mem_range_self x)
-  rcases(Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).1 with ⟨cf, hcf⟩
+  rcases(Real.isBounded_iff_bddBelow_bddAbove.1 f.bounded_range).1 with ⟨cf, hcf⟩
   have Hcf : ∀ x, cf ≤ f x := fun x => hcf (mem_range_self x)
   -- prove the inequality but with `dist f g` inside, by using inequalities comparing
   -- supr to supr and infi to infi
@@ -443,9 +443,9 @@ private theorem HD_lipschitz_aux1 (f g : Cb X Y) :
 private theorem HD_lipschitz_aux2 (f g : Cb X Y) :
     (⨆ y, ⨅ x, f (inl x, inr y)) ≤ (⨆ y, ⨅ x, g (inl x, inr y)) + dist f g :=
   by
-  rcases(Real.bounded_iff_bddBelow_bddAbove.1 g.bounded_range).1 with ⟨cg, hcg⟩
+  rcases(Real.isBounded_iff_bddBelow_bddAbove.1 g.bounded_range).1 with ⟨cg, hcg⟩
   have Hcg : ∀ x, cg ≤ g x := fun x => hcg (mem_range_self x)
-  rcases(Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).1 with ⟨cf, hcf⟩
+  rcases(Real.isBounded_iff_bddBelow_bddAbove.1 f.bounded_range).1 with ⟨cf, hcf⟩
   have Hcf : ∀ x, cf ≤ f x := fun x => hcf (mem_range_self x)
   -- prove the inequality but with `dist f g` inside, by using inequalities comparing
   -- supr to supr and infi to infi
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sébastien Gouëzel
-
-! This file was ported from Lean 3 source module topology.metric_space.gromov_hausdorff_realized
-! leanprover-community/mathlib commit a87d22575d946e1e156fc1edd1e1269600a8a282
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Topology.MetricSpace.Gluing
 import Mathbin.Topology.MetricSpace.HausdorffDistance
 import Mathbin.Topology.ContinuousFunction.Bounded
 
+#align_import topology.metric_space.gromov_hausdorff_realized from "leanprover-community/mathlib"@"a87d22575d946e1e156fc1edd1e1269600a8a282"
+
 /-!
 # The Gromov-Hausdorff distance is realized
 
Diff
@@ -83,6 +83,7 @@ private theorem one_le_max_var : 1 ≤ maxVar X Y :=
     _ ≤ 2 * diam (univ : Set X) + 1 + 2 * diam (univ : Set Y) := by
       apply_rules [add_le_add, mul_le_mul_of_nonneg_left, diam_nonneg] <;> norm_num
 
+#print GromovHausdorff.candidates /-
 /-- The set of functions on `X ⊕ Y` that are candidates distances to realize the
 minimum of the Hausdorff distances between `X` and `Y` in a coupling -/
 def candidates : Set (ProdSpaceFun X Y) :=
@@ -94,6 +95,7 @@ def candidates : Set (ProdSpaceFun X Y) :=
         ∀ x, f (x, x) = 0) ∧
       ∀ x y, f (x, y) ≤ maxVar X Y}
 #align Gromov_Hausdorff.candidates GromovHausdorff.candidates
+-/
 
 /-- Version of the set of candidates in bounded_continuous_functions, to apply
 Arzela-Ascoli -/
@@ -222,15 +224,19 @@ private theorem candidates_lipschitz (fA : f ∈ candidates X Y) : LipschitzWith
   rw [dist_comm]
   exact candidates_lipschitz_aux fA
 
+#print GromovHausdorff.candidatesBOfCandidates /-
 /-- candidates give rise to elements of bounded_continuous_functions -/
 def candidatesBOfCandidates (f : ProdSpaceFun X Y) (fA : f ∈ candidates X Y) : Cb X Y :=
   BoundedContinuousFunction.mkOfCompact ⟨f, (candidates_lipschitz fA).Continuous⟩
 #align Gromov_Hausdorff.candidates_b_of_candidates GromovHausdorff.candidatesBOfCandidates
+-/
 
+#print GromovHausdorff.candidatesBOfCandidates_mem /-
 theorem candidatesBOfCandidates_mem (f : ProdSpaceFun X Y) (fA : f ∈ candidates X Y) :
     candidatesBOfCandidates f fA ∈ candidatesB X Y :=
   fA
 #align Gromov_Hausdorff.candidates_b_of_candidates_mem GromovHausdorff.candidatesBOfCandidates_mem
+-/
 
 /-- The distance on `X ⊕ Y` is a candidate -/
 private theorem dist_mem_candidates :
@@ -245,15 +251,19 @@ private theorem dist_mem_candidates :
     | exact fun x y => by rfl
     | exact fun x y => max_var_bound
 
+#print GromovHausdorff.candidatesBDist /-
 /-- The distance on `X ⊕ Y` as a candidate -/
 def candidatesBDist (X : Type u) (Y : Type v) [MetricSpace X] [CompactSpace X] [Inhabited X]
     [MetricSpace Y] [CompactSpace Y] [Inhabited Y] : Cb X Y :=
   candidatesBOfCandidates _ dist_mem_candidates
 #align Gromov_Hausdorff.candidates_b_dist GromovHausdorff.candidatesBDist
+-/
 
+#print GromovHausdorff.candidatesBDist_mem_candidatesB /-
 theorem candidatesBDist_mem_candidatesB : candidatesBDist X Y ∈ candidatesB X Y :=
   candidatesBOfCandidates_mem _ _
 #align Gromov_Hausdorff.candidates_b_dist_mem_candidates_b GromovHausdorff.candidatesBDist_mem_candidatesB
+-/
 
 private theorem candidates_b_nonempty : (candidatesB X Y).Nonempty :=
   ⟨_, candidatesBDist_mem_candidatesB⟩
@@ -316,13 +326,16 @@ private theorem is_compact_candidates_b : IsCompact (candidatesB X Y) :=
     · rintro x y ⟨f, hf⟩
       exact (candidates_lipschitz hf).dist_le_mul _ _
 
+#print GromovHausdorff.HD /-
 /-- We will then choose the candidate minimizing the Hausdorff distance. Except that we are not
 in a metric space setting, so we need to define our custom version of Hausdorff distance,
 called HD, and prove its basic properties. -/
 def HD (f : Cb X Y) :=
   max (⨆ x, ⨅ y, f (inl x, inr y)) (⨆ y, ⨅ x, f (inl x, inr y))
 #align Gromov_Hausdorff.HD GromovHausdorff.HD
+-/
 
+#print GromovHausdorff.HD_below_aux1 /-
 /- We will show that HD is continuous on bounded_continuous_functions, to deduce that its
 minimum on the compact set candidates_b is attained. Since it is defined in terms of
 infimum and supremum on `ℝ`, which is only conditionnally complete, we will need all the time
@@ -333,6 +346,7 @@ theorem HD_below_aux1 {f : Cb X Y} (C : ℝ) {x : X} :
   let ⟨cf, hcf⟩ := (Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).1
   ⟨cf + C, forall_range_iff.2 fun i => add_le_add_right ((fun x => hcf (mem_range_self x)) _) _⟩
 #align Gromov_Hausdorff.HD_below_aux1 GromovHausdorff.HD_below_aux1
+-/
 
 private theorem HD_bound_aux1 (f : Cb X Y) (C : ℝ) :
     BddAbove (range fun x : X => ⨅ y, f (inl x, inr y) + C) :=
@@ -343,11 +357,13 @@ private theorem HD_bound_aux1 (f : Cb X Y) (C : ℝ) :
     (⨅ y, f (inl x, inr y) + C) ≤ f (inl x, inr default) + C := ciInf_le (HD_below_aux1 C) default
     _ ≤ Cf + C := add_le_add ((fun x => hCf (mem_range_self x)) _) le_rfl
 
+#print GromovHausdorff.HD_below_aux2 /-
 theorem HD_below_aux2 {f : Cb X Y} (C : ℝ) {y : Y} :
     BddBelow (range fun x : X => f (inl x, inr y) + C) :=
   let ⟨cf, hcf⟩ := (Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).1
   ⟨cf + C, forall_range_iff.2 fun i => add_le_add_right ((fun x => hcf (mem_range_self x)) _) _⟩
 #align Gromov_Hausdorff.HD_below_aux2 GromovHausdorff.HD_below_aux2
+-/
 
 private theorem HD_bound_aux2 (f : Cb X Y) (C : ℝ) :
     BddAbove (range fun y : Y => ⨅ x, f (inl x, inr y) + C) :=
@@ -358,6 +374,7 @@ private theorem HD_bound_aux2 (f : Cb X Y) (C : ℝ) :
     (⨅ x, f (inl x, inr y) + C) ≤ f (inl default, inr y) + C := ciInf_le (HD_below_aux2 C) default
     _ ≤ Cf + C := add_le_add ((fun x => hCf (mem_range_self x)) _) le_rfl
 
+#print GromovHausdorff.HD_candidatesBDist_le /-
 /-- Explicit bound on `HD (dist)`. This means that when looking for minimizers it will
 be sufficient to look for functions with `HD(f)` bounded by this bound. -/
 theorem HD_candidatesBDist_le :
@@ -393,6 +410,7 @@ theorem HD_candidatesBDist_le :
           exact dist_le_diam_of_mem bounded_of_compact_space (mem_univ _) (mem_univ _)
     exact le_trans A B
 #align Gromov_Hausdorff.HD_candidates_b_dist_le GromovHausdorff.HD_candidatesBDist_le
+-/
 
 /- To check that HD is continuous, we check that it is Lipschitz. As HD is a max, we
 prove separately inequalities controlling the two terms (relying too heavily on copy-paste...) -/
@@ -518,10 +536,12 @@ def optimalGHInjl (x : X) : OptimalGHCoupling X Y :=
 #align Gromov_Hausdorff.optimal_GH_injl GromovHausdorff.optimalGHInjl
 -/
 
+#print GromovHausdorff.isometry_optimalGHInjl /-
 /-- The injection of `X` in the optimal coupling between `X` and `Y` is an isometry. -/
 theorem isometry_optimalGHInjl : Isometry (optimalGHInjl X Y) :=
   Isometry.of_dist_eq fun x y => candidates_dist_inl (optimalGHDist_mem_candidatesB X Y) _ _
 #align Gromov_Hausdorff.isometry_optimal_GH_injl GromovHausdorff.isometry_optimalGHInjl
+-/
 
 #print GromovHausdorff.optimalGHInjr /-
 /-- Injection of `Y` in the optimal coupling between `X` and `Y` -/
@@ -530,11 +550,14 @@ def optimalGHInjr (y : Y) : OptimalGHCoupling X Y :=
 #align Gromov_Hausdorff.optimal_GH_injr GromovHausdorff.optimalGHInjr
 -/
 
+#print GromovHausdorff.isometry_optimalGHInjr /-
 /-- The injection of `Y` in the optimal coupling between `X` and `Y` is an isometry. -/
 theorem isometry_optimalGHInjr : Isometry (optimalGHInjr X Y) :=
   Isometry.of_dist_eq fun x y => candidates_dist_inr (optimalGHDist_mem_candidatesB X Y) _ _
 #align Gromov_Hausdorff.isometry_optimal_GH_injr GromovHausdorff.isometry_optimalGHInjr
+-/
 
+#print GromovHausdorff.compactSpace_optimalGHCoupling /-
 /-- The optimal coupling between two compact spaces `X` and `Y` is still a compact space -/
 instance compactSpace_optimalGHCoupling : CompactSpace (OptimalGHCoupling X Y) :=
   ⟨by
@@ -544,7 +567,9 @@ instance compactSpace_optimalGHCoupling : CompactSpace (OptimalGHCoupling X Y) :
         (continuous_sum_dom.2
           ⟨(isometry_optimal_GH_injl X Y).Continuous, (isometry_optimal_GH_injr X Y).Continuous⟩)⟩
 #align Gromov_Hausdorff.compact_space_optimal_GH_coupling GromovHausdorff.compactSpace_optimalGHCoupling
+-/
 
+#print GromovHausdorff.hausdorffDist_optimal_le_HD /-
 /-- For any candidate `f`, `HD(f)` is larger than or equal to the Hausdorff distance in the
 optimal coupling. This follows from the fact that HD of the optimal candidate is exactly
 the Hausdorff distance in the optimal coupling, although we only prove here the inequality
@@ -579,6 +604,7 @@ theorem hausdorffDist_optimal_le_HD {f} (h : f ∈ candidatesB X Y) :
     refine' ⟨optimal_GH_injl X Y z', mem_range_self _, le_of_lt _⟩
     rwa [dist_comm]
 #align Gromov_Hausdorff.Hausdorff_dist_optimal_le_HD GromovHausdorff.hausdorffDist_optimal_le_HD
+-/
 
 end Consequences
 
Diff
@@ -82,7 +82,6 @@ private theorem one_le_max_var : 1 ≤ maxVar X Y :=
     (1 : Real) = 2 * 0 + 1 + 2 * 0 := by simp
     _ ≤ 2 * diam (univ : Set X) + 1 + 2 * diam (univ : Set Y) := by
       apply_rules [add_le_add, mul_le_mul_of_nonneg_left, diam_nonneg] <;> norm_num
-    
 
 /-- The set of functions on `X ⊕ Y` that are candidates distances to realize the
 minimum of the Hausdorff distances between `X` and `Y` in a coupling -/
@@ -129,7 +128,6 @@ private theorem max_var_bound : dist x y ≤ maxVar X Y :=
       by
       apply_rules [add_le_add, mul_le_mul_of_nonneg_right, diam_nonneg, le_refl]
       norm_num; norm_num
-    
 
 private theorem candidates_symm (fA : f ∈ candidates X Y) : f (x, y) = f (y, x) :=
   fA.1.1.1.2 x y
@@ -148,7 +146,6 @@ private theorem candidates_nonneg (fA : f ∈ candidates X Y) : 0 ≤ f (x, y) :
       _ ≤ f (x, y) + f (y, x) := (candidates_triangle fA)
       _ = f (x, y) + f (x, y) := by rw [candidates_symm fA]
       _ = 2 * f (x, y) := by ring
-      
   · linarith
 
 private theorem candidates_dist_inl (fA : f ∈ candidates X Y) (x y : X) :
@@ -172,21 +169,18 @@ private theorem candidates_dist_bound (fA : f ∈ candidates X Y) :
       _ = 1 * dist (inl x) (inl y) := by simp
       _ ≤ maxVar X Y * dist (inl x) (inl y) :=
         mul_le_mul_of_nonneg_right (one_le_maxVar X Y) dist_nonneg
-      
   | inl x, inr y =>
     calc
       f (inl x, inr y) ≤ maxVar X Y := candidates_le_maxVar fA
       _ = maxVar X Y * 1 := by simp
       _ ≤ maxVar X Y * dist (inl x) (inr y) :=
         mul_le_mul_of_nonneg_left Sum.one_le_dist_inl_inr (le_trans zero_le_one (one_le_maxVar X Y))
-      
   | inr x, inl y =>
     calc
       f (inr x, inl y) ≤ maxVar X Y := candidates_le_maxVar fA
       _ = maxVar X Y * 1 := by simp
       _ ≤ maxVar X Y * dist (inl x) (inr y) :=
         mul_le_mul_of_nonneg_left Sum.one_le_dist_inl_inr (le_trans zero_le_one (one_le_maxVar X Y))
-      
   | inr x, inr y =>
     calc
       f (inr x, inr y) = dist x y := candidates_dist_inr fA x y
@@ -194,7 +188,6 @@ private theorem candidates_dist_bound (fA : f ∈ candidates X Y) :
       _ = 1 * dist (inr x) (inr y) := by simp
       _ ≤ maxVar X Y * dist (inr x) (inr y) :=
         mul_le_mul_of_nonneg_right (one_le_maxVar X Y) dist_nonneg
-      
 
 /-- Technical lemma to prove that candidates are Lipschitz -/
 private theorem candidates_lipschitz_aux (fA : f ∈ candidates X Y) :
@@ -218,7 +211,6 @@ private theorem candidates_lipschitz_aux (fA : f ∈ candidates X Y) :
           (zero_le_one.trans (one_le_max_var X Y))
     _ = 2 * maxVar X Y * max (dist x z) (dist y t) := by simp [dist_comm]; ring
     _ = 2 * maxVar X Y * dist (x, y) (z, t) := by rfl
-    
 
 /-- Candidates are Lipschitz -/
 private theorem candidates_lipschitz (fA : f ∈ candidates X Y) : LipschitzWith (2 * maxVar X Y) f :=
@@ -350,7 +342,6 @@ private theorem HD_bound_aux1 (f : Cb X Y) (C : ℝ) :
   calc
     (⨅ y, f (inl x, inr y) + C) ≤ f (inl x, inr default) + C := ciInf_le (HD_below_aux1 C) default
     _ ≤ Cf + C := add_le_add ((fun x => hCf (mem_range_self x)) _) le_rfl
-    
 
 theorem HD_below_aux2 {f : Cb X Y} (C : ℝ) {y : Y} :
     BddBelow (range fun x : X => f (inl x, inr y) + C) :=
@@ -366,7 +357,6 @@ private theorem HD_bound_aux2 (f : Cb X Y) (C : ℝ) :
   calc
     (⨅ x, f (inl x, inr y) + C) ≤ f (inl default, inr y) + C := ciInf_le (HD_below_aux2 C) default
     _ ≤ Cf + C := add_le_add ((fun x => hCf (mem_range_self x)) _) le_rfl
-    
 
 /-- Explicit bound on `HD (dist)`. This means that when looking for minimizers it will
 be sufficient to look for functions with `HD(f)` bounded by this bound. -/
@@ -387,7 +377,6 @@ theorem HD_candidatesBDist_le :
           any_goals exact OrderedAddCommMonoid.to_covariantClass_left ℝ
           any_goals exact OrderedAddCommMonoid.to_covariantClass_right ℝ
           exact dist_le_diam_of_mem bounded_of_compact_space (mem_univ _) (mem_univ _)
-        
     exact le_trans A B
   · have A :
       (⨅ x, candidates_b_dist X Y (inl x, inr y)) ≤ candidates_b_dist X Y (inl default, inr y) :=
@@ -402,7 +391,6 @@ theorem HD_candidatesBDist_le :
           any_goals exact OrderedAddCommMonoid.to_covariantClass_left ℝ
           any_goals exact OrderedAddCommMonoid.to_covariantClass_right ℝ
           exact dist_le_diam_of_mem bounded_of_compact_space (mem_univ _) (mem_univ _)
-        
     exact le_trans A B
 #align Gromov_Hausdorff.HD_candidates_b_dist_le GromovHausdorff.HD_candidatesBDist_le
 
Diff
@@ -87,19 +87,19 @@ private theorem one_le_max_var : 1 ≤ maxVar X Y :=
 /-- The set of functions on `X ⊕ Y` that are candidates distances to realize the
 minimum of the Hausdorff distances between `X` and `Y` in a coupling -/
 def candidates : Set (ProdSpaceFun X Y) :=
-  { f |
+  {f |
     (((((∀ x y : X, f (Sum.inl x, Sum.inl y) = dist x y) ∧
               ∀ x y : Y, f (Sum.inr x, Sum.inr y) = dist x y) ∧
             ∀ x y, f (x, y) = f (y, x)) ∧
           ∀ x y z, f (x, z) ≤ f (x, y) + f (y, z)) ∧
         ∀ x, f (x, x) = 0) ∧
-      ∀ x y, f (x, y) ≤ maxVar X Y }
+      ∀ x y, f (x, y) ≤ maxVar X Y}
 #align Gromov_Hausdorff.candidates GromovHausdorff.candidates
 
 /-- Version of the set of candidates in bounded_continuous_functions, to apply
 Arzela-Ascoli -/
 private def candidates_b : Set (Cb X Y) :=
-  { f : Cb X Y | (f : _ → ℝ) ∈ candidates X Y }
+  {f : Cb X Y | (f : _ → ℝ) ∈ candidates X Y}
 
 end Definitions
 
@@ -275,26 +275,26 @@ private theorem candidates_b_nonempty : (candidatesB X Y).Nonempty :=
 equicontinuous. Equicontinuity follows from the Lipschitz control, we check closedness. -/
 private theorem closed_candidates_b : IsClosed (candidatesB X Y) :=
   by
-  have I1 : ∀ x y, IsClosed { f : Cb X Y | f (inl x, inl y) = dist x y } := fun x y =>
+  have I1 : ∀ x y, IsClosed {f : Cb X Y | f (inl x, inl y) = dist x y} := fun x y =>
     isClosed_eq continuous_eval_const continuous_const
-  have I2 : ∀ x y, IsClosed { f : Cb X Y | f (inr x, inr y) = dist x y } := fun x y =>
+  have I2 : ∀ x y, IsClosed {f : Cb X Y | f (inr x, inr y) = dist x y} := fun x y =>
     isClosed_eq continuous_eval_const continuous_const
-  have I3 : ∀ x y, IsClosed { f : Cb X Y | f (x, y) = f (y, x) } := fun x y =>
+  have I3 : ∀ x y, IsClosed {f : Cb X Y | f (x, y) = f (y, x)} := fun x y =>
     isClosed_eq continuous_eval_const continuous_eval_const
-  have I4 : ∀ x y z, IsClosed { f : Cb X Y | f (x, z) ≤ f (x, y) + f (y, z) } := fun x y z =>
+  have I4 : ∀ x y z, IsClosed {f : Cb X Y | f (x, z) ≤ f (x, y) + f (y, z)} := fun x y z =>
     isClosed_le continuous_eval_const (continuous_eval_const.add continuous_eval_const)
-  have I5 : ∀ x, IsClosed { f : Cb X Y | f (x, x) = 0 } := fun x =>
+  have I5 : ∀ x, IsClosed {f : Cb X Y | f (x, x) = 0} := fun x =>
     isClosed_eq continuous_eval_const continuous_const
-  have I6 : ∀ x y, IsClosed { f : Cb X Y | f (x, y) ≤ max_var X Y } := fun x y =>
+  have I6 : ∀ x y, IsClosed {f : Cb X Y | f (x, y) ≤ max_var X Y} := fun x y =>
     isClosed_le continuous_eval_const continuous_const
   have :
     candidates_b X Y =
-      (((((⋂ (x) (y), { f : Cb X Y | f (@inl X Y x, @inl X Y y) = dist x y }) ∩
-                ⋂ (x) (y), { f : Cb X Y | f (@inr X Y x, @inr X Y y) = dist x y }) ∩
-              ⋂ (x) (y), { f : Cb X Y | f (x, y) = f (y, x) }) ∩
-            ⋂ (x) (y) (z), { f : Cb X Y | f (x, z) ≤ f (x, y) + f (y, z) }) ∩
-          ⋂ x, { f : Cb X Y | f (x, x) = 0 }) ∩
-        ⋂ (x) (y), { f : Cb X Y | f (x, y) ≤ max_var X Y } :=
+      (((((⋂ (x) (y), {f : Cb X Y | f (@inl X Y x, @inl X Y y) = dist x y}) ∩
+                ⋂ (x) (y), {f : Cb X Y | f (@inr X Y x, @inr X Y y) = dist x y}) ∩
+              ⋂ (x) (y), {f : Cb X Y | f (x, y) = f (y, x)}) ∩
+            ⋂ (x) (y) (z), {f : Cb X Y | f (x, z) ≤ f (x, y) + f (y, z)}) ∩
+          ⋂ x, {f : Cb X Y | f (x, x) = 0}) ∩
+        ⋂ (x) (y), {f : Cb X Y | f (x, y) ≤ max_var X Y} :=
     by ext; simp only [candidates_b, candidates, mem_inter_iff, mem_Inter, mem_set_of_eq]
   rw [this]
   repeat'
Diff
@@ -248,8 +248,10 @@ private theorem dist_mem_candidates :
     and_self_iff, Sum.forall, Set.mem_setOf_eq, dist_self]
   repeat'
     first
-      |constructor|exact fun a y z =>
-        dist_triangle_left _ _ _|exact fun x y => by rfl|exact fun x y => max_var_bound
+    | constructor
+    | exact fun a y z => dist_triangle_left _ _ _
+    | exact fun x y => by rfl
+    | exact fun x y => max_var_bound
 
 /-- The distance on `X ⊕ Y` as a candidate -/
 def candidatesBDist (X : Type u) (Y : Type v) [MetricSpace X] [CompactSpace X] [Inhabited X]
@@ -297,11 +299,15 @@ private theorem closed_candidates_b : IsClosed (candidatesB X Y) :=
   rw [this]
   repeat'
     first
-      |apply
-        IsClosed.inter _
-          _|apply
-        isClosed_iInter
-          _|apply I1 _ _|apply I2 _ _|apply I3 _ _|apply I4 _ _ _|apply I5 _|apply I6 _ _|intro x
+    | apply IsClosed.inter _ _
+    | apply isClosed_iInter _
+    | apply I1 _ _
+    | apply I2 _ _
+    | apply I3 _ _
+    | apply I4 _ _ _
+    | apply I5 _
+    | apply I6 _ _
+    | intro x
 
 /-- Compactness of candidates (in bounded_continuous_functions) follows. -/
 private theorem is_compact_candidates_b : IsCompact (candidatesB X Y) :=
@@ -512,8 +518,8 @@ attribute [local instance] premetric_optimal_GH_dist
 /-- A metric space which realizes the optimal coupling between `X` and `Y` -/
 @[nolint has_nonempty_instance]
 def OptimalGHCoupling : Type _ :=
-  @UniformSpace.SeparationQuotient (Sum X Y) (premetricOptimalGHDist X Y).toUniformSpace deriving
-  MetricSpace
+  @UniformSpace.SeparationQuotient (Sum X Y) (premetricOptimalGHDist X Y).toUniformSpace
+deriving MetricSpace
 #align Gromov_Hausdorff.optimal_GH_coupling GromovHausdorff.OptimalGHCoupling
 -/
 
Diff
@@ -40,7 +40,7 @@ space structure on `X ⊕ Y`. The corresponding metric quotient is `optimal_GH_c
 
 noncomputable section
 
-open Classical Topology NNReal
+open scoped Classical Topology NNReal
 
 universe u v w
 
Diff
@@ -84,12 +84,6 @@ private theorem one_le_max_var : 1 ≤ maxVar X Y :=
       apply_rules [add_le_add, mul_le_mul_of_nonneg_left, diam_nonneg] <;> norm_num
     
 
-/- warning: Gromov_Hausdorff.candidates -> GromovHausdorff.candidates is a dubious translation:
-lean 3 declaration is
-  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], Set.{max u1 u2} (_Private.3228366057.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
-but is expected to have type
-  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : MetricSpace.{u2} Y], Set.{max u2 u1} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y)
-Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.candidates GromovHausdorff.candidatesₓ'. -/
 /-- The set of functions on `X ⊕ Y` that are candidates distances to realize the
 minimum of the Hausdorff distances between `X` and `Y` in a coupling -/
 def candidates : Set (ProdSpaceFun X Y) :=
@@ -236,23 +230,11 @@ private theorem candidates_lipschitz (fA : f ∈ candidates X Y) : LipschitzWith
   rw [dist_comm]
   exact candidates_lipschitz_aux fA
 
-/- warning: Gromov_Hausdorff.candidates_b_of_candidates -> GromovHausdorff.candidatesBOfCandidates is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] (f : _Private.3228366057.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6), (Membership.Mem.{max u1 u2, max u1 u2} (_Private.3228366057.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (Set.{max u1 u2} (_Private.3228366057.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.hasMem.{max u1 u2} (_Private.3228366057.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) f (GromovHausdorff.candidates.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) -> (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
-but is expected to have type
-  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : MetricSpace.{u2} Y] [_inst_4 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_3)))] (_inst_5 : _private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y), (Membership.mem.{max u1 u2, max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y) (Set.{max u2 u1} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y)) (Set.instMembershipSet.{max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y)) _inst_5 (GromovHausdorff.candidates.{u1, u2} X Y _inst_1 _inst_3)) -> (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_3)
-Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.candidates_b_of_candidates GromovHausdorff.candidatesBOfCandidatesₓ'. -/
 /-- candidates give rise to elements of bounded_continuous_functions -/
 def candidatesBOfCandidates (f : ProdSpaceFun X Y) (fA : f ∈ candidates X Y) : Cb X Y :=
   BoundedContinuousFunction.mkOfCompact ⟨f, (candidates_lipschitz fA).Continuous⟩
 #align Gromov_Hausdorff.candidates_b_of_candidates GromovHausdorff.candidatesBOfCandidates
 
-/- warning: Gromov_Hausdorff.candidates_b_of_candidates_mem -> GromovHausdorff.candidatesBOfCandidates_mem is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] (f : _Private.3228366057.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (fA : Membership.Mem.{max u1 u2, max u1 u2} (_Private.3228366057.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (Set.{max u1 u2} (_Private.3228366057.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.hasMem.{max u1 u2} (_Private.3228366057.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) f (GromovHausdorff.candidates.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)), Membership.Mem.{max u1 u2, max u1 u2} (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (Set.{max u1 u2} (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.hasMem.{max u1 u2} (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (GromovHausdorff.candidatesBOfCandidates.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 f fA) (_Private.2031534939.candidatesB.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
-but is expected to have type
-  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : MetricSpace.{u2} Y] [_inst_4 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_3)))] (_inst_5 : _private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y) (_inst_6 : Membership.mem.{max u1 u2, max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y) (Set.{max u2 u1} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y)) (Set.instMembershipSet.{max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y)) _inst_5 (GromovHausdorff.candidates.{u1, u2} X Y _inst_1 _inst_3)), Membership.mem.{max u2 u1, max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_3) (Set.{max u2 u1} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_3)) (Set.instMembershipSet.{max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_3)) (GromovHausdorff.candidatesBOfCandidates.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.candidatesB.{u1, u2} X Y _inst_1 _inst_3)
-Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.candidates_b_of_candidates_mem GromovHausdorff.candidatesBOfCandidates_memₓ'. -/
 theorem candidatesBOfCandidates_mem (f : ProdSpaceFun X Y) (fA : f ∈ candidates X Y) :
     candidatesBOfCandidates f fA ∈ candidatesB X Y :=
   fA
@@ -269,24 +251,12 @@ private theorem dist_mem_candidates :
       |constructor|exact fun a y z =>
         dist_triangle_left _ _ _|exact fun x y => by rfl|exact fun x y => max_var_bound
 
-/- warning: Gromov_Hausdorff.candidates_b_dist -> GromovHausdorff.candidatesBDist is a dubious translation:
-lean 3 declaration is
-  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_7 : MetricSpace.{u1} X] [_inst_8 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_7)))] [_inst_9 : Inhabited.{succ u1} X] [_inst_10 : MetricSpace.{u2} Y] [_inst_11 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_10)))] [_inst_12 : Inhabited.{succ u2} Y], _Private.63012675.Cb.{u1, u2} X Y _inst_7 _inst_8 (instNonempty.{succ u1} X _inst_9) _inst_10 _inst_11 (instNonempty.{succ u2} Y _inst_12)
-but is expected to have type
-  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_7 : MetricSpace.{u1} X] [_inst_8 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_7)))] [_inst_9 : Inhabited.{succ u1} X] [_inst_10 : MetricSpace.{u2} Y] [_inst_11 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_10)))] [_inst_12 : Inhabited.{succ u2} Y], _private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_7 _inst_10
-Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.candidates_b_dist GromovHausdorff.candidatesBDistₓ'. -/
 /-- The distance on `X ⊕ Y` as a candidate -/
 def candidatesBDist (X : Type u) (Y : Type v) [MetricSpace X] [CompactSpace X] [Inhabited X]
     [MetricSpace Y] [CompactSpace Y] [Inhabited Y] : Cb X Y :=
   candidatesBOfCandidates _ dist_mem_candidates
 #align Gromov_Hausdorff.candidates_b_dist GromovHausdorff.candidatesBDist
 
-/- warning: Gromov_Hausdorff.candidates_b_dist_mem_candidates_b -> GromovHausdorff.candidatesBDist_mem_candidatesB is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], Membership.Mem.{max u1 u2, max u1 u2} (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 (instNonempty.{succ u1} X (Classical.inhabited_of_nonempty'.{succ u1} X _inst_3)) _inst_4 _inst_5 (instNonempty.{succ u2} Y (Classical.inhabited_of_nonempty'.{succ u2} Y _inst_6))) (Set.{max u1 u2} (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.hasMem.{max u1 u2} (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (GromovHausdorff.candidatesBDist.{u1, u2} X Y _inst_1 _inst_2 (Classical.inhabited_of_nonempty'.{succ u1} X _inst_3) _inst_4 _inst_5 (Classical.inhabited_of_nonempty'.{succ u2} Y _inst_6)) (_Private.2031534939.candidatesB.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
-but is expected to have type
-  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], Membership.mem.{max u1 u2, max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_4) (Set.{max u2 u1} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_4)) (Set.instMembershipSet.{max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_4)) (GromovHausdorff.candidatesBDist.{u1, u2} X Y _inst_1 _inst_2 (Classical.inhabited_of_nonempty'.{succ u1} X _inst_3) _inst_4 _inst_5 (Classical.inhabited_of_nonempty'.{succ u2} Y _inst_6)) (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.candidatesB.{u1, u2} X Y _inst_1 _inst_4)
-Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.candidates_b_dist_mem_candidates_b GromovHausdorff.candidatesBDist_mem_candidatesBₓ'. -/
 theorem candidatesBDist_mem_candidatesB : candidatesBDist X Y ∈ candidatesB X Y :=
   candidatesBOfCandidates_mem _ _
 #align Gromov_Hausdorff.candidates_b_dist_mem_candidates_b GromovHausdorff.candidatesBDist_mem_candidatesB
@@ -348,12 +318,6 @@ private theorem is_compact_candidates_b : IsCompact (candidatesB X Y) :=
     · rintro x y ⟨f, hf⟩
       exact (candidates_lipschitz hf).dist_le_mul _ _
 
-/- warning: Gromov_Hausdorff.HD -> GromovHausdorff.HD is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) -> Real
-but is expected to have type
-  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : MetricSpace.{u2} Y], (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_2) -> Real
-Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.HD GromovHausdorff.HDₓ'. -/
 /-- We will then choose the candidate minimizing the Hausdorff distance. Except that we are not
 in a metric space setting, so we need to define our custom version of Hausdorff distance,
 called HD, and prove its basic properties. -/
@@ -361,9 +325,6 @@ def HD (f : Cb X Y) :=
   max (⨆ x, ⨅ y, f (inl x, inr y)) (⨆ y, ⨅ x, f (inl x, inr y))
 #align Gromov_Hausdorff.HD GromovHausdorff.HD
 
-/- warning: Gromov_Hausdorff.HD_below_aux1 -> GromovHausdorff.HD_below_aux1 is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.HD_below_aux1 GromovHausdorff.HD_below_aux1ₓ'. -/
 /- We will show that HD is continuous on bounded_continuous_functions, to deduce that its
 minimum on the compact set candidates_b is attained. Since it is defined in terms of
 infimum and supremum on `ℝ`, which is only conditionnally complete, we will need all the time
@@ -385,9 +346,6 @@ private theorem HD_bound_aux1 (f : Cb X Y) (C : ℝ) :
     _ ≤ Cf + C := add_le_add ((fun x => hCf (mem_range_self x)) _) le_rfl
     
 
-/- warning: Gromov_Hausdorff.HD_below_aux2 -> GromovHausdorff.HD_below_aux2 is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.HD_below_aux2 GromovHausdorff.HD_below_aux2ₓ'. -/
 theorem HD_below_aux2 {f : Cb X Y} (C : ℝ) {y : Y} :
     BddBelow (range fun x : X => f (inl x, inr y) + C) :=
   let ⟨cf, hcf⟩ := (Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).1
@@ -404,12 +362,6 @@ private theorem HD_bound_aux2 (f : Cb X Y) (C : ℝ) :
     _ ≤ Cf + C := add_le_add ((fun x => hCf (mem_range_self x)) _) le_rfl
     
 
-/- warning: Gromov_Hausdorff.HD_candidates_b_dist_le -> GromovHausdorff.HD_candidatesBDist_le is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], LE.le.{0} Real Real.hasLe (GromovHausdorff.HD.{u1, u2} X Y _inst_1 _inst_2 (instNonempty.{succ u1} X (Classical.inhabited_of_nonempty'.{succ u1} X _inst_3)) _inst_4 _inst_5 (instNonempty.{succ u2} Y (Classical.inhabited_of_nonempty'.{succ u2} Y _inst_6)) (GromovHausdorff.candidatesBDist.{u1, u2} X Y _inst_1 _inst_2 (Classical.inhabited_of_nonempty'.{succ u1} X _inst_3) _inst_4 _inst_5 (Classical.inhabited_of_nonempty'.{succ u2} Y _inst_6))) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (Metric.diam.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1) (Set.univ.{u1} X)) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne)))) (Metric.diam.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4) (Set.univ.{u2} Y)))
-but is expected to have type
-  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], LE.le.{0} Real Real.instLEReal (GromovHausdorff.HD.{u1, u2} X Y _inst_1 _inst_4 (GromovHausdorff.candidatesBDist.{u1, u2} X Y _inst_1 _inst_2 (Classical.inhabited_of_nonempty'.{succ u1} X _inst_3) _inst_4 _inst_5 (Classical.inhabited_of_nonempty'.{succ u2} Y _inst_6))) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (Metric.diam.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1) (Set.univ.{u1} X)) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal))) (Metric.diam.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4) (Set.univ.{u2} Y)))
-Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.HD_candidates_b_dist_le GromovHausdorff.HD_candidatesBDist_leₓ'. -/
 /-- Explicit bound on `HD (dist)`. This means that when looking for minimizers it will
 be sufficient to look for functions with `HD(f)` bounded by this bound. -/
 theorem HD_candidatesBDist_le :
@@ -572,12 +524,6 @@ def optimalGHInjl (x : X) : OptimalGHCoupling X Y :=
 #align Gromov_Hausdorff.optimal_GH_injl GromovHausdorff.optimalGHInjl
 -/
 
-/- warning: Gromov_Hausdorff.isometry_optimal_GH_injl -> GromovHausdorff.isometry_optimalGHInjl is a dubious translation:
-lean 3 declaration is
-  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], Isometry.{u1, max u1 u2} X (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (PseudoMetricSpace.toPseudoEMetricSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)) (PseudoMetricSpace.toPseudoEMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (MetricSpace.toPseudoMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (GromovHausdorff.OptimalGHCoupling.metricSpace.{u2, u1} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6))) (GromovHausdorff.optimalGHInjl.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
-but is expected to have type
-  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], Isometry.{u1, max u1 u2} X (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (EMetricSpace.toPseudoEMetricSpace.{u1} X (MetricSpace.toEMetricSpace.{u1} X _inst_1)) (EMetricSpace.toPseudoEMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (MetricSpace.toEMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (GromovHausdorff.instMetricSpaceOptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6))) (GromovHausdorff.optimalGHInjl.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
-Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.isometry_optimal_GH_injl GromovHausdorff.isometry_optimalGHInjlₓ'. -/
 /-- The injection of `X` in the optimal coupling between `X` and `Y` is an isometry. -/
 theorem isometry_optimalGHInjl : Isometry (optimalGHInjl X Y) :=
   Isometry.of_dist_eq fun x y => candidates_dist_inl (optimalGHDist_mem_candidatesB X Y) _ _
@@ -590,23 +536,11 @@ def optimalGHInjr (y : Y) : OptimalGHCoupling X Y :=
 #align Gromov_Hausdorff.optimal_GH_injr GromovHausdorff.optimalGHInjr
 -/
 
-/- warning: Gromov_Hausdorff.isometry_optimal_GH_injr -> GromovHausdorff.isometry_optimalGHInjr is a dubious translation:
-lean 3 declaration is
-  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], Isometry.{u2, max u1 u2} Y (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)) (PseudoMetricSpace.toPseudoEMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (MetricSpace.toPseudoMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (GromovHausdorff.OptimalGHCoupling.metricSpace.{u2, u1} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6))) (GromovHausdorff.optimalGHInjr.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
-but is expected to have type
-  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], Isometry.{u2, max u1 u2} Y (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (EMetricSpace.toPseudoEMetricSpace.{u2} Y (MetricSpace.toEMetricSpace.{u2} Y _inst_4)) (EMetricSpace.toPseudoEMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (MetricSpace.toEMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (GromovHausdorff.instMetricSpaceOptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6))) (GromovHausdorff.optimalGHInjr.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
-Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.isometry_optimal_GH_injr GromovHausdorff.isometry_optimalGHInjrₓ'. -/
 /-- The injection of `Y` in the optimal coupling between `X` and `Y` is an isometry. -/
 theorem isometry_optimalGHInjr : Isometry (optimalGHInjr X Y) :=
   Isometry.of_dist_eq fun x y => candidates_dist_inr (optimalGHDist_mem_candidatesB X Y) _ _
 #align Gromov_Hausdorff.isometry_optimal_GH_injr GromovHausdorff.isometry_optimalGHInjr
 
-/- warning: Gromov_Hausdorff.compact_space_optimal_GH_coupling -> GromovHausdorff.compactSpace_optimalGHCoupling is a dubious translation:
-lean 3 declaration is
-  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], CompactSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (UniformSpace.toTopologicalSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (PseudoMetricSpace.toUniformSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (MetricSpace.toPseudoMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (GromovHausdorff.OptimalGHCoupling.metricSpace.{u2, u1} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6))))
-but is expected to have type
-  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], CompactSpace.{max u2 u1} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (UniformSpace.toTopologicalSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (PseudoMetricSpace.toUniformSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (MetricSpace.toPseudoMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (GromovHausdorff.instMetricSpaceOptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6))))
-Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.compact_space_optimal_GH_coupling GromovHausdorff.compactSpace_optimalGHCouplingₓ'. -/
 /-- The optimal coupling between two compact spaces `X` and `Y` is still a compact space -/
 instance compactSpace_optimalGHCoupling : CompactSpace (OptimalGHCoupling X Y) :=
   ⟨by
@@ -617,12 +551,6 @@ instance compactSpace_optimalGHCoupling : CompactSpace (OptimalGHCoupling X Y) :
           ⟨(isometry_optimal_GH_injl X Y).Continuous, (isometry_optimal_GH_injr X Y).Continuous⟩)⟩
 #align Gromov_Hausdorff.compact_space_optimal_GH_coupling GromovHausdorff.compactSpace_optimalGHCoupling
 
-/- warning: Gromov_Hausdorff.Hausdorff_dist_optimal_le_HD -> GromovHausdorff.hausdorffDist_optimal_le_HD is a dubious translation:
-lean 3 declaration is
-  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] {f : _Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6}, (Membership.Mem.{max u1 u2, max u1 u2} (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (Set.{max u1 u2} (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.hasMem.{max u1 u2} (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) f (_Private.2031534939.candidatesB.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) -> (LE.le.{0} Real Real.hasLe (Metric.hausdorffDist.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (MetricSpace.toPseudoMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (GromovHausdorff.OptimalGHCoupling.metricSpace.{u2, u1} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.range.{max u1 u2, succ u1} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) X (GromovHausdorff.optimalGHInjl.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.range.{max u1 u2, succ u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) Y (GromovHausdorff.optimalGHInjr.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6))) (GromovHausdorff.HD.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 f))
-but is expected to have type
-  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] {f : _private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_4}, (Membership.mem.{max u1 u2, max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_4) (Set.{max u2 u1} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_4)) (Set.instMembershipSet.{max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_4)) f (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.candidatesB.{u1, u2} X Y _inst_1 _inst_4)) -> (LE.le.{0} Real Real.instLEReal (Metric.hausdorffDist.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (MetricSpace.toPseudoMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (GromovHausdorff.instMetricSpaceOptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.range.{max u1 u2, succ u1} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) X (GromovHausdorff.optimalGHInjl.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.range.{max u1 u2, succ u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) Y (GromovHausdorff.optimalGHInjr.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6))) (GromovHausdorff.HD.{u1, u2} X Y _inst_1 _inst_4 f))
-Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.Hausdorff_dist_optimal_le_HD GromovHausdorff.hausdorffDist_optimal_le_HDₓ'. -/
 /-- For any candidate `f`, `HD(f)` is larger than or equal to the Hausdorff distance in the
 optimal coupling. This follows from the fact that HD of the optimal candidate is exactly
 the Hausdorff distance in the optimal coupling, although we only prove here the inequality
Diff
@@ -129,9 +129,7 @@ private theorem max_var_bound : dist x y ≤ maxVar X Y :=
     _ =
         diam (univ : Set X) + (dist default default + 1 + dist default default) +
           diam (univ : Set Y) :=
-      by
-      rw [isometry_inl.diam_range, isometry_inr.diam_range]
-      rfl
+      by rw [isometry_inl.diam_range, isometry_inr.diam_range]; rfl
     _ = 1 * diam (univ : Set X) + 1 + 1 * diam (univ : Set Y) := by simp
     _ ≤ 2 * diam (univ : Set X) + 1 + 2 * diam (univ : Set Y) :=
       by
@@ -176,9 +174,7 @@ private theorem candidates_dist_bound (fA : f ∈ candidates X Y) :
   | inl x, inl y =>
     calc
       f (inl x, inl y) = dist x y := candidates_dist_inl fA x y
-      _ = dist (inl x) (inl y) := by
-        rw [@sum.dist_eq X Y]
-        rfl
+      _ = dist (inl x) (inl y) := by rw [@sum.dist_eq X Y]; rfl
       _ = 1 * dist (inl x) (inl y) := by simp
       _ ≤ maxVar X Y * dist (inl x) (inl y) :=
         mul_le_mul_of_nonneg_right (one_le_maxVar X Y) dist_nonneg
@@ -200,9 +196,7 @@ private theorem candidates_dist_bound (fA : f ∈ candidates X Y) :
   | inr x, inr y =>
     calc
       f (inr x, inr y) = dist x y := candidates_dist_inr fA x y
-      _ = dist (inr x) (inr y) := by
-        rw [@sum.dist_eq X Y]
-        rfl
+      _ = dist (inr x) (inr y) := by rw [@sum.dist_eq X Y]; rfl
       _ = 1 * dist (inr x) (inr y) := by simp
       _ ≤ maxVar X Y * dist (inr x) (inr y) :=
         mul_le_mul_of_nonneg_right (one_le_maxVar X Y) dist_nonneg
@@ -228,10 +222,7 @@ private theorem candidates_lipschitz_aux (fA : f ∈ candidates X Y) :
       apply
         mul_le_mul_of_nonneg_left (le_max_right (dist x z) (dist t y))
           (zero_le_one.trans (one_le_max_var X Y))
-    _ = 2 * maxVar X Y * max (dist x z) (dist y t) :=
-      by
-      simp [dist_comm]
-      ring
+    _ = 2 * maxVar X Y * max (dist x z) (dist y t) := by simp [dist_comm]; ring
     _ = 2 * maxVar X Y * dist (x, y) (z, t) := by rfl
     
 
@@ -332,9 +323,7 @@ private theorem closed_candidates_b : IsClosed (candidatesB X Y) :=
             ⋂ (x) (y) (z), { f : Cb X Y | f (x, z) ≤ f (x, y) + f (y, z) }) ∩
           ⋂ x, { f : Cb X Y | f (x, x) = 0 }) ∩
         ⋂ (x) (y), { f : Cb X Y | f (x, y) ≤ max_var X Y } :=
-    by
-    ext
-    simp only [candidates_b, candidates, mem_inter_iff, mem_Inter, mem_set_of_eq]
+    by ext; simp only [candidates_b, candidates, mem_inter_iff, mem_Inter, mem_set_of_eq]
   rw [this]
   repeat'
     first
@@ -479,15 +468,13 @@ private theorem HD_lipschitz_aux1 (f g : Cb X Y) :
     by
     intro x
     refine' Monotone.map_ciInf_of_continuousAt (continuous_at_id.add continuousAt_const) _ _
-    · intro x y hx
-      simpa
+    · intro x y hx; simpa
     · show BddBelow (range fun y : Y => g (inl x, inr y))
       exact ⟨cg, forall_range_iff.2 fun i => Hcg _⟩
   have E2 : (⨆ x, ⨅ y, g (inl x, inr y)) + dist f g = ⨆ x, (⨅ y, g (inl x, inr y)) + dist f g :=
     by
     refine' Monotone.map_ciSup_of_continuousAt (continuous_at_id.add continuousAt_const) _ _
-    · intro x y hx
-      simpa
+    · intro x y hx; simpa
     · simpa using HD_bound_aux1 _ 0
   -- deduce the result from the above two steps
   simpa [E2, E1, Function.comp]
@@ -510,15 +497,13 @@ private theorem HD_lipschitz_aux2 (f g : Cb X Y) :
     by
     intro y
     refine' Monotone.map_ciInf_of_continuousAt (continuous_at_id.add continuousAt_const) _ _
-    · intro x y hx
-      simpa
+    · intro x y hx; simpa
     · show BddBelow (range fun x : X => g (inl x, inr y))
       exact ⟨cg, forall_range_iff.2 fun i => Hcg _⟩
   have E2 : (⨆ y, ⨅ x, g (inl x, inr y)) + dist f g = ⨆ y, (⨅ x, g (inl x, inr y)) + dist f g :=
     by
     refine' Monotone.map_ciSup_of_continuousAt (continuous_at_id.add continuousAt_const) _ _
-    · intro x y hx
-      simpa
+    · intro x y hx; simpa
     · simpa using HD_bound_aux2 _ 0
   -- deduce the result from the above two steps
   simpa [E2, E1]
Diff
@@ -69,16 +69,13 @@ variable (X : Type u) (Y : Type v) [MetricSpace X] [CompactSpace X] [Nonempty X]
 @[reducible]
 private def prod_space_fun : Type _ :=
   Sum X Y × Sum X Y → ℝ
-#align Gromov_Hausdorff.prod_space_fun Gromov_Hausdorff.prod_space_fun
 
 @[reducible]
 private def Cb : Type _ :=
   BoundedContinuousFunction (Sum X Y × Sum X Y) ℝ
-#align Gromov_Hausdorff.Cb Gromov_Hausdorff.Cb
 
 private def max_var : ℝ≥0 :=
   2 * ⟨diam (univ : Set X), diam_nonneg⟩ + 1 + 2 * ⟨diam (univ : Set Y), diam_nonneg⟩
-#align Gromov_Hausdorff.max_var Gromov_Hausdorff.max_var
 
 private theorem one_le_max_var : 1 ≤ maxVar X Y :=
   calc
@@ -86,7 +83,6 @@ private theorem one_le_max_var : 1 ≤ maxVar X Y :=
     _ ≤ 2 * diam (univ : Set X) + 1 + 2 * diam (univ : Set Y) := by
       apply_rules [add_le_add, mul_le_mul_of_nonneg_left, diam_nonneg] <;> norm_num
     
-#align Gromov_Hausdorff.one_le_max_var Gromov_Hausdorff.one_le_max_var
 
 /- warning: Gromov_Hausdorff.candidates -> GromovHausdorff.candidates is a dubious translation:
 lean 3 declaration is
@@ -110,7 +106,6 @@ def candidates : Set (ProdSpaceFun X Y) :=
 Arzela-Ascoli -/
 private def candidates_b : Set (Cb X Y) :=
   { f : Cb X Y | (f : _ → ℝ) ∈ candidates X Y }
-#align Gromov_Hausdorff.candidates_b Gromov_Hausdorff.candidates_b
 
 end Definitions
 
@@ -143,19 +138,15 @@ private theorem max_var_bound : dist x y ≤ maxVar X Y :=
       apply_rules [add_le_add, mul_le_mul_of_nonneg_right, diam_nonneg, le_refl]
       norm_num; norm_num
     
-#align Gromov_Hausdorff.max_var_bound Gromov_Hausdorff.max_var_bound
 
 private theorem candidates_symm (fA : f ∈ candidates X Y) : f (x, y) = f (y, x) :=
   fA.1.1.1.2 x y
-#align Gromov_Hausdorff.candidates_symm Gromov_Hausdorff.candidates_symm
 
 private theorem candidates_triangle (fA : f ∈ candidates X Y) : f (x, z) ≤ f (x, y) + f (y, z) :=
   fA.1.1.2 x y z
-#align Gromov_Hausdorff.candidates_triangle Gromov_Hausdorff.candidates_triangle
 
 private theorem candidates_refl (fA : f ∈ candidates X Y) : f (x, x) = 0 :=
   fA.1.2 x
-#align Gromov_Hausdorff.candidates_refl Gromov_Hausdorff.candidates_refl
 
 private theorem candidates_nonneg (fA : f ∈ candidates X Y) : 0 ≤ f (x, y) :=
   by
@@ -167,21 +158,17 @@ private theorem candidates_nonneg (fA : f ∈ candidates X Y) : 0 ≤ f (x, y) :
       _ = 2 * f (x, y) := by ring
       
   · linarith
-#align Gromov_Hausdorff.candidates_nonneg Gromov_Hausdorff.candidates_nonneg
 
 private theorem candidates_dist_inl (fA : f ∈ candidates X Y) (x y : X) :
     f (inl x, inl y) = dist x y :=
   fA.1.1.1.1.1 x y
-#align Gromov_Hausdorff.candidates_dist_inl Gromov_Hausdorff.candidates_dist_inl
 
 private theorem candidates_dist_inr (fA : f ∈ candidates X Y) (x y : Y) :
     f (inr x, inr y) = dist x y :=
   fA.1.1.1.1.2 x y
-#align Gromov_Hausdorff.candidates_dist_inr Gromov_Hausdorff.candidates_dist_inr
 
 private theorem candidates_le_max_var (fA : f ∈ candidates X Y) : f (x, y) ≤ maxVar X Y :=
   fA.2 x y
-#align Gromov_Hausdorff.candidates_le_max_var Gromov_Hausdorff.candidates_le_max_var
 
 /-- candidates are bounded by `max_var X Y` -/
 private theorem candidates_dist_bound (fA : f ∈ candidates X Y) :
@@ -220,7 +207,6 @@ private theorem candidates_dist_bound (fA : f ∈ candidates X Y) :
       _ ≤ maxVar X Y * dist (inr x) (inr y) :=
         mul_le_mul_of_nonneg_right (one_le_maxVar X Y) dist_nonneg
       
-#align Gromov_Hausdorff.candidates_dist_bound Gromov_Hausdorff.candidates_dist_bound
 
 /-- Technical lemma to prove that candidates are Lipschitz -/
 private theorem candidates_lipschitz_aux (fA : f ∈ candidates X Y) :
@@ -248,7 +234,6 @@ private theorem candidates_lipschitz_aux (fA : f ∈ candidates X Y) :
       ring
     _ = 2 * maxVar X Y * dist (x, y) (z, t) := by rfl
     
-#align Gromov_Hausdorff.candidates_lipschitz_aux Gromov_Hausdorff.candidates_lipschitz_aux
 
 /-- Candidates are Lipschitz -/
 private theorem candidates_lipschitz (fA : f ∈ candidates X Y) : LipschitzWith (2 * maxVar X Y) f :=
@@ -259,7 +244,6 @@ private theorem candidates_lipschitz (fA : f ∈ candidates X Y) : LipschitzWith
   use candidates_lipschitz_aux fA
   rw [dist_comm]
   exact candidates_lipschitz_aux fA
-#align Gromov_Hausdorff.candidates_lipschitz Gromov_Hausdorff.candidates_lipschitz
 
 /- warning: Gromov_Hausdorff.candidates_b_of_candidates -> GromovHausdorff.candidatesBOfCandidates is a dubious translation:
 lean 3 declaration is
@@ -293,7 +277,6 @@ private theorem dist_mem_candidates :
     first
       |constructor|exact fun a y z =>
         dist_triangle_left _ _ _|exact fun x y => by rfl|exact fun x y => max_var_bound
-#align Gromov_Hausdorff.dist_mem_candidates Gromov_Hausdorff.dist_mem_candidates
 
 /- warning: Gromov_Hausdorff.candidates_b_dist -> GromovHausdorff.candidatesBDist is a dubious translation:
 lean 3 declaration is
@@ -319,7 +302,6 @@ theorem candidatesBDist_mem_candidatesB : candidatesBDist X Y ∈ candidatesB X
 
 private theorem candidates_b_nonempty : (candidatesB X Y).Nonempty :=
   ⟨_, candidatesBDist_mem_candidatesB⟩
-#align Gromov_Hausdorff.candidates_b_nonempty Gromov_Hausdorff.candidates_b_nonempty
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:107:6: warning: expanding binder group (x y) -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:107:6: warning: expanding binder group (x y) -/
@@ -361,7 +343,6 @@ private theorem closed_candidates_b : IsClosed (candidatesB X Y) :=
           _|apply
         isClosed_iInter
           _|apply I1 _ _|apply I2 _ _|apply I3 _ _|apply I4 _ _ _|apply I5 _|apply I6 _ _|intro x
-#align Gromov_Hausdorff.closed_candidates_b Gromov_Hausdorff.closed_candidates_b
 
 /-- Compactness of candidates (in bounded_continuous_functions) follows. -/
 private theorem is_compact_candidates_b : IsCompact (candidatesB X Y) :=
@@ -377,7 +358,6 @@ private theorem is_compact_candidates_b : IsCompact (candidatesB X Y) :=
       simpa using this
     · rintro x y ⟨f, hf⟩
       exact (candidates_lipschitz hf).dist_le_mul _ _
-#align Gromov_Hausdorff.is_compact_candidates_b Gromov_Hausdorff.is_compact_candidates_b
 
 /- warning: Gromov_Hausdorff.HD -> GromovHausdorff.HD is a dubious translation:
 lean 3 declaration is
@@ -393,10 +373,7 @@ def HD (f : Cb X Y) :=
 #align Gromov_Hausdorff.HD GromovHausdorff.HD
 
 /- warning: Gromov_Hausdorff.HD_below_aux1 -> GromovHausdorff.HD_below_aux1 is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] {f : _Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6} (C : Real) {x : X}, BddBelow.{0} Real Real.preorder (Set.range.{0, succ u2} Real Y (fun (y : Y) => HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (coeFn.{succ (max u1 u2), succ (max u1 u2)} (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (fun (_x : BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (Prod.topologicalSpace.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4))))) Real.pseudoMetricSpace) => (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) -> Real) (BoundedContinuousFunction.hasCoeToFun.{max u1 u2, 0} (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (Prod.topologicalSpace.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4))))) Real.pseudoMetricSpace) f (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y x) (Sum.inr.{u1, u2} X Y y))) C))
-but is expected to have type
-  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : MetricSpace.{u2} Y] {_inst_3 : _private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_2} (_inst_4 : Real) {_inst_5 : X}, BddBelow.{0} Real Real.instPreorderReal (Set.range.{0, succ u2} Real Y (fun (y : Y) => HAdd.hAdd.{0, 0, 0} ((fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y _inst_5) (Sum.inr.{u1, u2} X Y y))) Real ((fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y _inst_5) (Sum.inr.{u1, u2} X Y y))) (instHAdd.{0} ((fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y _inst_5) (Sum.inr.{u1, u2} X Y y))) Real.instAddReal) (FunLike.coe.{succ (max u1 u2), succ (max u1 u2), 1} (BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace) (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) (fun (a : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => (fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) a) (ContinuousMapClass.toFunLike.{max u1 u2, max u1 u2, 0} (BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace) (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)) (BoundedContinuousMapClass.toContinuousMapClass.{max u1 u2, max u1 u2, 0} (BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace) (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace (BoundedContinuousFunction.instBoundedContinuousMapClassBoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace))) _inst_3 (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y _inst_5) (Sum.inr.{u1, u2} X Y y))) _inst_4))
+<too large>
 Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.HD_below_aux1 GromovHausdorff.HD_below_aux1ₓ'. -/
 /- We will show that HD is continuous on bounded_continuous_functions, to deduce that its
 minimum on the compact set candidates_b is attained. Since it is defined in terms of
@@ -418,13 +395,9 @@ private theorem HD_bound_aux1 (f : Cb X Y) (C : ℝ) :
     (⨅ y, f (inl x, inr y) + C) ≤ f (inl x, inr default) + C := ciInf_le (HD_below_aux1 C) default
     _ ≤ Cf + C := add_le_add ((fun x => hCf (mem_range_self x)) _) le_rfl
     
-#align Gromov_Hausdorff.HD_bound_aux1 Gromov_Hausdorff.HD_bound_aux1
 
 /- warning: Gromov_Hausdorff.HD_below_aux2 -> GromovHausdorff.HD_below_aux2 is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] {f : _Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6} (C : Real) {y : Y}, BddBelow.{0} Real Real.preorder (Set.range.{0, succ u1} Real X (fun (x : X) => HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (coeFn.{succ (max u1 u2), succ (max u1 u2)} (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (fun (_x : BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (Prod.topologicalSpace.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4))))) Real.pseudoMetricSpace) => (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) -> Real) (BoundedContinuousFunction.hasCoeToFun.{max u1 u2, 0} (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (Prod.topologicalSpace.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4))))) Real.pseudoMetricSpace) f (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y x) (Sum.inr.{u1, u2} X Y y))) C))
-but is expected to have type
-  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : MetricSpace.{u2} Y] {_inst_3 : _private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_2} (_inst_4 : Real) {_inst_5 : Y}, BddBelow.{0} Real Real.instPreorderReal (Set.range.{0, succ u1} Real X (fun (x : X) => HAdd.hAdd.{0, 0, 0} ((fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y x) (Sum.inr.{u1, u2} X Y _inst_5))) Real ((fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y x) (Sum.inr.{u1, u2} X Y _inst_5))) (instHAdd.{0} ((fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y x) (Sum.inr.{u1, u2} X Y _inst_5))) Real.instAddReal) (FunLike.coe.{succ (max u1 u2), succ (max u1 u2), 1} (BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace) (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) (fun (a : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => (fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) a) (ContinuousMapClass.toFunLike.{max u1 u2, max u1 u2, 0} (BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace) (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)) (BoundedContinuousMapClass.toContinuousMapClass.{max u1 u2, max u1 u2, 0} (BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace) (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace (BoundedContinuousFunction.instBoundedContinuousMapClassBoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace))) _inst_3 (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y x) (Sum.inr.{u1, u2} X Y _inst_5))) _inst_4))
+<too large>
 Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.HD_below_aux2 GromovHausdorff.HD_below_aux2ₓ'. -/
 theorem HD_below_aux2 {f : Cb X Y} (C : ℝ) {y : Y} :
     BddBelow (range fun x : X => f (inl x, inr y) + C) :=
@@ -441,7 +414,6 @@ private theorem HD_bound_aux2 (f : Cb X Y) (C : ℝ) :
     (⨅ x, f (inl x, inr y) + C) ≤ f (inl default, inr y) + C := ciInf_le (HD_below_aux2 C) default
     _ ≤ Cf + C := add_le_add ((fun x => hCf (mem_range_self x)) _) le_rfl
     
-#align Gromov_Hausdorff.HD_bound_aux2 Gromov_Hausdorff.HD_bound_aux2
 
 /- warning: Gromov_Hausdorff.HD_candidates_b_dist_le -> GromovHausdorff.HD_candidatesBDist_le is a dubious translation:
 lean 3 declaration is
@@ -519,7 +491,6 @@ private theorem HD_lipschitz_aux1 (f g : Cb X Y) :
     · simpa using HD_bound_aux1 _ 0
   -- deduce the result from the above two steps
   simpa [E2, E1, Function.comp]
-#align Gromov_Hausdorff.HD_lipschitz_aux1 Gromov_Hausdorff.HD_lipschitz_aux1
 
 private theorem HD_lipschitz_aux2 (f g : Cb X Y) :
     (⨆ y, ⨅ x, f (inl x, inr y)) ≤ (⨆ y, ⨅ x, g (inl x, inr y)) + dist f g :=
@@ -551,17 +522,14 @@ private theorem HD_lipschitz_aux2 (f g : Cb X Y) :
     · simpa using HD_bound_aux2 _ 0
   -- deduce the result from the above two steps
   simpa [E2, E1]
-#align Gromov_Hausdorff.HD_lipschitz_aux2 Gromov_Hausdorff.HD_lipschitz_aux2
 
 private theorem HD_lipschitz_aux3 (f g : Cb X Y) : HD f ≤ HD g + dist f g :=
   max_le (le_trans (HD_lipschitz_aux1 f g) (add_le_add_right (le_max_left _ _) _))
     (le_trans (HD_lipschitz_aux2 f g) (add_le_add_right (le_max_right _ _) _))
-#align Gromov_Hausdorff.HD_lipschitz_aux3 Gromov_Hausdorff.HD_lipschitz_aux3
 
 /-- Conclude that HD, being Lipschitz, is continuous -/
 private theorem HD_continuous : Continuous (HD : Cb X Y → ℝ) :=
   LipschitzWith.continuous (LipschitzWith.of_le_add hD_lipschitz_aux3)
-#align Gromov_Hausdorff.HD_continuous Gromov_Hausdorff.HD_continuous
 
 end Constructions
 
@@ -576,21 +544,17 @@ we can finally select a candidate minimizing HD. This will be the candidate real
 optimal coupling. -/
 private theorem exists_minimizer : ∃ f ∈ candidatesB X Y, ∀ g ∈ candidatesB X Y, HD f ≤ HD g :=
   isCompact_candidatesB.exists_forall_le candidatesB_nonempty hD_continuous.ContinuousOn
-#align Gromov_Hausdorff.exists_minimizer Gromov_Hausdorff.exists_minimizer
 
 private def optimal_GH_dist : Cb X Y :=
   Classical.choose (exists_minimizer X Y)
-#align Gromov_Hausdorff.optimal_GH_dist Gromov_Hausdorff.optimal_GH_dist
 
 private theorem optimal_GH_dist_mem_candidates_b : optimalGHDist X Y ∈ candidatesB X Y := by
   cases Classical.choose_spec (exists_minimizer X Y) <;> assumption
-#align Gromov_Hausdorff.optimal_GH_dist_mem_candidates_b Gromov_Hausdorff.optimal_GH_dist_mem_candidates_b
 
 private theorem HD_optimal_GH_dist_le (g : Cb X Y) (hg : g ∈ candidatesB X Y) :
     HD (optimalGHDist X Y) ≤ HD g :=
   let ⟨Z1, Z2⟩ := Classical.choose_spec (exists_minimizer X Y)
   Z2 g hg
-#align Gromov_Hausdorff.HD_optimal_GH_dist_le Gromov_Hausdorff.HD_optimal_GH_dist_le
 
 #print GromovHausdorff.premetricOptimalGHDist /-
 /-- With the optimal candidate, construct a premetric space structure on `X ⊕ Y`, on which the
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sébastien Gouëzel
 
 ! This file was ported from Lean 3 source module topology.metric_space.gromov_hausdorff_realized
-! leanprover-community/mathlib commit 0c1f285a9f6e608ae2bdffa3f993eafb01eba829
+! leanprover-community/mathlib commit a87d22575d946e1e156fc1edd1e1269600a8a282
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -15,6 +15,9 @@ import Mathbin.Topology.ContinuousFunction.Bounded
 /-!
 # The Gromov-Hausdorff distance is realized
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 In this file, we construct of a good coupling between nonempty compact metric spaces, minimizing
 their Hausdorff distance. This construction is instrumental to study the Gromov-Hausdorff
 distance between nonempty compact metric spaces.
@@ -87,7 +90,7 @@ private theorem one_le_max_var : 1 ≤ maxVar X Y :=
 
 /- warning: Gromov_Hausdorff.candidates -> GromovHausdorff.candidates is a dubious translation:
 lean 3 declaration is
-  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], Set.{max u1 u2} (_Private.4235162875.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
+  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], Set.{max u1 u2} (_Private.3228366057.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
 but is expected to have type
   forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : MetricSpace.{u2} Y], Set.{max u2 u1} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y)
 Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.candidates GromovHausdorff.candidatesₓ'. -/
@@ -260,7 +263,7 @@ private theorem candidates_lipschitz (fA : f ∈ candidates X Y) : LipschitzWith
 
 /- warning: Gromov_Hausdorff.candidates_b_of_candidates -> GromovHausdorff.candidatesBOfCandidates is a dubious translation:
 lean 3 declaration is
-  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] (f : _Private.4235162875.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6), (Membership.Mem.{max u1 u2, max u1 u2} (_Private.4235162875.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (Set.{max u1 u2} (_Private.4235162875.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.hasMem.{max u1 u2} (_Private.4235162875.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) f (GromovHausdorff.candidates.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) -> (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
+  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] (f : _Private.3228366057.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6), (Membership.Mem.{max u1 u2, max u1 u2} (_Private.3228366057.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (Set.{max u1 u2} (_Private.3228366057.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.hasMem.{max u1 u2} (_Private.3228366057.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) f (GromovHausdorff.candidates.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) -> (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
 but is expected to have type
   forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : MetricSpace.{u2} Y] [_inst_4 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_3)))] (_inst_5 : _private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y), (Membership.mem.{max u1 u2, max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y) (Set.{max u2 u1} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y)) (Set.instMembershipSet.{max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y)) _inst_5 (GromovHausdorff.candidates.{u1, u2} X Y _inst_1 _inst_3)) -> (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_3)
 Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.candidates_b_of_candidates GromovHausdorff.candidatesBOfCandidatesₓ'. -/
@@ -271,7 +274,7 @@ def candidatesBOfCandidates (f : ProdSpaceFun X Y) (fA : f ∈ candidates X Y) :
 
 /- warning: Gromov_Hausdorff.candidates_b_of_candidates_mem -> GromovHausdorff.candidatesBOfCandidates_mem is a dubious translation:
 lean 3 declaration is
-  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] (f : _Private.4235162875.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (fA : Membership.Mem.{max u1 u2, max u1 u2} (_Private.4235162875.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (Set.{max u1 u2} (_Private.4235162875.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.hasMem.{max u1 u2} (_Private.4235162875.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) f (GromovHausdorff.candidates.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)), Membership.Mem.{max u1 u2, max u1 u2} (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (Set.{max u1 u2} (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.hasMem.{max u1 u2} (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (GromovHausdorff.candidatesBOfCandidates.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 f fA) (_Private.2695913301.candidatesB.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
+  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] (f : _Private.3228366057.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (fA : Membership.Mem.{max u1 u2, max u1 u2} (_Private.3228366057.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (Set.{max u1 u2} (_Private.3228366057.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.hasMem.{max u1 u2} (_Private.3228366057.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) f (GromovHausdorff.candidates.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)), Membership.Mem.{max u1 u2, max u1 u2} (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (Set.{max u1 u2} (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.hasMem.{max u1 u2} (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (GromovHausdorff.candidatesBOfCandidates.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 f fA) (_Private.2031534939.candidatesB.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
 but is expected to have type
   forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : MetricSpace.{u2} Y] [_inst_4 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_3)))] (_inst_5 : _private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y) (_inst_6 : Membership.mem.{max u1 u2, max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y) (Set.{max u2 u1} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y)) (Set.instMembershipSet.{max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y)) _inst_5 (GromovHausdorff.candidates.{u1, u2} X Y _inst_1 _inst_3)), Membership.mem.{max u2 u1, max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_3) (Set.{max u2 u1} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_3)) (Set.instMembershipSet.{max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_3)) (GromovHausdorff.candidatesBOfCandidates.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.candidatesB.{u1, u2} X Y _inst_1 _inst_3)
 Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.candidates_b_of_candidates_mem GromovHausdorff.candidatesBOfCandidates_memₓ'. -/
@@ -294,7 +297,7 @@ private theorem dist_mem_candidates :
 
 /- warning: Gromov_Hausdorff.candidates_b_dist -> GromovHausdorff.candidatesBDist is a dubious translation:
 lean 3 declaration is
-  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_7 : MetricSpace.{u1} X] [_inst_8 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_7)))] [_inst_9 : Inhabited.{succ u1} X] [_inst_10 : MetricSpace.{u2} Y] [_inst_11 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_10)))] [_inst_12 : Inhabited.{succ u2} Y], _Private.1145524185.Cb.{u1, u2} X Y _inst_7 _inst_8 (instNonempty.{succ u1} X _inst_9) _inst_10 _inst_11 (instNonempty.{succ u2} Y _inst_12)
+  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_7 : MetricSpace.{u1} X] [_inst_8 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_7)))] [_inst_9 : Inhabited.{succ u1} X] [_inst_10 : MetricSpace.{u2} Y] [_inst_11 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_10)))] [_inst_12 : Inhabited.{succ u2} Y], _Private.63012675.Cb.{u1, u2} X Y _inst_7 _inst_8 (instNonempty.{succ u1} X _inst_9) _inst_10 _inst_11 (instNonempty.{succ u2} Y _inst_12)
 but is expected to have type
   forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_7 : MetricSpace.{u1} X] [_inst_8 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_7)))] [_inst_9 : Inhabited.{succ u1} X] [_inst_10 : MetricSpace.{u2} Y] [_inst_11 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_10)))] [_inst_12 : Inhabited.{succ u2} Y], _private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_7 _inst_10
 Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.candidates_b_dist GromovHausdorff.candidatesBDistₓ'. -/
@@ -306,7 +309,7 @@ def candidatesBDist (X : Type u) (Y : Type v) [MetricSpace X] [CompactSpace X] [
 
 /- warning: Gromov_Hausdorff.candidates_b_dist_mem_candidates_b -> GromovHausdorff.candidatesBDist_mem_candidatesB is a dubious translation:
 lean 3 declaration is
-  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], Membership.Mem.{max u1 u2, max u1 u2} (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 (instNonempty.{succ u1} X (Classical.inhabited_of_nonempty'.{succ u1} X _inst_3)) _inst_4 _inst_5 (instNonempty.{succ u2} Y (Classical.inhabited_of_nonempty'.{succ u2} Y _inst_6))) (Set.{max u1 u2} (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.hasMem.{max u1 u2} (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (GromovHausdorff.candidatesBDist.{u1, u2} X Y _inst_1 _inst_2 (Classical.inhabited_of_nonempty'.{succ u1} X _inst_3) _inst_4 _inst_5 (Classical.inhabited_of_nonempty'.{succ u2} Y _inst_6)) (_Private.2695913301.candidatesB.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
+  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], Membership.Mem.{max u1 u2, max u1 u2} (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 (instNonempty.{succ u1} X (Classical.inhabited_of_nonempty'.{succ u1} X _inst_3)) _inst_4 _inst_5 (instNonempty.{succ u2} Y (Classical.inhabited_of_nonempty'.{succ u2} Y _inst_6))) (Set.{max u1 u2} (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.hasMem.{max u1 u2} (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (GromovHausdorff.candidatesBDist.{u1, u2} X Y _inst_1 _inst_2 (Classical.inhabited_of_nonempty'.{succ u1} X _inst_3) _inst_4 _inst_5 (Classical.inhabited_of_nonempty'.{succ u2} Y _inst_6)) (_Private.2031534939.candidatesB.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
 but is expected to have type
   forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], Membership.mem.{max u1 u2, max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_4) (Set.{max u2 u1} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_4)) (Set.instMembershipSet.{max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_4)) (GromovHausdorff.candidatesBDist.{u1, u2} X Y _inst_1 _inst_2 (Classical.inhabited_of_nonempty'.{succ u1} X _inst_3) _inst_4 _inst_5 (Classical.inhabited_of_nonempty'.{succ u2} Y _inst_6)) (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.candidatesB.{u1, u2} X Y _inst_1 _inst_4)
 Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.candidates_b_dist_mem_candidates_b GromovHausdorff.candidatesBDist_mem_candidatesBₓ'. -/
@@ -378,7 +381,7 @@ private theorem is_compact_candidates_b : IsCompact (candidatesB X Y) :=
 
 /- warning: Gromov_Hausdorff.HD -> GromovHausdorff.HD is a dubious translation:
 lean 3 declaration is
-  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) -> Real
+  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) -> Real
 but is expected to have type
   forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : MetricSpace.{u2} Y], (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_2) -> Real
 Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.HD GromovHausdorff.HDₓ'. -/
@@ -391,7 +394,7 @@ def HD (f : Cb X Y) :=
 
 /- warning: Gromov_Hausdorff.HD_below_aux1 -> GromovHausdorff.HD_below_aux1 is a dubious translation:
 lean 3 declaration is
-  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] {f : _Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6} (C : Real) {x : X}, BddBelow.{0} Real Real.preorder (Set.range.{0, succ u2} Real Y (fun (y : Y) => HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (coeFn.{succ (max u1 u2), succ (max u1 u2)} (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (fun (_x : BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (Prod.topologicalSpace.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4))))) Real.pseudoMetricSpace) => (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) -> Real) (BoundedContinuousFunction.hasCoeToFun.{max u1 u2, 0} (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (Prod.topologicalSpace.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4))))) Real.pseudoMetricSpace) f (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y x) (Sum.inr.{u1, u2} X Y y))) C))
+  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] {f : _Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6} (C : Real) {x : X}, BddBelow.{0} Real Real.preorder (Set.range.{0, succ u2} Real Y (fun (y : Y) => HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (coeFn.{succ (max u1 u2), succ (max u1 u2)} (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (fun (_x : BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (Prod.topologicalSpace.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4))))) Real.pseudoMetricSpace) => (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) -> Real) (BoundedContinuousFunction.hasCoeToFun.{max u1 u2, 0} (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (Prod.topologicalSpace.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4))))) Real.pseudoMetricSpace) f (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y x) (Sum.inr.{u1, u2} X Y y))) C))
 but is expected to have type
   forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : MetricSpace.{u2} Y] {_inst_3 : _private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_2} (_inst_4 : Real) {_inst_5 : X}, BddBelow.{0} Real Real.instPreorderReal (Set.range.{0, succ u2} Real Y (fun (y : Y) => HAdd.hAdd.{0, 0, 0} ((fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y _inst_5) (Sum.inr.{u1, u2} X Y y))) Real ((fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y _inst_5) (Sum.inr.{u1, u2} X Y y))) (instHAdd.{0} ((fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y _inst_5) (Sum.inr.{u1, u2} X Y y))) Real.instAddReal) (FunLike.coe.{succ (max u1 u2), succ (max u1 u2), 1} (BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace) (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) (fun (a : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => (fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) a) (ContinuousMapClass.toFunLike.{max u1 u2, max u1 u2, 0} (BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace) (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)) (BoundedContinuousMapClass.toContinuousMapClass.{max u1 u2, max u1 u2, 0} (BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace) (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace (BoundedContinuousFunction.instBoundedContinuousMapClassBoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace))) _inst_3 (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y _inst_5) (Sum.inr.{u1, u2} X Y y))) _inst_4))
 Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.HD_below_aux1 GromovHausdorff.HD_below_aux1ₓ'. -/
@@ -419,7 +422,7 @@ private theorem HD_bound_aux1 (f : Cb X Y) (C : ℝ) :
 
 /- warning: Gromov_Hausdorff.HD_below_aux2 -> GromovHausdorff.HD_below_aux2 is a dubious translation:
 lean 3 declaration is
-  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] {f : _Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6} (C : Real) {y : Y}, BddBelow.{0} Real Real.preorder (Set.range.{0, succ u1} Real X (fun (x : X) => HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (coeFn.{succ (max u1 u2), succ (max u1 u2)} (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (fun (_x : BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (Prod.topologicalSpace.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4))))) Real.pseudoMetricSpace) => (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) -> Real) (BoundedContinuousFunction.hasCoeToFun.{max u1 u2, 0} (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (Prod.topologicalSpace.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4))))) Real.pseudoMetricSpace) f (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y x) (Sum.inr.{u1, u2} X Y y))) C))
+  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] {f : _Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6} (C : Real) {y : Y}, BddBelow.{0} Real Real.preorder (Set.range.{0, succ u1} Real X (fun (x : X) => HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (coeFn.{succ (max u1 u2), succ (max u1 u2)} (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (fun (_x : BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (Prod.topologicalSpace.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4))))) Real.pseudoMetricSpace) => (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) -> Real) (BoundedContinuousFunction.hasCoeToFun.{max u1 u2, 0} (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (Prod.topologicalSpace.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4))))) Real.pseudoMetricSpace) f (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y x) (Sum.inr.{u1, u2} X Y y))) C))
 but is expected to have type
   forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : MetricSpace.{u2} Y] {_inst_3 : _private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_2} (_inst_4 : Real) {_inst_5 : Y}, BddBelow.{0} Real Real.instPreorderReal (Set.range.{0, succ u1} Real X (fun (x : X) => HAdd.hAdd.{0, 0, 0} ((fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y x) (Sum.inr.{u1, u2} X Y _inst_5))) Real ((fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y x) (Sum.inr.{u1, u2} X Y _inst_5))) (instHAdd.{0} ((fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y x) (Sum.inr.{u1, u2} X Y _inst_5))) Real.instAddReal) (FunLike.coe.{succ (max u1 u2), succ (max u1 u2), 1} (BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace) (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) (fun (a : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => (fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) a) (ContinuousMapClass.toFunLike.{max u1 u2, max u1 u2, 0} (BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace) (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)) (BoundedContinuousMapClass.toContinuousMapClass.{max u1 u2, max u1 u2, 0} (BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace) (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace (BoundedContinuousFunction.instBoundedContinuousMapClassBoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace))) _inst_3 (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y x) (Sum.inr.{u1, u2} X Y _inst_5))) _inst_4))
 Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.HD_below_aux2 GromovHausdorff.HD_below_aux2ₓ'. -/
@@ -667,7 +670,7 @@ instance compactSpace_optimalGHCoupling : CompactSpace (OptimalGHCoupling X Y) :
 
 /- warning: Gromov_Hausdorff.Hausdorff_dist_optimal_le_HD -> GromovHausdorff.hausdorffDist_optimal_le_HD is a dubious translation:
 lean 3 declaration is
-  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] {f : _Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6}, (Membership.Mem.{max u1 u2, max u1 u2} (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (Set.{max u1 u2} (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.hasMem.{max u1 u2} (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) f (_Private.2695913301.candidatesB.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) -> (LE.le.{0} Real Real.hasLe (Metric.hausdorffDist.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (MetricSpace.toPseudoMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (GromovHausdorff.OptimalGHCoupling.metricSpace.{u2, u1} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.range.{max u1 u2, succ u1} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) X (GromovHausdorff.optimalGHInjl.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.range.{max u1 u2, succ u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) Y (GromovHausdorff.optimalGHInjr.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6))) (GromovHausdorff.HD.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 f))
+  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] {f : _Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6}, (Membership.Mem.{max u1 u2, max u1 u2} (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (Set.{max u1 u2} (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.hasMem.{max u1 u2} (_Private.63012675.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) f (_Private.2031534939.candidatesB.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) -> (LE.le.{0} Real Real.hasLe (Metric.hausdorffDist.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (MetricSpace.toPseudoMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (GromovHausdorff.OptimalGHCoupling.metricSpace.{u2, u1} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.range.{max u1 u2, succ u1} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) X (GromovHausdorff.optimalGHInjl.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.range.{max u1 u2, succ u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) Y (GromovHausdorff.optimalGHInjr.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6))) (GromovHausdorff.HD.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 f))
 but is expected to have type
   forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] {f : _private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_4}, (Membership.mem.{max u1 u2, max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_4) (Set.{max u2 u1} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_4)) (Set.instMembershipSet.{max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_4)) f (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.candidatesB.{u1, u2} X Y _inst_1 _inst_4)) -> (LE.le.{0} Real Real.instLEReal (Metric.hausdorffDist.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (MetricSpace.toPseudoMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (GromovHausdorff.instMetricSpaceOptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.range.{max u1 u2, succ u1} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) X (GromovHausdorff.optimalGHInjl.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.range.{max u1 u2, succ u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) Y (GromovHausdorff.optimalGHInjr.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6))) (GromovHausdorff.HD.{u1, u2} X Y _inst_1 _inst_4 f))
 Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.Hausdorff_dist_optimal_le_HD GromovHausdorff.hausdorffDist_optimal_le_HDₓ'. -/
Diff
@@ -85,6 +85,12 @@ private theorem one_le_max_var : 1 ≤ maxVar X Y :=
     
 #align Gromov_Hausdorff.one_le_max_var Gromov_Hausdorff.one_le_max_var
 
+/- warning: Gromov_Hausdorff.candidates -> GromovHausdorff.candidates is a dubious translation:
+lean 3 declaration is
+  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], Set.{max u1 u2} (_Private.4235162875.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
+but is expected to have type
+  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : MetricSpace.{u2} Y], Set.{max u2 u1} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y)
+Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.candidates GromovHausdorff.candidatesₓ'. -/
 /-- The set of functions on `X ⊕ Y` that are candidates distances to realize the
 minimum of the Hausdorff distances between `X` and `Y` in a coupling -/
 def candidates : Set (ProdSpaceFun X Y) :=
@@ -252,11 +258,23 @@ private theorem candidates_lipschitz (fA : f ∈ candidates X Y) : LipschitzWith
   exact candidates_lipschitz_aux fA
 #align Gromov_Hausdorff.candidates_lipschitz Gromov_Hausdorff.candidates_lipschitz
 
+/- warning: Gromov_Hausdorff.candidates_b_of_candidates -> GromovHausdorff.candidatesBOfCandidates is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] (f : _Private.4235162875.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6), (Membership.Mem.{max u1 u2, max u1 u2} (_Private.4235162875.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (Set.{max u1 u2} (_Private.4235162875.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.hasMem.{max u1 u2} (_Private.4235162875.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) f (GromovHausdorff.candidates.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) -> (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
+but is expected to have type
+  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : MetricSpace.{u2} Y] [_inst_4 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_3)))] (_inst_5 : _private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y), (Membership.mem.{max u1 u2, max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y) (Set.{max u2 u1} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y)) (Set.instMembershipSet.{max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y)) _inst_5 (GromovHausdorff.candidates.{u1, u2} X Y _inst_1 _inst_3)) -> (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_3)
+Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.candidates_b_of_candidates GromovHausdorff.candidatesBOfCandidatesₓ'. -/
 /-- candidates give rise to elements of bounded_continuous_functions -/
 def candidatesBOfCandidates (f : ProdSpaceFun X Y) (fA : f ∈ candidates X Y) : Cb X Y :=
   BoundedContinuousFunction.mkOfCompact ⟨f, (candidates_lipschitz fA).Continuous⟩
 #align Gromov_Hausdorff.candidates_b_of_candidates GromovHausdorff.candidatesBOfCandidates
 
+/- warning: Gromov_Hausdorff.candidates_b_of_candidates_mem -> GromovHausdorff.candidatesBOfCandidates_mem is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] (f : _Private.4235162875.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (fA : Membership.Mem.{max u1 u2, max u1 u2} (_Private.4235162875.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (Set.{max u1 u2} (_Private.4235162875.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.hasMem.{max u1 u2} (_Private.4235162875.ProdSpaceFun.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) f (GromovHausdorff.candidates.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)), Membership.Mem.{max u1 u2, max u1 u2} (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (Set.{max u1 u2} (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.hasMem.{max u1 u2} (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (GromovHausdorff.candidatesBOfCandidates.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 f fA) (_Private.2695913301.candidatesB.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
+but is expected to have type
+  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : MetricSpace.{u2} Y] [_inst_4 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_3)))] (_inst_5 : _private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y) (_inst_6 : Membership.mem.{max u1 u2, max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y) (Set.{max u2 u1} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y)) (Set.instMembershipSet.{max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.ProdSpaceFun.{u1, u2} X Y)) _inst_5 (GromovHausdorff.candidates.{u1, u2} X Y _inst_1 _inst_3)), Membership.mem.{max u2 u1, max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_3) (Set.{max u2 u1} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_3)) (Set.instMembershipSet.{max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_3)) (GromovHausdorff.candidatesBOfCandidates.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.candidatesB.{u1, u2} X Y _inst_1 _inst_3)
+Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.candidates_b_of_candidates_mem GromovHausdorff.candidatesBOfCandidates_memₓ'. -/
 theorem candidatesBOfCandidates_mem (f : ProdSpaceFun X Y) (fA : f ∈ candidates X Y) :
     candidatesBOfCandidates f fA ∈ candidatesB X Y :=
   fA
@@ -274,12 +292,24 @@ private theorem dist_mem_candidates :
         dist_triangle_left _ _ _|exact fun x y => by rfl|exact fun x y => max_var_bound
 #align Gromov_Hausdorff.dist_mem_candidates Gromov_Hausdorff.dist_mem_candidates
 
+/- warning: Gromov_Hausdorff.candidates_b_dist -> GromovHausdorff.candidatesBDist is a dubious translation:
+lean 3 declaration is
+  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_7 : MetricSpace.{u1} X] [_inst_8 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_7)))] [_inst_9 : Inhabited.{succ u1} X] [_inst_10 : MetricSpace.{u2} Y] [_inst_11 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_10)))] [_inst_12 : Inhabited.{succ u2} Y], _Private.1145524185.Cb.{u1, u2} X Y _inst_7 _inst_8 (instNonempty.{succ u1} X _inst_9) _inst_10 _inst_11 (instNonempty.{succ u2} Y _inst_12)
+but is expected to have type
+  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_7 : MetricSpace.{u1} X] [_inst_8 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_7)))] [_inst_9 : Inhabited.{succ u1} X] [_inst_10 : MetricSpace.{u2} Y] [_inst_11 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_10)))] [_inst_12 : Inhabited.{succ u2} Y], _private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_7 _inst_10
+Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.candidates_b_dist GromovHausdorff.candidatesBDistₓ'. -/
 /-- The distance on `X ⊕ Y` as a candidate -/
 def candidatesBDist (X : Type u) (Y : Type v) [MetricSpace X] [CompactSpace X] [Inhabited X]
     [MetricSpace Y] [CompactSpace Y] [Inhabited Y] : Cb X Y :=
   candidatesBOfCandidates _ dist_mem_candidates
 #align Gromov_Hausdorff.candidates_b_dist GromovHausdorff.candidatesBDist
 
+/- warning: Gromov_Hausdorff.candidates_b_dist_mem_candidates_b -> GromovHausdorff.candidatesBDist_mem_candidatesB is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], Membership.Mem.{max u1 u2, max u1 u2} (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 (instNonempty.{succ u1} X (Classical.inhabited_of_nonempty'.{succ u1} X _inst_3)) _inst_4 _inst_5 (instNonempty.{succ u2} Y (Classical.inhabited_of_nonempty'.{succ u2} Y _inst_6))) (Set.{max u1 u2} (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.hasMem.{max u1 u2} (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (GromovHausdorff.candidatesBDist.{u1, u2} X Y _inst_1 _inst_2 (Classical.inhabited_of_nonempty'.{succ u1} X _inst_3) _inst_4 _inst_5 (Classical.inhabited_of_nonempty'.{succ u2} Y _inst_6)) (_Private.2695913301.candidatesB.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
+but is expected to have type
+  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], Membership.mem.{max u1 u2, max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_4) (Set.{max u2 u1} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_4)) (Set.instMembershipSet.{max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_4)) (GromovHausdorff.candidatesBDist.{u1, u2} X Y _inst_1 _inst_2 (Classical.inhabited_of_nonempty'.{succ u1} X _inst_3) _inst_4 _inst_5 (Classical.inhabited_of_nonempty'.{succ u2} Y _inst_6)) (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.candidatesB.{u1, u2} X Y _inst_1 _inst_4)
+Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.candidates_b_dist_mem_candidates_b GromovHausdorff.candidatesBDist_mem_candidatesBₓ'. -/
 theorem candidatesBDist_mem_candidatesB : candidatesBDist X Y ∈ candidatesB X Y :=
   candidatesBOfCandidates_mem _ _
 #align Gromov_Hausdorff.candidates_b_dist_mem_candidates_b GromovHausdorff.candidatesBDist_mem_candidatesB
@@ -346,13 +376,25 @@ private theorem is_compact_candidates_b : IsCompact (candidatesB X Y) :=
       exact (candidates_lipschitz hf).dist_le_mul _ _
 #align Gromov_Hausdorff.is_compact_candidates_b Gromov_Hausdorff.is_compact_candidates_b
 
+/- warning: Gromov_Hausdorff.HD -> GromovHausdorff.HD is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) -> Real
+but is expected to have type
+  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : MetricSpace.{u2} Y], (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_2) -> Real
+Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.HD GromovHausdorff.HDₓ'. -/
 /-- We will then choose the candidate minimizing the Hausdorff distance. Except that we are not
 in a metric space setting, so we need to define our custom version of Hausdorff distance,
 called HD, and prove its basic properties. -/
-def hD (f : Cb X Y) :=
+def HD (f : Cb X Y) :=
   max (⨆ x, ⨅ y, f (inl x, inr y)) (⨆ y, ⨅ x, f (inl x, inr y))
-#align Gromov_Hausdorff.HD GromovHausdorff.hD
-
+#align Gromov_Hausdorff.HD GromovHausdorff.HD
+
+/- warning: Gromov_Hausdorff.HD_below_aux1 -> GromovHausdorff.HD_below_aux1 is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] {f : _Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6} (C : Real) {x : X}, BddBelow.{0} Real Real.preorder (Set.range.{0, succ u2} Real Y (fun (y : Y) => HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (coeFn.{succ (max u1 u2), succ (max u1 u2)} (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (fun (_x : BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (Prod.topologicalSpace.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4))))) Real.pseudoMetricSpace) => (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) -> Real) (BoundedContinuousFunction.hasCoeToFun.{max u1 u2, 0} (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (Prod.topologicalSpace.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4))))) Real.pseudoMetricSpace) f (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y x) (Sum.inr.{u1, u2} X Y y))) C))
+but is expected to have type
+  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : MetricSpace.{u2} Y] {_inst_3 : _private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_2} (_inst_4 : Real) {_inst_5 : X}, BddBelow.{0} Real Real.instPreorderReal (Set.range.{0, succ u2} Real Y (fun (y : Y) => HAdd.hAdd.{0, 0, 0} ((fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y _inst_5) (Sum.inr.{u1, u2} X Y y))) Real ((fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y _inst_5) (Sum.inr.{u1, u2} X Y y))) (instHAdd.{0} ((fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y _inst_5) (Sum.inr.{u1, u2} X Y y))) Real.instAddReal) (FunLike.coe.{succ (max u1 u2), succ (max u1 u2), 1} (BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace) (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) (fun (a : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => (fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) a) (ContinuousMapClass.toFunLike.{max u1 u2, max u1 u2, 0} (BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace) (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)) (BoundedContinuousMapClass.toContinuousMapClass.{max u1 u2, max u1 u2, 0} (BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace) (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace (BoundedContinuousFunction.instBoundedContinuousMapClassBoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace))) _inst_3 (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y _inst_5) (Sum.inr.{u1, u2} X Y y))) _inst_4))
+Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.HD_below_aux1 GromovHausdorff.HD_below_aux1ₓ'. -/
 /- We will show that HD is continuous on bounded_continuous_functions, to deduce that its
 minimum on the compact set candidates_b is attained. Since it is defined in terms of
 infimum and supremum on `ℝ`, which is only conditionnally complete, we will need all the time
@@ -375,6 +417,12 @@ private theorem HD_bound_aux1 (f : Cb X Y) (C : ℝ) :
     
 #align Gromov_Hausdorff.HD_bound_aux1 Gromov_Hausdorff.HD_bound_aux1
 
+/- warning: Gromov_Hausdorff.HD_below_aux2 -> GromovHausdorff.HD_below_aux2 is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] {f : _Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6} (C : Real) {y : Y}, BddBelow.{0} Real Real.preorder (Set.range.{0, succ u1} Real X (fun (x : X) => HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (coeFn.{succ (max u1 u2), succ (max u1 u2)} (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (fun (_x : BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (Prod.topologicalSpace.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4))))) Real.pseudoMetricSpace) => (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) -> Real) (BoundedContinuousFunction.hasCoeToFun.{max u1 u2, 0} (Prod.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (Prod.topologicalSpace.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))) (Sum.topologicalSpace.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4))))) Real.pseudoMetricSpace) f (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y x) (Sum.inr.{u1, u2} X Y y))) C))
+but is expected to have type
+  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : MetricSpace.{u2} Y] {_inst_3 : _private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_2} (_inst_4 : Real) {_inst_5 : Y}, BddBelow.{0} Real Real.instPreorderReal (Set.range.{0, succ u1} Real X (fun (x : X) => HAdd.hAdd.{0, 0, 0} ((fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y x) (Sum.inr.{u1, u2} X Y _inst_5))) Real ((fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y x) (Sum.inr.{u1, u2} X Y _inst_5))) (instHAdd.{0} ((fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y x) (Sum.inr.{u1, u2} X Y _inst_5))) Real.instAddReal) (FunLike.coe.{succ (max u1 u2), succ (max u1 u2), 1} (BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace) (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) (fun (a : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => (fun (a._@.Mathlib.Topology.ContinuousFunction.Bounded._hyg.904 : Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) => Real) a) (ContinuousMapClass.toFunLike.{max u1 u2, max u1 u2, 0} (BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace) (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)) (BoundedContinuousMapClass.toContinuousMapClass.{max u1 u2, max u1 u2, 0} (BoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace) (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace (BoundedContinuousFunction.instBoundedContinuousMapClassBoundedContinuousFunction.{max u1 u2, 0} (Prod.{max u2 u1, max u2 u1} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y)) Real (instTopologicalSpaceProd.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2)))) (instTopologicalSpaceSum.{u1, u2} X Y (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1))) (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_2))))) Real.pseudoMetricSpace))) _inst_3 (Prod.mk.{max u1 u2, max u1 u2} (Sum.{u1, u2} X Y) (Sum.{u1, u2} X Y) (Sum.inl.{u1, u2} X Y x) (Sum.inr.{u1, u2} X Y _inst_5))) _inst_4))
+Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.HD_below_aux2 GromovHausdorff.HD_below_aux2ₓ'. -/
 theorem HD_below_aux2 {f : Cb X Y} (C : ℝ) {y : Y} :
     BddBelow (range fun x : X => f (inl x, inr y) + C) :=
   let ⟨cf, hcf⟩ := (Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).1
@@ -392,10 +440,16 @@ private theorem HD_bound_aux2 (f : Cb X Y) (C : ℝ) :
     
 #align Gromov_Hausdorff.HD_bound_aux2 Gromov_Hausdorff.HD_bound_aux2
 
+/- warning: Gromov_Hausdorff.HD_candidates_b_dist_le -> GromovHausdorff.HD_candidatesBDist_le is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], LE.le.{0} Real Real.hasLe (GromovHausdorff.HD.{u1, u2} X Y _inst_1 _inst_2 (instNonempty.{succ u1} X (Classical.inhabited_of_nonempty'.{succ u1} X _inst_3)) _inst_4 _inst_5 (instNonempty.{succ u2} Y (Classical.inhabited_of_nonempty'.{succ u2} Y _inst_6)) (GromovHausdorff.candidatesBDist.{u1, u2} X Y _inst_1 _inst_2 (Classical.inhabited_of_nonempty'.{succ u1} X _inst_3) _inst_4 _inst_5 (Classical.inhabited_of_nonempty'.{succ u2} Y _inst_6))) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (Metric.diam.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1) (Set.univ.{u1} X)) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne)))) (Metric.diam.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4) (Set.univ.{u2} Y)))
+but is expected to have type
+  forall {X : Type.{u1}} {Y : Type.{u2}} [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], LE.le.{0} Real Real.instLEReal (GromovHausdorff.HD.{u1, u2} X Y _inst_1 _inst_4 (GromovHausdorff.candidatesBDist.{u1, u2} X Y _inst_1 _inst_2 (Classical.inhabited_of_nonempty'.{succ u1} X _inst_3) _inst_4 _inst_5 (Classical.inhabited_of_nonempty'.{succ u2} Y _inst_6))) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (Metric.diam.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1) (Set.univ.{u1} X)) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal))) (Metric.diam.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4) (Set.univ.{u2} Y)))
+Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.HD_candidates_b_dist_le GromovHausdorff.HD_candidatesBDist_leₓ'. -/
 /-- Explicit bound on `HD (dist)`. This means that when looking for minimizers it will
 be sufficient to look for functions with `HD(f)` bounded by this bound. -/
-theorem hD_candidatesBDist_le :
-    hD (candidatesBDist X Y) ≤ diam (univ : Set X) + 1 + diam (univ : Set Y) :=
+theorem HD_candidatesBDist_le :
+    HD (candidatesBDist X Y) ≤ diam (univ : Set X) + 1 + diam (univ : Set Y) :=
   by
   refine' max_le (ciSup_le fun x => _) (ciSup_le fun y => _)
   · have A :
@@ -428,7 +482,7 @@ theorem hD_candidatesBDist_le :
           exact dist_le_diam_of_mem bounded_of_compact_space (mem_univ _) (mem_univ _)
         
     exact le_trans A B
-#align Gromov_Hausdorff.HD_candidates_b_dist_le GromovHausdorff.hD_candidatesBDist_le
+#align Gromov_Hausdorff.HD_candidates_b_dist_le GromovHausdorff.HD_candidatesBDist_le
 
 /- To check that HD is continuous, we check that it is Lipschitz. As HD is a max, we
 prove separately inequalities controlling the two terms (relying too heavily on copy-paste...) -/
@@ -496,13 +550,13 @@ private theorem HD_lipschitz_aux2 (f g : Cb X Y) :
   simpa [E2, E1]
 #align Gromov_Hausdorff.HD_lipschitz_aux2 Gromov_Hausdorff.HD_lipschitz_aux2
 
-private theorem HD_lipschitz_aux3 (f g : Cb X Y) : hD f ≤ hD g + dist f g :=
+private theorem HD_lipschitz_aux3 (f g : Cb X Y) : HD f ≤ HD g + dist f g :=
   max_le (le_trans (HD_lipschitz_aux1 f g) (add_le_add_right (le_max_left _ _) _))
     (le_trans (HD_lipschitz_aux2 f g) (add_le_add_right (le_max_right _ _) _))
 #align Gromov_Hausdorff.HD_lipschitz_aux3 Gromov_Hausdorff.HD_lipschitz_aux3
 
 /-- Conclude that HD, being Lipschitz, is continuous -/
-private theorem HD_continuous : Continuous (hD : Cb X Y → ℝ) :=
+private theorem HD_continuous : Continuous (HD : Cb X Y → ℝ) :=
   LipschitzWith.continuous (LipschitzWith.of_le_add hD_lipschitz_aux3)
 #align Gromov_Hausdorff.HD_continuous Gromov_Hausdorff.HD_continuous
 
@@ -517,7 +571,7 @@ variable (X : Type u) (Y : Type v) [MetricSpace X] [CompactSpace X] [Nonempty X]
 /- Now that we have proved that the set of candidates is compact, and that HD is continuous,
 we can finally select a candidate minimizing HD. This will be the candidate realizing the
 optimal coupling. -/
-private theorem exists_minimizer : ∃ f ∈ candidatesB X Y, ∀ g ∈ candidatesB X Y, hD f ≤ hD g :=
+private theorem exists_minimizer : ∃ f ∈ candidatesB X Y, ∀ g ∈ candidatesB X Y, HD f ≤ HD g :=
   isCompact_candidatesB.exists_forall_le candidatesB_nonempty hD_continuous.ContinuousOn
 #align Gromov_Hausdorff.exists_minimizer Gromov_Hausdorff.exists_minimizer
 
@@ -530,11 +584,12 @@ private theorem optimal_GH_dist_mem_candidates_b : optimalGHDist X Y ∈ candida
 #align Gromov_Hausdorff.optimal_GH_dist_mem_candidates_b Gromov_Hausdorff.optimal_GH_dist_mem_candidates_b
 
 private theorem HD_optimal_GH_dist_le (g : Cb X Y) (hg : g ∈ candidatesB X Y) :
-    hD (optimalGHDist X Y) ≤ hD g :=
+    HD (optimalGHDist X Y) ≤ HD g :=
   let ⟨Z1, Z2⟩ := Classical.choose_spec (exists_minimizer X Y)
   Z2 g hg
 #align Gromov_Hausdorff.HD_optimal_GH_dist_le Gromov_Hausdorff.HD_optimal_GH_dist_le
 
+#print GromovHausdorff.premetricOptimalGHDist /-
 /-- With the optimal candidate, construct a premetric space structure on `X ⊕ Y`, on which the
 predistance is given by the candidate. Then, we will identify points at `0` predistance
 to obtain a genuine metric space -/
@@ -545,36 +600,61 @@ def premetricOptimalGHDist : PseudoMetricSpace (Sum X Y)
   dist_comm x y := candidates_symm (optimalGHDist_mem_candidatesB X Y)
   dist_triangle x y z := candidates_triangle (optimalGHDist_mem_candidatesB X Y)
 #align Gromov_Hausdorff.premetric_optimal_GH_dist GromovHausdorff.premetricOptimalGHDist
+-/
 
 attribute [local instance] premetric_optimal_GH_dist
 
+#print GromovHausdorff.OptimalGHCoupling /-
 /-- A metric space which realizes the optimal coupling between `X` and `Y` -/
 @[nolint has_nonempty_instance]
 def OptimalGHCoupling : Type _ :=
   @UniformSpace.SeparationQuotient (Sum X Y) (premetricOptimalGHDist X Y).toUniformSpace deriving
   MetricSpace
 #align Gromov_Hausdorff.optimal_GH_coupling GromovHausdorff.OptimalGHCoupling
+-/
 
+#print GromovHausdorff.optimalGHInjl /-
 /-- Injection of `X` in the optimal coupling between `X` and `Y` -/
 def optimalGHInjl (x : X) : OptimalGHCoupling X Y :=
   Quotient.mk'' (inl x)
 #align Gromov_Hausdorff.optimal_GH_injl GromovHausdorff.optimalGHInjl
+-/
 
+/- warning: Gromov_Hausdorff.isometry_optimal_GH_injl -> GromovHausdorff.isometry_optimalGHInjl is a dubious translation:
+lean 3 declaration is
+  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], Isometry.{u1, max u1 u2} X (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (PseudoMetricSpace.toPseudoEMetricSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)) (PseudoMetricSpace.toPseudoEMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (MetricSpace.toPseudoMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (GromovHausdorff.OptimalGHCoupling.metricSpace.{u2, u1} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6))) (GromovHausdorff.optimalGHInjl.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
+but is expected to have type
+  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], Isometry.{u1, max u1 u2} X (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (EMetricSpace.toPseudoEMetricSpace.{u1} X (MetricSpace.toEMetricSpace.{u1} X _inst_1)) (EMetricSpace.toPseudoEMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (MetricSpace.toEMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (GromovHausdorff.instMetricSpaceOptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6))) (GromovHausdorff.optimalGHInjl.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
+Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.isometry_optimal_GH_injl GromovHausdorff.isometry_optimalGHInjlₓ'. -/
 /-- The injection of `X` in the optimal coupling between `X` and `Y` is an isometry. -/
 theorem isometry_optimalGHInjl : Isometry (optimalGHInjl X Y) :=
   Isometry.of_dist_eq fun x y => candidates_dist_inl (optimalGHDist_mem_candidatesB X Y) _ _
 #align Gromov_Hausdorff.isometry_optimal_GH_injl GromovHausdorff.isometry_optimalGHInjl
 
+#print GromovHausdorff.optimalGHInjr /-
 /-- Injection of `Y` in the optimal coupling between `X` and `Y` -/
 def optimalGHInjr (y : Y) : OptimalGHCoupling X Y :=
   Quotient.mk'' (inr y)
 #align Gromov_Hausdorff.optimal_GH_injr GromovHausdorff.optimalGHInjr
+-/
 
+/- warning: Gromov_Hausdorff.isometry_optimal_GH_injr -> GromovHausdorff.isometry_optimalGHInjr is a dubious translation:
+lean 3 declaration is
+  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], Isometry.{u2, max u1 u2} Y (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)) (PseudoMetricSpace.toPseudoEMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (MetricSpace.toPseudoMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (GromovHausdorff.OptimalGHCoupling.metricSpace.{u2, u1} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6))) (GromovHausdorff.optimalGHInjr.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
+but is expected to have type
+  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], Isometry.{u2, max u1 u2} Y (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (EMetricSpace.toPseudoEMetricSpace.{u2} Y (MetricSpace.toEMetricSpace.{u2} Y _inst_4)) (EMetricSpace.toPseudoEMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (MetricSpace.toEMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (GromovHausdorff.instMetricSpaceOptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6))) (GromovHausdorff.optimalGHInjr.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)
+Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.isometry_optimal_GH_injr GromovHausdorff.isometry_optimalGHInjrₓ'. -/
 /-- The injection of `Y` in the optimal coupling between `X` and `Y` is an isometry. -/
 theorem isometry_optimalGHInjr : Isometry (optimalGHInjr X Y) :=
   Isometry.of_dist_eq fun x y => candidates_dist_inr (optimalGHDist_mem_candidatesB X Y) _ _
 #align Gromov_Hausdorff.isometry_optimal_GH_injr GromovHausdorff.isometry_optimalGHInjr
 
+/- warning: Gromov_Hausdorff.compact_space_optimal_GH_coupling -> GromovHausdorff.compactSpace_optimalGHCoupling is a dubious translation:
+lean 3 declaration is
+  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], CompactSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (UniformSpace.toTopologicalSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (PseudoMetricSpace.toUniformSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (MetricSpace.toPseudoMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (GromovHausdorff.OptimalGHCoupling.metricSpace.{u2, u1} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6))))
+but is expected to have type
+  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y], CompactSpace.{max u2 u1} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (UniformSpace.toTopologicalSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (PseudoMetricSpace.toUniformSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (MetricSpace.toPseudoMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (GromovHausdorff.instMetricSpaceOptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6))))
+Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.compact_space_optimal_GH_coupling GromovHausdorff.compactSpace_optimalGHCouplingₓ'. -/
 /-- The optimal coupling between two compact spaces `X` and `Y` is still a compact space -/
 instance compactSpace_optimalGHCoupling : CompactSpace (OptimalGHCoupling X Y) :=
   ⟨by
@@ -585,12 +665,18 @@ instance compactSpace_optimalGHCoupling : CompactSpace (OptimalGHCoupling X Y) :
           ⟨(isometry_optimal_GH_injl X Y).Continuous, (isometry_optimal_GH_injr X Y).Continuous⟩)⟩
 #align Gromov_Hausdorff.compact_space_optimal_GH_coupling GromovHausdorff.compactSpace_optimalGHCoupling
 
+/- warning: Gromov_Hausdorff.Hausdorff_dist_optimal_le_HD -> GromovHausdorff.hausdorffDist_optimal_le_HD is a dubious translation:
+lean 3 declaration is
+  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] {f : _Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6}, (Membership.Mem.{max u1 u2, max u1 u2} (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (Set.{max u1 u2} (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.hasMem.{max u1 u2} (_Private.1145524185.Cb.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) f (_Private.2695913301.candidatesB.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) -> (LE.le.{0} Real Real.hasLe (Metric.hausdorffDist.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (MetricSpace.toPseudoMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (GromovHausdorff.OptimalGHCoupling.metricSpace.{u2, u1} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.range.{max u1 u2, succ u1} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) X (GromovHausdorff.optimalGHInjl.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.range.{max u1 u2, succ u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) Y (GromovHausdorff.optimalGHInjr.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6))) (GromovHausdorff.HD.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 f))
+but is expected to have type
+  forall (X : Type.{u1}) (Y : Type.{u2}) [_inst_1 : MetricSpace.{u1} X] [_inst_2 : CompactSpace.{u1} X (UniformSpace.toTopologicalSpace.{u1} X (PseudoMetricSpace.toUniformSpace.{u1} X (MetricSpace.toPseudoMetricSpace.{u1} X _inst_1)))] [_inst_3 : Nonempty.{succ u1} X] [_inst_4 : MetricSpace.{u2} Y] [_inst_5 : CompactSpace.{u2} Y (UniformSpace.toTopologicalSpace.{u2} Y (PseudoMetricSpace.toUniformSpace.{u2} Y (MetricSpace.toPseudoMetricSpace.{u2} Y _inst_4)))] [_inst_6 : Nonempty.{succ u2} Y] {f : _private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_4}, (Membership.mem.{max u1 u2, max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_4) (Set.{max u2 u1} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_4)) (Set.instMembershipSet.{max u1 u2} (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.Cb.{u1, u2} X Y _inst_1 _inst_4)) f (_private.Mathlib.Topology.MetricSpace.GromovHausdorffRealized.0.GromovHausdorff.candidatesB.{u1, u2} X Y _inst_1 _inst_4)) -> (LE.le.{0} Real Real.instLEReal (Metric.hausdorffDist.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (MetricSpace.toPseudoMetricSpace.{max u1 u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) (GromovHausdorff.instMetricSpaceOptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.range.{max u1 u2, succ u1} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) X (GromovHausdorff.optimalGHInjl.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6)) (Set.range.{max u1 u2, succ u2} (GromovHausdorff.OptimalGHCoupling.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6) Y (GromovHausdorff.optimalGHInjr.{u1, u2} X Y _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6))) (GromovHausdorff.HD.{u1, u2} X Y _inst_1 _inst_4 f))
+Case conversion may be inaccurate. Consider using '#align Gromov_Hausdorff.Hausdorff_dist_optimal_le_HD GromovHausdorff.hausdorffDist_optimal_le_HDₓ'. -/
 /-- For any candidate `f`, `HD(f)` is larger than or equal to the Hausdorff distance in the
 optimal coupling. This follows from the fact that HD of the optimal candidate is exactly
 the Hausdorff distance in the optimal coupling, although we only prove here the inequality
 we need. -/
-theorem hausdorffDist_optimal_le_hD {f} (h : f ∈ candidatesB X Y) :
-    hausdorffDist (range (optimalGHInjl X Y)) (range (optimalGHInjr X Y)) ≤ hD f :=
+theorem hausdorffDist_optimal_le_HD {f} (h : f ∈ candidatesB X Y) :
+    hausdorffDist (range (optimalGHInjl X Y)) (range (optimalGHInjr X Y)) ≤ HD f :=
   by
   refine' le_trans (le_of_forall_le_of_dense fun r hr => _) (HD_optimal_GH_dist_le X Y f h)
   have A : ∀ x ∈ range (optimal_GH_injl X Y), ∃ y ∈ range (optimal_GH_injr X Y), dist x y ≤ r :=
@@ -618,7 +704,7 @@ theorem hausdorffDist_optimal_le_hD {f} (h : f ∈ candidatesB X Y) :
     rcases exists_lt_of_csInf_lt (range_nonempty _) I with ⟨r', ⟨z', rfl⟩, hr'⟩
     refine' ⟨optimal_GH_injl X Y z', mem_range_self _, le_of_lt _⟩
     rwa [dist_comm]
-#align Gromov_Hausdorff.Hausdorff_dist_optimal_le_HD GromovHausdorff.hausdorffDist_optimal_le_hD
+#align Gromov_Hausdorff.Hausdorff_dist_optimal_le_HD GromovHausdorff.hausdorffDist_optimal_le_HD
 
 end Consequences
 
Diff
@@ -326,7 +326,7 @@ private theorem closed_candidates_b : IsClosed (candidatesB X Y) :=
       |apply
         IsClosed.inter _
           _|apply
-        isClosed_interᵢ
+        isClosed_iInter
           _|apply I1 _ _|apply I2 _ _|apply I3 _ _|apply I4 _ _ _|apply I5 _|apply I6 _ _|intro x
 #align Gromov_Hausdorff.closed_candidates_b Gromov_Hausdorff.closed_candidates_b
 
@@ -370,7 +370,7 @@ private theorem HD_bound_aux1 (f : Cb X Y) (C : ℝ) :
   rcases(Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).2 with ⟨Cf, hCf⟩
   refine' ⟨Cf + C, forall_range_iff.2 fun x => _⟩
   calc
-    (⨅ y, f (inl x, inr y) + C) ≤ f (inl x, inr default) + C := cinfᵢ_le (HD_below_aux1 C) default
+    (⨅ y, f (inl x, inr y) + C) ≤ f (inl x, inr default) + C := ciInf_le (HD_below_aux1 C) default
     _ ≤ Cf + C := add_le_add ((fun x => hCf (mem_range_self x)) _) le_rfl
     
 #align Gromov_Hausdorff.HD_bound_aux1 Gromov_Hausdorff.HD_bound_aux1
@@ -387,7 +387,7 @@ private theorem HD_bound_aux2 (f : Cb X Y) (C : ℝ) :
   rcases(Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).2 with ⟨Cf, hCf⟩
   refine' ⟨Cf + C, forall_range_iff.2 fun y => _⟩
   calc
-    (⨅ x, f (inl x, inr y) + C) ≤ f (inl default, inr y) + C := cinfᵢ_le (HD_below_aux2 C) default
+    (⨅ x, f (inl x, inr y) + C) ≤ f (inl default, inr y) + C := ciInf_le (HD_below_aux2 C) default
     _ ≤ Cf + C := add_le_add ((fun x => hCf (mem_range_self x)) _) le_rfl
     
 #align Gromov_Hausdorff.HD_bound_aux2 Gromov_Hausdorff.HD_bound_aux2
@@ -397,10 +397,10 @@ be sufficient to look for functions with `HD(f)` bounded by this bound. -/
 theorem hD_candidatesBDist_le :
     hD (candidatesBDist X Y) ≤ diam (univ : Set X) + 1 + diam (univ : Set Y) :=
   by
-  refine' max_le (csupᵢ_le fun x => _) (csupᵢ_le fun y => _)
+  refine' max_le (ciSup_le fun x => _) (ciSup_le fun y => _)
   · have A :
       (⨅ y, candidates_b_dist X Y (inl x, inr y)) ≤ candidates_b_dist X Y (inl x, inr default) :=
-      cinfᵢ_le (by simpa using HD_below_aux1 0) default
+      ciInf_le (by simpa using HD_below_aux1 0) default
     have B : dist (inl x) (inr default) ≤ diam (univ : Set X) + 1 + diam (univ : Set Y) :=
       calc
         dist (inl x) (inr (default : Y)) = dist x (default : X) + 1 + dist default default := rfl
@@ -415,7 +415,7 @@ theorem hD_candidatesBDist_le :
     exact le_trans A B
   · have A :
       (⨅ x, candidates_b_dist X Y (inl x, inr y)) ≤ candidates_b_dist X Y (inl default, inr y) :=
-      cinfᵢ_le (by simpa using HD_below_aux2 0) default
+      ciInf_le (by simpa using HD_below_aux2 0) default
     have B : dist (inl default) (inr y) ≤ diam (univ : Set X) + 1 + diam (univ : Set Y) :=
       calc
         dist (inl (default : X)) (inr y) = dist default default + 1 + dist default y := rfl
@@ -442,21 +442,21 @@ private theorem HD_lipschitz_aux1 (f g : Cb X Y) :
   -- prove the inequality but with `dist f g` inside, by using inequalities comparing
   -- supr to supr and infi to infi
   have Z : (⨆ x, ⨅ y, f (inl x, inr y)) ≤ ⨆ x, ⨅ y, g (inl x, inr y) + dist f g :=
-    csupᵢ_mono (HD_bound_aux1 _ (dist f g)) fun x =>
-      cinfᵢ_mono ⟨cf, forall_range_iff.2 fun i => Hcf _⟩ fun y => coe_le_coe_add_dist
+    ciSup_mono (HD_bound_aux1 _ (dist f g)) fun x =>
+      ciInf_mono ⟨cf, forall_range_iff.2 fun i => Hcf _⟩ fun y => coe_le_coe_add_dist
   -- move the `dist f g` out of the infimum and the supremum, arguing that continuous monotone maps
   -- (here the addition of `dist f g`) preserve infimum and supremum
   have E1 : ∀ x, (⨅ y, g (inl x, inr y)) + dist f g = ⨅ y, g (inl x, inr y) + dist f g :=
     by
     intro x
-    refine' Monotone.map_cinfᵢ_of_continuousAt (continuous_at_id.add continuousAt_const) _ _
+    refine' Monotone.map_ciInf_of_continuousAt (continuous_at_id.add continuousAt_const) _ _
     · intro x y hx
       simpa
     · show BddBelow (range fun y : Y => g (inl x, inr y))
       exact ⟨cg, forall_range_iff.2 fun i => Hcg _⟩
   have E2 : (⨆ x, ⨅ y, g (inl x, inr y)) + dist f g = ⨆ x, (⨅ y, g (inl x, inr y)) + dist f g :=
     by
-    refine' Monotone.map_csupᵢ_of_continuousAt (continuous_at_id.add continuousAt_const) _ _
+    refine' Monotone.map_ciSup_of_continuousAt (continuous_at_id.add continuousAt_const) _ _
     · intro x y hx
       simpa
     · simpa using HD_bound_aux1 _ 0
@@ -474,21 +474,21 @@ private theorem HD_lipschitz_aux2 (f g : Cb X Y) :
   -- prove the inequality but with `dist f g` inside, by using inequalities comparing
   -- supr to supr and infi to infi
   have Z : (⨆ y, ⨅ x, f (inl x, inr y)) ≤ ⨆ y, ⨅ x, g (inl x, inr y) + dist f g :=
-    csupᵢ_mono (HD_bound_aux2 _ (dist f g)) fun y =>
-      cinfᵢ_mono ⟨cf, forall_range_iff.2 fun i => Hcf _⟩ fun y => coe_le_coe_add_dist
+    ciSup_mono (HD_bound_aux2 _ (dist f g)) fun y =>
+      ciInf_mono ⟨cf, forall_range_iff.2 fun i => Hcf _⟩ fun y => coe_le_coe_add_dist
   -- move the `dist f g` out of the infimum and the supremum, arguing that continuous monotone maps
   -- (here the addition of `dist f g`) preserve infimum and supremum
   have E1 : ∀ y, (⨅ x, g (inl x, inr y)) + dist f g = ⨅ x, g (inl x, inr y) + dist f g :=
     by
     intro y
-    refine' Monotone.map_cinfᵢ_of_continuousAt (continuous_at_id.add continuousAt_const) _ _
+    refine' Monotone.map_ciInf_of_continuousAt (continuous_at_id.add continuousAt_const) _ _
     · intro x y hx
       simpa
     · show BddBelow (range fun x : X => g (inl x, inr y))
       exact ⟨cg, forall_range_iff.2 fun i => Hcg _⟩
   have E2 : (⨆ y, ⨅ x, g (inl x, inr y)) + dist f g = ⨆ y, (⨅ x, g (inl x, inr y)) + dist f g :=
     by
-    refine' Monotone.map_csupᵢ_of_continuousAt (continuous_at_id.add continuousAt_const) _ _
+    refine' Monotone.map_ciSup_of_continuousAt (continuous_at_id.add continuousAt_const) _ _
     · intro x y hx
       simpa
     · simpa using HD_bound_aux2 _ 0
@@ -600,9 +600,9 @@ theorem hausdorffDist_optimal_le_hD {f} (h : f ∈ candidatesB X Y) :
       lt_of_le_of_lt (le_max_left _ _) hr
     have I2 :
       (⨅ y, optimal_GH_dist X Y (inl z, inr y)) ≤ ⨆ x, ⨅ y, optimal_GH_dist X Y (inl x, inr y) :=
-      le_csupₛ (by simpa using HD_bound_aux1 _ 0) (mem_range_self _)
+      le_csSup (by simpa using HD_bound_aux1 _ 0) (mem_range_self _)
     have I : (⨅ y, optimal_GH_dist X Y (inl z, inr y)) < r := lt_of_le_of_lt I2 I1
-    rcases exists_lt_of_cinfₛ_lt (range_nonempty _) I with ⟨r', ⟨z', rfl⟩, hr'⟩
+    rcases exists_lt_of_csInf_lt (range_nonempty _) I with ⟨r', ⟨z', rfl⟩, hr'⟩
     exact ⟨optimal_GH_injr X Y z', mem_range_self _, le_of_lt hr'⟩
   refine' Hausdorff_dist_le_of_mem_dist _ A _
   · inhabit X
@@ -613,9 +613,9 @@ theorem hausdorffDist_optimal_le_hD {f} (h : f ∈ candidatesB X Y) :
       lt_of_le_of_lt (le_max_right _ _) hr
     have I2 :
       (⨅ x, optimal_GH_dist X Y (inl x, inr z)) ≤ ⨆ y, ⨅ x, optimal_GH_dist X Y (inl x, inr y) :=
-      le_csupₛ (by simpa using HD_bound_aux2 _ 0) (mem_range_self _)
+      le_csSup (by simpa using HD_bound_aux2 _ 0) (mem_range_self _)
     have I : (⨅ x, optimal_GH_dist X Y (inl x, inr z)) < r := lt_of_le_of_lt I2 I1
-    rcases exists_lt_of_cinfₛ_lt (range_nonempty _) I with ⟨r', ⟨z', rfl⟩, hr'⟩
+    rcases exists_lt_of_csInf_lt (range_nonempty _) I with ⟨r', ⟨z', rfl⟩, hr'⟩
     refine' ⟨optimal_GH_injl X Y z', mem_range_self _, le_of_lt _⟩
     rwa [dist_comm]
 #align Gromov_Hausdorff.Hausdorff_dist_optimal_le_HD GromovHausdorff.hausdorffDist_optimal_le_hD
Diff
@@ -456,7 +456,7 @@ private theorem HD_lipschitz_aux1 (f g : Cb X Y) :
       exact ⟨cg, forall_range_iff.2 fun i => Hcg _⟩
   have E2 : (⨆ x, ⨅ y, g (inl x, inr y)) + dist f g = ⨆ x, (⨅ y, g (inl x, inr y)) + dist f g :=
     by
-    refine' Monotone.map_csupr_of_continuousAt (continuous_at_id.add continuousAt_const) _ _
+    refine' Monotone.map_csupᵢ_of_continuousAt (continuous_at_id.add continuousAt_const) _ _
     · intro x y hx
       simpa
     · simpa using HD_bound_aux1 _ 0
@@ -488,7 +488,7 @@ private theorem HD_lipschitz_aux2 (f g : Cb X Y) :
       exact ⟨cg, forall_range_iff.2 fun i => Hcg _⟩
   have E2 : (⨆ y, ⨅ x, g (inl x, inr y)) + dist f g = ⨆ y, (⨅ x, g (inl x, inr y)) + dist f g :=
     by
-    refine' Monotone.map_csupr_of_continuousAt (continuous_at_id.add continuousAt_const) _ _
+    refine' Monotone.map_csupᵢ_of_continuousAt (continuous_at_id.add continuousAt_const) _ _
     · intro x y hx
       simpa
     · simpa using HD_bound_aux2 _ 0
Diff
@@ -111,7 +111,7 @@ section Constructions
 variable {X : Type u} {Y : Type v} [MetricSpace X] [CompactSpace X] [Nonempty X] [MetricSpace Y]
   [CompactSpace Y] [Nonempty Y] {f : ProdSpaceFun X Y} {x y z t : Sum X Y}
 
-attribute [local instance] inhabited_of_nonempty'
+attribute [local instance 10] inhabited_of_nonempty'
 
 private theorem max_var_bound : dist x y ≤ maxVar X Y :=
   calc
Diff
@@ -192,14 +192,14 @@ private theorem candidates_dist_bound (fA : f ∈ candidates X Y) :
       f (inl x, inr y) ≤ maxVar X Y := candidates_le_maxVar fA
       _ = maxVar X Y * 1 := by simp
       _ ≤ maxVar X Y * dist (inl x) (inr y) :=
-        mul_le_mul_of_nonneg_left Sum.one_dist_le (le_trans zero_le_one (one_le_maxVar X Y))
+        mul_le_mul_of_nonneg_left Sum.one_le_dist_inl_inr (le_trans zero_le_one (one_le_maxVar X Y))
       
   | inr x, inl y =>
     calc
       f (inr x, inl y) ≤ maxVar X Y := candidates_le_maxVar fA
       _ = maxVar X Y * 1 := by simp
       _ ≤ maxVar X Y * dist (inl x) (inr y) :=
-        mul_le_mul_of_nonneg_left Sum.one_dist_le (le_trans zero_le_one (one_le_maxVar X Y))
+        mul_le_mul_of_nonneg_left Sum.one_le_dist_inl_inr (le_trans zero_le_one (one_le_maxVar X Y))
       
   | inr x, inr y =>
     calc
Diff
@@ -121,7 +121,7 @@ private theorem max_var_bound : dist x y ≤ maxVar X Y :=
     _ ≤
         diam (range inl : Set (Sum X Y)) + dist (inl default) (inr default) +
           diam (range inr : Set (Sum X Y)) :=
-      diam_union (mem_range_self _) (mem_range_self _)
+      (diam_union (mem_range_self _) (mem_range_self _))
     _ =
         diam (univ : Set X) + (dist default default + 1 + dist default default) +
           diam (univ : Set Y) :=
@@ -153,7 +153,7 @@ private theorem candidates_nonneg (fA : f ∈ candidates X Y) : 0 ≤ f (x, y) :
   have : 0 ≤ 2 * f (x, y) :=
     calc
       0 = f (x, x) := (candidates_refl fA).symm
-      _ ≤ f (x, y) + f (y, x) := candidates_triangle fA
+      _ ≤ f (x, y) + f (y, x) := (candidates_triangle fA)
       _ = f (x, y) + f (x, y) := by rw [candidates_symm fA]
       _ = 2 * f (x, y) := by ring
       
@@ -220,10 +220,10 @@ private theorem candidates_lipschitz_aux (fA : f ∈ candidates X Y) :
     f (x, y) - f (z, t) ≤ f (x, t) + f (t, y) - f (z, t) :=
       sub_le_sub_right (candidates_triangle fA) _
     _ ≤ f (x, z) + f (z, t) + f (t, y) - f (z, t) :=
-      sub_le_sub_right (add_le_add_right (candidates_triangle fA) _) _
+      (sub_le_sub_right (add_le_add_right (candidates_triangle fA) _) _)
     _ = f (x, z) + f (t, y) := by simp [sub_eq_add_neg, add_assoc]
     _ ≤ maxVar X Y * dist x z + maxVar X Y * dist t y :=
-      add_le_add (candidates_dist_bound fA) (candidates_dist_bound fA)
+      (add_le_add (candidates_dist_bound fA) (candidates_dist_bound fA))
     _ ≤ maxVar X Y * max (dist x z) (dist t y) + maxVar X Y * max (dist x z) (dist t y) :=
       by
       apply add_le_add
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sébastien Gouëzel
 
 ! This file was ported from Lean 3 source module topology.metric_space.gromov_hausdorff_realized
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
+! leanprover-community/mathlib commit 0c1f285a9f6e608ae2bdffa3f993eafb01eba829
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -117,17 +117,16 @@ private theorem max_var_bound : dist x y ≤ maxVar X Y :=
   calc
     dist x y ≤ diam (univ : Set (Sum X Y)) :=
       dist_le_diam_of_mem bounded_of_compactSpace (mem_univ _) (mem_univ _)
-    _ = diam (inl '' (univ : Set X) ∪ inr '' (univ : Set Y)) := by
-      apply congr_arg <;> ext (x y z) <;> cases x <;> simp [mem_univ, mem_range_self]
+    _ = diam (range inl ∪ range inr : Set (Sum X Y)) := by rw [range_inl_union_range_inr]
     _ ≤
-        diam (inl '' (univ : Set X)) + dist (inl default) (inr default) +
-          diam (inr '' (univ : Set Y)) :=
-      diam_union (mem_image_of_mem _ (mem_univ _)) (mem_image_of_mem _ (mem_univ _))
+        diam (range inl : Set (Sum X Y)) + dist (inl default) (inr default) +
+          diam (range inr : Set (Sum X Y)) :=
+      diam_union (mem_range_self _) (mem_range_self _)
     _ =
         diam (univ : Set X) + (dist default default + 1 + dist default default) +
           diam (univ : Set Y) :=
       by
-      rw [isometry_inl.diam_image, isometry_inr.diam_image]
+      rw [isometry_inl.diam_range, isometry_inr.diam_range]
       rfl
     _ = 1 * diam (univ : Set X) + 1 + 1 * diam (univ : Set Y) := by simp
     _ ≤ 2 * diam (univ : Set X) + 1 + 2 * diam (univ : Set Y) :=
@@ -547,60 +546,43 @@ def premetricOptimalGHDist : PseudoMetricSpace (Sum X Y)
   dist_triangle x y z := candidates_triangle (optimalGHDist_mem_candidatesB X Y)
 #align Gromov_Hausdorff.premetric_optimal_GH_dist GromovHausdorff.premetricOptimalGHDist
 
-attribute [local instance] premetric_optimal_GH_dist PseudoMetric.distSetoid
+attribute [local instance] premetric_optimal_GH_dist
 
 /-- A metric space which realizes the optimal coupling between `X` and `Y` -/
 @[nolint has_nonempty_instance]
 def OptimalGHCoupling : Type _ :=
-  PseudoMetricQuot (Sum X Y)deriving MetricSpace
+  @UniformSpace.SeparationQuotient (Sum X Y) (premetricOptimalGHDist X Y).toUniformSpace deriving
+  MetricSpace
 #align Gromov_Hausdorff.optimal_GH_coupling GromovHausdorff.OptimalGHCoupling
 
 /-- Injection of `X` in the optimal coupling between `X` and `Y` -/
 def optimalGHInjl (x : X) : OptimalGHCoupling X Y :=
-  ⟦inl x⟧
+  Quotient.mk'' (inl x)
 #align Gromov_Hausdorff.optimal_GH_injl GromovHausdorff.optimalGHInjl
 
 /-- The injection of `X` in the optimal coupling between `X` and `Y` is an isometry. -/
 theorem isometry_optimalGHInjl : Isometry (optimalGHInjl X Y) :=
-  by
-  refine' Isometry.of_dist_eq fun x y => _
-  change dist ⟦inl x⟧ ⟦inl y⟧ = dist x y
-  exact candidates_dist_inl (optimal_GH_dist_mem_candidates_b X Y) _ _
+  Isometry.of_dist_eq fun x y => candidates_dist_inl (optimalGHDist_mem_candidatesB X Y) _ _
 #align Gromov_Hausdorff.isometry_optimal_GH_injl GromovHausdorff.isometry_optimalGHInjl
 
 /-- Injection of `Y` in the optimal coupling between `X` and `Y` -/
 def optimalGHInjr (y : Y) : OptimalGHCoupling X Y :=
-  ⟦inr y⟧
+  Quotient.mk'' (inr y)
 #align Gromov_Hausdorff.optimal_GH_injr GromovHausdorff.optimalGHInjr
 
 /-- The injection of `Y` in the optimal coupling between `X` and `Y` is an isometry. -/
 theorem isometry_optimalGHInjr : Isometry (optimalGHInjr X Y) :=
-  by
-  refine' Isometry.of_dist_eq fun x y => _
-  change dist ⟦inr x⟧ ⟦inr y⟧ = dist x y
-  exact candidates_dist_inr (optimal_GH_dist_mem_candidates_b X Y) _ _
+  Isometry.of_dist_eq fun x y => candidates_dist_inr (optimalGHDist_mem_candidatesB X Y) _ _
 #align Gromov_Hausdorff.isometry_optimal_GH_injr GromovHausdorff.isometry_optimalGHInjr
 
 /-- The optimal coupling between two compact spaces `X` and `Y` is still a compact space -/
 instance compactSpace_optimalGHCoupling : CompactSpace (OptimalGHCoupling X Y) :=
   ⟨by
-    have :
-      (univ : Set (optimal_GH_coupling X Y)) =
-        optimal_GH_injl X Y '' univ ∪ optimal_GH_injr X Y '' univ :=
-      by
-      refine' subset.antisymm (fun xc hxc => _) (subset_univ _)
-      rcases Quotient.exists_rep xc with ⟨x, hx⟩
-      cases x <;> rw [← hx]
-      · have : ⟦inl x⟧ = optimal_GH_injl X Y x := rfl
-        rw [this]
-        exact mem_union_left _ (mem_image_of_mem _ (mem_univ _))
-      · have : ⟦inr x⟧ = optimal_GH_injr X Y x := rfl
-        rw [this]
-        exact mem_union_right _ (mem_image_of_mem _ (mem_univ _))
-    rw [this]
+    rw [← range_quotient_mk']
     exact
-      (is_compact_univ.image (isometry_optimal_GH_injl X Y).Continuous).union
-        (is_compact_univ.image (isometry_optimal_GH_injr X Y).Continuous)⟩
+      isCompact_range
+        (continuous_sum_dom.2
+          ⟨(isometry_optimal_GH_injl X Y).Continuous, (isometry_optimal_GH_injr X Y).Continuous⟩)⟩
 #align Gromov_Hausdorff.compact_space_optimal_GH_coupling GromovHausdorff.compactSpace_optimalGHCoupling
 
 /-- For any candidate `f`, `HD(f)` is larger than or equal to the Hausdorff distance in the
@@ -613,46 +595,29 @@ theorem hausdorffDist_optimal_le_hD {f} (h : f ∈ candidatesB X Y) :
   refine' le_trans (le_of_forall_le_of_dense fun r hr => _) (HD_optimal_GH_dist_le X Y f h)
   have A : ∀ x ∈ range (optimal_GH_injl X Y), ∃ y ∈ range (optimal_GH_injr X Y), dist x y ≤ r :=
     by
-    intro x hx
-    rcases mem_range.1 hx with ⟨z, hz⟩
-    rw [← hz]
+    rintro _ ⟨z, rfl⟩
     have I1 : (⨆ x, ⨅ y, optimal_GH_dist X Y (inl x, inr y)) < r :=
       lt_of_le_of_lt (le_max_left _ _) hr
     have I2 :
       (⨅ y, optimal_GH_dist X Y (inl z, inr y)) ≤ ⨆ x, ⨅ y, optimal_GH_dist X Y (inl x, inr y) :=
       le_csupₛ (by simpa using HD_bound_aux1 _ 0) (mem_range_self _)
     have I : (⨅ y, optimal_GH_dist X Y (inl z, inr y)) < r := lt_of_le_of_lt I2 I1
-    rcases exists_lt_of_cinfₛ_lt (range_nonempty _) I with ⟨r', r'range, hr'⟩
-    rcases mem_range.1 r'range with ⟨z', hz'⟩
-    exists optimal_GH_injr X Y z', mem_range_self _
-    have : (optimal_GH_dist X Y) (inl z, inr z') ≤ r :=
-      by
-      rw [hz']
-      exact le_of_lt hr'
-    exact this
+    rcases exists_lt_of_cinfₛ_lt (range_nonempty _) I with ⟨r', ⟨z', rfl⟩, hr'⟩
+    exact ⟨optimal_GH_injr X Y z', mem_range_self _, le_of_lt hr'⟩
   refine' Hausdorff_dist_le_of_mem_dist _ A _
-  · rcases exists_mem_of_nonempty X with ⟨xX, _⟩
-    have : optimal_GH_injl X Y xX ∈ range (optimal_GH_injl X Y) := mem_range_self _
-    rcases A _ this with ⟨y, yrange, hy⟩
+  · inhabit X
+    rcases A _ (mem_range_self default) with ⟨y, -, hy⟩
     exact le_trans dist_nonneg hy
-  · intro y hy
-    rcases mem_range.1 hy with ⟨z, hz⟩
-    rw [← hz]
+  · rintro _ ⟨z, rfl⟩
     have I1 : (⨆ y, ⨅ x, optimal_GH_dist X Y (inl x, inr y)) < r :=
       lt_of_le_of_lt (le_max_right _ _) hr
     have I2 :
       (⨅ x, optimal_GH_dist X Y (inl x, inr z)) ≤ ⨆ y, ⨅ x, optimal_GH_dist X Y (inl x, inr y) :=
       le_csupₛ (by simpa using HD_bound_aux2 _ 0) (mem_range_self _)
     have I : (⨅ x, optimal_GH_dist X Y (inl x, inr z)) < r := lt_of_le_of_lt I2 I1
-    rcases exists_lt_of_cinfₛ_lt (range_nonempty _) I with ⟨r', r'range, hr'⟩
-    rcases mem_range.1 r'range with ⟨z', hz'⟩
-    exists optimal_GH_injl X Y z', mem_range_self _
-    have : (optimal_GH_dist X Y) (inl z', inr z) ≤ r :=
-      by
-      rw [hz']
-      exact le_of_lt hr'
-    rw [dist_comm]
-    exact this
+    rcases exists_lt_of_cinfₛ_lt (range_nonempty _) I with ⟨r', ⟨z', rfl⟩, hr'⟩
+    refine' ⟨optimal_GH_injl X Y z', mem_range_self _, le_of_lt _⟩
+    rwa [dist_comm]
 #align Gromov_Hausdorff.Hausdorff_dist_optimal_le_HD GromovHausdorff.hausdorffDist_optimal_le_hD
 
 end Consequences

Changes in mathlib4

mathlib3
mathlib4
chore: superfluous parentheses part 2 (#12131)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -132,7 +132,7 @@ private theorem candidates_nonneg (fA : f ∈ candidates X Y) : 0 ≤ f (x, y) :
   have : 0 ≤ 2 * f (x, y) :=
     calc
       0 = f (x, x) := (candidates_refl fA).symm
-      _ ≤ f (x, y) + f (y, x) := (candidates_triangle fA)
+      _ ≤ f (x, y) + f (y, x) := candidates_triangle fA
       _ = f (x, y) + f (x, y) := by rw [candidates_symm fA]
       _ = 2 * f (x, y) := by ring
   linarith
chore: classify porting notes referring to missing linters (#12098)

Reference the newly created issues #12094 and #12096, as well as the pre-existing #5171. Change all references to #10927 to #5171. Some of these changes were not labelled as "porting note"; change this for good measure.

Diff
@@ -455,7 +455,7 @@ def premetricOptimalGHDist : PseudoMetricSpace (X ⊕ Y) where
 attribute [local instance] premetricOptimalGHDist
 
 /-- A metric space which realizes the optimal coupling between `X` and `Y` -/
--- @[nolint has_nonempty_instance] -- Porting note: This linter does not exist yet.
+-- @[nolint has_nonempty_instance] -- Porting note(#5171): This linter does not exist yet.
 def OptimalGHCoupling : Type _ :=
   @SeparationQuotient (X ⊕ Y) (premetricOptimalGHDist X Y).toUniformSpace.toTopologicalSpace
 #align Gromov_Hausdorff.optimal_GH_coupling GromovHausdorff.OptimalGHCoupling
doc: convert many comments into doc comments (#11940)

All of these changes appear to be oversights to me.

Diff
@@ -54,7 +54,7 @@ set_option linter.uppercaseLean3 false -- `Gromov_Hausdorff`
 
 section GromovHausdorffRealized
 
-/- This section shows that the Gromov-Hausdorff distance
+/-! This section shows that the Gromov-Hausdorff distance
 is realized. For this, we consider candidate distances on the disjoint union
 `X ⊕ Y` of two compact nonempty metric spaces, almost realizing the Gromov-Hausdorff
 distance, and show that they form a compact family by applying Arzela-Ascoli
refactor(UniformSpace): drop separationRel (#10644)

We had duplicated API between topological spaces and uniform spaces. In this PR I mostly deduplicate it with some exceptions:

  • SeparationQuotient.lift' and SeparationQuotient.map are leftovers from the old version that are designed to work with uniform spaces;
  • probably, some theorems/instances still assume UniformSpace when TopologicalSpace would work.

Outside of UniformSpace/Separation, I mostly changed SeparatedSpace to T0Space and separationRel to Inseparable. I also rewrote a few proofs that were broken by the API change.

Fixes #2031

Diff
@@ -457,7 +457,7 @@ attribute [local instance] premetricOptimalGHDist
 /-- A metric space which realizes the optimal coupling between `X` and `Y` -/
 -- @[nolint has_nonempty_instance] -- Porting note: This linter does not exist yet.
 def OptimalGHCoupling : Type _ :=
-  @UniformSpace.SeparationQuotient (X ⊕ Y) (premetricOptimalGHDist X Y).toUniformSpace
+  @SeparationQuotient (X ⊕ Y) (premetricOptimalGHDist X Y).toUniformSpace.toTopologicalSpace
 #align Gromov_Hausdorff.optimal_GH_coupling GromovHausdorff.OptimalGHCoupling
 
 instance : MetricSpace (OptimalGHCoupling X Y) := by
chore: Remove ball and bex from lemma names (#10816)

ball for "bounded forall" and bex for "bounded exists" are from experience very confusing abbreviations. This PR renames them to forall_mem and exists_mem in the few Set lemma names that mention them.

Also deprecate ball_image_of_ball, mem_image_elim, mem_image_elim_on since those lemmas are duplicates of the renamed lemmas (apart from argument order and implicitness, which I am also fixing by making the binder in the RHS of forall_mem_image semi-implicit), have obscure names and are completely unused.

Diff
@@ -295,13 +295,13 @@ technical lemmas. -/
 theorem HD_below_aux1 {f : Cb X Y} (C : ℝ) {x : X} :
     BddBelow (range fun y : Y => f (inl x, inr y) + C) :=
   let ⟨cf, hcf⟩ := (Real.isBounded_iff_bddBelow_bddAbove.1 f.isBounded_range).1
-  ⟨cf + C, forall_range_iff.2 fun _ => add_le_add_right ((fun x => hcf (mem_range_self x)) _) _⟩
+  ⟨cf + C, forall_mem_range.2 fun _ => add_le_add_right ((fun x => hcf (mem_range_self x)) _) _⟩
 #align Gromov_Hausdorff.HD_below_aux1 GromovHausdorff.HD_below_aux1
 
 private theorem HD_bound_aux1 (f : Cb X Y) (C : ℝ) :
     BddAbove (range fun x : X => ⨅ y, f (inl x, inr y) + C) := by
   rcases (Real.isBounded_iff_bddBelow_bddAbove.1 f.isBounded_range).2 with ⟨Cf, hCf⟩
-  refine' ⟨Cf + C, forall_range_iff.2 fun x => _⟩
+  refine' ⟨Cf + C, forall_mem_range.2 fun x => _⟩
   calc
     ⨅ y, f (inl x, inr y) + C ≤ f (inl x, inr default) + C := ciInf_le (HD_below_aux1 C) default
     _ ≤ Cf + C := add_le_add ((fun x => hCf (mem_range_self x)) _) le_rfl
@@ -309,13 +309,13 @@ private theorem HD_bound_aux1 (f : Cb X Y) (C : ℝ) :
 theorem HD_below_aux2 {f : Cb X Y} (C : ℝ) {y : Y} :
     BddBelow (range fun x : X => f (inl x, inr y) + C) :=
   let ⟨cf, hcf⟩ := (Real.isBounded_iff_bddBelow_bddAbove.1 f.isBounded_range).1
-  ⟨cf + C, forall_range_iff.2 fun _ => add_le_add_right ((fun x => hcf (mem_range_self x)) _) _⟩
+  ⟨cf + C, forall_mem_range.2 fun _ => add_le_add_right ((fun x => hcf (mem_range_self x)) _) _⟩
 #align Gromov_Hausdorff.HD_below_aux2 GromovHausdorff.HD_below_aux2
 
 private theorem HD_bound_aux2 (f : Cb X Y) (C : ℝ) :
     BddAbove (range fun y : Y => ⨅ x, f (inl x, inr y) + C) := by
   rcases (Real.isBounded_iff_bddBelow_bddAbove.1 f.isBounded_range).2 with ⟨Cf, hCf⟩
-  refine' ⟨Cf + C, forall_range_iff.2 fun y => _⟩
+  refine' ⟨Cf + C, forall_mem_range.2 fun y => _⟩
   calc
     ⨅ x, f (inl x, inr y) + C ≤ f (inl default, inr y) + C := ciInf_le (HD_below_aux2 C) default
     _ ≤ Cf + C := add_le_add ((fun x => hCf (mem_range_self x)) _) le_rfl
@@ -357,7 +357,7 @@ private theorem HD_lipschitz_aux1 (f g : Cb X Y) :
   -- iSup to iSup and iInf to iInf
   have Z : (⨆ x, ⨅ y, f (inl x, inr y)) ≤ ⨆ x, ⨅ y, g (inl x, inr y) + dist f g :=
     ciSup_mono (HD_bound_aux1 _ (dist f g)) fun x =>
-      ciInf_mono ⟨cf, forall_range_iff.2 fun i => Hcf _⟩ fun y => coe_le_coe_add_dist
+      ciInf_mono ⟨cf, forall_mem_range.2 fun i => Hcf _⟩ fun y => coe_le_coe_add_dist
   -- move the `dist f g` out of the infimum and the supremum, arguing that continuous monotone maps
   -- (here the addition of `dist f g`) preserve infimum and supremum
   have E1 : ∀ x, (⨅ y, g (inl x, inr y)) + dist f g = ⨅ y, g (inl x, inr y) + dist f g := by
@@ -366,7 +366,7 @@ private theorem HD_lipschitz_aux1 (f g : Cb X Y) :
     · intro x y hx
       simpa
     · show BddBelow (range fun y : Y => g (inl x, inr y))
-      exact ⟨cg, forall_range_iff.2 fun i => Hcg _⟩
+      exact ⟨cg, forall_mem_range.2 fun i => Hcg _⟩
   have E2 : (⨆ x, ⨅ y, g (inl x, inr y)) + dist f g = ⨆ x, (⨅ y, g (inl x, inr y)) + dist f g := by
     refine' Monotone.map_ciSup_of_continuousAt (continuousAt_id.add continuousAt_const) _ _
     · intro x y hx
@@ -385,7 +385,7 @@ private theorem HD_lipschitz_aux2 (f g : Cb X Y) :
   -- iSup to iSup and iInf to iInf
   have Z : (⨆ y, ⨅ x, f (inl x, inr y)) ≤ ⨆ y, ⨅ x, g (inl x, inr y) + dist f g :=
     ciSup_mono (HD_bound_aux2 _ (dist f g)) fun y =>
-      ciInf_mono ⟨cf, forall_range_iff.2 fun i => Hcf _⟩ fun y => coe_le_coe_add_dist
+      ciInf_mono ⟨cf, forall_mem_range.2 fun i => Hcf _⟩ fun y => coe_le_coe_add_dist
   -- move the `dist f g` out of the infimum and the supremum, arguing that continuous monotone maps
   -- (here the addition of `dist f g`) preserve infimum and supremum
   have E1 : ∀ y, (⨅ x, g (inl x, inr y)) + dist f g = ⨅ x, g (inl x, inr y) + dist f g := by
@@ -394,7 +394,7 @@ private theorem HD_lipschitz_aux2 (f g : Cb X Y) :
     · intro x y hx
       simpa
     · show BddBelow (range fun x : X => g (inl x, inr y))
-      exact ⟨cg, forall_range_iff.2 fun i => Hcg _⟩
+      exact ⟨cg, forall_mem_range.2 fun i => Hcg _⟩
   have E2 : (⨆ y, ⨅ x, g (inl x, inr y)) + dist f g = ⨆ y, (⨅ x, g (inl x, inr y)) + dist f g := by
     refine' Monotone.map_ciSup_of_continuousAt (continuousAt_id.add continuousAt_const) _ _
     · intro x y hx
chore: scope open Classical (#11199)

We remove all but one open Classicals, instead preferring to use open scoped Classical. The only real side-effect this led to is moving a couple declarations to use Exists.choose instead of Classical.choose.

The first few commits are explicitly labelled regex replaces for ease of review.

Diff
@@ -34,11 +34,13 @@ space structure on `X ⊕ Y`. The corresponding metric quotient is `OptimalGHCou
 
 noncomputable section
 
-open Classical Topology NNReal
+open scoped Classical
+open Topology NNReal
 
 universe u v w
 
-open Classical Set Function TopologicalSpace Filter Metric Quotient
+open scoped Classical
+open Set Function TopologicalSpace Filter Metric Quotient
 
 open BoundedContinuousFunction
 
@@ -100,7 +102,7 @@ section Constructions
 variable {X : Type u} {Y : Type v} [MetricSpace X] [CompactSpace X] [Nonempty X] [MetricSpace Y]
   [CompactSpace Y] [Nonempty Y] {f : ProdSpaceFun X Y} {x y z t : X ⊕ Y}
 
-attribute [local instance 10] inhabited_of_nonempty'
+attribute [local instance 10] Classical.inhabited_of_nonempty'
 
 private theorem maxVar_bound : dist x y ≤ maxVar X Y :=
   calc
chore: classify added proof porting notes (#10889)

Classifies by adding issue number (#10888) to porting notes claiming added proof.

Diff
@@ -442,7 +442,7 @@ def premetricOptimalGHDist : PseudoMetricSpace (X ⊕ Y) where
   dist_self x := candidates_refl (optimalGHDist_mem_candidatesB X Y)
   dist_comm x y := candidates_symm (optimalGHDist_mem_candidatesB X Y)
   dist_triangle x y z := candidates_triangle (optimalGHDist_mem_candidatesB X Y)
-  -- Porting note: Added a proof for `edist_dist`
+  -- Porting note (#10888): added proof for `edist_dist`
   edist_dist x y := by
     simp only
     congr
chore(Topology): Inhabited -> Nonempty (#10647)
Diff
@@ -222,8 +222,8 @@ private theorem dist_mem_candidates :
   exact ⟨fun x y => rfl, fun x y => rfl⟩
 
 /-- The distance on `X ⊕ Y` as a candidate -/
-def candidatesBDist (X : Type u) (Y : Type v) [MetricSpace X] [CompactSpace X] [Inhabited X]
-    [MetricSpace Y] [CompactSpace Y] [Inhabited Y] : Cb X Y :=
+def candidatesBDist (X : Type u) (Y : Type v) [MetricSpace X] [CompactSpace X] [Nonempty X]
+    [MetricSpace Y] [CompactSpace Y] [Nonempty Y] : Cb X Y :=
   candidatesBOfCandidates _ dist_mem_candidates
 #align Gromov_Hausdorff.candidates_b_dist GromovHausdorff.candidatesBDist
 
refactor(Topology/MetricSpace): remove Metric.Bounded (#7240)

Use Bornology.IsBounded instead.

Diff
@@ -105,7 +105,7 @@ attribute [local instance 10] inhabited_of_nonempty'
 private theorem maxVar_bound : dist x y ≤ maxVar X Y :=
   calc
     dist x y ≤ diam (univ : Set (X ⊕ Y)) :=
-      dist_le_diam_of_mem bounded_of_compactSpace (mem_univ _) (mem_univ _)
+      dist_le_diam_of_mem isBounded_of_compactSpace (mem_univ _) (mem_univ _)
     _ = diam (range inl ∪ range inr : Set (X ⊕ Y)) := by rw [range_inl_union_range_inr]
     _ ≤ diam (range inl : Set (X ⊕ Y)) + dist (inl default) (inr default) +
         diam (range inr : Set (X ⊕ Y)) :=
@@ -292,13 +292,13 @@ to check that the defining sets are bounded below or above. This is done in the
 technical lemmas. -/
 theorem HD_below_aux1 {f : Cb X Y} (C : ℝ) {x : X} :
     BddBelow (range fun y : Y => f (inl x, inr y) + C) :=
-  let ⟨cf, hcf⟩ := (Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).1
+  let ⟨cf, hcf⟩ := (Real.isBounded_iff_bddBelow_bddAbove.1 f.isBounded_range).1
   ⟨cf + C, forall_range_iff.2 fun _ => add_le_add_right ((fun x => hcf (mem_range_self x)) _) _⟩
 #align Gromov_Hausdorff.HD_below_aux1 GromovHausdorff.HD_below_aux1
 
 private theorem HD_bound_aux1 (f : Cb X Y) (C : ℝ) :
     BddAbove (range fun x : X => ⨅ y, f (inl x, inr y) + C) := by
-  rcases (Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).2 with ⟨Cf, hCf⟩
+  rcases (Real.isBounded_iff_bddBelow_bddAbove.1 f.isBounded_range).2 with ⟨Cf, hCf⟩
   refine' ⟨Cf + C, forall_range_iff.2 fun x => _⟩
   calc
     ⨅ y, f (inl x, inr y) + C ≤ f (inl x, inr default) + C := ciInf_le (HD_below_aux1 C) default
@@ -306,13 +306,13 @@ private theorem HD_bound_aux1 (f : Cb X Y) (C : ℝ) :
 
 theorem HD_below_aux2 {f : Cb X Y} (C : ℝ) {y : Y} :
     BddBelow (range fun x : X => f (inl x, inr y) + C) :=
-  let ⟨cf, hcf⟩ := (Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).1
+  let ⟨cf, hcf⟩ := (Real.isBounded_iff_bddBelow_bddAbove.1 f.isBounded_range).1
   ⟨cf + C, forall_range_iff.2 fun _ => add_le_add_right ((fun x => hcf (mem_range_self x)) _) _⟩
 #align Gromov_Hausdorff.HD_below_aux2 GromovHausdorff.HD_below_aux2
 
 private theorem HD_bound_aux2 (f : Cb X Y) (C : ℝ) :
     BddAbove (range fun y : Y => ⨅ x, f (inl x, inr y) + C) := by
-  rcases (Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).2 with ⟨Cf, hCf⟩
+  rcases (Real.isBounded_iff_bddBelow_bddAbove.1 f.isBounded_range).2 with ⟨Cf, hCf⟩
   refine' ⟨Cf + C, forall_range_iff.2 fun y => _⟩
   calc
     ⨅ x, f (inl x, inr y) + C ≤ f (inl default, inr y) + C := ciInf_le (HD_below_aux2 C) default
@@ -330,7 +330,7 @@ theorem HD_candidatesBDist_le :
         dist (inl x) (inr (default : Y)) = dist x (default : X) + 1 + dist default default := rfl
         _ ≤ diam (univ : Set X) + 1 + diam (univ : Set Y) := by
           gcongr <;>
-            exact dist_le_diam_of_mem bounded_of_compactSpace (mem_univ _) (mem_univ _)
+            exact dist_le_diam_of_mem isBounded_of_compactSpace (mem_univ _) (mem_univ _)
     exact le_trans A B
   · have A : ⨅ x, candidatesBDist X Y (inl x, inr y) ≤ candidatesBDist X Y (inl default, inr y) :=
       ciInf_le (by simpa using HD_below_aux2 0) default
@@ -339,7 +339,7 @@ theorem HD_candidatesBDist_le :
         dist (inl (default : X)) (inr y) = dist default default + 1 + dist default y := rfl
         _ ≤ diam (univ : Set X) + 1 + diam (univ : Set Y) := by
           gcongr <;>
-            exact dist_le_diam_of_mem bounded_of_compactSpace (mem_univ _) (mem_univ _)
+            exact dist_le_diam_of_mem isBounded_of_compactSpace (mem_univ _) (mem_univ _)
     exact le_trans A B
 #align Gromov_Hausdorff.HD_candidates_b_dist_le GromovHausdorff.HD_candidatesBDist_le
 
@@ -347,9 +347,9 @@ theorem HD_candidatesBDist_le :
 prove separately inequalities controlling the two terms (relying too heavily on copy-paste...) -/
 private theorem HD_lipschitz_aux1 (f g : Cb X Y) :
     (⨆ x, ⨅ y, f (inl x, inr y)) ≤ (⨆ x, ⨅ y, g (inl x, inr y)) + dist f g := by
-  rcases (Real.bounded_iff_bddBelow_bddAbove.1 g.bounded_range).1 with ⟨cg, hcg⟩
+  rcases (Real.isBounded_iff_bddBelow_bddAbove.1 g.isBounded_range).1 with ⟨cg, hcg⟩
   have Hcg : ∀ x, cg ≤ g x := fun x => hcg (mem_range_self x)
-  rcases (Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).1 with ⟨cf, hcf⟩
+  rcases (Real.isBounded_iff_bddBelow_bddAbove.1 f.isBounded_range).1 with ⟨cf, hcf⟩
   have Hcf : ∀ x, cf ≤ f x := fun x => hcf (mem_range_self x)
   -- prove the inequality but with `dist f g` inside, by using inequalities comparing
   -- iSup to iSup and iInf to iInf
@@ -375,9 +375,9 @@ private theorem HD_lipschitz_aux1 (f g : Cb X Y) :
 
 private theorem HD_lipschitz_aux2 (f g : Cb X Y) :
     (⨆ y, ⨅ x, f (inl x, inr y)) ≤ (⨆ y, ⨅ x, g (inl x, inr y)) + dist f g := by
-  rcases (Real.bounded_iff_bddBelow_bddAbove.1 g.bounded_range).1 with ⟨cg, hcg⟩
+  rcases (Real.isBounded_iff_bddBelow_bddAbove.1 g.isBounded_range).1 with ⟨cg, hcg⟩
   have Hcg : ∀ x, cg ≤ g x := fun x => hcg (mem_range_self x)
-  rcases (Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).1 with ⟨cf, hcf⟩
+  rcases (Real.isBounded_iff_bddBelow_bddAbove.1 f.isBounded_range).1 with ⟨cf, hcf⟩
   have Hcf : ∀ x, cf ≤ f x := fun x => hcf (mem_range_self x)
   -- prove the inequality but with `dist f g` inside, by using inequalities comparing
   -- iSup to iSup and iInf to iInf
chore: simplify by rfl (#7039)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -192,7 +192,7 @@ private theorem candidates_lipschitz_aux (fA : f ∈ candidates X Y) :
     _ = 2 * maxVar X Y * max (dist x z) (dist y t) := by
       rw [dist_comm t y]
       ring
-    _ = 2 * maxVar X Y * dist (x, y) (z, t) := by rfl
+    _ = 2 * maxVar X Y * dist (x, y) (z, t) := rfl
 
 /-- Candidates are Lipschitz -/
 private theorem candidates_lipschitz (fA : f ∈ candidates X Y) :
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,16 +2,13 @@
 Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sébastien Gouëzel
-
-! This file was ported from Lean 3 source module topology.metric_space.gromov_hausdorff_realized
-! leanprover-community/mathlib commit 0c1f285a9f6e608ae2bdffa3f993eafb01eba829
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Topology.MetricSpace.Gluing
 import Mathlib.Topology.MetricSpace.HausdorffDistance
 import Mathlib.Topology.ContinuousFunction.Bounded
 
+#align_import topology.metric_space.gromov_hausdorff_realized from "leanprover-community/mathlib"@"0c1f285a9f6e608ae2bdffa3f993eafb01eba829"
+
 /-!
 # The Gromov-Hausdorff distance is realized
 
fix: precedences of ⨆⋃⋂⨅ (#5614)
Diff
@@ -304,7 +304,7 @@ private theorem HD_bound_aux1 (f : Cb X Y) (C : ℝ) :
   rcases (Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).2 with ⟨Cf, hCf⟩
   refine' ⟨Cf + C, forall_range_iff.2 fun x => _⟩
   calc
-    (⨅ y, f (inl x, inr y) + C) ≤ f (inl x, inr default) + C := ciInf_le (HD_below_aux1 C) default
+    ⨅ y, f (inl x, inr y) + C ≤ f (inl x, inr default) + C := ciInf_le (HD_below_aux1 C) default
     _ ≤ Cf + C := add_le_add ((fun x => hCf (mem_range_self x)) _) le_rfl
 
 theorem HD_below_aux2 {f : Cb X Y} (C : ℝ) {y : Y} :
@@ -318,7 +318,7 @@ private theorem HD_bound_aux2 (f : Cb X Y) (C : ℝ) :
   rcases (Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).2 with ⟨Cf, hCf⟩
   refine' ⟨Cf + C, forall_range_iff.2 fun y => _⟩
   calc
-    (⨅ x, f (inl x, inr y) + C) ≤ f (inl default, inr y) + C := ciInf_le (HD_below_aux2 C) default
+    ⨅ x, f (inl x, inr y) + C ≤ f (inl default, inr y) + C := ciInf_le (HD_below_aux2 C) default
     _ ≤ Cf + C := add_le_add ((fun x => hCf (mem_range_self x)) _) le_rfl
 
 /-- Explicit bound on `HD (dist)`. This means that when looking for minimizers it will
@@ -326,7 +326,7 @@ be sufficient to look for functions with `HD(f)` bounded by this bound. -/
 theorem HD_candidatesBDist_le :
     HD (candidatesBDist X Y) ≤ diam (univ : Set X) + 1 + diam (univ : Set Y) := by
   refine' max_le (ciSup_le fun x => _) (ciSup_le fun y => _)
-  · have A : (⨅ y, candidatesBDist X Y (inl x, inr y)) ≤ candidatesBDist X Y (inl x, inr default) :=
+  · have A : ⨅ y, candidatesBDist X Y (inl x, inr y) ≤ candidatesBDist X Y (inl x, inr default) :=
       ciInf_le (by simpa using HD_below_aux1 0) default
     have B : dist (inl x) (inr default) ≤ diam (univ : Set X) + 1 + diam (univ : Set Y) :=
       calc
@@ -335,7 +335,7 @@ theorem HD_candidatesBDist_le :
           gcongr <;>
             exact dist_le_diam_of_mem bounded_of_compactSpace (mem_univ _) (mem_univ _)
     exact le_trans A B
-  · have A : (⨅ x, candidatesBDist X Y (inl x, inr y)) ≤ candidatesBDist X Y (inl default, inr y) :=
+  · have A : ⨅ x, candidatesBDist X Y (inl x, inr y) ≤ candidatesBDist X Y (inl default, inr y) :=
       ciInf_le (by simpa using HD_below_aux2 0) default
     have B : dist (inl default) (inr y) ≤ diam (univ : Set X) + 1 + diam (univ : Set Y) :=
       calc
@@ -504,9 +504,9 @@ theorem hausdorffDist_optimal_le_HD {f} (h : f ∈ candidatesB X Y) :
     have I1 : (⨆ x, ⨅ y, optimalGHDist X Y (inl x, inr y)) < r :=
       lt_of_le_of_lt (le_max_left _ _) hr
     have I2 :
-        (⨅ y, optimalGHDist X Y (inl z, inr y)) ≤ ⨆ x, ⨅ y, optimalGHDist X Y (inl x, inr y) :=
+        ⨅ y, optimalGHDist X Y (inl z, inr y) ≤ ⨆ x, ⨅ y, optimalGHDist X Y (inl x, inr y) :=
       le_csSup (by simpa using HD_bound_aux1 _ 0) (mem_range_self _)
-    have I : (⨅ y, optimalGHDist X Y (inl z, inr y)) < r := lt_of_le_of_lt I2 I1
+    have I : ⨅ y, optimalGHDist X Y (inl z, inr y) < r := lt_of_le_of_lt I2 I1
     rcases exists_lt_of_csInf_lt (range_nonempty _) I with ⟨r', ⟨z', rfl⟩, hr'⟩
     exact ⟨optimalGHInjr X Y z', mem_range_self _, le_of_lt hr'⟩
   refine' hausdorffDist_le_of_mem_dist _ A _
@@ -517,9 +517,9 @@ theorem hausdorffDist_optimal_le_HD {f} (h : f ∈ candidatesB X Y) :
     have I1 : (⨆ y, ⨅ x, optimalGHDist X Y (inl x, inr y)) < r :=
       lt_of_le_of_lt (le_max_right _ _) hr
     have I2 :
-        (⨅ x, optimalGHDist X Y (inl x, inr z)) ≤ ⨆ y, ⨅ x, optimalGHDist X Y (inl x, inr y) :=
+        ⨅ x, optimalGHDist X Y (inl x, inr z) ≤ ⨆ y, ⨅ x, optimalGHDist X Y (inl x, inr y) :=
       le_csSup (by simpa using HD_bound_aux2 _ 0) (mem_range_self _)
-    have I : (⨅ x, optimalGHDist X Y (inl x, inr z)) < r := lt_of_le_of_lt I2 I1
+    have I : ⨅ x, optimalGHDist X Y (inl x, inr z) < r := lt_of_le_of_lt I2 I1
     rcases exists_lt_of_csInf_lt (range_nonempty _) I with ⟨r', ⟨z', rfl⟩, hr'⟩
     refine' ⟨optimalGHInjl X Y z', mem_range_self _, le_of_lt _⟩
     rwa [dist_comm]
feat: golf using gcongr throughout the library (#4784)

Following on from #4702, another hundred sample uses of the gcongr tactic.

Diff
@@ -79,8 +79,7 @@ private def maxVar : ℝ≥0 :=
 private theorem one_le_maxVar : 1 ≤ maxVar X Y :=
   calc
     (1 : Real) = 2 * 0 + 1 + 2 * 0 := by simp
-    _ ≤ 2 * diam (univ : Set X) + 1 + 2 * diam (univ : Set Y) := by
-      apply_rules [add_le_add, mul_le_mul_of_nonneg_left, diam_nonneg] <;> norm_num
+    _ ≤ 2 * diam (univ : Set X) + 1 + 2 * diam (univ : Set Y) := by gcongr <;> positivity
 
 /-- The set of functions on `X ⊕ Y` that are candidates distances to realize the
 minimum of the Hausdorff distances between `X` and `Y` in a coupling. -/
@@ -119,8 +118,7 @@ private theorem maxVar_bound : dist x y ≤ maxVar X Y :=
       rw [isometry_inl.diam_range, isometry_inr.diam_range]
       rfl
     _ = 1 * diam (univ : Set X) + 1 + 1 * diam (univ : Set Y) := by simp
-    _ ≤ 2 * diam (univ : Set X) + 1 + 2 * diam (univ : Set Y) := by
-      apply_rules [add_le_add, mul_le_mul_of_nonneg_right, diam_nonneg, le_refl] <;> norm_num
+    _ ≤ 2 * diam (univ : Set X) + 1 + 2 * diam (univ : Set Y) := by gcongr <;> norm_num
 
 private theorem candidates_symm (fA : f ∈ candidates X Y) : f (x, y) = f (y, x) :=
   fA.1.1.1.2 x y
@@ -160,48 +158,40 @@ private theorem candidates_dist_bound (fA : f ∈ candidates X Y) :
       _ = dist (inl x) (inl y) := by
         rw [@Sum.dist_eq X Y]
         rfl
-      _ = 1 * dist (inl x) (inl y) := by simp
-      _ ≤ maxVar X Y * dist (inl x) (inl y) :=
-        mul_le_mul_of_nonneg_right (one_le_maxVar X Y) dist_nonneg
+      _ = 1 * dist (inl x) (inl y) := by ring
+      _ ≤ maxVar X Y * dist (inl x) (inl y) := by gcongr; exact one_le_maxVar X Y
   | inl x, inr y =>
     calc
       f (inl x, inr y) ≤ maxVar X Y := candidates_le_maxVar fA
       _ = maxVar X Y * 1 := by simp
-      _ ≤ maxVar X Y * dist (inl x) (inr y) :=
-        mul_le_mul_of_nonneg_left Sum.one_le_dist_inl_inr (le_trans zero_le_one (one_le_maxVar X Y))
+      _ ≤ maxVar X Y * dist (inl x) (inr y) := by gcongr; apply Sum.one_le_dist_inl_inr
   | inr x, inl y =>
     calc
       f (inr x, inl y) ≤ maxVar X Y := candidates_le_maxVar fA
       _ = maxVar X Y * 1 := by simp
-      _ ≤ maxVar X Y * dist (inl x) (inr y) :=
-        mul_le_mul_of_nonneg_left Sum.one_le_dist_inl_inr (le_trans zero_le_one (one_le_maxVar X Y))
+      _ ≤ maxVar X Y * dist (inl x) (inr y) := by gcongr; apply Sum.one_le_dist_inl_inr
   | inr x, inr y =>
     calc
       f (inr x, inr y) = dist x y := candidates_dist_inr fA x y
       _ = dist (inr x) (inr y) := by
         rw [@Sum.dist_eq X Y]
         rfl
-      _ = 1 * dist (inr x) (inr y) := by simp
-      _ ≤ maxVar X Y * dist (inr x) (inr y) :=
-        mul_le_mul_of_nonneg_right (one_le_maxVar X Y) dist_nonneg
+      _ = 1 * dist (inr x) (inr y) := by ring
+      _ ≤ maxVar X Y * dist (inr x) (inr y) := by gcongr; exact one_le_maxVar X Y
 
 /-- Technical lemma to prove that candidates are Lipschitz -/
 private theorem candidates_lipschitz_aux (fA : f ∈ candidates X Y) :
     f (x, y) - f (z, t) ≤ 2 * maxVar X Y * dist (x, y) (z, t) :=
   calc
-    f (x, y) - f (z, t) ≤ f (x, t) + f (t, y) - f (z, t) :=
-      sub_le_sub_right (candidates_triangle fA) _
-    _ ≤ f (x, z) + f (z, t) + f (t, y) - f (z, t) :=
-      (sub_le_sub_right (add_le_add_right (candidates_triangle fA) _) _)
+    f (x, y) - f (z, t) ≤ f (x, t) + f (t, y) - f (z, t) := by gcongr; exact candidates_triangle fA
+    _ ≤ f (x, z) + f (z, t) + f (t, y) - f (z, t) := by gcongr; exact candidates_triangle fA
     _ = f (x, z) + f (t, y) := by simp [sub_eq_add_neg, add_assoc]
-    _ ≤ maxVar X Y * dist x z + maxVar X Y * dist t y :=
-      (add_le_add (candidates_dist_bound fA) (candidates_dist_bound fA))
+    _ ≤ maxVar X Y * dist x z + maxVar X Y * dist t y := by
+      gcongr <;> apply candidates_dist_bound fA
     _ ≤ maxVar X Y * max (dist x z) (dist t y) + maxVar X Y * max (dist x z) (dist t y) := by
-      apply add_le_add
-      apply mul_le_mul_of_nonneg_left (le_max_left (dist x z) (dist t y))
-        (zero_le_one.trans (one_le_maxVar X Y))
-      apply mul_le_mul_of_nonneg_left (le_max_right (dist x z) (dist t y))
-        (zero_le_one.trans (one_le_maxVar X Y))
+      gcongr
+      · apply le_max_left
+      · apply le_max_right
     _ = 2 * maxVar X Y * max (dist x z) (dist y t) := by
       rw [dist_comm t y]
       ring
@@ -342,7 +332,7 @@ theorem HD_candidatesBDist_le :
       calc
         dist (inl x) (inr (default : Y)) = dist x (default : X) + 1 + dist default default := rfl
         _ ≤ diam (univ : Set X) + 1 + diam (univ : Set Y) := by
-          apply add_le_add (add_le_add _ le_rfl) <;>
+          gcongr <;>
             exact dist_le_diam_of_mem bounded_of_compactSpace (mem_univ _) (mem_univ _)
     exact le_trans A B
   · have A : (⨅ x, candidatesBDist X Y (inl x, inr y)) ≤ candidatesBDist X Y (inl default, inr y) :=
@@ -351,7 +341,7 @@ theorem HD_candidatesBDist_le :
       calc
         dist (inl (default : X)) (inr y) = dist default default + 1 + dist default y := rfl
         _ ≤ diam (univ : Set X) + 1 + diam (univ : Set Y) := by
-          apply add_le_add (add_le_add _ le_rfl) <;>
+          gcongr <;>
             exact dist_le_diam_of_mem bounded_of_compactSpace (mem_univ _) (mem_univ _)
     exact le_trans A B
 #align Gromov_Hausdorff.HD_candidates_b_dist_le GromovHausdorff.HD_candidatesBDist_le
feat: port Topology.MetricSpace.GromovHausdorffRealized (#4206)

Proof of dist_mem_candidates has been simplified

Dependencies 10 + 666

667 files ported (98.5%)
296309 lines ported (98.2%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file