English
For x,y ∈ Lex(HahnSeries Γ R) with given orderTop equality, ArchimedeanClass.mk x ≤ ArchimedeanClass.mk y iff either their orderTop are different as given or they have equal orderTop and leadingCoeff inequality holds.
Русский
Для x,y ∈ Lex(HahnSeries Γ R) при равенстве orderTop: ArchimedeanClass.mk x ≤ ArchimedeanClass.mk y тогда выполняется либо неравенство orderTop, либо равенство orderTop и неравенство ведущего коэффициента.
LaTeX
$$$ \\text{archimedeanClassMk_le_archimedeanClassMk_iff_of_orderTop_ofLex } \\{x y : Lex (HahnSeries Γ R)\\} (h : (\\mathrm{ofLex } x).\\mathrm{orderTop} = (\\mathrm{ofLex } y).\\mathrm{orderTop}) : \\mathrm{ArchimedeanClass.mk } x ≤ \\mathrm{ArchimedeanClass.mk } y \\\\leftrightarrow (\\text{orderTop equal and leadingCoeff inequality})$$$
Lean4
theorem archimedeanClassMk_le_archimedeanClassMk_iff_of_orderTop_ofLex {x y : Lex (HahnSeries Γ R)}
(h : (ofLex x).orderTop = (ofLex y).orderTop) :
ArchimedeanClass.mk x ≤ .mk y ↔ ArchimedeanClass.mk (ofLex x).leadingCoeff ≤ .mk (ofLex y).leadingCoeff :=
by
simp_rw [ArchimedeanClass.mk_le_mk]
obtain rfl | hy := eq_or_ne y 0
· -- special case: both `x` and `y` are zero
simp_all
-- general case: `x` and `y` are not zero
have hx : x ≠ 0 := by simpa using orderTop_ne_top.1 <| h ▸ orderTop_ne_top.2 (by simpa using hy)
have h' : (ofLex |x|).orderTop = (ofLex |y|).orderTop := by simpa using h
constructor
· -- `mk x ≤ mk y → mk x.leadingCoeff ≤ mk y.leadingCoeff`
intro ⟨n, hn⟩
refine ⟨n + 1, ?_⟩
have hn' : |y| < (n + 1) • |x| := lt_of_le_of_lt hn <| nsmul_lt_nsmul_left (by simpa using hx) (by simp)
obtain ⟨j, hj, hi⟩ := (lt_iff _ _).mp hn'
simp_rw [ofLex_smul, coeff_smul] at hj hi
simp_rw [← leadingCoeff_abs]
rw [leadingCoeff_of_ne_zero (by simpa using hy), leadingCoeff_of_ne_zero (by simpa using hx)]
simp_rw [← h']
obtain hjlt | hjeq | hjgt := lt_trichotomy (WithTop.some j) (ofLex |x|).orderTop
· -- impossible case: `x` and `y` differ before their leading coefficients
have hjlt' : j < (ofLex |y|).orderTop := h'.symm ▸ hjlt
simp [coeff_eq_zero_of_lt_orderTop hjlt, coeff_eq_zero_of_lt_orderTop hjlt'] at hi
· convert hi.le <;> exact (WithTop.untop_eq_iff _).mpr hjeq.symm
· exact (hj _ ((WithTop.untop_lt_iff _).mpr hjgt)).le
· -- `mk x.leadingCoeff ≤ mk y.leadingCoeff → mk x ≤ mk y`
intro ⟨n, hn⟩
refine ⟨n + 1, ((lt_iff _ _).mpr ?_).le⟩
refine ⟨(ofLex x).orderTop.untop (by simpa using hx), ?_, ?_⟩
· -- all coefficients before the leading coefficient are zero
intro j hj
trans 0
· apply coeff_eq_zero_of_lt_orderTop
simpa [← h] using hj
· suffices (ofLex |x|).coeff j = 0 by simp [this]
apply coeff_eq_zero_of_lt_orderTop
simpa using hj
rw [ofLex_smul, coeff_smul]
suffices |(ofLex y).leadingCoeff| < (n + 1) • |(ofLex x).leadingCoeff|
by
simp_rw [← leadingCoeff_abs] at this
rw [leadingCoeff_of_ne_zero (by simpa using hy), leadingCoeff_of_ne_zero (by simpa using hx)] at this
convert this using 3 <;> simp [h]
refine lt_of_le_of_lt hn <| nsmul_lt_nsmul_left ?_ (by simp)
rwa [abs_pos, leadingCoeff_ne_zero]