awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Luroth (goal)
Goal:
K : Type u_1
inst : Field K
E : IntermediateField K K⟮X⟯
h : E ≠ ⊥
this :
  natDegree.{u_1} (R := K[X])
      ((Bivariate.swap : (a : K[X][Y]) → K[X][Y])
        (Polynomial.map Polynomial.C ((Polynomial.C : (a : K) → K[X]) (Q₃ h)) * Φ E)) =
    natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (θ E))
⊢ natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) = (θ E).natDegree
have rwa : ∀
  (this :
    (HMul.hMul (α := K[X][Y]) (β := K[X][Y])
          ((Bivariate.swap : (a : K[X][Y]) → K[X][Y])
              (Polynomial.map Polynomial.C ((Polynomial.C : (a : K) → K[X]) (Q₃ h))) :
            K[X][Y])
          ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E) : K[X][Y])).natDegree =
      natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (θ E))),
  natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) = (θ E).natDegree
Tactic: rwa [map_mul, Polynomial.map_C, Bivariate.swap_C_C,
    natDegree_mul (C_ne_zero.mpr (Q₃_map h ▸ Q₂_ne_zero h))
      ((map_ne_zero_iff _ Bivariate.swap.injective).mpr (Φ_ne_zero h)),
    natDegree_C, zero_add, swap_θ, natDegree_neg] at this
Cleared hypotheses: this
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Luroth (goal)
Goal:
K : Type u_1
inst : Field K
E : IntermediateField K K⟮X⟯
h : E ≠ ⊥
this :
  natDegree.{u_1} (R := K[X])
      ((Bivariate.swap : (a : K[X][Y]) → K[X][Y])
        (Polynomial.map Polynomial.C ((Polynomial.C : (a : K) → K[X]) (Q₃ h)) * Φ E)) =
    natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (θ E))
rwa :
  ∀
    (this :
      (HMul.hMul (α := K[X][Y]) (β := K[X][Y])
            ((Bivariate.swap : (a : K[X][Y]) → K[X][Y])
                (Polynomial.map Polynomial.C ((Polynomial.C : (a : K) → K[X]) (Q₃ h))) :
              K[X][Y])
            ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E) : K[X][Y])).natDegree =
        natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (θ E))),
    natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) = (θ E).natDegree
⊢ natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) = (θ E).natDegree
have rwa₁ : ∀
  (this :
    (HMul.hMul (α := K[X][Y]) (β := K[X][Y])
          ((Bivariate.swap : (a : K[X][Y]) → K[X][Y])
              ((Polynomial.C : (a : K[X]) → K[X][Y]) ((Polynomial.C : (a : K) → K[X]) (Q₃ h))) :
            K[X][Y])
          ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E) : K[X][Y])).natDegree =
      natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (θ E))),
  natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) = (θ E).natDegree
Tactic: rwa [map_mul, Polynomial.map_C, Bivariate.swap_C_C,
    natDegree_mul (C_ne_zero.mpr (Q₃_map h ▸ Q₂_ne_zero h))
      ((map_ne_zero_iff _ Bivariate.swap.injective).mpr (Φ_ne_zero h)),
    natDegree_C, zero_add, swap_θ, natDegree_neg] at this
Cleared hypotheses: this
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Luroth (goal)
Goal:
K : Type u_1
inst : Field K
E : IntermediateField K K⟮X⟯
h : E ≠ ⊥
this :
  natDegree.{u_1} (R := K[X])
      ((Bivariate.swap : (a : K[X][Y]) → K[X][Y])
        (Polynomial.map Polynomial.C ((Polynomial.C : (a : K) → K[X]) (Q₃ h)) * Φ E)) =
    natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (θ E))
rwa :
  ∀
    (this :
      (HMul.hMul (α := K[X][Y]) (β := K[X][Y])
            ((Bivariate.swap : (a : K[X][Y]) → K[X][Y])
                (Polynomial.map Polynomial.C ((Polynomial.C : (a : K) → K[X]) (Q₃ h))) :
              K[X][Y])
            ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E) : K[X][Y])).natDegree =
        natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (θ E))),
    natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) = (θ E).natDegree
rwa₁ :
  ∀
    (this :
      (HMul.hMul (α := K[X][Y]) (β := K[X][Y])
            ((Bivariate.swap : (a : K[X][Y]) → K[X][Y])
                ((Polynomial.C : (a : K[X]) → K[X][Y]) ((Polynomial.C : (a : K) → K[X]) (Q₃ h))) :
              K[X][Y])
            ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E) : K[X][Y])).natDegree =
        natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (θ E))),
    natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) = (θ E).natDegree
⊢ natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) = (θ E).natDegree
have rwa₂ : ∀
  (this :
    (HMul.hMul (α := K[X][Y]) (β := K[X][Y])
          ((Polynomial.C : (a : K[X]) → K[X][Y]) ((Polynomial.C : (a : K) → K[X]) (Q₃ h)) : K[X][Y])
          ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E) : K[X][Y])).natDegree =
      natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (θ E))),
  natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) = (θ E).natDegree
Tactic: rwa [map_mul, Polynomial.map_C, Bivariate.swap_C_C,
    natDegree_mul (C_ne_zero.mpr (Q₃_map h ▸ Q₂_ne_zero h))
      ((map_ne_zero_iff _ Bivariate.swap.injective).mpr (Φ_ne_zero h)),
    natDegree_C, zero_add, swap_θ, natDegree_neg] at this
Cleared hypotheses: this
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Luroth (goal)
Goal:
K : Type u_1
inst : Field K
E : IntermediateField K K⟮X⟯
h : E ≠ ⊥
this :
  natDegree.{u_1} (R := K[X])
      ((Bivariate.swap : (a : K[X][Y]) → K[X][Y])
        (Polynomial.map Polynomial.C ((Polynomial.C : (a : K) → K[X]) (Q₃ h)) * Φ E)) =
    natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (θ E))
rwa :
  ∀
    (this :
      (HMul.hMul (α := K[X][Y]) (β := K[X][Y])
            ((Bivariate.swap : (a : K[X][Y]) → K[X][Y])
                (Polynomial.map Polynomial.C ((Polynomial.C : (a : K) → K[X]) (Q₃ h))) :
              K[X][Y])
            ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E) : K[X][Y])).natDegree =
        natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (θ E))),
    natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) = (θ E).natDegree
rwa₁ :
  ∀
    (this :
      (HMul.hMul (α := K[X][Y]) (β := K[X][Y])
            ((Bivariate.swap : (a : K[X][Y]) → K[X][Y])
                ((Polynomial.C : (a : K[X]) → K[X][Y]) ((Polynomial.C : (a : K) → K[X]) (Q₃ h))) :
              K[X][Y])
            ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E) : K[X][Y])).natDegree =
        natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (θ E))),
    natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) = (θ E).natDegree
rwa₂ :
  ∀
    (this :
      (HMul.hMul (α := K[X][Y]) (β := K[X][Y])
            ((Polynomial.C : (a : K[X]) → K[X][Y]) ((Polynomial.C : (a : K) → K[X]) (Q₃ h)) : K[X][Y])
            ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E) : K[X][Y])).natDegree =
        natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (θ E))),
    natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) = (θ E).natDegree
⊢ natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) = (θ E).natDegree
have rwa₃ : ∀
  (this :
    natDegree.{u_1} (R := K[X]) ((Polynomial.C : (a : K[X]) → K[X][Y]) ((Polynomial.C : (a : K) → K[X]) (Q₃ h))) +
        natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) =
      natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (θ E))),
  natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) = (θ E).natDegree
Tactic: rwa [map_mul, Polynomial.map_C, Bivariate.swap_C_C,
    natDegree_mul (C_ne_zero.mpr (Q₃_map h ▸ Q₂_ne_zero h))
      ((map_ne_zero_iff _ Bivariate.swap.injective).mpr (Φ_ne_zero h)),
    natDegree_C, zero_add, swap_θ, natDegree_neg] at this
Cleared hypotheses: this
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Luroth (goal)
Goal:
K : Type u_1
inst : Field K
E : IntermediateField K K⟮X⟯
h : E ≠ ⊥
this :
  natDegree.{u_1} (R := K[X])
      ((Bivariate.swap : (a : K[X][Y]) → K[X][Y])
        (Polynomial.map Polynomial.C ((Polynomial.C : (a : K) → K[X]) (Q₃ h)) * Φ E)) =
    natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (θ E))
rwa :
  ∀
    (this :
      (HMul.hMul (α := K[X][Y]) (β := K[X][Y])
            ((Bivariate.swap : (a : K[X][Y]) → K[X][Y])
                (Polynomial.map Polynomial.C ((Polynomial.C : (a : K) → K[X]) (Q₃ h))) :
              K[X][Y])
            ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E) : K[X][Y])).natDegree =
        natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (θ E))),
    natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) = (θ E).natDegree
rwa₁ :
  ∀
    (this :
      (HMul.hMul (α := K[X][Y]) (β := K[X][Y])
            ((Bivariate.swap : (a : K[X][Y]) → K[X][Y])
                ((Polynomial.C : (a : K[X]) → K[X][Y]) ((Polynomial.C : (a : K) → K[X]) (Q₃ h))) :
              K[X][Y])
            ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E) : K[X][Y])).natDegree =
        natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (θ E))),
    natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) = (θ E).natDegree
rwa₂ :
  ∀
    (this :
      (HMul.hMul (α := K[X][Y]) (β := K[X][Y])
            ((Polynomial.C : (a : K[X]) → K[X][Y]) ((Polynomial.C : (a : K) → K[X]) (Q₃ h)) : K[X][Y])
            ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E) : K[X][Y])).natDegree =
        natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (θ E))),
    natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) = (θ E).natDegree
rwa₃ :
  ∀
    (this :
      natDegree.{u_1} (R := K[X]) ((Polynomial.C : (a : K[X]) → K[X][Y]) ((Polynomial.C : (a : K) → K[X]) (Q₃ h))) +
          natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) =
        natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (θ E))),
    natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) = (θ E).natDegree
⊢ natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) = (θ E).natDegree
have rwa₄ : ∀
  (this :
    0 + natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) =
      natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (θ E))),
  natDegree.{u_1} (R := K[X]) ((Bivariate.swap : (a : K[X][Y]) → K[X][Y]) (Φ E)) = (θ E).natDegree
Tactic: rwa [map_mul, Polynomial.map_C, Bivariate.swap_C_C,
    natDegree_mul (C_ne_zero.mpr (Q₃_map h ▸ Q₂_ne_zero h))
      ((map_ne_zero_iff _ Bivariate.swap.injective).mpr (Φ_ne_zero h)),
    natDegree_C, zero_add, swap_θ, natDegree_neg] at this
Cleared hypotheses: this
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Luroth (goal)
Goal:
K : Type u_1
inst : Field K
E : IntermediateField K K⟮X⟯
⊢ E = K⟮generator E⟯
have pos : ∀ (h : E = ⊥), E = K⟮generator E⟯
Tactic: by_cases h : E = ⊥
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Luroth (goal)
Goal:
K : Type u_1
inst : Field K
E : IntermediateField K K⟮X⟯
pos : ∀ (h : E = ⊥), E = K⟮generator E⟯
⊢ E = K⟮generator E⟯
have neg : ∀ (h : ¬E = ⊥), E = K⟮generator E⟯
Tactic: by_cases h : E = ⊥
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Luroth (goal)
Goal:
K : Type u_1
inst : Field K
E : IntermediateField K K⟮X⟯
h : E = ⊥
⊢ E = K⟮generator E⟯
have pos : E = K⟮0⟯
Tactic: rwa [generator_eq_zero h, adjoin_zero]
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Luroth (goal)
Goal:
K : Type u_1
inst : Field K
E : IntermediateField K K⟮X⟯
h : ¬E = ⊥
⊢ E = K⟮generator E⟯
have neg : relfinrank K⟮generator E⟯ E = 1
Tactic: refine le_antisymm (relfinrank_eq_one_iff.mp ?_) adjoin_generator_le
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Luroth (goal)
Goal:
K : Type u_1
inst : Field K
E : IntermediateField K K⟮X⟯
h : ¬E = ⊥
this : (φ E).natDegree = m E
⊢ relfinrank K⟮generator E⟯ E = 1
have refine : m E ≠ 0
Tactic: refine (mul_eq_right₀ ?_).mp <| this ▸ (generator E).finrank_eq_max_natDegree ▸
      φ_natDegree h ▸ relfinrank_mul_finrank_top (adjoin_generator_le (E := E))
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Luroth (goal)
Goal:
K : Type u_1
inst : Field K
E : IntermediateField K K⟮X⟯
h : ¬E = ⊥
⊢ relfinrank K⟮generator E⟯ E = 1
have neg : (φ E).natDegree = m E
Tactic: suffices (φ E).natDegree = m E by
    refine (mul_eq_right₀ ?_).mp <| this ▸ (generator E).finrank_eq_max_natDegree ▸
      φ_natDegree h ▸ relfinrank_mul_finrank_top (adjoin_generator_le (E := E))
    intro H
    exact generator_ne_C h ((eq_C_iff _).mpr (Nat.max_eq_zero_iff.mp H))
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Luroth (goal)
Goal:
K : Type u_1
inst : Field K
E : IntermediateField K K⟮X⟯
h : ¬E = ⊥
⊢ (φ E).natDegree = m E
have neg : (θ E).natDegree = m E
Tactic: rw [← Φ_natDegree_eq_φ_natDegree h, Φ_natDegree_eq_θ_natDegree h]
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Valuation (goal)
Goal:
F : Type u_1
inst : Field F
inst_1 : DecidableEq F⟮X⟯
x y : F⟮X⟯
⊢ (if x * y = 0 then 0 else exp (x * y).intDegree) =
    (if x = 0 then 0 else exp x.intDegree) * if y = 0 then 0 else exp y.intDegree
have pos : ∀ (hx : x = 0),
  (if x * y = 0 then 0 else exp (x * y).intDegree) =
    (if x = 0 then 0 else exp x.intDegree) * if y = 0 then 0 else exp y.intDegree
Tactic: by_cases hx : x = 0
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Valuation (goal)
Goal:
F : Type u_1
inst : Field F
inst_1 : DecidableEq F⟮X⟯
x y : F⟮X⟯
pos :
  ∀ (hx : x = 0),
    (if x * y = 0 then 0 else exp (x * y).intDegree) =
      (if x = 0 then 0 else exp x.intDegree) * if y = 0 then 0 else exp y.intDegree
⊢ (if x * y = 0 then 0 else exp (x * y).intDegree) =
    (if x = 0 then 0 else exp x.intDegree) * if y = 0 then 0 else exp y.intDegree
have neg : ∀ (hx : ¬x = 0),
  (if x * y = 0 then 0 else exp (x * y).intDegree) =
    (if x = 0 then 0 else exp x.intDegree) * if y = 0 then 0 else exp y.intDegree
Tactic: by_cases hx : x = 0
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Valuation (goal)
Goal:
F : Type u_1
inst : Field F
inst_1 : DecidableEq F⟮X⟯
x y : F⟮X⟯
hx : x = 0
⊢ (if x * y = 0 then 0 else exp (x * y).intDegree) =
    (if x = 0 then 0 else exp x.intDegree) * if y = 0 then 0 else exp y.intDegree
have pos : (if 0 * y = 0 then 0 else exp (0 * y).intDegree) =
  (if Eq.{u_1 + 1} (α := F⟮X⟯) 0 0 then 0 else exp (intDegree.{u_1} (K := F) 0)) * if y = 0 then 0 else exp y.intDegree
Tactic: rw [hx, zero_mul, if_pos (Eq.refl _), zero_mul]
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Valuation (goal)
Goal:
F : Type u_1
inst : Field F
inst_1 : DecidableEq F⟮X⟯
x y : F⟮X⟯
hx : x = 0
pos :
  (if 0 * y = 0 then 0 else exp (0 * y).intDegree) =
    (if Eq.{u_1 + 1} (α := F⟮X⟯) 0 0 then 0 else exp (intDegree.{u_1} (K := F) 0)) *
      if y = 0 then 0 else exp y.intDegree
⊢ (if x * y = 0 then 0 else exp (x * y).intDegree) =
    (if x = 0 then 0 else exp x.intDegree) * if y = 0 then 0 else exp y.intDegree
have pos₁ : (if Eq.{u_1 + 1} (α := F⟮X⟯) 0 0 then 0 else exp (intDegree.{u_1} (K := F) 0)) =
  (if Eq.{u_1 + 1} (α := F⟮X⟯) 0 0 then 0 else exp (intDegree.{u_1} (K := F) 0)) * if y = 0 then 0 else exp y.intDegree
Tactic: rw [hx, zero_mul, if_pos (Eq.refl _), zero_mul]
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Valuation (goal)
Goal:
F : Type u_1
inst : Field F
inst_1 : DecidableEq F⟮X⟯
x y : F⟮X⟯
hx : x = 0
pos :
  (if 0 * y = 0 then 0 else exp (0 * y).intDegree) =
    (if Eq.{u_1 + 1} (α := F⟮X⟯) 0 0 then 0 else exp (intDegree.{u_1} (K := F) 0)) *
      if y = 0 then 0 else exp y.intDegree
pos₁ :
  (if Eq.{u_1 + 1} (α := F⟮X⟯) 0 0 then 0 else exp (intDegree.{u_1} (K := F) 0)) =
    (if Eq.{u_1 + 1} (α := F⟮X⟯) 0 0 then 0 else exp (intDegree.{u_1} (K := F) 0)) *
      if y = 0 then 0 else exp y.intDegree
⊢ (if x * y = 0 then 0 else exp (x * y).intDegree) =
    (if x = 0 then 0 else exp x.intDegree) * if y = 0 then 0 else exp y.intDegree
have pos₂ : 0 = 0 * if y = 0 then 0 else exp y.intDegree
Tactic: rw [hx, zero_mul, if_pos (Eq.refl _), zero_mul]
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Valuation (goal)
Goal:
F : Type u_1
inst : Field F
inst_1 : DecidableEq F⟮X⟯
x y : F⟮X⟯
hx : x = 0
pos :
  (if 0 * y = 0 then 0 else exp (0 * y).intDegree) =
    (if Eq.{u_1 + 1} (α := F⟮X⟯) 0 0 then 0 else exp (intDegree.{u_1} (K := F) 0)) *
      if y = 0 then 0 else exp y.intDegree
pos₁ :
  (if Eq.{u_1 + 1} (α := F⟮X⟯) 0 0 then 0 else exp (intDegree.{u_1} (K := F) 0)) =
    (if Eq.{u_1 + 1} (α := F⟮X⟯) 0 0 then 0 else exp (intDegree.{u_1} (K := F) 0)) *
      if y = 0 then 0 else exp y.intDegree
pos₂ : 0 = 0 * if y = 0 then 0 else exp y.intDegree
⊢ (if x * y = 0 then 0 else exp (x * y).intDegree) =
    (if x = 0 then 0 else exp x.intDegree) * if y = 0 then 0 else exp y.intDegree
have pos₃ : Eq (α := WithZero (Multiplicative ℤ)) 0 0
Tactic: rw [hx, zero_mul, if_pos (Eq.refl _), zero_mul]
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Valuation (goal)
Goal:
F : Type u_1
inst : Field F
inst_1 : DecidableEq F⟮X⟯
x y : F⟮X⟯
hx : ¬x = 0
⊢ (if x * y = 0 then 0 else exp (x * y).intDegree) =
    (if x = 0 then 0 else exp x.intDegree) * if y = 0 then 0 else exp y.intDegree
have pos : ∀ (hy : y = 0),
  (if x * y = 0 then 0 else exp (x * y).intDegree) =
    (if x = 0 then 0 else exp x.intDegree) * if y = 0 then 0 else exp y.intDegree
Tactic: by_cases hy : y = 0
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Valuation (goal)
Goal:
F : Type u_1
inst : Field F
inst_1 : DecidableEq F⟮X⟯
x y : F⟮X⟯
hx : ¬x = 0
pos :
  ∀ (hy : y = 0),
    (if x * y = 0 then 0 else exp (x * y).intDegree) =
      (if x = 0 then 0 else exp x.intDegree) * if y = 0 then 0 else exp y.intDegree
⊢ (if x * y = 0 then 0 else exp (x * y).intDegree) =
    (if x = 0 then 0 else exp x.intDegree) * if y = 0 then 0 else exp y.intDegree
have neg : ∀ (hy : ¬y = 0),
  (if x * y = 0 then 0 else exp (x * y).intDegree) =
    (if x = 0 then 0 else exp x.intDegree) * if y = 0 then 0 else exp y.intDegree
Tactic: by_cases hy : y = 0
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Valuation (goal)
Goal:
F : Type u_1
inst : Field F
inst_1 : DecidableEq F⟮X⟯
x y : F⟮X⟯
hx : ¬x = 0
hy : y = 0
⊢ (if x * y = 0 then 0 else exp (x * y).intDegree) =
    (if x = 0 then 0 else exp x.intDegree) * if y = 0 then 0 else exp y.intDegree
have pos : (if x * 0 = 0 then 0 else exp (x * 0).intDegree) =
  (if x = 0 then 0 else exp x.intDegree) * if Eq.{u_1 + 1} (α := F⟮X⟯) 0 0 then 0 else exp (intDegree.{u_1} (K := F) 0)
Tactic: rw [hy, mul_zero, if_pos (Eq.refl _), mul_zero]
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Valuation (goal)
Goal:
F : Type u_1
inst : Field F
inst_1 : DecidableEq F⟮X⟯
x y : F⟮X⟯
hx : ¬x = 0
hy : y = 0
pos :
  (if x * 0 = 0 then 0 else exp (x * 0).intDegree) =
    (if x = 0 then 0 else exp x.intDegree) *
      if Eq.{u_1 + 1} (α := F⟮X⟯) 0 0 then 0 else exp (intDegree.{u_1} (K := F) 0)
⊢ (if x * y = 0 then 0 else exp (x * y).intDegree) =
    (if x = 0 then 0 else exp x.intDegree) * if y = 0 then 0 else exp y.intDegree
have pos₁ : (if Eq.{u_1 + 1} (α := F⟮X⟯) 0 0 then 0 else exp (intDegree.{u_1} (K := F) 0)) =
  (if x = 0 then 0 else exp x.intDegree) * if Eq.{u_1 + 1} (α := F⟮X⟯) 0 0 then 0 else exp (intDegree.{u_1} (K := F) 0)
Tactic: rw [hy, mul_zero, if_pos (Eq.refl _), mul_zero]
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Valuation (goal)
Goal:
F : Type u_1
inst : Field F
inst_1 : DecidableEq F⟮X⟯
x y : F⟮X⟯
hx : ¬x = 0
hy : y = 0
pos :
  (if x * 0 = 0 then 0 else exp (x * 0).intDegree) =
    (if x = 0 then 0 else exp x.intDegree) *
      if Eq.{u_1 + 1} (α := F⟮X⟯) 0 0 then 0 else exp (intDegree.{u_1} (K := F) 0)
pos₁ :
  (if Eq.{u_1 + 1} (α := F⟮X⟯) 0 0 then 0 else exp (intDegree.{u_1} (K := F) 0)) =
    (if x = 0 then 0 else exp x.intDegree) *
      if Eq.{u_1 + 1} (α := F⟮X⟯) 0 0 then 0 else exp (intDegree.{u_1} (K := F) 0)
⊢ (if x * y = 0 then 0 else exp (x * y).intDegree) =
    (if x = 0 then 0 else exp x.intDegree) * if y = 0 then 0 else exp y.intDegree
have pos₂ : 0 = (if x = 0 then 0 else exp x.intDegree) * 0
Tactic: rw [hy, mul_zero, if_pos (Eq.refl _), mul_zero]
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Valuation (goal)
Goal:
F : Type u_1
inst : Field F
inst_1 : DecidableEq F⟮X⟯
x y : F⟮X⟯
hx : ¬x = 0
hy : y = 0
pos :
  (if x * 0 = 0 then 0 else exp (x * 0).intDegree) =
    (if x = 0 then 0 else exp x.intDegree) *
      if Eq.{u_1 + 1} (α := F⟮X⟯) 0 0 then 0 else exp (intDegree.{u_1} (K := F) 0)
pos₁ :
  (if Eq.{u_1 + 1} (α := F⟮X⟯) 0 0 then 0 else exp (intDegree.{u_1} (K := F) 0)) =
    (if x = 0 then 0 else exp x.intDegree) *
      if Eq.{u_1 + 1} (α := F⟮X⟯) 0 0 then 0 else exp (intDegree.{u_1} (K := F) 0)
pos₂ : 0 = (if x = 0 then 0 else exp x.intDegree) * 0
⊢ (if x * y = 0 then 0 else exp (x * y).intDegree) =
    (if x = 0 then 0 else exp x.intDegree) * if y = 0 then 0 else exp y.intDegree
have pos₃ : Eq (α := WithZero (Multiplicative ℤ)) 0 0
Tactic: rw [hy, mul_zero, if_pos (Eq.refl _), mul_zero]
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Valuation (goal)
Goal:
F : Type u_1
inst : Field F
inst_1 : DecidableEq F⟮X⟯
x y : F⟮X⟯
⊢ inftyValuationDef F (x + y) ≤ max (inftyValuationDef F x) (inftyValuationDef F y)
have unfold : (if x + y = 0 then 0 else exp (x + y).intDegree) ≤
  max (if x = 0 then 0 else exp x.intDegree) (if y = 0 then 0 else exp y.intDegree)
Tactic: unfold inftyValuationDef
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Valuation (hypothesis)
Goal:
F : Type u_1
inst : Field F
inst_1 : DecidableEq F⟮X⟯
x y : F⟮X⟯
⊢ (if x + y = 0 then 0 else exp (x + y).intDegree) ≤
    max (if x = 0 then 0 else exp x.intDegree) (if y = 0 then 0 else exp y.intDegree)
have this : ∀ [inst : Field F] {x y : F⟮X⟯} (hy : y ≠ 0) (hxy : x + y ≠ 0), (x + y).intDegree ≤ max x.intDegree y.intDegree
Tactic: have := @RatFunc.intDegree_add_le F
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Valuation (goal)
Goal:
F : Type u_1
inst : Field F
inst_1 : DecidableEq F⟮X⟯
x : F⟮X⟯
hx : x ≠ 0
⊢ inftyValuationDef F x = exp x.intDegree
have rw : (if x = 0 then 0 else exp x.intDegree) = exp x.intDegree
Tactic: rw [inftyValuationDef, if_neg hx]
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Valuation (goal)
Goal:
F : Type u_1
inst : Field F
inst_1 : DecidableEq F⟮X⟯
x : F⟮X⟯
hx : x ≠ 0
rw : (if x = 0 then 0 else exp x.intDegree) = exp x.intDegree
⊢ inftyValuationDef F x = exp x.intDegree
have rw₁ : exp x.intDegree = exp x.intDegree
Tactic: rw [inftyValuationDef, if_neg hx]
-- Lean 4 proof step from Mathlib.FieldTheory.RatFunc.Valuation (goal)
Goal:
F : Type u_1
inst : Field F
inst_1 : DecidableEq F⟮X⟯
⊢ Eq (α := WithZero (Multiplicative ℤ))
    (((inftyValuation F : Valuation F⟮X⟯ (WithZero (Multiplicative ℤ))) : (a : F⟮X⟯) → WithZero (Multiplicative ℤ))
        (HDiv.hDiv (α := F⟮X⟯) 1 RatFunc.X) :
      WithZero (Multiplicative ℤ))
    (exp (-1) : WithZero (Multiplicative ℤ))
have rw : Eq (α := WithZero (Multiplicative ℤ))
  (((inftyValuation F : Valuation F⟮X⟯ (WithZero (Multiplicative ℤ))) : (a : F⟮X⟯) → WithZero (Multiplicative ℤ))
      RatFunc.X⁻¹ :
    WithZero (Multiplicative ℤ))
  (exp (-1) : WithZero (Multiplicative ℤ))
Tactic: rw [one_div, ← zpow_neg_one, inftyValuation.X_zpow]