Skip to content

feat: surreal Hahn series from ordinal-indexed sequences#316

Open
vihdzp wants to merge 9 commits intomasterfrom
termseq
Open

feat: surreal Hahn series from ordinal-indexed sequences#316
vihdzp wants to merge 9 commits intomasterfrom
termseq

Conversation

@vihdzp
Copy link
Copy Markdown
Owner

@vihdzp vihdzp commented Jan 25, 2026

We define an auxiliary type TermSeq for an ordinal-indexed sequence of terms r * ω^ i with non-zero coefficients and decreasing exponents. These provide an alternate, often more convenient representation for surreal Hahn series. We provide basic API, and build the equiv between both types.

@vihdzp vihdzp added the t-surreal This is mainly about surreal numbers label Jan 25, 2026
@plp127
Copy link
Copy Markdown
Contributor

plp127 commented Mar 29, 2026

Why do we need this again?

@vihdzp
Copy link
Copy Markdown
Owner Author

vihdzp commented Mar 29, 2026

It's often a nicer constructor than the regular one. If you read ONAG you'll notice Conway defines his series as sums $\sum_{\beta<\alpha} r_\beta\omega^\beta$, and never as explicit functions $\mathrm{No}\to\mathbb{R}$ which happen to have well-founded support, which also happens to be small.

Comment on lines +567 to +570
simp_rw [mk.injEq, heq_eq_eq, true_and]
constructor <;> ext
· exact he ..
· exact hc ..
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work?

Suggested change
simp_rw [mk.injEq, heq_eq_eq, true_and]
constructor <;> ext
· exact he ..
· exact hc ..
cases funext fun t : Iio _ => he t.1 t.2
cases funext fun t : Iio _ => hc t.1 t.2
rfl

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem to.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah lemme try again

Suggested change
simp_rw [mk.injEq, heq_eq_eq, true_and]
constructor <;> ext
· exact he ..
· exact hc ..
cases funext fun t : Iio _ => he t.1 t.2 t.2
cases funext fun t : Iio _ => hc t.1 t.2 t.2
rfl

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still no. I get a "Dependent elimination failed" error.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's so weird

Comment thread CombinatorialGames/Surreal/HahnSeries/Basic.lean
Comment thread CombinatorialGames/Surreal/HahnSeries/Basic.lean
coeffIdx s i = s.coeff ⟨i, h⟩ := by
rw [coeffIdx_of_lt (by simpa), exp_coe, coeff_coe]

theorem coeffIdx_coe_of_le {s : TermSeq} {i} (h : s.length ≤ i) : coeffIdx s i = 0 :=
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be _of_ge instead

term s i = s.coeff ⟨i, h⟩ * ω^ s.exp ⟨i, h⟩ := by
rw [term_of_lt (by simpa), coeffIdx_coe_of_lt, exp_coe]

theorem term_coe_of_le {s : TermSeq} {i} (h : s.length ≤ i) : term s i = 0 :=
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, use _of_ge to match the _of_lt theorem.

ofSurrealHahnSeries x = ofSurrealHahnSeries y ↔ x = y :=
surrealHahnSeriesEquiv.symm.apply_eq_iff_eq

end TermSeq
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
end TermSeq
end TermSeq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-surreal This is mainly about surreal numbers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants