Zulip Chat Archive

Stream: general

Topic: algebraic_closure makes Lean hang


Chris Hughes (Sep 20 2021 at 01:39):

This gives me excessive memory consumption errors. Any tips about what to do?

import field_theory.algebraic_closure

def examle {K : Type} [field K] : K ≃+* algebraic_closure K := sorry

Alex J. Best (Sep 20 2021 at 08:27):

Does it work if you fill in the def? I see the same behaviour with:

def a {K : Type} [field K] : algebraic_closure K ≃+* algebraic_closure K := sorry -- hangs
def b {K : Type} [field K] : algebraic_closure K ≃+* algebraic_closure K := ring_equiv.refl _ --works

Eric Rodriguez (Sep 20 2021 at 11:44):

Yeah, I think this is the "standard" lemma/def issue. I tend to make these sorts of defns a lemma until its done, and then change then to def at the end

Eric Rodriguez (Sep 20 2021 at 11:45):

Iirc it's related to defs being able to change the 'actual' type depending on the contents

Reid Barton (Sep 20 2021 at 12:08):

What is it actually doing while it hangs though? Presumably it must be unfolding some definitions, but why?
If b above works, then it doesn't seem to be an instance search issue...?

Johan Commelin (Sep 20 2021 at 12:10):

I hit this issue very often in LTE. I used the same workaround as Eric: keep the defns a lemma until all the pieces are in place.

Alex J. Best (Sep 20 2021 at 12:13):

Running the profiler it looks like it is the decl post-processing that hangs?


Last updated: Dec 20 2023 at 11:08 UTC