l3lab/ntp-mathlib huggingface dataset:
instance completeSpace_separation [h : CompleteSpace α] :
    CompleteSpace (Quotient (separationSetoid α)) := by
  constructor
  intro f hf
  have : Cauchy (f.comap fun x => ⟦x⟧) :=
    hf.comap' comap_quotient_le_uniformity <| hf.left.comap_of_surj (surjective_quotient_mk' _)
  let ⟨x, (hx : (f.comap fun x => ⟦x⟧) ≤ 𝓝 x)⟩ := CompleteSpace.complete this
  exact ⟨⟦x⟧,
    (comap_le_comap_iff <| by 

Proof state:
α : Type u_1
inst✝² : UniformSpace α
β : Type u_2
inst✝¹ : UniformSpace β
γ : Type u_3
inst✝ : UniformSpace γ
h : CompleteSpace α
f : Filter (Quotient (separationSetoid α))
hf : Cauchy f
this : Cauchy (Filter.comap (fun x => ⟦x⟧) f)
x : α
hx : Filter.comap (fun x => ⟦x⟧) f ≤ 𝓝 x
⊢ (range fun x => ⟦x⟧) ∈ f

Next tactic:
simp
theorem comap_coe_eq_uniformity :
    ((𝓤 _).comap fun p : α × α => ((p.1 : Completion α), (p.2 : Completion α))) = 𝓤 α := by
  

Proof state:
α : Type u_1
inst✝² : UniformSpace α
β : Type u_2
inst✝¹ : UniformSpace β
γ : Type u_3
inst✝ : UniformSpace γ
⊢ Filter.comap (fun p => (↑α p.1, ↑α p.2)) (𝓤 (Completion α)) = 𝓤 α

Next tactic:
have :
    (fun x : α × α => ((x.1 : Completion α), (x.2 : Completion α))) =
      (fun x : CauchyFilter α × CauchyFilter α => (⟦x.1⟧, ⟦x.2⟧)) ∘ fun x : α × α =>
        (pureCauchy x.1, pureCauchy x.2) :=
    by ext ⟨a, b⟩ <;> simp <;> rfl
theorem comap_coe_eq_uniformity :
    ((𝓤 _).comap fun p : α × α => ((p.1 : Completion α), (p.2 : Completion α))) = 𝓤 α := by
  have :
    (fun x : α × α => ((x.1 : Completion α), (x.2 : Completion α))) =
      (fun x : CauchyFilter α × CauchyFilter α => (⟦x.1⟧, ⟦x.2⟧)) ∘ fun x : α × α =>
        (pureCauchy x.1, pureCauchy x.2) :=
    by 

Proof state:
α : Type u_1
inst✝² : UniformSpace α
β : Type u_2
inst✝¹ : UniformSpace β
γ : Type u_3
inst✝ : UniformSpace γ
⊢ (fun x => (↑α x.1, ↑α x.2)) = (fun x => (⟦x.1⟧, ⟦x.2⟧)) ∘ fun x => (pureCauchy x.1, pureCauchy x.2)

Next tactic:
ext ⟨a, b⟩
theorem comap_coe_eq_uniformity :
    ((𝓤 _).comap fun p : α × α => ((p.1 : Completion α), (p.2 : Completion α))) = 𝓤 α := by
  have :
    (fun x : α × α => ((x.1 : Completion α), (x.2 : Completion α))) =
      (fun x : CauchyFilter α × CauchyFilter α => (⟦x.1⟧, ⟦x.2⟧)) ∘ fun x : α × α =>
        (pureCauchy x.1, pureCauchy x.2) :=
    by ext ⟨a, b⟩ <;> 

Proof state:
case h.mk.a
α : Type u_1
inst✝² : UniformSpace α
β : Type u_2
inst✝¹ : UniformSpace β
γ : Type u_3
inst✝ : UniformSpace γ
a b : α
⊢ (↑α (a, b).1, ↑α (a, b).2).1 = (((fun x => (⟦x.1⟧, ⟦x.2⟧)) ∘ fun x => (pureCauchy x.1, pureCauchy x.2)) (a, b)).1

Next tactic:
simp
theorem comap_coe_eq_uniformity :
    ((𝓤 _).comap fun p : α × α => ((p.1 : Completion α), (p.2 : Completion α))) = 𝓤 α := by
  have :
    (fun x : α × α => ((x.1 : Completion α), (x.2 : Completion α))) =
      (fun x : CauchyFilter α × CauchyFilter α => (⟦x.1⟧, ⟦x.2⟧)) ∘ fun x : α × α =>
        (pureCauchy x.1, pureCauchy x.2) :=
    by ext ⟨a, b⟩ <;> 

Proof state:
case h.mk.a
α : Type u_1
inst✝² : UniformSpace α
β : Type u_2
inst✝¹ : UniformSpace β
γ : Type u_3
inst✝ : UniformSpace γ
a b : α
⊢ (↑α (a, b).1, ↑α (a, b).2).2 = (((fun x => (⟦x.1⟧, ⟦x.2⟧)) ∘ fun x => (pureCauchy x.1, pureCauchy x.2)) (a, b)).2

Next tactic:
simp
theorem comap_coe_eq_uniformity :
    ((𝓤 _).comap fun p : α × α => ((p.1 : Completion α), (p.2 : Completion α))) = 𝓤 α := by
  have :
    (fun x : α × α => ((x.1 : Completion α), (x.2 : Completion α))) =
      (fun x : CauchyFilter α × CauchyFilter α => (⟦x.1⟧, ⟦x.2⟧)) ∘ fun x : α × α =>
        (pureCauchy x.1, pureCauchy x.2) :=
    by ext ⟨a, b⟩ <;> simp <;> 

Proof state:
case h.mk.a
α : Type u_1
inst✝² : UniformSpace α
β : Type u_2
inst✝¹ : UniformSpace β
γ : Type u_3
inst✝ : UniformSpace γ
a b : α
⊢ ↑α a = ⟦pureCauchy a⟧

Next tactic:
rfl
theorem comap_coe_eq_uniformity :
    ((𝓤 _).comap fun p : α × α => ((p.1 : Completion α), (p.2 : Completion α))) = 𝓤 α := by
  have :
    (fun x : α × α => ((x.1 : Completion α), (x.2 : Completion α))) =
      (fun x : CauchyFilter α × CauchyFilter α => (⟦x.1⟧, ⟦x.2⟧)) ∘ fun x : α × α =>
        (pureCauchy x.1, pureCauchy x.2) :=
    by ext ⟨a, b⟩ <;> simp <;> 

Proof state:
case h.mk.a
α : Type u_1
inst✝² : UniformSpace α
β : Type u_2
inst✝¹ : UniformSpace β
γ : Type u_3
inst✝ : UniformSpace γ
a b : α
⊢ ↑α b = ⟦pureCauchy b⟧

Next tactic:
rfl
theorem comap_coe_eq_uniformity :
    ((𝓤 _).comap fun p : α × α => ((p.1 : Completion α), (p.2 : Completion α))) = 𝓤 α := by
  have :
    (fun x : α × α => ((x.1 : Completion α), (x.2 : Completion α))) =
      (fun x : CauchyFilter α × CauchyFilter α => (⟦x.1⟧, ⟦x.2⟧)) ∘ fun x : α × α =>
        (pureCauchy x.1, pureCauchy x.2) :=
    by ext ⟨a, b⟩ <;> simp <;> rfl
  

Proof state:
α : Type u_1
inst✝² : UniformSpace α
β : Type u_2
inst✝¹ : UniformSpace β
γ : Type u_3
inst✝ : UniformSpace γ
this : (fun x => (↑α x.1, ↑α x.2)) = (fun x => (⟦x.1⟧, ⟦x.2⟧)) ∘ fun x => (pureCauchy x.1, pureCauchy x.2)
⊢ Filter.comap (fun p => (↑α p.1, ↑α p.2)) (𝓤 (Completion α)) = 𝓤 α

Next tactic:
rw [this, ← Filter.comap_comap]
theorem comap_coe_eq_uniformity :
    ((𝓤 _).comap fun p : α × α => ((p.1 : Completion α), (p.2 : Completion α))) = 𝓤 α := by
  have :
    (fun x : α × α => ((x.1 : Completion α), (x.2 : Completion α))) =
      (fun x : CauchyFilter α × CauchyFilter α => (⟦x.1⟧, ⟦x.2⟧)) ∘ fun x : α × α =>
        (pureCauchy x.1, pureCauchy x.2) :=
    by ext ⟨a, b⟩ <;> simp <;> rfl
  rw [this, ← Filter.comap_comap]
  

Proof state:
α : Type u_1
inst✝² : UniformSpace α
β : Type u_2
inst✝¹ : UniformSpace β
γ : Type u_3
inst✝ : UniformSpace γ
this : (fun x => (↑α x.1, ↑α x.2)) = (fun x => (⟦x.1⟧, ⟦x.2⟧)) ∘ fun x => (pureCauchy x.1, pureCauchy x.2)
⊢ Filter.comap (fun x => (pureCauchy x.1, pureCauchy x.2)) (Filter.comap (fun x => (⟦x.1⟧, ⟦x.2⟧)) (𝓤 (Completion α))) =
    𝓤 α

Next tactic:
change Filter.comap _ (Filter.comap _ (𝓤 <| Quotient <| separationSetoid <| CauchyFilter α)) = 𝓤 α
theorem comap_coe_eq_uniformity :
    ((𝓤 _).comap fun p : α × α => ((p.1 : Completion α), (p.2 : Completion α))) = 𝓤 α := by
  have :
    (fun x : α × α => ((x.1 : Completion α), (x.2 : Completion α))) =
      (fun x : CauchyFilter α × CauchyFilter α => (⟦x.1⟧, ⟦x.2⟧)) ∘ fun x : α × α =>
        (pureCauchy x.1, pureCauchy x.2) :=
    by ext ⟨a, b⟩ <;> simp <;> rfl
  rw [this, ← Filter.comap_comap]
  change Filter.comap _ (Filter.comap _ (𝓤 <| Quotient <| separationSetoid <| CauchyFilter α)) = 𝓤 α
  

Proof state:
α : Type u_1
inst✝² : UniformSpace α
β : Type u_2
inst✝¹ : UniformSpace β
γ : Type u_3
inst✝ : UniformSpace γ
this : (fun x => (↑α x.1, ↑α x.2)) = (fun x => (⟦x.1⟧, ⟦x.2⟧)) ∘ fun x => (pureCauchy x.1, pureCauchy x.2)
⊢ Filter.comap (fun x => (pureCauchy x.1, pureCauchy x.2))
      (Filter.comap (fun x => (⟦x.1⟧, ⟦x.2⟧)) (𝓤 (Quotient (separationSetoid (CauchyFilter α))))) =
    𝓤 α

Next tactic:
rw [comap_quotient_eq_uniformity, uniformEmbedding_pureCauchy.comap_uniformity]
/-- The Haudorff completion as an abstract completion. -/
def cPkg {α : Type*} [UniformSpace α] : AbstractCompletion α where
  space := Completion α
  coe := (↑)
  uniformStruct := by 

Proof state:
α✝ : Type u_1
inst✝³ : UniformSpace α✝
β : Type u_2
inst✝² : UniformSpace β
γ : Type u_3
inst✝¹ : UniformSpace γ
α : Type u_4
inst✝ : UniformSpace α
⊢ UniformSpace (Completion α)

Next tactic:
infer_instance
/-- The Haudorff completion as an abstract completion. -/
def cPkg {α : Type*} [UniformSpace α] : AbstractCompletion α where
  space := Completion α
  coe := (↑)
  uniformStruct := by infer_instance
  complete := by 

Proof state:
α✝ : Type u_1
inst✝³ : UniformSpace α✝
β : Type u_2
inst✝² : UniformSpace β
γ : Type u_3
inst✝¹ : UniformSpace γ
α : Type u_4
inst✝ : UniformSpace α
⊢ CompleteSpace (Completion α)

Next tactic:
infer_instance
/-- The Haudorff completion as an abstract completion. -/
def cPkg {α : Type*} [UniformSpace α] : AbstractCompletion α where
  space := Completion α
  coe := (↑)
  uniformStruct := by infer_instance
  complete := by infer_instance
  separation := by 

Proof state:
α✝ : Type u_1
inst✝³ : UniformSpace α✝
β : Type u_2
inst✝² : UniformSpace β
γ : Type u_3
inst✝¹ : UniformSpace γ
α : Type u_4
inst✝ : UniformSpace α
⊢ SeparatedSpace (Completion α)

Next tactic:
infer_instance
theorem extension_map [CompleteSpace γ] [SeparatedSpace γ] {f : β → γ} {g : α → β}
    (hf : UniformContinuous f) (hg : UniformContinuous g) :
    Completion.extension f ∘ Completion.map g = Completion.extension (f ∘ g) :=
  Completion.ext (continuous_extension.comp continuous_map) continuous_extension <| by
    

Proof state:
α : Type u_1
inst✝⁴ : UniformSpace α
β : Type u_2
inst✝³ : UniformSpace β
γ : Type u_3
inst✝² : UniformSpace γ
f✝ : α → β
inst✝¹ : CompleteSpace γ
inst✝ : SeparatedSpace γ
f : β → γ
g : α → β
hf : UniformContinuous f
hg : UniformContinuous g
⊢ ∀ (a : α), (Completion.extension f ∘ Completion.map g) (↑α a) = Completion.extension (f ∘ g) (↑α a)

Next tactic:
intro a
theorem extension_map [CompleteSpace γ] [SeparatedSpace γ] {f : β → γ} {g : α → β}
    (hf : UniformContinuous f) (hg : UniformContinuous g) :
    Completion.extension f ∘ Completion.map g = Completion.extension (f ∘ g) :=
  Completion.ext (continuous_extension.comp continuous_map) continuous_extension <| by
    intro a
    -- porting note: this is not provable by simp [hf, hg, hf.comp hg, map_coe, extension_coe],
    -- but should be?
    

Proof state:
α : Type u_1
inst✝⁴ : UniformSpace α
β : Type u_2
inst✝³ : UniformSpace β
γ : Type u_3
inst✝² : UniformSpace γ
f✝ : α → β
inst✝¹ : CompleteSpace γ
inst✝ : SeparatedSpace γ
f : β → γ
g : α → β
hf : UniformContinuous f
hg : UniformContinuous g
a : α
⊢ (Completion.extension f ∘ Completion.map g) (↑α a) = Completion.extension (f ∘ g) (↑α a)

Next tactic:
rw [extension_coe (hf.comp hg), Function.comp_apply, map_coe hg, extension_coe hf,
      Function.comp_apply]
/-- The isomorphism between the completion of a uniform space and the completion of its separation
quotient. -/
def completionSeparationQuotientEquiv (α : Type u) [UniformSpace α] :
    Completion (SeparationQuotient α) ≃ Completion α := by
  

Proof state:
α✝ : Type u_1
inst✝³ : UniformSpace α✝
β : Type u_2
inst✝² : UniformSpace β
γ : Type u_3
inst✝¹ : UniformSpace γ
α : Type u
inst✝ : UniformSpace α
⊢ Completion (SeparationQuotient α) ≃ Completion α

Next tactic:
refine'
    ⟨Completion.extension (SeparationQuotient.lift ((↑) : α → Completion α)),
      Completion.map Quotient.mk', _, _⟩
/-- The isomorphism between the completion of a uniform space and the completion of its separation
quotient. -/
def completionSeparationQuotientEquiv (α : Type u) [UniformSpace α] :
    Completion (SeparationQuotient α) ≃ Completion α := by
  refine'
    ⟨Completion.extension (SeparationQuotient.lift ((↑) : α → Completion α)),
      Completion.map Quotient.mk', _, _⟩
  · 

Proof state:
case refine'_1
α✝ : Type u_1
inst✝³ : UniformSpace α✝
β : Type u_2
inst✝² : UniformSpace β
γ : Type u_3
inst✝¹ : UniformSpace γ
α : Type u
inst✝ : UniformSpace α
⊢ Function.LeftInverse (Completion.map Quotient.mk') (Completion.extension (SeparationQuotient.lift ↑α))

Next tactic:
intro a
/-- The isomorphism between the completion of a uniform space and the completion of its separation
quotient. -/
def completionSeparationQuotientEquiv (α : Type u) [UniformSpace α] :
    Completion (SeparationQuotient α) ≃ Completion α := by
  refine'
    ⟨Completion.extension (SeparationQuotient.lift ((↑) : α → Completion α)),
      Completion.map Quotient.mk', _, _⟩
  · intro a
    

Proof state:
case refine'_1
α✝ : Type u_1
inst✝³ : UniformSpace α✝
β : Type u_2
inst✝² : UniformSpace β
γ : Type u_3
inst✝¹ : UniformSpace γ
α : Type u
inst✝ : UniformSpace α
a : Completion (SeparationQuotient α)
⊢ Completion.map Quotient.mk' (Completion.extension (SeparationQuotient.lift ↑α) a) = a

Next tactic:
refine' induction_on a (isClosed_eq (continuous_map.comp continuous_extension) continuous_id) _
/-- The isomorphism between the completion of a uniform space and the completion of its separation
quotient. -/
def completionSeparationQuotientEquiv (α : Type u) [UniformSpace α] :
    Completion (SeparationQuotient α) ≃ Completion α := by
  refine'
    ⟨Completion.extension (SeparationQuotient.lift ((↑) : α → Completion α)),
      Completion.map Quotient.mk', _, _⟩
  · intro a
    refine' induction_on a (isClosed_eq (continuous_map.comp continuous_extension) continuous_id) _
    

Proof state:
case refine'_1
α✝ : Type u_1
inst✝³ : UniformSpace α✝
β : Type u_2
inst✝² : UniformSpace β
γ : Type u_3
inst✝¹ : UniformSpace γ
α : Type u
inst✝ : UniformSpace α
a : Completion (SeparationQuotient α)
⊢ ∀ (a : SeparationQuotient α),
    Completion.map Quotient.mk' (Completion.extension (SeparationQuotient.lift ↑α) (↑(SeparationQuotient α) a)) =
      ↑(SeparationQuotient α) a

Next tactic:
rintro ⟨a⟩
/-- The isomorphism between the completion of a uniform space and the completion of its separation
quotient. -/
def completionSeparationQuotientEquiv (α : Type u) [UniformSpace α] :
    Completion (SeparationQuotient α) ≃ Completion α := by
  refine'
    ⟨Completion.extension (SeparationQuotient.lift ((↑) : α → Completion α)),
      Completion.map Quotient.mk', _, _⟩
  · intro a
    refine' induction_on a (isClosed_eq (continuous_map.comp continuous_extension) continuous_id) _
    rintro ⟨a⟩
    -- porting note: had to insert rewrites to switch between Quot.mk, Quotient.mk, Quotient.mk'
    

Proof state:
case refine'_1.mk
α✝ : Type u_1
inst✝³ : UniformSpace α✝
β : Type u_2
inst✝² : UniformSpace β
γ : Type u_3
inst✝¹ : UniformSpace γ
α : Type u
inst✝ : UniformSpace α
a✝¹ : Completion (SeparationQuotient α)
a✝ : SeparationQuotient α
a : α
⊢ Completion.map Quotient.mk'
      (Completion.extension (SeparationQuotient.lift ↑α) (↑(SeparationQuotient α) (Quot.mk Setoid.r a))) =
    ↑(SeparationQuotient α) (Quot.mk Setoid.r a)

Next tactic:
rw [← Quotient.mk,extension_coe (SeparationQuotient.uniformContinuous_lift _),
      SeparationQuotient.lift_mk (uniformContinuous_coe α), map_coe]
/-- The isomorphism between the completion of a uniform space and the completion of its separation
quotient. -/
def completionSeparationQuotientEquiv (α : Type u) [UniformSpace α] :
    Completion (SeparationQuotient α) ≃ Completion α := by
  refine'
    ⟨Completion.extension (SeparationQuotient.lift ((↑) : α → Completion α)),
      Completion.map Quotient.mk', _, _⟩
  · intro a
    refine' induction_on a (isClosed_eq (continuous_map.comp continuous_extension) continuous_id) _
    rintro ⟨a⟩
    -- porting note: had to insert rewrites to switch between Quot.mk, Quotient.mk, Quotient.mk'
    rw [← Quotient.mk,extension_coe (SeparationQuotient.uniformContinuous_lift _),
      SeparationQuotient.lift_mk (uniformContinuous_coe α), map_coe]
    · 

Proof state:
case refine'_1.mk
α✝ : Type u_1
inst✝³ : UniformSpace α✝
β : Type u_2
inst✝² : UniformSpace β
γ : Type u_3
inst✝¹ : UniformSpace γ
α : Type u
inst✝ : UniformSpace α
a✝¹ : Completion (SeparationQuotient α)
a✝ : SeparationQuotient α
a : α
⊢ ↑(SeparationQuotient α) (Quotient.mk' a) = ↑(SeparationQuotient α) ⟦a⟧

Next tactic:
rfl
/-- The isomorphism between the completion of a uniform space and the completion of its separation
quotient. -/
def completionSeparationQuotientEquiv (α : Type u) [UniformSpace α] :
    Completion (SeparationQuotient α) ≃ Completion α := by
  refine'
    ⟨Completion.extension (SeparationQuotient.lift ((↑) : α → Completion α)),
      Completion.map Quotient.mk', _, _⟩
  · intro a
    refine' induction_on a (isClosed_eq (continuous_map.comp continuous_extension) continuous_id) _
    rintro ⟨a⟩
    -- porting note: had to insert rewrites to switch between Quot.mk, Quotient.mk, Quotient.mk'
    rw [← Quotient.mk,extension_coe (SeparationQuotient.uniformContinuous_lift _),
      SeparationQuotient.lift_mk (uniformContinuous_coe α), map_coe]
    · rfl
    · 

Proof state:
case refine'_1.mk.hf
α✝ : Type u_1
inst✝³ : UniformSpace α✝
β : Type u_2
inst✝² : UniformSpace β
γ : Type u_3
inst✝¹ : UniformSpace γ
α : Type u
inst✝ : UniformSpace α
a✝¹ : Completion (SeparationQuotient α)
a✝ : SeparationQuotient α
a : α
⊢ UniformContinuous Quotient.mk'

Next tactic:
exact uniformContinuous_quotient_mk
/-- The isomorphism between the completion of a uniform space and the completion of its separation
quotient. -/
def completionSeparationQuotientEquiv (α : Type u) [UniformSpace α] :
    Completion (SeparationQuotient α) ≃ Completion α := by
  refine'
    ⟨Completion.extension (SeparationQuotient.lift ((↑) : α → Completion α)),
      Completion.map Quotient.mk', _, _⟩
  · intro a
    refine' induction_on a (isClosed_eq (continuous_map.comp continuous_extension) continuous_id) _
    rintro ⟨a⟩
    -- porting note: had to insert rewrites to switch between Quot.mk, Quotient.mk, Quotient.mk'
    rw [← Quotient.mk,extension_coe (SeparationQuotient.uniformContinuous_lift _),
      SeparationQuotient.lift_mk (uniformContinuous_coe α), map_coe]
    · rfl
    · exact uniformContinuous_quotient_mk
  · 

Proof state:
case refine'_2
α✝ : Type u_1
inst✝³ : UniformSpace α✝
β : Type u_2
inst✝² : UniformSpace β
γ : Type u_3
inst✝¹ : UniformSpace γ
α : Type u
inst✝ : UniformSpace α
⊢ Function.RightInverse (Completion.map Quotient.mk') (Completion.extension (SeparationQuotient.lift ↑α))

Next tactic:
intro a
/-- The isomorphism between the completion of a uniform space and the completion of its separation
quotient. -/
def completionSeparationQuotientEquiv (α : Type u) [UniformSpace α] :
    Completion (SeparationQuotient α) ≃ Completion α := by
  refine'
    ⟨Completion.extension (SeparationQuotient.lift ((↑) : α → Completion α)),
      Completion.map Quotient.mk', _, _⟩
  · intro a
    refine' induction_on a (isClosed_eq (continuous_map.comp continuous_extension) continuous_id) _
    rintro ⟨a⟩
    -- porting note: had to insert rewrites to switch between Quot.mk, Quotient.mk, Quotient.mk'
    rw [← Quotient.mk,extension_coe (SeparationQuotient.uniformContinuous_lift _),
      SeparationQuotient.lift_mk (uniformContinuous_coe α), map_coe]
    · rfl
    · exact uniformContinuous_quotient_mk
  · intro a
    

Proof state:
case refine'_2
α✝ : Type u_1
inst✝³ : UniformSpace α✝
β : Type u_2
inst✝² : UniformSpace β
γ : Type u_3
inst✝¹ : UniformSpace γ
α : Type u
inst✝ : UniformSpace α
a : Completion α
⊢ Completion.extension (SeparationQuotient.lift ↑α) (Completion.map Quotient.mk' a) = a

Next tactic:
refine' Completion.induction_on a
        (isClosed_eq (continuous_extension.comp continuous_map) continuous_id) fun a => _
/-- The isomorphism between the completion of a uniform space and the completion of its separation
quotient. -/
def completionSeparationQuotientEquiv (α : Type u) [UniformSpace α] :
    Completion (SeparationQuotient α) ≃ Completion α := by
  refine'
    ⟨Completion.extension (SeparationQuotient.lift ((↑) : α → Completion α)),
      Completion.map Quotient.mk', _, _⟩
  · intro a
    refine' induction_on a (isClosed_eq (continuous_map.comp continuous_extension) continuous_id) _
    rintro ⟨a⟩
    -- porting note: had to insert rewrites to switch between Quot.mk, Quotient.mk, Quotient.mk'
    rw [← Quotient.mk,extension_coe (SeparationQuotient.uniformContinuous_lift _),
      SeparationQuotient.lift_mk (uniformContinuous_coe α), map_coe]
    · rfl
    · exact uniformContinuous_quotient_mk
  · intro a
    refine' Completion.induction_on a
        (isClosed_eq (continuous_extension.comp continuous_map) continuous_id) fun a => _
    

Proof state:
case refine'_2
α✝ : Type u_1
inst✝³ : UniformSpace α✝
β : Type u_2
inst✝² : UniformSpace β
γ : Type u_3
inst✝¹ : UniformSpace γ
α : Type u
inst✝ : UniformSpace α
a✝ : Completion α
a : α
⊢ Completion.extension (SeparationQuotient.lift ↑α) (Completion.map Quotient.mk' (↑α a)) = ↑α a

Next tactic:
rw [map_coe]
/-- The isomorphism between the completion of a uniform space and the completion of its separation
quotient. -/
def completionSeparationQuotientEquiv (α : Type u) [UniformSpace α] :
    Completion (SeparationQuotient α) ≃ Completion α := by
  refine'
    ⟨Completion.extension (SeparationQuotient.lift ((↑) : α → Completion α)),
      Completion.map Quotient.mk', _, _⟩
  · intro a
    refine' induction_on a (isClosed_eq (continuous_map.comp continuous_extension) continuous_id) _
    rintro ⟨a⟩
    -- porting note: had to insert rewrites to switch between Quot.mk, Quotient.mk, Quotient.mk'
    rw [← Quotient.mk,extension_coe (SeparationQuotient.uniformContinuous_lift _),
      SeparationQuotient.lift_mk (uniformContinuous_coe α), map_coe]
    · rfl
    · exact uniformContinuous_quotient_mk
  · intro a
    refine' Completion.induction_on a
        (isClosed_eq (continuous_extension.comp continuous_map) continuous_id) fun a => _
    rw [map_coe]
    -- porting note: add SeparationQuotient.lift_mk' for Quotient.mk' ?
    · 

Proof state:
case refine'_2
α✝ : Type u_1
inst✝³ : UniformSpace α✝
β : Type u_2
inst✝² : UniformSpace β
γ : Type u_3
inst✝¹ : UniformSpace γ
α : Type u
inst✝ : UniformSpace α
a✝ : Completion α
a : α
⊢ Completion.extension (SeparationQuotient.lift ↑α) (↑(SeparationQuotient α) (Quotient.mk' a)) = ↑α a

Next tactic:
rw [extension_coe (SeparationQuotient.uniformContinuous_lift _), Quotient.mk',
        SeparationQuotient.lift_mk (uniformContinuous_coe α) _]
/-- The isomorphism between the completion of a uniform space and the completion of its separation
quotient. -/
def completionSeparationQuotientEquiv (α : Type u) [UniformSpace α] :
    Completion (SeparationQuotient α) ≃ Completion α := by
  refine'
    ⟨Completion.extension (SeparationQuotient.lift ((↑) : α → Completion α)),
      Completion.map Quotient.mk', _, _⟩
  · intro a
    refine' induction_on a (isClosed_eq (continuous_map.comp continuous_extension) continuous_id) _
    rintro ⟨a⟩
    -- porting note: had to insert rewrites to switch between Quot.mk, Quotient.mk, Quotient.mk'
    rw [← Quotient.mk,extension_coe (SeparationQuotient.uniformContinuous_lift _),
      SeparationQuotient.lift_mk (uniformContinuous_coe α), map_coe]
    · rfl
    · exact uniformContinuous_quotient_mk
  · intro a
    refine' Completion.induction_on a
        (isClosed_eq (continuous_extension.comp continuous_map) continuous_id) fun a => _
    rw [map_coe]
    -- porting note: add SeparationQuotient.lift_mk' for Quotient.mk' ?
    · rw [extension_coe (SeparationQuotient.uniformContinuous_lift _), Quotient.mk',
        SeparationQuotient.lift_mk (uniformContinuous_coe α) _]
    · 

Proof state:
case refine'_2.hf
α✝ : Type u_1
inst✝³ : UniformSpace α✝
β : Type u_2
inst✝² : UniformSpace β
γ : Type u_3
inst✝¹ : UniformSpace γ
α : Type u
inst✝ : UniformSpace α
a✝ : Completion α
a : α
⊢ UniformContinuous Quotient.mk'

Next tactic:
exact uniformContinuous_quotient_mk
@[simp]
theorem transvection_zero : transvection i j (0 : R) = 1 := by 

Proof state:
n : Type u_1
p : Type u_2
R : Type u₂
𝕜 : Type u_3
inst✝³ : Field 𝕜
inst✝² : DecidableEq n
inst✝¹ : DecidableEq p
inst✝ : CommRing R
i j : n
⊢ transvection i j 0 = 1

Next tactic:
simp [transvection]
/-- A transvection matrix is obtained from the identity by adding `c` times the `j`-th row to
the `i`-th row. -/
theorem updateRow_eq_transvection [Finite n] (c : R) :
    updateRow (1 : Matrix n n R) i ((1 : Matrix n n R) i + c • (1 : Matrix n n R) j) =
      transvection i j c := by
  

Proof state:
n : Type u_1
p : Type u_2
R : Type u₂
𝕜 : Type u_3
inst✝⁴ : Field 𝕜
inst✝³ : DecidableEq n
inst✝² : DecidableEq p
inst✝¹ : CommRing R
i j : n
inst✝ : Finite n
c : R
⊢ updateRow 1 i (OfNat.ofNat 1 i + c • OfNat.ofNat 1 j) = transvection i j c

Next tactic:
cases nonempty_fintype n
/-- A transvection matrix is obtained from the identity by adding `c` times the `j`-th row to
the `i`-th row. -/
theorem updateRow_eq_transvection [Finite n] (c : R) :
    updateRow (1 : Matrix n n R) i ((1 : Matrix n n R) i + c • (1 : Matrix n n R) j) =
      transvection i j c := by
  cases nonempty_fintype n
  

Proof state:
case intro
n : Type u_1
p : Type u_2
R : Type u₂
𝕜 : Type u_3
inst✝⁴ : Field 𝕜
inst✝³ : DecidableEq n
inst✝² : DecidableEq p
inst✝¹ : CommRing R
i j : n
inst✝ : Finite n
c : R
val✝ : Fintype n
⊢ updateRow 1 i (OfNat.ofNat 1 i + c • OfNat.ofNat 1 j) = transvection i j c

Next tactic:
ext a b