l3lab/ntp-mathlib huggingface dataset:
theorem InftyValuation.map_mul' (x y : RatFunc Fq) :
    inftyValuationDef Fq (x * y) = inftyValuationDef Fq x * inftyValuationDef Fq y := by
  rw [inftyValuationDef, inftyValuationDef, inftyValuationDef]
  by_cases hx : x = 0
  · rw [hx, zero_mul, if_pos (Eq.refl _), zero_mul]
  · by_cases hy : y = 0
    · 

Proof state:
case pos
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
x y : RatFunc Fq
hx : ¬x = 0
hy : y = 0
⊢ (if x * y = 0 then 0 else ↑(Multiplicative.ofAdd (RatFunc.intDegree (x * y)))) =
    (if x = 0 then 0 else ↑(Multiplicative.ofAdd (RatFunc.intDegree x))) *
      if y = 0 then 0 else ↑(Multiplicative.ofAdd (RatFunc.intDegree y))

Next tactic:
rw [hy, mul_zero, if_pos (Eq.refl _), mul_zero]
theorem InftyValuation.map_mul' (x y : RatFunc Fq) :
    inftyValuationDef Fq (x * y) = inftyValuationDef Fq x * inftyValuationDef Fq y := by
  rw [inftyValuationDef, inftyValuationDef, inftyValuationDef]
  by_cases hx : x = 0
  · rw [hx, zero_mul, if_pos (Eq.refl _), zero_mul]
  · by_cases hy : y = 0
    · rw [hy, mul_zero, if_pos (Eq.refl _), mul_zero]
    · 

Proof state:
case neg
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
x y : RatFunc Fq
hx : ¬x = 0
hy : ¬y = 0
⊢ (if x * y = 0 then 0 else ↑(Multiplicative.ofAdd (RatFunc.intDegree (x * y)))) =
    (if x = 0 then 0 else ↑(Multiplicative.ofAdd (RatFunc.intDegree x))) *
      if y = 0 then 0 else ↑(Multiplicative.ofAdd (RatFunc.intDegree y))

Next tactic:
rw [if_neg hx, if_neg hy, if_neg (mul_ne_zero hx hy), ← WithZero.coe_mul, WithZero.coe_inj,
        ← ofAdd_add, RatFunc.intDegree_mul hx hy]
theorem InftyValuation.map_add_le_max' (x y : RatFunc Fq) :
    inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y) := by
  

Proof state:
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
x y : RatFunc Fq
⊢ inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y)

Next tactic:
by_cases hx : x = 0
theorem InftyValuation.map_add_le_max' (x y : RatFunc Fq) :
    inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y) := by
  by_cases hx : x = 0
  · 

Proof state:
case pos
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
x y : RatFunc Fq
hx : x = 0
⊢ inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y)

Next tactic:
rw [hx, zero_add]
theorem InftyValuation.map_add_le_max' (x y : RatFunc Fq) :
    inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y) := by
  by_cases hx : x = 0
  · rw [hx, zero_add]
    

Proof state:
case pos
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
x y : RatFunc Fq
hx : x = 0
⊢ inftyValuationDef Fq y ≤ max (inftyValuationDef Fq 0) (inftyValuationDef Fq y)

Next tactic:
conv_rhs => rw [inftyValuationDef, if_pos (Eq.refl _)]
theorem InftyValuation.map_add_le_max' (x y : RatFunc Fq) :
    inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y) := by
  by_cases hx : x = 0
  · rw [hx, zero_add]
    conv_rhs => 

Proof state:
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
x y : RatFunc Fq
hx : x = 0
| max (inftyValuationDef Fq 0) (inftyValuationDef Fq y)

Next tactic:
rw [inftyValuationDef, if_pos (Eq.refl _)]
theorem InftyValuation.map_add_le_max' (x y : RatFunc Fq) :
    inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y) := by
  by_cases hx : x = 0
  · rw [hx, zero_add]
    conv_rhs => rw [inftyValuationDef, if_pos (Eq.refl _)]
    

Proof state:
case pos
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
x y : RatFunc Fq
hx : x = 0
⊢ inftyValuationDef Fq y ≤ max 0 (inftyValuationDef Fq y)

Next tactic:
rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq y))]
theorem InftyValuation.map_add_le_max' (x y : RatFunc Fq) :
    inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y) := by
  by_cases hx : x = 0
  · rw [hx, zero_add]
    conv_rhs => rw [inftyValuationDef, if_pos (Eq.refl _)]
    rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq y))]
  · 

Proof state:
case neg
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
x y : RatFunc Fq
hx : ¬x = 0
⊢ inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y)

Next tactic:
by_cases hy : y = 0
theorem InftyValuation.map_add_le_max' (x y : RatFunc Fq) :
    inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y) := by
  by_cases hx : x = 0
  · rw [hx, zero_add]
    conv_rhs => rw [inftyValuationDef, if_pos (Eq.refl _)]
    rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq y))]
  · by_cases hy : y = 0
    · 

Proof state:
case pos
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
x y : RatFunc Fq
hx : ¬x = 0
hy : y = 0
⊢ inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y)

Next tactic:
rw [hy, add_zero]
theorem InftyValuation.map_add_le_max' (x y : RatFunc Fq) :
    inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y) := by
  by_cases hx : x = 0
  · rw [hx, zero_add]
    conv_rhs => rw [inftyValuationDef, if_pos (Eq.refl _)]
    rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq y))]
  · by_cases hy : y = 0
    · rw [hy, add_zero]
      

Proof state:
case pos
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
x y : RatFunc Fq
hx : ¬x = 0
hy : y = 0
⊢ inftyValuationDef Fq x ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq 0)

Next tactic:
conv_rhs => rw [max_comm, inftyValuationDef, if_pos (Eq.refl _)]
theorem InftyValuation.map_add_le_max' (x y : RatFunc Fq) :
    inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y) := by
  by_cases hx : x = 0
  · rw [hx, zero_add]
    conv_rhs => rw [inftyValuationDef, if_pos (Eq.refl _)]
    rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq y))]
  · by_cases hy : y = 0
    · rw [hy, add_zero]
      conv_rhs => 

Proof state:
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
x y : RatFunc Fq
hx : ¬x = 0
hy : y = 0
| max (inftyValuationDef Fq x) (inftyValuationDef Fq 0)

Next tactic:
rw [max_comm, inftyValuationDef, if_pos (Eq.refl _)]
theorem InftyValuation.map_add_le_max' (x y : RatFunc Fq) :
    inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y) := by
  by_cases hx : x = 0
  · rw [hx, zero_add]
    conv_rhs => rw [inftyValuationDef, if_pos (Eq.refl _)]
    rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq y))]
  · by_cases hy : y = 0
    · rw [hy, add_zero]
      conv_rhs => rw [max_comm, inftyValuationDef, if_pos (Eq.refl _)]
      

Proof state:
case pos
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
x y : RatFunc Fq
hx : ¬x = 0
hy : y = 0
⊢ inftyValuationDef Fq x ≤ max 0 (inftyValuationDef Fq x)

Next tactic:
rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq x))]
theorem InftyValuation.map_add_le_max' (x y : RatFunc Fq) :
    inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y) := by
  by_cases hx : x = 0
  · rw [hx, zero_add]
    conv_rhs => rw [inftyValuationDef, if_pos (Eq.refl _)]
    rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq y))]
  · by_cases hy : y = 0
    · rw [hy, add_zero]
      conv_rhs => rw [max_comm, inftyValuationDef, if_pos (Eq.refl _)]
      rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq x))]
    · 

Proof state:
case neg
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
x y : RatFunc Fq
hx : ¬x = 0
hy : ¬y = 0
⊢ inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y)

Next tactic:
by_cases hxy : x + y = 0
theorem InftyValuation.map_add_le_max' (x y : RatFunc Fq) :
    inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y) := by
  by_cases hx : x = 0
  · rw [hx, zero_add]
    conv_rhs => rw [inftyValuationDef, if_pos (Eq.refl _)]
    rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq y))]
  · by_cases hy : y = 0
    · rw [hy, add_zero]
      conv_rhs => rw [max_comm, inftyValuationDef, if_pos (Eq.refl _)]
      rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq x))]
    · by_cases hxy : x + y = 0
      · 

Proof state:
case pos
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
x y : RatFunc Fq
hx : ¬x = 0
hy : ¬y = 0
hxy : x + y = 0
⊢ inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y)

Next tactic:
rw [inftyValuationDef, if_pos hxy]
theorem InftyValuation.map_add_le_max' (x y : RatFunc Fq) :
    inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y) := by
  by_cases hx : x = 0
  · rw [hx, zero_add]
    conv_rhs => rw [inftyValuationDef, if_pos (Eq.refl _)]
    rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq y))]
  · by_cases hy : y = 0
    · rw [hy, add_zero]
      conv_rhs => rw [max_comm, inftyValuationDef, if_pos (Eq.refl _)]
      rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq x))]
    · by_cases hxy : x + y = 0
      · rw [inftyValuationDef, if_pos hxy]; 

Proof state:
case pos
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
x y : RatFunc Fq
hx : ¬x = 0
hy : ¬y = 0
hxy : x + y = 0
⊢ 0 ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y)

Next tactic:
exact zero_le'
theorem InftyValuation.map_add_le_max' (x y : RatFunc Fq) :
    inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y) := by
  by_cases hx : x = 0
  · rw [hx, zero_add]
    conv_rhs => rw [inftyValuationDef, if_pos (Eq.refl _)]
    rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq y))]
  · by_cases hy : y = 0
    · rw [hy, add_zero]
      conv_rhs => rw [max_comm, inftyValuationDef, if_pos (Eq.refl _)]
      rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq x))]
    · by_cases hxy : x + y = 0
      · rw [inftyValuationDef, if_pos hxy]; exact zero_le'
      · 

Proof state:
case neg
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
x y : RatFunc Fq
hx : ¬x = 0
hy : ¬y = 0
hxy : ¬x + y = 0
⊢ inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y)

Next tactic:
rw [inftyValuationDef, inftyValuationDef, inftyValuationDef, if_neg hx, if_neg hy,
          if_neg hxy]
theorem InftyValuation.map_add_le_max' (x y : RatFunc Fq) :
    inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y) := by
  by_cases hx : x = 0
  · rw [hx, zero_add]
    conv_rhs => rw [inftyValuationDef, if_pos (Eq.refl _)]
    rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq y))]
  · by_cases hy : y = 0
    · rw [hy, add_zero]
      conv_rhs => rw [max_comm, inftyValuationDef, if_pos (Eq.refl _)]
      rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq x))]
    · by_cases hxy : x + y = 0
      · rw [inftyValuationDef, if_pos hxy]; exact zero_le'
      · rw [inftyValuationDef, inftyValuationDef, inftyValuationDef, if_neg hx, if_neg hy,
          if_neg hxy]
        

Proof state:
case neg
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
x y : RatFunc Fq
hx : ¬x = 0
hy : ¬y = 0
hxy : ¬x + y = 0
⊢ ↑(Multiplicative.ofAdd (RatFunc.intDegree (x + y))) ≤
    max ↑(Multiplicative.ofAdd (RatFunc.intDegree x)) ↑(Multiplicative.ofAdd (RatFunc.intDegree y))

Next tactic:
rw [le_max_iff, WithZero.coe_le_coe, Multiplicative.ofAdd_le, WithZero.coe_le_coe,
          Multiplicative.ofAdd_le, ← le_max_iff]
theorem InftyValuation.map_add_le_max' (x y : RatFunc Fq) :
    inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y) := by
  by_cases hx : x = 0
  · rw [hx, zero_add]
    conv_rhs => rw [inftyValuationDef, if_pos (Eq.refl _)]
    rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq y))]
  · by_cases hy : y = 0
    · rw [hy, add_zero]
      conv_rhs => rw [max_comm, inftyValuationDef, if_pos (Eq.refl _)]
      rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq x))]
    · by_cases hxy : x + y = 0
      · rw [inftyValuationDef, if_pos hxy]; exact zero_le'
      · rw [inftyValuationDef, inftyValuationDef, inftyValuationDef, if_neg hx, if_neg hy,
          if_neg hxy]
        rw [le_max_iff, WithZero.coe_le_coe, Multiplicative.ofAdd_le, WithZero.coe_le_coe,
          Multiplicative.ofAdd_le, ← le_max_iff]
        

Proof state:
case neg
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
x y : RatFunc Fq
hx : ¬x = 0
hy : ¬y = 0
hxy : ¬x + y = 0
⊢ RatFunc.intDegree (x + y) ≤ max (RatFunc.intDegree x) (RatFunc.intDegree y)

Next tactic:
exact RatFunc.intDegree_add_le hy hxy
@[simp]
theorem inftyValuation_of_nonzero {x : RatFunc Fq} (hx : x ≠ 0) :
    inftyValuationDef Fq x = Multiplicative.ofAdd x.intDegree := by
  

Proof state:
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
x : RatFunc Fq
hx : x ≠ 0
⊢ inftyValuationDef Fq x = ↑(Multiplicative.ofAdd (RatFunc.intDegree x))

Next tactic:
rw [inftyValuationDef, if_neg hx]
@[simp]
theorem inftyValuation.C {k : Fq} (hk : k ≠ 0) :
    inftyValuationDef Fq (RatFunc.C k) = Multiplicative.ofAdd (0 : ℤ) := by
  

Proof state:
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
k : Fq
hk : k ≠ 0
⊢ inftyValuationDef Fq (RatFunc.C k) = ↑(Multiplicative.ofAdd 0)

Next tactic:
have hCk : RatFunc.C k ≠ 0 := (map_ne_zero _).mpr hk
@[simp]
theorem inftyValuation.C {k : Fq} (hk : k ≠ 0) :
    inftyValuationDef Fq (RatFunc.C k) = Multiplicative.ofAdd (0 : ℤ) := by
  have hCk : RatFunc.C k ≠ 0 := (map_ne_zero _).mpr hk
  

Proof state:
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
k : Fq
hk : k ≠ 0
hCk : RatFunc.C k ≠ 0
⊢ inftyValuationDef Fq (RatFunc.C k) = ↑(Multiplicative.ofAdd 0)

Next tactic:
rw [inftyValuationDef, if_neg hCk, RatFunc.intDegree_C]
@[simp]
theorem inftyValuation.X : inftyValuationDef Fq RatFunc.X = Multiplicative.ofAdd (1 : ℤ) := by
  

Proof state:
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
⊢ inftyValuationDef Fq RatFunc.X = ↑(Multiplicative.ofAdd 1)

Next tactic:
rw [inftyValuationDef, if_neg RatFunc.X_ne_zero, RatFunc.intDegree_X]
@[simp]
theorem inftyValuation.polynomial {p : Fq[X]} (hp : p ≠ 0) :
    inftyValuationDef Fq (algebraMap Fq[X] (RatFunc Fq) p) =
      Multiplicative.ofAdd (p.natDegree : ℤ) := by
  

Proof state:
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
p : Fq[X]
hp : p ≠ 0
⊢ inftyValuationDef Fq ((algebraMap Fq[X] (RatFunc Fq)) p) = ↑(Multiplicative.ofAdd ↑(Polynomial.natDegree p))

Next tactic:
have hp' : algebraMap Fq[X] (RatFunc Fq) p ≠ 0 := by
    rw [Ne.def, RatFunc.algebraMap_eq_zero_iff]; exact hp
@[simp]
theorem inftyValuation.polynomial {p : Fq[X]} (hp : p ≠ 0) :
    inftyValuationDef Fq (algebraMap Fq[X] (RatFunc Fq) p) =
      Multiplicative.ofAdd (p.natDegree : ℤ) := by
  have hp' : algebraMap Fq[X] (RatFunc Fq) p ≠ 0 := by
    

Proof state:
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
p : Fq[X]
hp : p ≠ 0
⊢ (algebraMap Fq[X] (RatFunc Fq)) p ≠ 0

Next tactic:
rw [Ne.def, RatFunc.algebraMap_eq_zero_iff]
@[simp]
theorem inftyValuation.polynomial {p : Fq[X]} (hp : p ≠ 0) :
    inftyValuationDef Fq (algebraMap Fq[X] (RatFunc Fq) p) =
      Multiplicative.ofAdd (p.natDegree : ℤ) := by
  have hp' : algebraMap Fq[X] (RatFunc Fq) p ≠ 0 := by
    rw [Ne.def, RatFunc.algebraMap_eq_zero_iff]; 

Proof state:
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
p : Fq[X]
hp : p ≠ 0
⊢ ¬p = 0

Next tactic:
exact hp
@[simp]
theorem inftyValuation.polynomial {p : Fq[X]} (hp : p ≠ 0) :
    inftyValuationDef Fq (algebraMap Fq[X] (RatFunc Fq) p) =
      Multiplicative.ofAdd (p.natDegree : ℤ) := by
  have hp' : algebraMap Fq[X] (RatFunc Fq) p ≠ 0 := by
    rw [Ne.def, RatFunc.algebraMap_eq_zero_iff]; exact hp
  

Proof state:
Fq F : Type
inst✝² : Field Fq
inst✝¹ : Field F
inst✝ : DecidableEq (RatFunc Fq)
p : Fq[X]
hp : p ≠ 0
hp' : (algebraMap Fq[X] (RatFunc Fq)) p ≠ 0
⊢ inftyValuationDef Fq ((algebraMap Fq[X] (RatFunc Fq)) p) = ↑(Multiplicative.ofAdd ↑(Polynomial.natDegree p))

Next tactic:
rw [inftyValuationDef, if_neg hp', RatFunc.intDegree_polynomial]
/-- Pullback an `OrderedCommMonoid` under an injective map.
See note [reducible non-instances]. -/
@[to_additive (attr := reducible) "Pullback an `OrderedAddCommMonoid` under an injective map."]
def Function.Injective.orderedCommMonoid [OrderedCommMonoid α] {β : Type*} [One β] [Mul β]
    [Pow β ℕ] (f : β → α) (hf : Function.Injective f) (one : f 1 = 1)
    (mul : ∀ x y, f (x * y) = f x * f y) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) :
    OrderedCommMonoid β :=
  { PartialOrder.lift f hf,
    hf.commMonoid f one mul npow with
    mul_le_mul_left := fun a b ab c =>
      show f (c * a) ≤ f (c * b) by
        

Proof state:
α : Type u
β✝ : Type u_1
inst✝³ : OrderedCommMonoid α
β : Type u_2
inst✝² : One β
inst✝¹ : Mul β
inst✝ : Pow β ℕ
f : β → α
hf : Injective f
one : f 1 = 1
mul : ∀ (x y : β), f (x * y) = f x * f y
npow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n
src✝¹ : PartialOrder β := PartialOrder.lift f hf
src✝ : CommMonoid β := Injective.commMonoid f hf one mul npow
a b : β
ab : a ≤ b
c : β
⊢ f (c * a) ≤ f (c * b)

Next tactic:
rw [mul, mul]
/-- Pullback an `OrderedCommMonoid` under an injective map.
See note [reducible non-instances]. -/
@[to_additive (attr := reducible) "Pullback an `OrderedAddCommMonoid` under an injective map."]
def Function.Injective.orderedCommMonoid [OrderedCommMonoid α] {β : Type*} [One β] [Mul β]
    [Pow β ℕ] (f : β → α) (hf : Function.Injective f) (one : f 1 = 1)
    (mul : ∀ x y, f (x * y) = f x * f y) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) :
    OrderedCommMonoid β :=
  { PartialOrder.lift f hf,
    hf.commMonoid f one mul npow with
    mul_le_mul_left := fun a b ab c =>
      show f (c * a) ≤ f (c * b) by
        rw [mul, mul]
        

Proof state:
α : Type u
β✝ : Type u_1
inst✝³ : OrderedCommMonoid α
β : Type u_2
inst✝² : One β
inst✝¹ : Mul β
inst✝ : Pow β ℕ
f : β → α
hf : Injective f
one : f 1 = 1
mul : ∀ (x y : β), f (x * y) = f x * f y
npow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n
src✝¹ : PartialOrder β := PartialOrder.lift f hf
src✝ : CommMonoid β := Injective.commMonoid f hf one mul npow
a b : β
ab : a ≤ b
c : β
⊢ f c * f a ≤ f c * f b

Next tactic:
apply mul_le_mul_left'
/-- Pullback an `OrderedCommMonoid` under an injective map.
See note [reducible non-instances]. -/
@[to_additive (attr := reducible) "Pullback an `OrderedAddCommMonoid` under an injective map."]
def Function.Injective.orderedCommMonoid [OrderedCommMonoid α] {β : Type*} [One β] [Mul β]
    [Pow β ℕ] (f : β → α) (hf : Function.Injective f) (one : f 1 = 1)
    (mul : ∀ x y, f (x * y) = f x * f y) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) :
    OrderedCommMonoid β :=
  { PartialOrder.lift f hf,
    hf.commMonoid f one mul npow with
    mul_le_mul_left := fun a b ab c =>
      show f (c * a) ≤ f (c * b) by
        rw [mul, mul]
        apply mul_le_mul_left'
        

Proof state:
case bc
α : Type u
β✝ : Type u_1
inst✝³ : OrderedCommMonoid α
β : Type u_2
inst✝² : One β
inst✝¹ : Mul β
inst✝ : Pow β ℕ
f : β → α
hf : Injective f
one : f 1 = 1
mul : ∀ (x y : β), f (x * y) = f x * f y
npow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n
src✝¹ : PartialOrder β := PartialOrder.lift f hf
src✝ : CommMonoid β := Injective.commMonoid f hf one mul npow
a b : β
ab : a ≤ b
c : β
⊢ f a ≤ f b

Next tactic:
exact ab
/-- Pullback an `OrderedCancelCommMonoid` under an injective map.
See note [reducible non-instances]. -/
@[to_additive (attr := reducible) Function.Injective.orderedCancelAddCommMonoid
    "Pullback an `OrderedCancelAddCommMonoid` under an injective map."]
def Function.Injective.orderedCancelCommMonoid [OrderedCancelCommMonoid α] [One β] [Mul β] [Pow β ℕ]
    (f : β → α) (hf : Injective f) (one : f 1 = 1) (mul : ∀ x y, f (x * y) = f x * f y)
    (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) : OrderedCancelCommMonoid β :=
  { hf.orderedCommMonoid f one mul npow with
    le_of_mul_le_mul_left := fun a b c (bc : f (a * b) ≤ f (a * c)) ↦
      (mul_le_mul_iff_left (f a)).mp (by 

Proof state:
α : Type u
β : Type u_1
inst✝³ : OrderedCancelCommMonoid α
inst✝² : One β
inst✝¹ : Mul β
inst✝ : Pow β ℕ
f : β → α
hf : Injective f
one : f 1 = 1
mul : ∀ (x y : β), f (x * y) = f x * f y
npow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n
src✝ : OrderedCommMonoid β := orderedCommMonoid f hf one mul npow
a b c : β
bc : f (a * b) ≤ f (a * c)
⊢ f a * f b ≤ f a * f c

Next tactic:
rwa [← mul, ← mul]
instance concreteCategory : ConcreteCategory TopCat := by
  

Proof state:
⊢ ConcreteCategory TopCat

Next tactic:
dsimp [TopCat]
instance concreteCategory : ConcreteCategory TopCat := by
  dsimp [TopCat]
  

Proof state:
⊢ ConcreteCategory (Bundled TopologicalSpace)

Next tactic:
infer_instance
/-- Any homeomorphisms induces an isomorphism in `Top`. -/
@[simps]
def isoOfHomeo {X Y : TopCat.{u}} (f : X ≃ₜ Y) : X ≅ Y where
  -- Porting note: previously ⟨f⟩ for hom (inv) and tidy closed proofs
  hom := f.toContinuousMap
  inv := f.symm.toContinuousMap
  hom_inv_id := by 

Proof state:
X Y : TopCat
f : ↑X ≃ₜ ↑Y
⊢ Homeomorph.toContinuousMap f ≫ Homeomorph.toContinuousMap (Homeomorph.symm f) = 𝟙 X

Next tactic:
ext
/-- Any homeomorphisms induces an isomorphism in `Top`. -/
@[simps]
def isoOfHomeo {X Y : TopCat.{u}} (f : X ≃ₜ Y) : X ≅ Y where
  -- Porting note: previously ⟨f⟩ for hom (inv) and tidy closed proofs
  hom := f.toContinuousMap
  inv := f.symm.toContinuousMap
  hom_inv_id := by ext; 

Proof state:
case w
X Y : TopCat
f : ↑X ≃ₜ ↑Y
x✝ : (forget TopCat).obj X
⊢ (Homeomorph.toContinuousMap f ≫ Homeomorph.toContinuousMap (Homeomorph.symm f)) x✝ = (𝟙 X) x✝

Next tactic:
exact f.symm_apply_apply _
/-- Any homeomorphisms induces an isomorphism in `Top`. -/
@[simps]
def isoOfHomeo {X Y : TopCat.{u}} (f : X ≃ₜ Y) : X ≅ Y where
  -- Porting note: previously ⟨f⟩ for hom (inv) and tidy closed proofs
  hom := f.toContinuousMap
  inv := f.symm.toContinuousMap
  hom_inv_id := by ext; exact f.symm_apply_apply _
  inv_hom_id := by 

Proof state:
X Y : TopCat
f : ↑X ≃ₜ ↑Y
⊢ Homeomorph.toContinuousMap (Homeomorph.symm f) ≫ Homeomorph.toContinuousMap f = 𝟙 Y

Next tactic:
ext
/-- Any homeomorphisms induces an isomorphism in `Top`. -/
@[simps]
def isoOfHomeo {X Y : TopCat.{u}} (f : X ≃ₜ Y) : X ≅ Y where
  -- Porting note: previously ⟨f⟩ for hom (inv) and tidy closed proofs
  hom := f.toContinuousMap
  inv := f.symm.toContinuousMap
  hom_inv_id := by ext; exact f.symm_apply_apply _
  inv_hom_id := by ext; 

Proof state:
case w
X Y : TopCat
f : ↑X ≃ₜ ↑Y
x✝ : (forget TopCat).obj Y
⊢ (Homeomorph.toContinuousMap (Homeomorph.symm f) ≫ Homeomorph.toContinuousMap f) x✝ = (𝟙 Y) x✝

Next tactic:
exact f.apply_symm_apply _
/-- Any isomorphism in `Top` induces a homeomorphism. -/
@[simps]
def homeoOfIso {X Y : TopCat.{u}} (f : X ≅ Y) : X ≃ₜ Y where
  toFun := f.hom
  invFun := f.inv
  left_inv x := by 

Proof state:
X Y : TopCat
f : X ≅ Y
x : ↑X
⊢ f.inv (f.hom x) = x

Next tactic:
simp
/-- Any isomorphism in `Top` induces a homeomorphism. -/
@[simps]
def homeoOfIso {X Y : TopCat.{u}} (f : X ≅ Y) : X ≃ₜ Y where
  toFun := f.hom
  invFun := f.inv
  left_inv x := by simp
  right_inv x := by 

Proof state:
X Y : TopCat
f : X ≅ Y
x : ↑Y
⊢ f.hom (f.inv x) = x

Next tactic:
simp
@[simp]
theorem of_isoOfHomeo {X Y : TopCat.{u}} (f : X ≃ₜ Y) : homeoOfIso (isoOfHomeo f) = f := by
  -- Porting note: unfold some defs now
  

Proof state:
X Y : TopCat
f : ↑X ≃ₜ ↑Y
⊢ homeoOfIso (isoOfHomeo f) = f

Next tactic:
dsimp [homeoOfIso, isoOfHomeo]