Zulip Chat Archive

Stream: mathlib4

Topic: Why is Field.toIsField not an instance?


Johan Commelin (Aug 23 2024 at 08:56):

Why is docs#Field.toIsField not an instance?

Yaël Dillies (Aug 23 2024 at 08:56):

Because IsField is not a class, I would guess

Johan Commelin (Aug 23 2024 at 08:56):

Never mind... because IsField is not a class

Johan Commelin (Aug 23 2024 at 08:57):

So.... why... is IsField not a class?

Yaël Dillies (Aug 23 2024 at 08:57):

I think because most people use ¬ IsField R

Johan Commelin (Aug 23 2024 at 09:04):

hmm, good point

Kevin Buzzard (Aug 23 2024 at 10:15):

Maybe we should have class IsntField

Antoine Chambert-Loir (Aug 23 2024 at 12:49):

I worried for 30 seconds at the prospect that R wouldn't be a field. Ok.

Adam Topaz (Aug 24 2024 at 00:24):

docs#DiscreteValuationRing

Adam Topaz (Aug 24 2024 at 00:27):

(I also remember some discussions about making Dedekind domains IsntField)

Johan Commelin (Aug 24 2024 at 06:22):

I really like it that IsntField vs instField isn't confusing at all :grinning:

Yaël Dillies (Aug 24 2024 at 07:11):

Can't wait for instIsntField

Damiano Testa (Aug 24 2024 at 07:25):

If there were an instance : IsntField ℤ, would typeclass inference know not to look for Field ℤ? If it were the case, this could be a way of systematically short-circuiting TC searches that are "obviously" going to fail.

Kevin Buzzard (Aug 24 2024 at 08:38):

Just to be clear, my comment was made in jest, but it's certainly true that it's annoying that fields are regarded as Dedekind domains in the literature because in practice you actually want a word for "smooth affine curve" and what the literature offers is "smooth affine curve or a point". I remember that Maria Ines had to prove that integers of number fields weren't fields, for example.

Johan Commelin (Aug 26 2024 at 12:21):

Damiano Testa said:

If there were an instance : IsntField ℤ, would typeclass inference know not to look for Field ℤ? If it were the case, this could be a way of systematically short-circuiting TC searches that are "obviously" going to fail.

I think we'll need some systematic data to decide whether such a feature is a good idea.

Johan Commelin (Aug 26 2024 at 12:22):

To be more precise:

  • how often does TC synth go down a path that will "obviously fail"?
  • how quickly does it recover with the current algo?
  • in how many of these cases can we reasonably expect the "opposite" TC problem to succeed quickly?
  • and vice versa, in how many cases will the "opposite" TC problem be a complete waste of time?

Last updated: May 02 2025 at 03:31 UTC