1-- Powers under a ring homomorphism: f(a ^ n) = f(a) ^ n between2-- commutative rings; everything here is ZF3-- Part of Cumulus, the Grace17 mathematics library.4-- Copyright (c) 2026 Grant Passmore.5-- Released under the Apache License 2.0. See LICENSE in the repository root.6-- Authors: Grant Passmore78module Grace.Cumulus.Algebra.Ring.HomomorphismPow9import Homomorphism10import Pow1112section Powers13variable (R S f : Set)14hypothesis source : CommRing(R)15hypothesis target : CommRing(S)16hypothesis hom : f : R→+* S1718theorem RingHom.map_pow (a : R) (n : Nat)19shows f(a ^ n) = f(a) ^ n20proof21have ringR := CommRing.to_ring with source22have ringS := CommRing.to_ring with target23induction n24| zero =>25haveleft:= Ring.pow_zero at R, a with ringR26haveright:= Ring.pow_zero at S, f(a) with ringS27have one := RingHom.map_one with hom28rw [left, right, one]29| succ(k) using ih =>30have shift := add.right_one at k with*31rw← shift32haveleft:= Ring.pow_succ at R, a, k with ringR33haveright:= Ring.pow_succ at S, f(a), k with ringS34have mul := RingHom.map_mul at f, R, S, a ^ k, a with hom35rw [left, right, mul, ih]3637end Powers38