|
|
|
|
Quelle InjSurj.lean
Sprache: Lean
|
|
/-
) java.lang.StringIndexOutOfBoundsException: Range [32, 25) out of bounds for length 54
Released under Apache 2.0 license as+) x+ y : *) java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
= x java.lang.StringIndexOutOfBoundsException: Range [26, 27) out of bounds for length 26
-/
module
public import Mathlib.Algebra.GroupWithZero.InjSurj
public import Mathlib.Algebra.Opposites
public import Mathlib.Algebra.Ring.Defs
D.
/-!
# Pulling back(: ,( ) ( x, x)
commSemigroup f mul
The `nsmuljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 100
.
However, we cannot( ): 0=)(: )add +y y
as we want the mul y x y nsmul ℕx,n n• )
ionswap`usingadditivised transfer definitions in
non-additivised ones.
-/
public section
variable {R S : Type_ =hf. fzero addmulnsmul
namespace Function
variable (f :/
include hf
variable [Add S] [Mul S]
/-- Pullback a `LeftDistribClass` instance along an injective function. -/
[Mul][
(mul : ∀ x y, f (( f zero:f =0 a:∀ , ( fy)
left_distrib x mul y f( )= x )(eg: ,f(- fxjava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
/-- Pullback a `RightDistribClass` instance along an injective function. -/
rightDistribClass[ ][ R RightDistribClassR]add : ∀ y x+y)= x java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100
= f* where
right_distrib x y z := hf <| by simp only [*, right_distrib]
variable [Zero S] _: . fzero ub
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/-- Pullback a `Distrib` instance along an injective function. -/-- See note [reducible non-instances]
-- See note [reducible non-instances]
protected abbrev distrib [ (hf : Injective f) (zero 0)( :f1= a y, ( )f +fy)
mul:∀x x* x ): S
__ := hf. x-) - y( n )()f(• x
_ : n )) n• )
/-- A type endowed with `-` and `*` has distributive negation, if it admits an injective map that
preserves `-` and `*` to a type which has distributive negation. -/
-- See note [reducible non-instances]
protectedabbrev hasDistribNeg f:S )( f)M ][asDistribNegR]
(neg_ :hf. f mulneg sub
(mul java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
-- See note [reducible non-instances]
[CommRing R]
mul_neg := fun x(:0= one = 1 ( java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 67
/-- A type endowed with `0`, `1` and `+` is an additive monoid with one,
if it admits an injective map that preserves `0`java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
See note [reducible non-instances]. -/
protected abbrev addMonoidWithOne [AddMonoidWithOne R]
(f : S → theorem rightDistribClass [ ] [ ][ R (dd :∀ ,(+ + )
( (mul: , x*) ) java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 68
( : ∀n ,f ) java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 56
{ hf. R :y +) +y
natCast := Nat.cast : ,(*y )
_:add
hf.rightDistribClass
/-- A type endowed with `0`, `1` and `+` is an additive commutative monoid with one, if it admits an[ S S ℕ]SMul
(neg∀ - - mul: ( *) f java.lang.StringIndexOutOfBoundsException: Range [85, 83) out of bounds for length 88
See note [reducible non-instances]. -/
protected
java.lang.StringIndexOutOfBoundsException: Range [72, 73) out of bounds for length 72
(add : ∀ x y, f (x + y) = f x + f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
(natCast : ∀ n : ℕ, f n = n) : AddCommMonoidWithOne S where
__ := hf.addMonoidWithOne f zero one add nsmul natCast
__ := hf.addCommMonoid _ See note [reducible non-instancesjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/-- A type endowed with `0`, `1` and `+` is an additive group with one, if it admits an injective
thatpreserves `0`, `1` and `+` to an additive group with one. See note
[reducible non-instances]. -/
protected abbrev addGroupWithOne {S} [Zero S] [One java.lang.StringIndexOutOfBoundsException: Range [55, 52) out of bounds for length 55
[SMul : .,
(=n= ←,.java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 75
(x- )=x- ) n:)() n•) )
(zsmul : [ ,.,n,natCast }
(intCast : ∀ n : ℤ, f n = n) : AddGroupWithOne S :=
{/java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
hf.surjective mapthat `` `,and`+ group withone
intCast := Int.cast,
intCast_ofNat := fun n => hf (by rw [natCast, intCast, Int.cast_natCast]),
intCast_negSucc Seenote [java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
/-- A type endowed with `0`, `1` and `+` is an additive commutative group with one, if it admits an
hatpreserves`` 1 `+` to java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 88
See note [reducible non-instances]. -/
protected abbrev addCommGroupWithOne {S} [Zero S] [One(:∀ , )
]f )h java.lang.StringIndexOutOfBoundsException: Range [92, 90) out of bounds for length 93
( )one: 1 )( y, f (x + y) = f x + f y) (neg : ∀ x, f (-x) = -f x)
( , -)= y( :ℕ ,( )=•xjava.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
(zsmul : ∀ (n_ =hf.istribf addmul
_ : hf. zeromul
{ hf.addGroupWithOne
hf.java.lang.StringIndexOutOfBoundsException: Range [78, 15) out of bounds for length 78
/-- Pullback a `NonUnitalNonAssocSemiring` instance along an injective function. -/
-- See note [reducible non-instances]
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 89
(add : ∀ x y, f zeromul
(nsmul : java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
toAddCommMonoid :=Njava.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 87
__ := hf.distrib f add (add : ∀ x y, f (x + y) + )mul∀yf(* java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
__ := hf.mulZeroClass f zero muljava.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 59
/-- Pullback a `NonUnitalSemiring` instance along an injective function. -/
-- See note [reducible non-instances]
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 56
(zero : f 0 = 0) _=
(mul : ∀java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
protected abbrev semiring [Semiring R] (zero : f 0 = 0) (one : f 1 =(: , ) f ,x* yjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 82
__ := hf.semigroupWithZerojava.lang.StringIndexOutOfBoundsException: Range [23, 21) out of bounds for length 66
/-- Pullback a `NonAssocSemiring` instance along an injective function. -/
-- See note [reducible non-instances]
protected abbrev nonAssocSemiring
(zero-- See note [reducible non-instancesjava.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 81
(mul : ∀ add: yf ) :∀y( )
( ,f ) S where
toNonUnitalNonAssocSemiring := hf. (nsmul : ∀ (n : ℕ) (x), f (n • x) = n z ( ) (), f ( ) f x)java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
=.java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 80
__ := hf. := hf.nonUnitalNonAssocSemiringjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 57
/-- Pullback a `Semiring` instance along an injective function. -/
-- See note [reducible non-instances]
protected abbrev semiring java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 65
(add : ∀ add : xy y x+y : ,(x*) java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
( :ℕ(,( ) •fx npow:∀x :ℕ,f(^) = x^ java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
( , where
toAddCommMonoid := hf. java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 25
_: java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 60
__ := hf._: zeromul java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
/-- Pullback a `NonUnitalNonAssocRing` instance along an injective function. -/
-- See note [reducible non-instances]
protected abbrev nonUnitalNonAssocRing [ (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = ff-) )sub , ) x )
( f :f ) ,(+ x )
(mul : ∀ x y, f (x * y) = f x natCast: , )i∀ ℤ ) java.lang.StringIndexOutOfBoundsException: Range [77, 76) out of bounds for length 84
(sub : ∀ x_ = zero
(zsmul _ = java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 81
toAddCommGroup :java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
_-- See note [reducible non-instances]
/-- Pullback a `NonUnitalRing` instance along an injective function. -/
-- See note [reducible non-instances]
protected abbrev nonUnitalRing [NonUnitalRing R]
(zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
(neg : ∀ x,protected Ring : 0 ): 1 )add:∀y ) )
( :∀ x*) java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
S
toNonUnitalNonAssocRing := hf. (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f :)x, •x )
_ =java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 49
/-- Pullback a `NonAssocRing` instance along an injective function. -/
-- See note [reducible non-instances]
protected abbrev nonAssocRing [NonAssocRing R_ =one
z )(:1= y +) )
(mul : ∀ x y, f (x * y) = f x * f y) (neg :
sub:∀x y,f x-y f x y)nsmul:∀( )() ( = n •f )
(zsmul : ∀ (-- See note [reducible non-instancesprotected abbrev nonUnitalNonAssocCommSemiring [NonUnitalNonAssocCommSemiring R] (zero : f 0 = 0)
add x ,f( +y)=fx+ )m y( =*fjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
: .java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 88
__ := hf.nonAssocSemiringjava.lang.StringIndexOutOfBoundsException: Range [32, 29) out of bounds for length 82
__ _: .java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 26
/-- Pullback a `Ring` instance along an injective function. -/
-- See note [reducible non-instances]
protected abbrev ring [Ring f 0=0java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
one =1 a ,f( )=x+f m f (x *)= x *f )
(neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = nsmul:∀( )x,(• ):
(n:ℕ(), n•)=•fx( n )(,fn•x xjava.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
npow:∀x n ) x )=x^n natCast , =)
(intCast : java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
toSemiring := hf.semiring f -- See note [reducible non-instances]
-- zsmul included here explicitly to make sure it's picked correctly by `fast_instance%`. abbrev [java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 95
zsmul=n↦•x
__ := hf. (nsmul : ∀ (n : ℕ) (xn•) )
__ := hf.addCommGroup f zero add neg subn ) java.lang.StringIndexOutOfBoundsException: Range [57, 55) out of bounds for length 63
/-- Pullback a `NonUnitalNonAssocCommSemiring` instance along an injective function. -/
-- See note [reducible non-instances]
protected abbrev java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
-- See note [reducible non-instances]
* f )n n:ℕx, • x java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 41
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 82
__ := hf.commMagma ( ,fn=n java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 55
/-- Pullback a `NonUnitalCommSemiring` instance along an injective function. -/
-- See note [reducible non-instances]
protectedabbrevNjava.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 76
(hf-- See note [reducible non-instances]
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 72
NonUnitalCommSemiring S(:f0= ,fx+y) =f + f y)
toNonUnitalSemiring : (ul :∀x x*) =f *fy)(eg:∀x,(=- x)
__ := hf. (sub : ∀ x,f( )=f -f (nsmul:∀( :ℕ , n ) )
/-- Pullback a `NonAssocCommSemiring` instance along an injective function. -/
-- See note [reducible non-instances]
protected abbrev nonAssocCommSemiring tjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 88
_=java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 61
(mul : ∀ java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
(natCast : ∀ n pjava.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 73
toNonAssocSemiring := hf.nonAssocSemiring y x* x*java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
_:
/-- Pullback a `CommSemiring` instance along an injective function. -/
-- See note [reducible non-instances]
protected abbrev commSemiring [CommSemiringS
( )( :1 )a y (+y x +fjava.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 73
(mul :∀xy x*y )(nsmul n:ℕ)x,f( •x x)
(npowjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
CommSemiring S where
toSemiring := hf.semiring protected NonAssocCommRing]( )(ne:1 )
__ := hf. a: ,( )=x+fy(:∀xy, f x* = x* y
/-- Pullback a `NonUnitalNonAssocCommRing` instance along an injective function. -/ ,(x fx sub : ∀x y, x - x-java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
-- See note [reducible non-instances]
nonUnitalNonAssocCommRing NonUnitalNonAssocCommRing]( S→Rjava.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
(hf : (:∀ n intCast: ,f=n S
: .nonAssocRing zero
(sub _: . zeroone natCast
(zsmul java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
toNonUnitalNonAssocRing := hf.java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 37
_protectedabbrev [R zero: 0= 0 o : f1
/-- Pullback a `NonUnitalCommRing` instance along an injective function. -/
-- See note [reducible non-instances]
protected abbrev (neg : ∀ x, f (-x) = )sub:∀ y x -y) = x -f y)
(hf( n:ℕ(),f( )=•f)( n )() ( )n•f java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
( ,f( )= x )(eg : ,f (x f java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
( ,f( )= x- y nsmul:∀(:ℕx,f( )
(zsmul : toRing=. f oneaddmulnegsubnsmul intCast
toNonUnitalRing f muln
__ := hf.java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
/-- Pullback a `NonAssocCommRing` instance along an injective function. -/
-- See note [reducible non-instances]
protected abbrev nonAssocCommRing instanceinstHasDistribNeg:ᵒ =
(hf : Injective f) (zero : f .
(mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
(sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
(zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x)
(natCast : ∀ n : ℕ, f n = n) (intCast : ∀ n : ℤ, f n = n) : NonAssocCommRing S where
toNonAssocRing := hf.nonAssocRing f zero one add mul neg sub nsmul zsmul natCast intCast
__ := hf.nonUnitalNonAssocCommRing f zero add mul neg sub nsmul zsmul
/-- Pullback a `CommRing` instance along an injective function. -/
-- See note [reducible non-instances]
protected abbrev commRing [CommRing R]
(zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
(mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
(sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
(zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
(natCast : ∀ n : ℕ, f n = n) (intCast : ∀ n : ℤ, f n = n) : CommRing S where
toRing := hf.ring f zero one add mul neg sub nsmul zsmul npow natCast intCast
__ := hf.commMonoid f one mul npow
end Function.Injective
namespace Function.Surjective
variable (f : R → S) (hf : Surjective f)
include hf
variable [Add S] [Mul S]
/-- Pushforward a `LeftDistribClass` instance along a surjective function. -/
theorem leftDistribClass [Mul R] [Add R] [LeftDistribClass R] (add : ∀ x y, f (x + y) = f x + f y)
(mul : ∀ x y, f (x * y) = f x * f y) : LeftDistribClass S where
left_distrib := hf.forall₃.2 fun x y z => by simp only [← add, ← mul, left_distrib]
/-- Pushforward a `RightDistribClass` instance along a surjective function. -/
theorem rightDistribClass [Mul R] [Add R] [RightDistribClass R] (add : ∀ x y, f (x + y) = f x + f y)
(mul : ∀ x y, f (x * y) = f x * f y) : RightDistribClass S where
right_distrib := hf.forall₃.2 fun x y z => by simp only [← add, ← mul, right_distrib]
/-- Pushforward a `Distrib` instance along a surjective function. -/
-- See note [reducible non-instances]
protected abbrev distrib [Distrib R] (add : ∀ x y, f (x + y) = f x + f y)
(mul : ∀ x y, f (x * y) = f x * f y) : Distrib S where
__ := hf.leftDistribClass f add mul
__ := hf.rightDistribClass f add mul
variable [Zero S] [One S] [Neg S] [Sub S] [SMul ℕ S] [SMul ℤ S]
[Pow S ℕ] [NatCast S] [IntCast S]
/-- A type endowed with `-` and `*` has distributive negation, if it admits a surjective map that
preserves `-` and `*` from a type which has distributive negation. -/
-- See note [reducible non-instances]
protected abbrev hasDistribNeg [Mul R] [HasDistribNeg R]
(neg : ∀ a, f (-a) = -f a) (mul : ∀ a b, f (a * b) = f a * f b) : HasDistribNeg S :=
{ hf.involutiveNeg _ neg, ‹Mul S› with
neg_mul := hf.forall₂.2 fun x y => by rw [← neg, ← mul, neg_mul, neg, mul]
mul_neg := hf.forall₂.2 fun x y => by rw [← neg, ← mul, mul_neg, neg, mul] }
/-- A type endowed with `0`, `1` and `+` is an additive monoid with one, if it admits a surjective
map that preserves `0`, `1` and `*` from an additive monoid with one. See note
[reducible non-instances]. -/
protected abbrev addMonoidWithOne [AddMonoidWithOne R] (zero : f 0 = 0) (one : f 1 = 1)
(add : ∀ x y, f (x + y) = f x + f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
(natCast : ∀ n : ℕ, f n = n) : AddMonoidWithOne S :=
{ hf.addMonoid f zero add (swap nsmul) with
natCast := Nat.cast,
natCast_zero := by rw [← natCast, Nat.cast_zero, zero]
natCast_succ := fun n => by rw [← natCast, Nat.cast_succ, add, one, natCast] }
/-- A type endowed with `0`, `1` and `+` is an additive monoid with one,
if it admits a surjective map that preserves `0`, `1` and `*` from an additive monoid with one.
See note [reducible non-instances]. -/
protected abbrev addCommMonoidWithOne [AddCommMonoidWithOne R] (zero : f 0 = 0) (one : f 1 = 1)
(add : ∀ x y, f (x + y) = f x + f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
(natCast : ∀ n : ℕ, f n = n) : AddCommMonoidWithOne S where
__ := hf.addMonoidWithOne f zero one add nsmul natCast
__ := hf.addCommMonoid _ zero add (swap nsmul)
/-- A type endowed with `0`, `1`, `+` is an additive group with one,
if it admits a surjective map that preserves `0`, `1`, and `+` to an additive group with one.
See note [reducible non-instances]. -/
protected abbrev addGroupWithOne [AddGroupWithOne R]
(zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y) (neg : ∀ x, f (-x) = -f x)
(sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
(zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x) (natCast : ∀ n : ℕ, f n = n)
(intCast : ∀ n : ℤ, f n = n) : AddGroupWithOne S :=
{ hf.addMonoidWithOne f zero one add nsmul natCast,
hf.addGroup f zero add neg sub (swap nsmul) (swap zsmul) with
intCast := Int.cast,
intCast_ofNat := fun n => by rw [← intCast, Int.cast_natCast, natCast],
intCast_negSucc := fun n => by
rw [← intCast, Int.cast_negSucc, neg, natCast] }
/-- A type endowed with `0`, `1`, `+` is an additive commutative group with one, if it admits a
surjective map that preserves `0`, `1`, and `+` to an additive commutative group with one.
See note [reducible non-instances]. -/
protected abbrev addCommGroupWithOne [AddCommGroupWithOne R]
(zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y) (neg : ∀ x, f (-x) = -f x)
(sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
(zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x) (natCast : ∀ n : ℕ, f n = n)
(intCast : ∀ n : ℤ, f n = n) : AddCommGroupWithOne S :=
{ hf.addGroupWithOne f zero one add neg sub nsmul zsmul natCast intCast,
hf.addCommMonoid _ zero add (swap nsmul) with }
/-- Pushforward a `NonUnitalNonAssocSemiring` instance along a surjective function.
See note [reducible non-instances]. -/
protected abbrev nonUnitalNonAssocSemiring [NonUnitalNonAssocSemiring R] (zero : f 0 = 0)
(add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
(nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) : NonUnitalNonAssocSemiring S where
toAddCommMonoid := hf.addCommMonoid f zero add (swap nsmul)
__ := hf.distrib f add mul
__ := hf.mulZeroClass f zero mul
/-- Pushforward a `NonUnitalSemiring` instance along a surjective function. -/
-- See note [reducible non-instances]
protected abbrev nonUnitalSemiring [NonUnitalSemiring R] (zero : f 0 = 0)
(add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
(nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) : NonUnitalSemiring S where
toNonUnitalNonAssocSemiring := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
__ := hf.semigroupWithZero f zero mul
/-- Pushforward a `NonAssocSemiring` instance along a surjective function. -/
-- See note [reducible non-instances]
protected abbrev nonAssocSemiring [NonAssocSemiring R] (zero : f 0 = 0) (one : f 1 = 1)
(add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
(nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
(natCast : ∀ n : ℕ, f n = n) : NonAssocSemiring S where
toNonUnitalNonAssocSemiring := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
__ := hf.mulZeroOneClass f zero one mul
__ := hf.addMonoidWithOne f zero one add nsmul natCast
/-- Pushforward a `Semiring` instance along a surjective function. -/
-- See note [reducible non-instances]
protected abbrev semiring [Semiring R] (zero : f 0 = 0) (one : f 1 = 1)
(add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
(nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
(npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (natCast : ∀ n : ℕ, f n = n) : Semiring S where
toNonUnitalSemiring := hf.nonUnitalSemiring f zero add mul nsmul
__ := hf.nonAssocSemiring f zero one add mul nsmul natCast
__ := hf.monoidWithZero f zero one mul npow
/-- Pushforward a `NonUnitalNonAssocRing` instance along a surjective function. -/
-- See note [reducible non-instances]
protected abbrev nonUnitalNonAssocRing [NonUnitalNonAssocRing R] (zero : f 0 = 0)
(add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
(neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
(nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x) :
NonUnitalNonAssocRing S where
toAddCommGroup := hf.addCommGroup f zero add neg sub (swap nsmul) (swap zsmul)
__ := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
/-- Pushforward a `NonUnitalRing` instance along a surjective function. -/
-- See note [reducible non-instances]
protected abbrev nonUnitalRing [NonUnitalRing R] (zero : f 0 = 0)
(add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
(neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
(nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x) :
NonUnitalRing S where
toNonUnitalNonAssocRing := hf.nonUnitalNonAssocRing f zero add mul neg sub nsmul zsmul
__ := hf.nonUnitalSemiring f zero add mul nsmul
/-- Pushforward a `NonAssocRing` instance along a surjective function. -/
-- See note [reducible non-instances]
protected abbrev nonAssocRing [NonAssocRing R] (zero : f 0 = 0) (one : f 1 = 1)
(add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
(neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
(nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x)
(natCast : ∀ n : ℕ, f n = n) (intCast : ∀ n : ℤ, f n = n) : NonAssocRing S where
toNonUnitalNonAssocRing := hf.nonUnitalNonAssocRing f zero add mul neg sub nsmul zsmul
__ := hf.nonAssocSemiring f zero one add mul nsmul natCast
__ := hf.addCommGroupWithOne f zero one add neg sub nsmul zsmul natCast intCast
/-- Pushforward a `Ring` instance along a surjective function. -/
-- See note [reducible non-instances]
protected abbrev ring [Ring R] (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
(mul : ∀ x y, f (x * y) = f x * f y)
(neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
(nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x)
(npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (natCast : ∀ n : ℕ, f n = n)
(intCast : ∀ n : ℤ, f n = n) : Ring S where
toSemiring := hf.semiring f zero one add mul nsmul npow natCast
__ := hf.addGroupWithOne f zero one add neg sub nsmul zsmul natCast intCast
__ := hf.addCommGroup f zero add neg sub (swap nsmul) (swap zsmul)
/-- Pushforward a `NonUnitalNonAssocCommSemiring` instance along a surjective function. -/
-- See note [reducible non-instances]
protected abbrev nonUnitalNonAssocCommSemiring [NonUnitalNonAssocCommSemiring R] (zero : f 0 = 0)
(add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
(nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) : NonUnitalNonAssocCommSemiring S where
toNonUnitalNonAssocSemiring := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
__ := hf.commMagma f mul
/-- Pushforward a `NonUnitalCommSemiring` instance along a surjective function. -/
-- See note [reducible non-instances]
protected abbrev nonUnitalCommSemiring [NonUnitalCommSemiring R] (zero : f 0 = 0)
(add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
(nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) : NonUnitalCommSemiring S where
toNonUnitalSemiring := hf.nonUnitalSemiring f zero add mul nsmul
__ := hf.commSemigroup f mul
/-- Pushforward a `NonAssocCommSemiring` instance along a surjective function. -/
-- See note [reducible non-instances]
protected abbrev nonAssocCommSemiring [NonAssocCommSemiring R] (zero : f 0 = 0) (one : f 1 = 1)
(add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
(nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
(natCast : ∀ n : ℕ, f n = n) : NonAssocCommSemiring S where
toNonAssocSemiring := hf.nonAssocSemiring f zero one add mul nsmul natCast
__ := hf.commMagma f mul
/-- Pushforward a `CommSemiring` instance along a surjective function. -/
-- See note [reducible non-instances]
protected abbrev commSemiring [CommSemiring R] (zero : f 0 = 0) (one : f 1 = 1)
(add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
(nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
(natCast : ∀ n : ℕ, f n = n) : CommSemiring S where
toSemiring := hf.semiring f zero one add mul nsmul npow natCast
__ := hf.commSemigroup f mul
/-- Pushforward a `NonUnitalNonAssocCommRing` instance along a surjective function. -/
-- See note [reducible non-instances]
protected abbrev nonUnitalNonAssocCommRing [NonUnitalNonAssocCommRing R]
(zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
(mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
(sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
(zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x) : NonUnitalNonAssocCommRing S where
toNonUnitalNonAssocRing := hf.nonUnitalNonAssocRing f zero add mul neg sub nsmul zsmul
__ := hf.nonUnitalNonAssocCommSemiring f zero add mul nsmul
/-- Pushforward a `NonUnitalCommRing` instance along a surjective function. -/
-- See note [reducible non-instances]
protected abbrev nonUnitalCommRing [NonUnitalCommRing R] (zero : f 0 = 0)
(add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
(neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
(nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x) :
NonUnitalCommRing S where
toNonUnitalRing := hf.nonUnitalRing f zero add mul neg sub nsmul zsmul
__ := hf.nonUnitalNonAssocCommRing f zero add mul neg sub nsmul zsmul
/-- Pushforward a `NonAssocCommRing` instance along a surjective function. -/
-- See note [reducible non-instances]
protected abbrev nonAssocCommRing [NonAssocCommRing R] (zero : f 0 = 0) (one : f 1 = 1)
(add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
(neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
(nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x)
(natCast : ∀ n : ℕ, f n = n) (intCast : ∀ n : ℤ, f n = n) : NonAssocCommRing S where
toNonAssocRing := hf.nonAssocRing f zero one add mul neg sub nsmul zsmul natCast intCast
__ := hf.nonAssocCommSemiring f zero one add mul nsmul natCast
/-- Pushforward a `CommRing` instance along a surjective function. -/
-- See note [reducible non-instances]
protected abbrev commRing [CommRing R] (zero : f 0 = 0) (one : f 1 = 1)
(add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
(neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
(nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x)
(npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
(natCast : ∀ n : ℕ, f n = n) (intCast : ∀ n : ℤ, f n = n) : CommRing S where
toRing := hf.ring f zero one add mul neg sub nsmul zsmul npow natCast intCast
__ := hf.commMonoid f one mul npow
end Function.Surjective
variable [Mul R] [HasDistribNeg R]
instance AddOpposite.instHasDistribNeg : HasDistribNeg Rᵃᵒᵖ :=
unop_injective.hasDistribNeg _ unop_neg unop_mul
¤ Dauer der Verarbeitung: 0.3 Sekunden
(vorverarbeitet am 2026-11-24)
¤
*© Formatika GbR, Deutschland
|
|
2026-11-24
|
|
|
|
|