Zulip Chat Archive

Stream: mathlib4

Topic: !4#3716 FieldTheory.Tower


Jeremy Tan (Apr 29 2023 at 07:15):

In !4#3716, current line 150, this doesn't compile:
letI := divisionRingOfFiniteDimensional F K
I checked in mathlib3 (using Gitpod on Safari – finally) and there is a hidden in the type of the let declaration, which is
division_ring ↥K := division_ring_of_finite_dimensional F ↥K
The is apparently a coe_sort of some kind, relating to SetLike, but how do I translate this to mathlib4?

Jeremy Tan (Apr 29 2023 at 07:16):

letI := divisionRingOfFiniteDimensional F (↥K) fails with the error

failed to synthesize instance
  FiniteDimensional F { x // x  K }

Jeremy Tan (Apr 29 2023 at 07:17):

Actually it's the same with or without the

Eric Wieser (Apr 29 2023 at 09:34):

This is a recurring problem with FiniteDimensional; have := some_finiteDimensional fails, you have to use have : FiniteDimensional _ _ := some_finiteDImensional

Eric Wieser (Apr 29 2023 at 09:34):

I've pushed a fix

Eric Rodriguez (Apr 29 2023 at 10:08):

should it be haveI and letI? why are we using those instead of have/let?

Eric Wieser (Apr 29 2023 at 10:18):

I doesn't mean instance any more

Eric Wieser (Apr 29 2023 at 10:18):

It means inline

Eric Wieser (Apr 29 2023 at 10:19):

In tactic mode, the translation is {have,haveI} -> haveI, {let, letI} -> let. Lean 3's term-mode have is lean 4's tactic have

Eric Wieser (Apr 29 2023 at 10:20):

Mathport doesn't actually do that translation, but it could

Eric Rodriguez (Apr 29 2023 at 11:17):

I know this, but they seem to be being used like the lean3 ones here and I was wondering if that was maybe some of the issue

Eric Wieser (Apr 29 2023 at 11:18):

I think the issue is just that the instance cache gets confused by FiniteDimensional which is an abbreviation


Last updated: Dec 20 2023 at 11:08 UTC