Zulip Chat Archive

Stream: general

Topic: submodule.span


petercommand (Nov 18 2018 at 03:42):

I am trying to understand submodule.span, why can the type of Inf { p | s \sub p } (set beta) be converted to submodule \alpha \beta? Thanks!

petercommand (Nov 18 2018 at 03:45):

is there an option to show this information?

Mario Carneiro (Nov 18 2018 at 03:46):

There is a coercion on p there

Mario Carneiro (Nov 18 2018 at 03:47):

it is the infimum (in the lattice of submodules) of all submodules that when converted to a set are supersets of s

Mario Carneiro (Nov 18 2018 at 03:48):

Lean knows the inf is taken in submodules, and p is a submodule, because type inference is done from the outside in and the target type is a submodule

petercommand (Nov 18 2018 at 03:48):

hmm, how can I know that there is a coercion on p?

Mario Carneiro (Nov 18 2018 at 03:48):

If you print it there will be an up arrow

petercommand (Nov 18 2018 at 03:49):

ah

petercommand (Nov 18 2018 at 03:53):

can I know which coercion is applied?

petercommand (Nov 18 2018 at 03:53):

like where the coercion is defined

petercommand (Nov 18 2018 at 03:54):

Ah, there is only one submodule.has_coe in submodule.lean


Last updated: Dec 20 2023 at 11:08 UTC