l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem mem_sups : c ∈ s ⊻ t ↔ ∃ a ∈ s, ∃ b ∈ t, a ⊔ b = c := by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝² : SemilatticeSup α
inst✝¹ : SemilatticeSup β
inst✝ : SupHomClass F α β
s s₁ s₂ t t₁ t₂ u v : Set α
a b c : α
⊢ c ∈ s ⊻ t ↔ ∃ a ∈ s, ∃ b ∈ t, a ⊔ b = c

Next tactic:
simp [(· ⊻ ·)]
lemma sep_sups_le (s t : Set α) (a : α) :
    {b ∈ s ⊻ t | b ≤ a} = {b ∈ s | b ≤ a} ⊻ {b ∈ t | b ≤ a} := by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝² : SemilatticeSup α
inst✝¹ : SemilatticeSup β
inst✝ : SupHomClass F α β
s✝ s₁ s₂ t✝ t₁ t₂ u v : Set α
a✝ b c : α
s t : Set α
a : α
⊢ {b | b ∈ s ⊻ t ∧ b ≤ a} = {b | b ∈ s ∧ b ≤ a} ⊻ {b | b ∈ t ∧ b ≤ a}

Next tactic:
ext
lemma sep_sups_le (s t : Set α) (a : α) :
    {b ∈ s ⊻ t | b ≤ a} = {b ∈ s | b ≤ a} ⊻ {b ∈ t | b ≤ a} := by ext; 

Proof state:
case h
F : Type u_1
α : Type u_2
β : Type u_3
inst✝² : SemilatticeSup α
inst✝¹ : SemilatticeSup β
inst✝ : SupHomClass F α β
s✝ s₁ s₂ t✝ t₁ t₂ u v : Set α
a✝ b c : α
s t : Set α
a x✝ : α
⊢ x✝ ∈ {b | b ∈ s ⊻ t ∧ b ≤ a} ↔ x✝ ∈ {b | b ∈ s ∧ b ≤ a} ⊻ {b | b ∈ t ∧ b ≤ a}

Next tactic:
aesop
@[simp]
theorem image_sup_prod (s t : Set α) : Set.image2 (fun x x_1 => x ⊔ x_1) s t = s ⊻ t := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝² : SemilatticeSup α
inst✝¹ : SemilatticeSup β
inst✝ : SupHomClass F α β
s✝ s₁ s₂ t✝ t₁ t₂ u v : Set α
a b c : α
s t : Set α
⊢ image2 (fun x x_1 => x ⊔ x_1) s t = s ⊻ t

Next tactic:
have : (s ×ˢ t).image (uncurry (· ⊔ ·)) = Set.image2 (fun x x_1 => x ⊔ x_1) s t := by
    simp only [ge_iff_le, image_uncurry_prod]
@[simp]
theorem image_sup_prod (s t : Set α) : Set.image2 (fun x x_1 => x ⊔ x_1) s t = s ⊻ t := by
  have : (s ×ˢ t).image (uncurry (· ⊔ ·)) = Set.image2 (fun x x_1 => x ⊔ x_1) s t := by
    

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝² : SemilatticeSup α
inst✝¹ : SemilatticeSup β
inst✝ : SupHomClass F α β
s✝ s₁ s₂ t✝ t₁ t₂ u v : Set α
a b c : α
s t : Set α
⊢ (uncurry fun x x_1 => x ⊔ x_1) '' s ×ˢ t = image2 (fun x x_1 => x ⊔ x_1) s t

Next tactic:
simp only [ge_iff_le, image_uncurry_prod]
@[simp]
theorem image_sup_prod (s t : Set α) : Set.image2 (fun x x_1 => x ⊔ x_1) s t = s ⊻ t := by
  have : (s ×ˢ t).image (uncurry (· ⊔ ·)) = Set.image2 (fun x x_1 => x ⊔ x_1) s t := by
    simp only [ge_iff_le, image_uncurry_prod]
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝² : SemilatticeSup α
inst✝¹ : SemilatticeSup β
inst✝ : SupHomClass F α β
s✝ s₁ s₂ t✝ t₁ t₂ u v : Set α
a b c : α
s t : Set α
this : (uncurry fun x x_1 => x ⊔ x_1) '' s ×ˢ t = image2 (fun x x_1 => x ⊔ x_1) s t
⊢ image2 (fun x x_1 => x ⊔ x_1) s t = s ⊻ t

Next tactic:
rw [← this]
@[simp]
theorem image_sup_prod (s t : Set α) : Set.image2 (fun x x_1 => x ⊔ x_1) s t = s ⊻ t := by
  have : (s ×ˢ t).image (uncurry (· ⊔ ·)) = Set.image2 (fun x x_1 => x ⊔ x_1) s t := by
    simp only [ge_iff_le, image_uncurry_prod]
  rw [← this]
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝² : SemilatticeSup α
inst✝¹ : SemilatticeSup β
inst✝ : SupHomClass F α β
s✝ s₁ s₂ t✝ t₁ t₂ u v : Set α
a b c : α
s t : Set α
this : (uncurry fun x x_1 => x ⊔ x_1) '' s ×ˢ t = image2 (fun x x_1 => x ⊔ x_1) s t
⊢ (uncurry fun x x_1 => x ⊔ x_1) '' s ×ˢ t = s ⊻ t

Next tactic:
exact image_uncurry_prod _ _ _
@[simp]
theorem mem_infs : c ∈ s ⊼ t ↔ ∃ a ∈ s, ∃ b ∈ t, a ⊓ b = c := by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝² : SemilatticeInf α
inst✝¹ : SemilatticeInf β
inst✝ : InfHomClass F α β
s s₁ s₂ t t₁ t₂ u v : Set α
a b c : α
⊢ c ∈ s ⊼ t ↔ ∃ a ∈ s, ∃ b ∈ t, a ⊓ b = c

Next tactic:
simp [(· ⊼ ·)]
lemma sep_infs_le (s t : Set α) (a : α) :
    {b ∈ s ⊼ t | a ≤ b} = {b ∈ s | a ≤ b} ⊼ {b ∈ t | a ≤ b} := by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝² : SemilatticeInf α
inst✝¹ : SemilatticeInf β
inst✝ : InfHomClass F α β
s✝ s₁ s₂ t✝ t₁ t₂ u v : Set α
a✝ b c : α
s t : Set α
a : α
⊢ {b | b ∈ s ⊼ t ∧ a ≤ b} = {b | b ∈ s ∧ a ≤ b} ⊼ {b | b ∈ t ∧ a ≤ b}

Next tactic:
ext
lemma sep_infs_le (s t : Set α) (a : α) :
    {b ∈ s ⊼ t | a ≤ b} = {b ∈ s | a ≤ b} ⊼ {b ∈ t | a ≤ b} := by ext; 

Proof state:
case h
F : Type u_1
α : Type u_2
β : Type u_3
inst✝² : SemilatticeInf α
inst✝¹ : SemilatticeInf β
inst✝ : InfHomClass F α β
s✝ s₁ s₂ t✝ t₁ t₂ u v : Set α
a✝ b c : α
s t : Set α
a x✝ : α
⊢ x✝ ∈ {b | b ∈ s ⊼ t ∧ a ≤ b} ↔ x✝ ∈ {b | b ∈ s ∧ a ≤ b} ⊼ {b | b ∈ t ∧ a ≤ b}

Next tactic:
aesop
@[simp]
theorem image_inf_prod (s t : Set α) : Set.image2 (fun x x_1 => x ⊓ x_1) s t = s ⊼ t := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝² : SemilatticeInf α
inst✝¹ : SemilatticeInf β
inst✝ : InfHomClass F α β
s✝ s₁ s₂ t✝ t₁ t₂ u v : Set α
a b c : α
s t : Set α
⊢ image2 (fun x x_1 => x ⊓ x_1) s t = s ⊼ t

Next tactic:
have : (s ×ˢ t).image (uncurry (· ⊓ ·)) = Set.image2 (fun x x_1 => x ⊓ x_1) s t := by
    simp only [@ge_iff_le, @Set.image_uncurry_prod]
@[simp]
theorem image_inf_prod (s t : Set α) : Set.image2 (fun x x_1 => x ⊓ x_1) s t = s ⊼ t := by
  have : (s ×ˢ t).image (uncurry (· ⊓ ·)) = Set.image2 (fun x x_1 => x ⊓ x_1) s t := by
    

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝² : SemilatticeInf α
inst✝¹ : SemilatticeInf β
inst✝ : InfHomClass F α β
s✝ s₁ s₂ t✝ t₁ t₂ u v : Set α
a b c : α
s t : Set α
⊢ (uncurry fun x x_1 => x ⊓ x_1) '' s ×ˢ t = image2 (fun x x_1 => x ⊓ x_1) s t

Next tactic:
simp only [@ge_iff_le, @Set.image_uncurry_prod]
@[simp]
theorem image_inf_prod (s t : Set α) : Set.image2 (fun x x_1 => x ⊓ x_1) s t = s ⊼ t := by
  have : (s ×ˢ t).image (uncurry (· ⊓ ·)) = Set.image2 (fun x x_1 => x ⊓ x_1) s t := by
    simp only [@ge_iff_le, @Set.image_uncurry_prod]
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝² : SemilatticeInf α
inst✝¹ : SemilatticeInf β
inst✝ : InfHomClass F α β
s✝ s₁ s₂ t✝ t₁ t₂ u v : Set α
a b c : α
s t : Set α
this : (uncurry fun x x_1 => x ⊓ x_1) '' s ×ˢ t = image2 (fun x x_1 => x ⊓ x_1) s t
⊢ image2 (fun x x_1 => x ⊓ x_1) s t = s ⊼ t

Next tactic:
rw [← this]
@[simp]
theorem image_inf_prod (s t : Set α) : Set.image2 (fun x x_1 => x ⊓ x_1) s t = s ⊼ t := by
  have : (s ×ˢ t).image (uncurry (· ⊓ ·)) = Set.image2 (fun x x_1 => x ⊓ x_1) s t := by
    simp only [@ge_iff_le, @Set.image_uncurry_prod]
  rw [← this]
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝² : SemilatticeInf α
inst✝¹ : SemilatticeInf β
inst✝ : InfHomClass F α β
s✝ s₁ s₂ t✝ t₁ t₂ u v : Set α
a b c : α
s t : Set α
this : (uncurry fun x x_1 => x ⊓ x_1) '' s ×ˢ t = image2 (fun x x_1 => x ⊓ x_1) s t
⊢ (uncurry fun x x_1 => x ⊓ x_1) '' s ×ˢ t = s ⊼ t

Next tactic:
exact image_uncurry_prod _ _ _
@[simp]
theorem upperClosure_sups [SemilatticeSup α] (s t : Set α) :
    upperClosure (s ⊻ t) = upperClosure s ⊔ upperClosure t := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeSup α
s t : Set α
⊢ upperClosure (s ⊻ t) = upperClosure s ⊔ upperClosure t

Next tactic:
ext a
@[simp]
theorem upperClosure_sups [SemilatticeSup α] (s t : Set α) :
    upperClosure (s ⊻ t) = upperClosure s ⊔ upperClosure t := by
  ext a
  

Proof state:
case a.h
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeSup α
s t : Set α
a : α
⊢ a ∈ ↑(upperClosure (s ⊻ t)) ↔ a ∈ ↑(upperClosure s ⊔ upperClosure t)

Next tactic:
simp only [SetLike.mem_coe, mem_upperClosure, Set.mem_sups, exists_and_left, exists_prop,
    UpperSet.coe_sup, Set.mem_inter_iff]
@[simp]
theorem upperClosure_sups [SemilatticeSup α] (s t : Set α) :
    upperClosure (s ⊻ t) = upperClosure s ⊔ upperClosure t := by
  ext a
  simp only [SetLike.mem_coe, mem_upperClosure, Set.mem_sups, exists_and_left, exists_prop,
    UpperSet.coe_sup, Set.mem_inter_iff]
  

Proof state:
case a.h
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeSup α
s t : Set α
a : α
⊢ (∃ a_1, (∃ a ∈ s, ∃ b ∈ t, a ⊔ b = a_1) ∧ a_1 ≤ a) ↔ (∃ a_1 ∈ s, a_1 ≤ a) ∧ ∃ a_1 ∈ t, a_1 ≤ a

Next tactic:
constructor
@[simp]
theorem upperClosure_sups [SemilatticeSup α] (s t : Set α) :
    upperClosure (s ⊻ t) = upperClosure s ⊔ upperClosure t := by
  ext a
  simp only [SetLike.mem_coe, mem_upperClosure, Set.mem_sups, exists_and_left, exists_prop,
    UpperSet.coe_sup, Set.mem_inter_iff]
  constructor
  · 

Proof state:
case a.h.mp
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeSup α
s t : Set α
a : α
⊢ (∃ a_1, (∃ a ∈ s, ∃ b ∈ t, a ⊔ b = a_1) ∧ a_1 ≤ a) → (∃ a_2 ∈ s, a_2 ≤ a) ∧ ∃ a_2 ∈ t, a_2 ≤ a

Next tactic:
rintro ⟨_, ⟨b, hb, c, hc, rfl⟩, ha⟩
@[simp]
theorem upperClosure_sups [SemilatticeSup α] (s t : Set α) :
    upperClosure (s ⊻ t) = upperClosure s ⊔ upperClosure t := by
  ext a
  simp only [SetLike.mem_coe, mem_upperClosure, Set.mem_sups, exists_and_left, exists_prop,
    UpperSet.coe_sup, Set.mem_inter_iff]
  constructor
  · rintro ⟨_, ⟨b, hb, c, hc, rfl⟩, ha⟩
    

Proof state:
case a.h.mp.intro.intro.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeSup α
s t : Set α
a b : α
hb : b ∈ s
c : α
hc : c ∈ t
ha : b ⊔ c ≤ a
⊢ (∃ a_1 ∈ s, a_1 ≤ a) ∧ ∃ a_1 ∈ t, a_1 ≤ a

Next tactic:
exact ⟨⟨b, hb, le_sup_left.trans ha⟩, c, hc, le_sup_right.trans ha⟩
@[simp]
theorem upperClosure_sups [SemilatticeSup α] (s t : Set α) :
    upperClosure (s ⊻ t) = upperClosure s ⊔ upperClosure t := by
  ext a
  simp only [SetLike.mem_coe, mem_upperClosure, Set.mem_sups, exists_and_left, exists_prop,
    UpperSet.coe_sup, Set.mem_inter_iff]
  constructor
  · rintro ⟨_, ⟨b, hb, c, hc, rfl⟩, ha⟩
    exact ⟨⟨b, hb, le_sup_left.trans ha⟩, c, hc, le_sup_right.trans ha⟩
  · 

Proof state:
case a.h.mpr
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeSup α
s t : Set α
a : α
⊢ ((∃ a_1 ∈ s, a_1 ≤ a) ∧ ∃ a_1 ∈ t, a_1 ≤ a) → ∃ a_2, (∃ a ∈ s, ∃ b ∈ t, a ⊔ b = a_2) ∧ a_2 ≤ a

Next tactic:
rintro ⟨⟨b, hb, hab⟩, c, hc, hac⟩
@[simp]
theorem upperClosure_sups [SemilatticeSup α] (s t : Set α) :
    upperClosure (s ⊻ t) = upperClosure s ⊔ upperClosure t := by
  ext a
  simp only [SetLike.mem_coe, mem_upperClosure, Set.mem_sups, exists_and_left, exists_prop,
    UpperSet.coe_sup, Set.mem_inter_iff]
  constructor
  · rintro ⟨_, ⟨b, hb, c, hc, rfl⟩, ha⟩
    exact ⟨⟨b, hb, le_sup_left.trans ha⟩, c, hc, le_sup_right.trans ha⟩
  · rintro ⟨⟨b, hb, hab⟩, c, hc, hac⟩
    

Proof state:
case a.h.mpr.intro.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeSup α
s t : Set α
a b : α
hb : b ∈ s
hab : b ≤ a
c : α
hc : c ∈ t
hac : c ≤ a
⊢ ∃ a_1, (∃ a ∈ s, ∃ b ∈ t, a ⊔ b = a_1) ∧ a_1 ≤ a

Next tactic:
exact ⟨_, ⟨b, hb, c, hc, rfl⟩, sup_le hab hac⟩
@[simp]
theorem lowerClosure_infs [SemilatticeInf α] (s t : Set α) :
    lowerClosure (s ⊼ t) = lowerClosure s ⊓ lowerClosure t := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeInf α
s t : Set α
⊢ lowerClosure (s ⊼ t) = lowerClosure s ⊓ lowerClosure t

Next tactic:
ext a
@[simp]
theorem lowerClosure_infs [SemilatticeInf α] (s t : Set α) :
    lowerClosure (s ⊼ t) = lowerClosure s ⊓ lowerClosure t := by
  ext a
  

Proof state:
case a.h
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeInf α
s t : Set α
a : α
⊢ a ∈ ↑(lowerClosure (s ⊼ t)) ↔ a ∈ ↑(lowerClosure s ⊓ lowerClosure t)

Next tactic:
simp only [SetLike.mem_coe, mem_lowerClosure, Set.mem_infs, exists_and_left, exists_prop,
    LowerSet.coe_sup, Set.mem_inter_iff]
@[simp]
theorem lowerClosure_infs [SemilatticeInf α] (s t : Set α) :
    lowerClosure (s ⊼ t) = lowerClosure s ⊓ lowerClosure t := by
  ext a
  simp only [SetLike.mem_coe, mem_lowerClosure, Set.mem_infs, exists_and_left, exists_prop,
    LowerSet.coe_sup, Set.mem_inter_iff]
  

Proof state:
case a.h
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeInf α
s t : Set α
a : α
⊢ (∃ a_1, (∃ a ∈ s, ∃ b ∈ t, a ⊓ b = a_1) ∧ a ≤ a_1) ↔ a ∈ lowerClosure s ⊓ lowerClosure t

Next tactic:
constructor
@[simp]
theorem lowerClosure_infs [SemilatticeInf α] (s t : Set α) :
    lowerClosure (s ⊼ t) = lowerClosure s ⊓ lowerClosure t := by
  ext a
  simp only [SetLike.mem_coe, mem_lowerClosure, Set.mem_infs, exists_and_left, exists_prop,
    LowerSet.coe_sup, Set.mem_inter_iff]
  constructor
  · 

Proof state:
case a.h.mp
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeInf α
s t : Set α
a : α
⊢ (∃ a_1, (∃ a ∈ s, ∃ b ∈ t, a ⊓ b = a_1) ∧ a ≤ a_1) → a ∈ lowerClosure s ⊓ lowerClosure t

Next tactic:
rintro ⟨_, ⟨b, hb, c, hc, rfl⟩, ha⟩
@[simp]
theorem lowerClosure_infs [SemilatticeInf α] (s t : Set α) :
    lowerClosure (s ⊼ t) = lowerClosure s ⊓ lowerClosure t := by
  ext a
  simp only [SetLike.mem_coe, mem_lowerClosure, Set.mem_infs, exists_and_left, exists_prop,
    LowerSet.coe_sup, Set.mem_inter_iff]
  constructor
  · rintro ⟨_, ⟨b, hb, c, hc, rfl⟩, ha⟩
    

Proof state:
case a.h.mp.intro.intro.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeInf α
s t : Set α
a b : α
hb : b ∈ s
c : α
hc : c ∈ t
ha : a ≤ b ⊓ c
⊢ a ∈ lowerClosure s ⊓ lowerClosure t

Next tactic:
exact ⟨⟨b, hb, ha.trans inf_le_left⟩, c, hc, ha.trans inf_le_right⟩
@[simp]
theorem lowerClosure_infs [SemilatticeInf α] (s t : Set α) :
    lowerClosure (s ⊼ t) = lowerClosure s ⊓ lowerClosure t := by
  ext a
  simp only [SetLike.mem_coe, mem_lowerClosure, Set.mem_infs, exists_and_left, exists_prop,
    LowerSet.coe_sup, Set.mem_inter_iff]
  constructor
  · rintro ⟨_, ⟨b, hb, c, hc, rfl⟩, ha⟩
    exact ⟨⟨b, hb, ha.trans inf_le_left⟩, c, hc, ha.trans inf_le_right⟩
  · 

Proof state:
case a.h.mpr
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeInf α
s t : Set α
a : α
⊢ a ∈ lowerClosure s ⊓ lowerClosure t → ∃ a_2, (∃ a ∈ s, ∃ b ∈ t, a ⊓ b = a_2) ∧ a ≤ a_2

Next tactic:
rintro ⟨⟨b, hb, hab⟩, c, hc, hac⟩
@[simp]
theorem lowerClosure_infs [SemilatticeInf α] (s t : Set α) :
    lowerClosure (s ⊼ t) = lowerClosure s ⊓ lowerClosure t := by
  ext a
  simp only [SetLike.mem_coe, mem_lowerClosure, Set.mem_infs, exists_and_left, exists_prop,
    LowerSet.coe_sup, Set.mem_inter_iff]
  constructor
  · rintro ⟨_, ⟨b, hb, c, hc, rfl⟩, ha⟩
    exact ⟨⟨b, hb, ha.trans inf_le_left⟩, c, hc, ha.trans inf_le_right⟩
  · rintro ⟨⟨b, hb, hab⟩, c, hc, hac⟩
    

Proof state:
case a.h.mpr.intro.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeInf α
s t : Set α
a b : α
hb : b ∈ s
hab : a ≤ b
c : α
hc : c ∈ t
hac : a ≤ c
⊢ ∃ a_1, (∃ a ∈ s, ∃ b ∈ t, a ⊓ b = a_1) ∧ a ≤ a_1

Next tactic:
exact ⟨_, ⟨b, hb, c, hc, rfl⟩, le_inf hab hac⟩
/-- Two metric space structures with the same distance coincide. -/
@[ext]
theorem MetricSpace.ext {α : Type*} {m m' : MetricSpace α} (h : m.toDist = m'.toDist) :
    m = m' := by
  

Proof state:
α✝ : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α✝
α : Type u_3
m m' : MetricSpace α
h : PseudoMetricSpace.toDist = PseudoMetricSpace.toDist
⊢ m = m'

Next tactic:
cases m
/-- Two metric space structures with the same distance coincide. -/
@[ext]
theorem MetricSpace.ext {α : Type*} {m m' : MetricSpace α} (h : m.toDist = m'.toDist) :
    m = m' := by
  cases m; 

Proof state:
case mk
α✝ : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α✝
α : Type u_3
m' : MetricSpace α
toPseudoMetricSpace✝ : PseudoMetricSpace α
eq_of_dist_eq_zero✝ : ∀ {x y : α}, dist x y = 0 → x = y
h : PseudoMetricSpace.toDist = PseudoMetricSpace.toDist
⊢ mk eq_of_dist_eq_zero✝ = m'

Next tactic:
cases m'
/-- Two metric space structures with the same distance coincide. -/
@[ext]
theorem MetricSpace.ext {α : Type*} {m m' : MetricSpace α} (h : m.toDist = m'.toDist) :
    m = m' := by
  cases m; cases m'; 

Proof state:
case mk.mk
α✝ : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α✝
α : Type u_3
toPseudoMetricSpace✝¹ : PseudoMetricSpace α
eq_of_dist_eq_zero✝¹ : ∀ {x y : α}, dist x y = 0 → x = y
toPseudoMetricSpace✝ : PseudoMetricSpace α
eq_of_dist_eq_zero✝ : ∀ {x y : α}, dist x y = 0 → x = y
h : PseudoMetricSpace.toDist = PseudoMetricSpace.toDist
⊢ mk eq_of_dist_eq_zero✝¹ = mk eq_of_dist_eq_zero✝

Next tactic:
congr
/-- Two metric space structures with the same distance coincide. -/
@[ext]
theorem MetricSpace.ext {α : Type*} {m m' : MetricSpace α} (h : m.toDist = m'.toDist) :
    m = m' := by
  cases m; cases m'; congr; 

Proof state:
case mk.mk.e_toPseudoMetricSpace
α✝ : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α✝
α : Type u_3
toPseudoMetricSpace✝¹ : PseudoMetricSpace α
eq_of_dist_eq_zero✝¹ : ∀ {x y : α}, dist x y = 0 → x = y
toPseudoMetricSpace✝ : PseudoMetricSpace α
eq_of_dist_eq_zero✝ : ∀ {x y : α}, dist x y = 0 → x = y
h : PseudoMetricSpace.toDist = PseudoMetricSpace.toDist
⊢ toPseudoMetricSpace✝¹ = toPseudoMetricSpace✝

Next tactic:
ext1
/-- Two metric space structures with the same distance coincide. -/
@[ext]
theorem MetricSpace.ext {α : Type*} {m m' : MetricSpace α} (h : m.toDist = m'.toDist) :
    m = m' := by
  cases m; cases m'; congr; ext1; 

Proof state:
case mk.mk.e_toPseudoMetricSpace.h
α✝ : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α✝
α : Type u_3
toPseudoMetricSpace✝¹ : PseudoMetricSpace α
eq_of_dist_eq_zero✝¹ : ∀ {x y : α}, dist x y = 0 → x = y
toPseudoMetricSpace✝ : PseudoMetricSpace α
eq_of_dist_eq_zero✝ : ∀ {x y : α}, dist x y = 0 → x = y
h : PseudoMetricSpace.toDist = PseudoMetricSpace.toDist
⊢ PseudoMetricSpace.toDist = PseudoMetricSpace.toDist

Next tactic:
assumption
@[simp]
theorem zero_eq_dist {x y : γ} : 0 = dist x y ↔ x = y := by 

Proof state:
α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝¹ : PseudoMetricSpace α
γ : Type w
inst✝ : MetricSpace γ
x y : γ
⊢ 0 = dist x y ↔ x = y

Next tactic:
rw [eq_comm, dist_eq_zero]
theorem dist_ne_zero {x y : γ} : dist x y ≠ 0 ↔ x ≠ y := by
  

Proof state:
α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝¹ : PseudoMetricSpace α
γ : Type w
inst✝ : MetricSpace γ
x y : γ
⊢ dist x y ≠ 0 ↔ x ≠ y

Next tactic:
simpa only [not_iff_not] using dist_eq_zero
@[simp]
theorem dist_le_zero {x y : γ} : dist x y ≤ 0 ↔ x = y := by
  

Proof state:
α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝¹ : PseudoMetricSpace α
γ : Type w
inst✝ : MetricSpace γ
x y : γ
⊢ dist x y ≤ 0 ↔ x = y

Next tactic:
simpa [le_antisymm_iff, dist_nonneg] using @dist_eq_zero _ _ x y
@[simp]
theorem dist_pos {x y : γ} : 0 < dist x y ↔ x ≠ y := by
  

Proof state:
α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝¹ : PseudoMetricSpace α
γ : Type w
inst✝ : MetricSpace γ
x y : γ
⊢ 0 < dist x y ↔ x ≠ y

Next tactic:
simpa only [not_le] using not_congr dist_le_zero
/-- Deduce the equality of points from the vanishing of the nonnegative distance-/
theorem eq_of_nndist_eq_zero {x y : γ} : nndist x y = 0 → x = y := by
  

Proof state:
α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝¹ : PseudoMetricSpace α
γ : Type w
inst✝ : MetricSpace γ
x y : γ
⊢ nndist x y = 0 → x = y

Next tactic:
simp only [← NNReal.eq_iff, ← dist_nndist, imp_self, NNReal.coe_zero, dist_eq_zero]
/-- Characterize the equality of points as the vanishing of the nonnegative distance-/
@[simp]
theorem nndist_eq_zero {x y : γ} : nndist x y = 0 ↔ x = y := by
  

Proof state:
α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝¹ : PseudoMetricSpace α
γ : Type w
inst✝ : MetricSpace γ
x y : γ
⊢ nndist x y = 0 ↔ x = y

Next tactic:
simp only [← NNReal.eq_iff, ← dist_nndist, imp_self, NNReal.coe_zero, dist_eq_zero]
@[simp]
theorem zero_eq_nndist {x y : γ} : 0 = nndist x y ↔ x = y := by
  

Proof state:
α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝¹ : PseudoMetricSpace α
γ : Type w
inst✝ : MetricSpace γ
x y : γ
⊢ 0 = nndist x y ↔ x = y

Next tactic:
simp only [← NNReal.eq_iff, ← dist_nndist, imp_self, NNReal.coe_zero, zero_eq_dist]
theorem subsingleton_closedBall (x : γ) {r : ℝ} (hr : r ≤ 0) : (closedBall x r).Subsingleton := by
  

Proof state:
α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝¹ : PseudoMetricSpace α
γ : Type w
inst✝ : MetricSpace γ
x✝ : γ
s : Set γ
x : γ
r : ℝ
hr : r ≤ 0
⊢ Set.Subsingleton (closedBall x r)

Next tactic:
rcases hr.lt_or_eq with (hr | rfl)
theorem subsingleton_closedBall (x : γ) {r : ℝ} (hr : r ≤ 0) : (closedBall x r).Subsingleton := by
  rcases hr.lt_or_eq with (hr | rfl)
  · 

Proof state:
case inl
α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝¹ : PseudoMetricSpace α
γ : Type w
inst✝ : MetricSpace γ
x✝ : γ
s : Set γ
x : γ
r : ℝ
hr✝ : r ≤ 0
hr : r < 0
⊢ Set.Subsingleton (closedBall x r)

Next tactic:
rw [closedBall_eq_empty.2 hr]
theorem subsingleton_closedBall (x : γ) {r : ℝ} (hr : r ≤ 0) : (closedBall x r).Subsingleton := by
  rcases hr.lt_or_eq with (hr | rfl)
  · rw [closedBall_eq_empty.2 hr]
    

Proof state:
case inl
α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝¹ : PseudoMetricSpace α
γ : Type w
inst✝ : MetricSpace γ
x✝ : γ
s : Set γ
x : γ
r : ℝ
hr✝ : r ≤ 0
hr : r < 0
⊢ Set.Subsingleton ∅

Next tactic:
exact subsingleton_empty
theorem subsingleton_closedBall (x : γ) {r : ℝ} (hr : r ≤ 0) : (closedBall x r).Subsingleton := by
  rcases hr.lt_or_eq with (hr | rfl)
  · rw [closedBall_eq_empty.2 hr]
    exact subsingleton_empty
  · 

Proof state:
case inr
α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝¹ : PseudoMetricSpace α
γ : Type w
inst✝ : MetricSpace γ
x✝ : γ
s : Set γ
x : γ
hr : 0 ≤ 0
⊢ Set.Subsingleton (closedBall x 0)

Next tactic:
rw [closedBall_zero]
theorem subsingleton_closedBall (x : γ) {r : ℝ} (hr : r ≤ 0) : (closedBall x r).Subsingleton := by
  rcases hr.lt_or_eq with (hr | rfl)
  · rw [closedBall_eq_empty.2 hr]
    exact subsingleton_empty
  · rw [closedBall_zero]
    

Proof state:
case inr
α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝¹ : PseudoMetricSpace α
γ : Type w
inst✝ : MetricSpace γ
x✝ : γ
s : Set γ
x : γ
hr : 0 ≤ 0
⊢ Set.Subsingleton {x}

Next tactic:
exact subsingleton_singleton
/-- A map between metric spaces is a uniform embedding if and only if the distance between `f x`
and `f y` is controlled in terms of the distance between `x` and `y` and conversely. -/
theorem uniformEmbedding_iff' [MetricSpace β] {f : γ → β} :
    UniformEmbedding f ↔
      (∀ ε > 0, ∃ δ > 0, ∀ {a b : γ}, dist a b < δ → dist (f a) (f b) < ε) ∧
        ∀ δ > 0, ∃ ε > 0, ∀ {a b : γ}, dist (f a) (f b) < ε → dist a b < δ := by
  

Proof state:
α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝² : PseudoMetricSpace α
γ : Type w
inst✝¹ : MetricSpace γ
x : γ
s : Set γ
inst✝ : MetricSpace β
f : γ → β
⊢ UniformEmbedding f ↔
    (∀ ε > 0, ∃ δ > 0, ∀ {a b : γ}, dist a b < δ → dist (f a) (f b) < ε) ∧
      ∀ δ > 0, ∃ ε > 0, ∀ {a b : γ}, dist (f a) (f b) < ε → dist a b < δ

Next tactic:
rw [uniformEmbedding_iff_uniformInducing, uniformInducing_iff, uniformContinuous_iff]
theorem isClosed_of_pairwise_le_dist {s : Set γ} {ε : ℝ} (hε : 0 < ε)
    (hs : s.Pairwise fun x y => ε ≤ dist x y) : IsClosed s :=
  isClosed_of_spaced_out (dist_mem_uniformity hε) <| by 

Proof state:
α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝¹ : PseudoMetricSpace α
γ : Type w
inst✝ : MetricSpace γ
x : γ
s✝ s : Set γ
ε : ℝ
hε : 0 < ε
hs : Set.Pairwise s fun x y => ε ≤ dist x y
⊢ Set.Pairwise s fun x y => (x, y) ∉ {p | dist p.1 p.2 < ε}

Next tactic:
simpa using hs
theorem closedEmbedding_of_pairwise_le_dist {α : Type*} [TopologicalSpace α] [DiscreteTopology α]
    {ε : ℝ} (hε : 0 < ε) {f : α → γ} (hf : Pairwise fun x y => ε ≤ dist (f x) (f y)) :
    ClosedEmbedding f :=
  closedEmbedding_of_spaced_out (dist_mem_uniformity hε) <| by 

Proof state:
α✝ : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝³ : PseudoMetricSpace α✝
γ : Type w
inst✝² : MetricSpace γ
x : γ
s : Set γ
α : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : DiscreteTopology α
ε : ℝ
hε : 0 < ε
f : α → γ
hf : Pairwise fun x y => ε ≤ dist (f x) (f y)
⊢ Pairwise fun x y => (f x, f y) ∉ {p | dist p.1 p.2 < ε}

Next tactic:
simpa using hf
/-- If `f : β → α` sends any two distinct points to points at distance at least `ε > 0`, then
`f` is a uniform embedding with respect to the discrete uniformity on `β`. -/
theorem uniformEmbedding_bot_of_pairwise_le_dist {β : Type*} {ε : ℝ} (hε : 0 < ε) {f : β → α}
    (hf : Pairwise fun x y => ε ≤ dist (f x) (f y)) :
    @UniformEmbedding _ _ ⊥ (by 

Proof state:
α : Type u
β✝ : Type v
X : Type u_1
ι : Type u_2
inst✝¹ : PseudoMetricSpace α
γ : Type w
inst✝ : MetricSpace γ
x : γ
s : Set γ
β : Type u_3
ε : ℝ
hε : 0 < ε
f : β → α
hf : Pairwise fun x y => ε ≤ dist (f x) (f y)
⊢ UniformSpace α

Next tactic:
infer_instance