Zulip Chat Archive
Stream: general
Topic: kernels of homomorphisms
Johan Commelin (Apr 23 2018 at 18:01):
Ok, I'm making my feet wet with a first attempt at formalising something. I want to say write down the assumption im(f) = ker(g), where f and g are group homomorphisms. I guess im(f) will be something like f ' A.univ
. I tried to find kernels in algebra.group
but did not find anything. Are kernels somewhere else?
Andrew Ashworth (Apr 23 2018 at 18:36):
https://github.com/leanprover/mathlib/search?utf8=✓&q=ker&type=
Andrew Ashworth (Apr 23 2018 at 18:36):
it's a little sparse
Johan Commelin (Apr 23 2018 at 18:37):
Aah, ok. So I should use the github search for this. Thanks
Johan Commelin (Apr 23 2018 at 18:50):
What am I doing wrong here?
universes u variables {A : Type u} [group A] {B : Type u} [group B] {f : A → B} [is_group_hom f] definition ker f := is_group_hom.ker f definition im f := f '' (@univ A)
Johan Commelin (Apr 23 2018 at 18:51):
Lean does not like my definition of ker
andim
Johan Commelin (Apr 23 2018 at 18:51):
I get squiggles under the f
Johan Commelin (Apr 23 2018 at 18:51):
invalid binder declaration, delimiter/bracket expected (i.e., '(', '{', '[', '{{')
Reid Barton (Apr 23 2018 at 19:27):
You can write
variables (f) definition ker := is_group_hom.ker f definition im := f '' (@univ A)
though I'm not sure whether it is very good style
Patrick Massot (Apr 23 2018 at 20:28):
Could use def im := set.range f
Kevin Buzzard (Apr 23 2018 at 21:20):
definition ker f := ...
is no good because everything to the left of the :=
has to either be a variable and skipped completely, or a term together with its type. Just f
by itself doesn't work.
Kevin Buzzard (Apr 23 2018 at 21:20):
As Reid Barton says, you can skip the f
completely
Kevin Buzzard (Apr 23 2018 at 21:20):
but you might want to write
import group_theory.subgroup universes u variables {A : Type u} [group A] {B : Type u} [group B] definition ker (f : A → B) [is_group_hom f] := is_group_hom.ker f
Patrick Massot (Apr 23 2018 at 21:23):
Why do you want to enforce the same universe?
Kevin Buzzard (Apr 23 2018 at 21:40):
Patrick, although your comment is of course sensible, and probably Johan should write universes u v
and then {B : Type v}
, in ZFC we only have universe and it never bothered us before :-)
Patrick Massot (Apr 23 2018 at 21:41):
If you don't care (like I don't care) then use Type*
until it bites you
Mario Carneiro (Apr 23 2018 at 23:03):
The lean syntax requires parentheses around arguments left of :=
, so def ker (f) := ...
would work. But it would be a different f
than the one in the variable statement, so its type could be different (it will be inferred) and in particular it will not be assumed to be a group_hom
Mario Carneiro (Apr 23 2018 at 23:06):
By the way, the parentheses used to be optional, until we discovered that it enables the following evil example:
example inconsistent : false := trivial
(hint: it's not proving false)
Last updated: Dec 20 2023 at 11:08 UTC