English
Let f : G →* H be a monoid homomorphism. Then the graph of f is a submonoid of G × H, consisting of all pairs (g, f(g)).
Русский
Пусть f : G →* H — гомоморфизм мономидам. Тогда граф графа f является подмоноидом G × H и состоит из всех пар (g, f(g)).
LaTeX
$$$f.mgraph \\subseteq G \\times H$ is a Submonoid with carrier = \\{(g,h) \\in G \\times H \\mid f(g) = h\\}\\,.$$$
Lean4
/-- The graph of a monoid homomorphism as a submonoid.
See also `MonoidHom.graph` for the graph as a subgroup. -/
@[to_additive /-- The graph of a monoid homomorphism as a submonoid.
See also `AddMonoidHom.graph` for the graph as a subgroup. -/
]
def mgraph (f : G →* H) : Submonoid (G × H)
where
carrier := {x | f x.1 = x.2}
one_mem' := map_one f
mul_mem' {x y} := by simp +contextual