Skip to content

Commit

Permalink
feat(data/polynomial/eval): map_equiv (#9375)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisHughes24 committed Sep 25, 2021
1 parent 59b9ebb commit 42d8243
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/data/polynomial/eval.lean
Expand Up @@ -507,6 +507,14 @@ begin
split_ifs; simp [f.map_zero],
end

/-- If `R` and `S` are isomorphic, then so are their polynomial rings. -/
@[simps] def map_equiv (e : R ≃+* S) : polynomial R ≃+* polynomial S :=
ring_equiv.of_hom_inv
(map_ring_hom e)
(map_ring_hom e.symm)
(by ext; simp)
(by ext; simp)

lemma map_map [semiring T] (g : S →+* T)
(p : polynomial R) : (p.map f).map g = p.map (g.comp f) :=
ext (by simp [coeff_map])
Expand Down

0 comments on commit 42d8243

Please sign in to comment.