Language homomorphism #
@[instance_reducible]
This is to support the function application notation for language homomorphisms.
Equations
- Language.instFunLikeHomList = { coe := fun (f : Language.Hom α β) => f.toFun, coe_injective := ⋯ }
This auxiliary function should not be used outside this file.
Instead, use the equivalence lift below.
Equations
- Language.Hom.liftAux f = { toFun := List.flatMap f, map_nil' := ⋯, map_append' := ⋯ }
Instances For
An equivalence from f : α → List β to Hom α β, whose forward direction can be
used to define language homomorphisms conveniently.
Equations
- Language.Hom.lift = { toFun := Language.Hom.liftAux, invFun := fun (f : Language.Hom α β) (a : α) => f [a], left_inv := ⋯, right_inv := ⋯ }
Instances For
lift.toFun is in fact List.flatMap.
The following distributive laws for the image operation requires the function f
to be a language homomorphism.