Grace/Cumulus/Algebra/Ring/HomomorphismPow.g17

Open in Workbench Download source

Imports

Homomorphism · Pow

Declarations

Source

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)19  shows f(a ^ n) = f(a) ^ n20proof21  have ringR := CommRing.to_ring with source22  have ringS := CommRing.to_ring with target23  induction n24  | zero =>25    have left := Ring.pow_zero at R, a with ringR26    have right := Ring.pow_zero at S, f(a) with ringS27    have one := RingHom.map_one with hom28    rw [left, right, one]29  | succ(k) using ih =>30    have shift := add.right_one at k with *31    rw ← shift32    have left := Ring.pow_succ at R, a, k with ringR33    have right := Ring.pow_succ at S, f(a), k with ringS34    have mul := RingHom.map_mul at f, R, S, a ^ k, a with hom35    rw [left, right, mul, ih]3637end Powers38