Built with Alectryon, running Coq+SerAPI v8.19.0+0.19.3. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use ⌘ instead of Ctrl.
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
Require Import
HoTT.Classes.interfaces.abstract_algebra.Generalizable VariablesR A B C f z.Definitionis_ne_0 `(x : R) `{Zero R} `{p : PropHolds (x <> 0)}
: x <> 0 := p.Definitionis_nonneg `(x : R) `{Le R} `{Zero R} `{p : PropHolds (0 ≤ x)}
: 0 ≤ x := p.Definitionis_pos `(x : R) `{Lt R} `{Zero R} `{p : PropHolds (0 < x)}
: 0 < x := p.(* Lemma stdlib_semiring_theory R `{SemiRing R} : Ring_theory.semi_ring_theory 0 1 (+) (.*.) (=).Proof.Qed.*)(* We cannot apply [left_cancellation (.*.) z] directly in case we have no [PropHolds (0 <> z)] instance in the context. *)Sectioncancellation.Context `(op : A -> A -> A) `{!Zero A}.
A: Type op: A -> A -> A Zero0: Zero A H: forallz : A,
PropHolds (z <> 0) -> LeftCancellation op z z: A
z <> 0 -> LeftCancellation op z
A: Type op: A -> A -> A Zero0: Zero A H: forallz : A,
PropHolds (z <> 0) -> LeftCancellation op z z: A
z <> 0 -> LeftCancellation op z
auto.Qed.
A: Type op: A -> A -> A Zero0: Zero A H: forallz : A,
PropHolds (z <> 0) -> RightCancellation op z z: A
z <> 0 -> RightCancellation op z
A: Type op: A -> A -> A Zero0: Zero A H: forallz : A,
PropHolds (z <> 0) -> RightCancellation op z z: A
z <> 0 -> RightCancellation op z
auto.Qed.
A: Type op: A -> A -> A Zero0: Zero A Commutative0: Commutative op z: A LeftCancellation0: LeftCancellation op z
RightCancellation op z
A: Type op: A -> A -> A Zero0: Zero A Commutative0: Commutative op z: A LeftCancellation0: LeftCancellation op z
RightCancellation op z
A: Type op: A -> A -> A Zero0: Zero A Commutative0: Commutative op z: A LeftCancellation0: LeftCancellation op z x, y: A E: op x z = op y z
x = y
A: Type op: A -> A -> A Zero0: Zero A Commutative0: Commutative op z: A LeftCancellation0: LeftCancellation op z x, y: A E: op x z = op y z
op z x = op z y
A: Type op: A -> A -> A Zero0: Zero A Commutative0: Commutative op z: A LeftCancellation0: LeftCancellation op z x, y: A E: op x z = op y z
op x z = op y z
assumption.Qed.Endcancellation.Sectionstrong_cancellation.Context `{IsApart A} (op : A -> A -> A).
A: Type Aap: Apart A H: IsApart A op: A -> A -> A Commutative0: Commutative op z: A StrongLeftCancellation0: StrongLeftCancellation op z
StrongRightCancellation op z
A: Type Aap: Apart A H: IsApart A op: A -> A -> A Commutative0: Commutative op z: A StrongLeftCancellation0: StrongLeftCancellation op z
StrongRightCancellation op z
A: Type Aap: Apart A H: IsApart A op: A -> A -> A Commutative0: Commutative op z: A StrongLeftCancellation0: StrongLeftCancellation op z x, y: A E: x ≶ y
op x z ≶ op y z
A: Type Aap: Apart A H: IsApart A op: A -> A -> A Commutative0: Commutative op z: A StrongLeftCancellation0: StrongLeftCancellation op z x, y: A E: x ≶ y
op z x ≶ op z y
apply (strong_left_cancellation op z);trivial.Qed.
A: Type Aap: Apart A H: IsApart A op: A -> A -> A z: A StrongLeftCancellation0: StrongLeftCancellation op z
LeftCancellation op z
A: Type Aap: Apart A H: IsApart A op: A -> A -> A z: A StrongLeftCancellation0: StrongLeftCancellation op z
LeftCancellation op z
A: Type Aap: Apart A H: IsApart A op: A -> A -> A z: A StrongLeftCancellation0: StrongLeftCancellation op z x, y: A E1: op z x = op z y
x = y
A: Type Aap: Apart A H: IsApart A op: A -> A -> A z: A StrongLeftCancellation0: StrongLeftCancellation op z x, y: A E1: ~ (op z x ≶ op z y) E2: x ≶ y
Empty
A: Type Aap: Apart A H: IsApart A op: A -> A -> A z: A StrongLeftCancellation0: StrongLeftCancellation op z x, y: A E1: ~ (op z x ≶ op z y) E2: x ≶ y
op z x ≶ op z y
apply (strong_left_cancellation op);trivial.Qed.
A: Type Aap: Apart A H: IsApart A op: A -> A -> A z: A StrongRightCancellation0: StrongRightCancellation op
z
RightCancellation op z
A: Type Aap: Apart A H: IsApart A op: A -> A -> A z: A StrongRightCancellation0: StrongRightCancellation op
z
RightCancellation op z
A: Type Aap: Apart A H: IsApart A op: A -> A -> A z: A StrongRightCancellation0: StrongRightCancellation op
z x, y: A E1: op x z = op y z
x = y
A: Type Aap: Apart A H: IsApart A op: A -> A -> A z: A StrongRightCancellation0: StrongRightCancellation op
z x, y: A E1: ~ (op x z ≶ op y z) E2: x ≶ y
Empty
A: Type Aap: Apart A H: IsApart A op: A -> A -> A z: A StrongRightCancellation0: StrongRightCancellation op
z x, y: A E1: ~ (op x z ≶ op y z) E2: x ≶ y
op x z ≶ op y z
apply (strong_right_cancellation op);trivial.Qed.Endstrong_cancellation.Sectionsemiring_props.Context `{IsSemiCRing R}.(* Add Ring SR : (stdlib_semiring_theory R). *)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R NoZeroDivisors0: NoZeroDivisors R x, y: R
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R NoZeroDivisors0: NoZeroDivisors R x, y: R Ex: PropHolds (x <> 0) Ey: PropHolds (y <> 0) Exy: x * y = 0
Empty
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R NoZeroDivisors0: NoZeroDivisors R x, y: R Ex: x <> 0 Ey: y <> 0 Exy: x * y = 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R
RightAbsorb mult 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R
RightAbsorb mult 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R x: R
x * 0 = 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R x: R
x * 0 = 0 * x
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R x: R
0 * x = 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R x: R
x * 0 = 0 * x
apply mult_comm.
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R x: R
0 * x = 0
apply left_absorb.Qed.
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R
RightDistribute mult plus
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R
RightDistribute mult plus
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R x, y, z: R
(x + y) * z = x * z + y * z
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R x, y, z: R
(x + y) * z = ?Goal
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R x, y, z: R
?Goal = ?Goal1
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R x, y, z: R
?Goal1 = x * z + y * z
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R x, y, z: R
(x + y) * z = ?Goal
apply mult_comm.
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R x, y, z: R
z * (x + y) = ?Goal
apply distribute_l.
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R x, y, z: R
z * x + z * y = x * z + y * z
apply ap011;apply mult_comm.Qed.
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R
LeftDistribute mult plus
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R
LeftDistribute mult plus
exact _.Qed.
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R
forallr : R, IsMonoidPreserving (mult r)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R
forallr : R, IsMonoidPreserving (mult r)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R r: R
IsSemiGroupPreserving (mult r)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R r: R
IsUnitPreserving (mult r)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R r: R
IsSemiGroupPreserving (mult r)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R r: R
forallxy : R, r * sg_op x y = sg_op (r * x) (r * y)
apply distribute_l.
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R H: IsSemiCRing R r: R
IsUnitPreserving (mult r)
apply right_absorb.Qed.Endsemiring_props.(* Due to bug #2528 *)#[export]
Hint Extern3 (PropHolds (_ * _ <> 0)) => eapply @mult_ne_0 : typeclass_instances.Sectionsemiringmor_props.Context `{IsSemiRingPreserving A B f}.
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f
f 0 = 0
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f
f 0 = 0
exact preserves_mon_unit.Qed.
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f
f 1 = 1
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f
f 1 = 1
exact preserves_mon_unit.Qed.
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f
forallxy : A, f (x * y) = f x * f y
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f
forallxy : A, f (x * y) = f x * f y
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f x, y: A
f (x * y) = f x * f y
apply preserves_sg_op.Qed.
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f
forallxy : A, f (x + y) = f x + f y
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f
forallxy : A, f (x + y) = f x + f y
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f x, y: A
f (x + y) = f x + f y
apply preserves_sg_op.Qed.
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f
f 2 = 2
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f
f 2 = 2
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f
f 1 + f 1 = 2
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f
2 = 2
reflexivity.Qed.
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f
f 3 = 3
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f
f 3 = 3
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f
3 = 3
reflexivity.Qed.
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f
f 4 = 4
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f
f 4 = 4
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f
4 = 4
reflexivity.Qed.Context `{!IsInjective f}.
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f IsInjective0: IsInjective f x: A
PropHolds (x <> 0) -> PropHolds (f x <> 0)
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f IsInjective0: IsInjective f x: A
PropHolds (x <> 0) -> PropHolds (f x <> 0)
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f IsInjective0: IsInjective f x: A X: PropHolds (x <> 0)
PropHolds (f x <> 0)
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f IsInjective0: IsInjective f x: A X: PropHolds (x <> 0)
PropHolds (f x <> f 0)
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f IsInjective0: IsInjective f x: A X: PropHolds (x <> 0)
x <> 0
assumption.Qed.
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f IsInjective0: IsInjective f x: A
x <> 1 -> f x <> 1
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f IsInjective0: IsInjective f x: A
x <> 1 -> f x <> 1
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f IsInjective0: IsInjective f x: A X: x <> 1
f x <> 1
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f IsInjective0: IsInjective f x: A X: x <> 1
f x <> f 1
A, B: Type Aplus: Plus A Bplus: Plus B Amult: Mult A Bmult: Mult B Azero: Zero A Bzero: Zero B Aone: One A Bone: One B f: A -> B H: IsSemiRingPreserving f IsInjective0: IsInjective f x: A X: x <> 1
x <> 1
assumption.Qed.Endsemiringmor_props.(* Due to bug #2528 *)#[export]
Hint Extern12 (PropHolds (_ _ <> 0)) =>
eapply @isinjective_ne_0 : typeclass_instances.(* Lemma stdlib_ring_theory R `{Ring R} : Ring_theory.ring_theory 0 1 (+) (.*.) (fun x y => x - y) (-) (=).Proof.Qed.*)Sectioncring_props.Context `{IsCRing R}.
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsCRing R
LeftAbsorb mult 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsCRing R
LeftAbsorb mult 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsCRing R y: R
0 * y = 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsCRing R y: R
y * 0 = 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsCRing R y: R
y * 0 + y * 0 = y * 0 + 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsCRing R y: R
y * 0 + y * 0 = y * 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsCRing R y: R
y * 0 + y * 0 = y * (0 + 0)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsCRing R y: R
y * (0 + 0) = y * 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsCRing R y: R
y * 0 + y * 0 = y * (0 + 0)
applysymmetry,distribute_l.
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsCRing R y: R
y * (0 + 0) = y * 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsCRing R y: R
0 + 0 = 0
apply right_identity.Qed.
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsCRing R
IsSemiCRing R
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsCRing R
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R
LeftAbsorb mult 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R
LeftAbsorb mult 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R y: R
0 * y = 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R y: R
0 * y + 0 * y = 0 + 0 * y
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R y: R
(0 + 0) * y = 0 + 0 * y
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R y: R
(0 + 0) * y = 0 * y
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R y: R
0 + 0 = 0
apply left_identity.Defined.
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R
RightAbsorb mult 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R
RightAbsorb mult 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R x: R
x * 0 = 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R x: R
x * 0 + x * 0 = 0 + x * 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R x: R
x * (0 + 0) = 0 + x * 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R x: R
x * (0 + 0) = x * 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R x: R
0 + 0 = 0
apply left_identity.Defined.(** This hint helps other results go through. We do it in two steps, since if we specify the type [IsGroup R], Coq infers the wrong implicit arguments to [IsGroup]. *)Definitionisgroup_ring := abgroup_group R.#[export] Existing Instanceisgroup_ring.#[export] Instancenegate_involutive : Involutive (-) := inverse_involutive.(* alias for convenience *)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R
RightInverse plus negate 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R
RightInverse plus negate 0
rapply inverse_r.Defined.
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R
LeftInverse plus negate 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R
LeftInverse plus negate 0
rapply inverse_l.Defined.
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R
forallxy : R, x - y = - (y - x)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R
forallxy : R, x - y = - (y - x)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R x, y: R
- (y - x) = x - y
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R x, y: R
sg_op (inv (- x)) (inv y) = x - y
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R x, y: R
inv (- x) = x
apply involutive.Defined.
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R x, y: R
- x + y = - (x - y)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R x, y: R
- x + y = - (x - y)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R x, y: R
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y)
forallz : R,
PropHolds (z <> 0) -> LeftCancellation mult z
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y)
forallz : R,
PropHolds (z <> 0) -> LeftCancellation mult z
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R z_nonzero: PropHolds (z <> 0) x, y: R E: z * x = z * y
x = y
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R z_nonzero: PropHolds (z <> 0) x, y: R E: z * x = z * y
~~ (x = y)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R z_nonzero: PropHolds (z <> 0) x, y: R E: z * x = z * y U: x <> y
Empty
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R z_nonzero: PropHolds (z <> 0) x, y: R E: z * x = z * y U: x <> y
PropHolds (x - y <> 0)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R z_nonzero: PropHolds (z <> 0) x, y: R E: z * x = z * y U: x <> y
z * (x - y) = 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R z_nonzero: PropHolds (z <> 0) x, y: R E: z * x = z * y U: x <> y
PropHolds (x - y <> 0)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R z_nonzero: PropHolds (z <> 0) x, y: R E: z * x = z * y U: x <> y X: x - y = 0
Empty
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R z_nonzero: PropHolds (z <> 0) x, y: R E: z * x = z * y U: x <> y X: x - y = 0
x = y
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R z_nonzero: PropHolds (z <> 0) x, y: R E: z * x = z * y U: x <> y X: x - y = 0
x - y = 0
trivial.
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R z_nonzero: PropHolds (z <> 0) x, y: R E: z * x = z * y U: x <> y
z * (x - y) = 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R z_nonzero: PropHolds (z <> 0) x, y: R E: z * x = z * y U: x <> y
z * y + z * - y = 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R z_nonzero: PropHolds (z <> 0) x, y: R E: z * x = z * y U: x <> y
z * 0 = 0
apply right_absorb.Qed.
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) NoZeroDivisors1: NoZeroDivisors R x, y: R
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) NoZeroDivisors1: NoZeroDivisors R x, y: R
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) NoZeroDivisors1: NoZeroDivisors R x, y: R Ex: PropHolds (x <> 0) Ey: PropHolds (y <> 0) Exy: x * y = 0
Empty
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) NoZeroDivisors1: NoZeroDivisors R x, y: R Ex: x <> 0 Ey: y <> 0 Exy: x * y = 0
Empty
apply (no_zero_divisors x); split; eauto.Qed.
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y)
forallz : R,
PropHolds (z <> 0) -> RightCancellation mult z
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y)
forallz : R,
PropHolds (z <> 0) -> RightCancellation mult z
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R X: PropHolds (z <> 0) x, y: R p: x * z = y * z
x = y
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R X: PropHolds (z <> 0) x, y: R p: x * z = y * z
~~ (x = y)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R X: PropHolds (z <> 0) x, y: R p: x * z = y * z U: x <> y
Empty
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R X: PropHolds (z <> 0) x, y: R p: x * z = y * z U: x <> y
NoZeroDivisors R
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R X: PropHolds (z <> 0) x, y: R p: x * z = y * z U: x <> y
PropHolds (x - y <> 0)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R X: PropHolds (z <> 0) x, y: R p: x * z = y * z U: x <> y
PropHolds (z <> 0)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R X: PropHolds (z <> 0) x, y: R p: x * z = y * z U: x <> y
(x - y) * z = 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R X: PropHolds (z <> 0) x, y: R p: x * z = y * z U: x <> y
NoZeroDivisors R
exact _.
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R X: PropHolds (z <> 0) x, y: R p: x * z = y * z U: x <> y
PropHolds (x - y <> 0)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R X: PropHolds (z <> 0) x, y: R p: x * z = y * z U: x <> y r: x - y = 0
Empty
apply U, equal_by_zero_sum, r.
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R X: PropHolds (z <> 0) x, y: R p: x * z = y * z U: x <> y
PropHolds (z <> 0)
exact _.
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R X: PropHolds (z <> 0) x, y: R p: x * z = y * z U: x <> y
(x - y) * z = 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R X: PropHolds (z <> 0) x, y: R p: x * z = y * z U: x <> y
x * z + - y * z = 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R X: PropHolds (z <> 0) x, y: R p: x * z = y * z U: x <> y
x * z - y * z = 0
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) z: R X: PropHolds (z <> 0) x, y: R p: x * z - y * z = 0 U: x <> y
x * z - y * z = 0
exact p.Defined.
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) x, y: R
x = y + x - y
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) x, y: R
x = y + x - y
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) x, y: R
x = x
reflexivity.Qed.
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) x, y: R
x = y + (x - y)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) x, y: R
x = y + (x - y)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsRing R NoZeroDivisors0: NoZeroDivisors R H0: forallxy : R, Stable (x = y) x, y: R
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsIntegralDomain R H0: Apart R TrivialApart0: TrivialApart R
PropHolds (1 ≶ 0)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsIntegralDomain R H0: Apart R TrivialApart0: TrivialApart R
PropHolds (1 ≶ 0)
R: Type Aplus: Plus R Amult: Mult R Azero: Zero R Aone: One R Anegate: Negate R H: IsIntegralDomain R H0: Apart R TrivialApart0: TrivialApart R
PropHolds (1 <> 0)
rapply intdom_nontrivial.Qed.Endintegral_domain_props.(* Due to bug #2528 *)#[export]
Hint Extern6 (PropHolds (1 ≶ 0)) =>
eapply @intdom_nontrivial_apart : typeclass_instances.Sectionringmor_props.Context `{IsRing A} `{IsRing B} `{!IsSemiRingPreserving (f : A -> B)}.
A: Type Aplus: Plus A Amult: Mult A Azero: Zero A Aone: One A Anegate: Negate A H: IsRing A B: Type Aplus0: Plus B Amult0: Mult B Azero0: Zero B Aone0: One B Anegate0: Negate B H0: IsRing B f: A -> B IsSemiRingPreserving0: IsSemiRingPreserving
(f : A -> B) x: A
f (- x) = - f x
A: Type Aplus: Plus A Amult: Mult A Azero: Zero A Aone: One A Anegate: Negate A H: IsRing A B: Type Aplus0: Plus B Amult0: Mult B Azero0: Zero B Aone0: One B Anegate0: Negate B H0: IsRing B f: A -> B IsSemiRingPreserving0: IsSemiRingPreserving
(f : A -> B) x: A
f (- x) = - f x
rapply preserves_inverse.Defined.
A: Type Aplus: Plus A Amult: Mult A Azero: Zero A Aone: One A Anegate: Negate A H: IsRing A B: Type Aplus0: Plus B Amult0: Mult B Azero0: Zero B Aone0: One B Anegate0: Negate B H0: IsRing B f: A -> B IsSemiRingPreserving0: IsSemiRingPreserving
(f : A -> B) x, y: A
f (x - y) = f x - f y
A: Type Aplus: Plus A Amult: Mult A Azero: Zero A Aone: One A Anegate: Negate A H: IsRing A B: Type Aplus0: Plus B Amult0: Mult B Azero0: Zero B Aone0: One B Anegate0: Negate B H0: IsRing B f: A -> B IsSemiRingPreserving0: IsSemiRingPreserving
(f : A -> B) x, y: A
f (x - y) = f x - f y
A: Type Aplus: Plus A Amult: Mult A Azero: Zero A Aone: One A Anegate: Negate A H: IsRing A B: Type Aplus0: Plus B Amult0: Mult B Azero0: Zero B Aone0: One B Anegate0: Negate B H0: IsRing B f: A -> B IsSemiRingPreserving0: IsSemiRingPreserving
(f : A -> B) x, y: A
f (x - y) = f x + f (- y)
apply preserves_plus.Qed.
A: Type Aplus: Plus A Amult: Mult A Azero: Zero A Aone: One A Anegate: Negate A H: IsRing A B: Type Aplus0: Plus B Amult0: Mult B Azero0: Zero B Aone0: One B Anegate0: Negate B H0: IsRing B f: A -> B IsSemiRingPreserving0: IsSemiRingPreserving
(f : A -> B)
(forallx : A, f x = 0 -> x = 0) -> IsInjective f
A: Type Aplus: Plus A Amult: Mult A Azero: Zero A Aone: One A Anegate: Negate A H: IsRing A B: Type Aplus0: Plus B Amult0: Mult B Azero0: Zero B Aone0: One B Anegate0: Negate B H0: IsRing B f: A -> B IsSemiRingPreserving0: IsSemiRingPreserving
(f : A -> B)
(forallx : A, f x = 0 -> x = 0) -> IsInjective f
A: Type Aplus: Plus A Amult: Mult A Azero: Zero A Aone: One A Anegate: Negate A H: IsRing A B: Type Aplus0: Plus B Amult0: Mult B Azero0: Zero B Aone0: One B Anegate0: Negate B H0: IsRing B f: A -> B IsSemiRingPreserving0: IsSemiRingPreserving
(f : A -> B) E1: forallx : A, f x = 0 -> x = 0 x, y: A E: f x = f y
x = y
A: Type Aplus: Plus A Amult: Mult A Azero: Zero A Aone: One A Anegate: Negate A H: IsRing A B: Type Aplus0: Plus B Amult0: Mult B Azero0: Zero B Aone0: One B Anegate0: Negate B H0: IsRing B f: A -> B IsSemiRingPreserving0: IsSemiRingPreserving
(f : A -> B) E1: forallx : A, f x = 0 -> x = 0 x, y: A E: f x = f y
x - y = 0
A: Type Aplus: Plus A Amult: Mult A Azero: Zero A Aone: One A Anegate: Negate A H: IsRing A B: Type Aplus0: Plus B Amult0: Mult B Azero0: Zero B Aone0: One B Anegate0: Negate B H0: IsRing B f: A -> B IsSemiRingPreserving0: IsSemiRingPreserving
(f : A -> B) E1: forallx : A, f x = 0 -> x = 0 x, y: A E: f x = f y
f (x - y) = 0
A: Type Aplus: Plus A Amult: Mult A Azero: Zero A Aone: One A Anegate: Negate A H: IsRing A B: Type Aplus0: Plus B Amult0: Mult B Azero0: Zero B Aone0: One B Anegate0: Negate B H0: IsRing B f: A -> B IsSemiRingPreserving0: IsSemiRingPreserving
(f : A -> B) E1: forallx : A, f x = 0 -> x = 0 x, y: A E: f x = f y
f y - f y = 0
apply right_inverse.Qed.Endringmor_props.Sectionfrom_another_ring.Context `{IsCRing A} `{IsHSet B}
`{Bplus : Plus B} `{Zero B} `{Bmult : Mult B} `{One B} `{Bnegate : Negate B}
(f : B -> A) `{!IsInjective f}
(plus_correct : forallxy, f (x + y) = f x + f y) (zero_correct : f 0 = 0)
(mult_correct : forallxy, f (x * y) = f x * f y) (one_correct : f 1 = 1)
(negate_correct : forallx, f (-x) = -f x).
A: Type Aplus: Plus A Amult: Mult A Azero: Zero A Aone: One A Anegate: Negate A H: IsCRing A B: Type IsHSet0: IsHSet B Bplus: Plus B H0: Zero B Bmult: Mult B H1: One B Bnegate: Negate B f: B -> A IsInjective0: IsInjective f plus_correct: forallxy : B, f (x + y) = f x + f y zero_correct: f 0 = 0 mult_correct: forallxy : B, f (x * y) = f x * f y one_correct: f 1 = 1 negate_correct: forallx : B, f (- x) = - f x
IsCRing B
A: Type Aplus: Plus A Amult: Mult A Azero: Zero A Aone: One A Anegate: Negate A H: IsCRing A B: Type IsHSet0: IsHSet B Bplus: Plus B H0: Zero B Bmult: Mult B H1: One B Bnegate: Negate B f: B -> A IsInjective0: IsInjective f plus_correct: forallxy : B, f (x + y) = f x + f y zero_correct: f 0 = 0 mult_correct: forallxy : B, f (x * y) = f x * f y one_correct: f 1 = 1 negate_correct: forallx : B, f (- x) = - f x
IsCRing B
A: Type Aplus: Plus A Amult: Mult A Azero: Zero A Aone: One A Anegate: Negate A H: IsCRing A B: Type IsHSet0: IsHSet B Bplus: Plus B H0: Zero B Bmult: Mult B H1: One B Bnegate: Negate B f: B -> A IsInjective0: IsInjective f plus_correct: forallxy : B, f (x + y) = f x + f y zero_correct: f 0 = 0 mult_correct: forallxy : B, f (x * y) = f x * f y one_correct: f 1 = 1 negate_correct: forallx : B, f (- x) = - f x
IsAbGroup B
A: Type Aplus: Plus A Amult: Mult A Azero: Zero A Aone: One A Anegate: Negate A H: IsCRing A B: Type IsHSet0: IsHSet B Bplus: Plus B H0: Zero B Bmult: Mult B H1: One B Bnegate: Negate B f: B -> A IsInjective0: IsInjective f plus_correct: forallxy : B, f (x + y) = f x + f y zero_correct: f 0 = 0 mult_correct: forallxy : B, f (x * y) = f x * f y one_correct: f 1 = 1 negate_correct: forallx : B, f (- x) = - f x
IsCommutativeMonoid B
A: Type Aplus: Plus A Amult: Mult A Azero: Zero A Aone: One A Anegate: Negate A H: IsCRing A B: Type IsHSet0: IsHSet B Bplus: Plus B H0: Zero B Bmult: Mult B H1: One B Bnegate: Negate B f: B -> A IsInjective0: IsInjective f plus_correct: forallxy : B, f (x + y) = f x + f y zero_correct: f 0 = 0 mult_correct: forallxy : B, f (x * y) = f x * f y one_correct: f 1 = 1 negate_correct: forallx : B, f (- x) = - f x
LeftDistribute mult plus
A: Type Aplus: Plus A Amult: Mult A Azero: Zero A Aone: One A Anegate: Negate A H: IsCRing A B: Type IsHSet0: IsHSet B Bplus: Plus B H0: Zero B Bmult: Mult B H1: One B Bnegate: Negate B f: B -> A IsInjective0: IsInjective f plus_correct: forallxy : B, f (x + y) = f x + f y zero_correct: f 0 = 0 mult_correct: forallxy : B, f (x * y) = f x * f y one_correct: f 1 = 1 negate_correct: forallx : B, f (- x) = - f x
IsAbGroup B
apply (groups.projected_ab_group f);assumption.
A: Type Aplus: Plus A Amult: Mult A Azero: Zero A Aone: One A Anegate: Negate A H: IsCRing A B: Type IsHSet0: IsHSet B Bplus: Plus B H0: Zero B Bmult: Mult B H1: One B Bnegate: Negate B f: B -> A IsInjective0: IsInjective f plus_correct: forallxy : B, f (x + y) = f x + f y zero_correct: f 0 = 0 mult_correct: forallxy : B, f (x * y) = f x * f y one_correct: f 1 = 1 negate_correct: forallx : B, f (- x) = - f x
IsCommutativeMonoid B
exact (groups.projected_com_monoid f mult_correct one_correct);assumption.
A: Type Aplus: Plus A Amult: Mult A Azero: Zero A Aone: One A Anegate: Negate A H: IsCRing A B: Type IsHSet0: IsHSet B Bplus: Plus B H0: Zero B Bmult: Mult B H1: One B Bnegate: Negate B f: B -> A IsInjective0: IsInjective f plus_correct: forallxy : B, f (x + y) = f x + f y zero_correct: f 0 = 0 mult_correct: forallxy : B, f (x * y) = f x * f y one_correct: f 1 = 1 negate_correct: forallx : B, f (- x) = - f x
LeftDistribute mult plus
A: Type Aplus: Plus A Amult: Mult A Azero: Zero A Aone: One A Anegate: Negate A H: IsCRing A B: Type IsHSet0: IsHSet B Bplus: Plus B H0: Zero B Bmult: Mult B H1: One B Bnegate: Negate B f: B -> A IsInjective0: IsInjective f plus_correct: forallxy : B, f (x + y) = f x + f y zero_correct: f 0 = 0 mult_correct: forallxy : B, f (x * y) = f x * f y one_correct: f 1 = 1 negate_correct: forallx : B, f (- x) = - f x a, b, c: B
f (a * (b + c)) = f (a * b + a * c)
A: Type Aplus: Plus A Amult: Mult A Azero: Zero A Aone: One A Anegate: Negate A H: IsCRing A B: Type IsHSet0: IsHSet B Bplus: Plus B H0: Zero B Bmult: Mult B H1: One B Bnegate: Negate B f: B -> A IsInjective0: IsInjective f plus_correct: forallxy : B, f (x + y) = f x + f y zero_correct: f 0 = 0 mult_correct: forallxy : B, f (x * y) = f x * f y one_correct: f 1 = 1 negate_correct: forallx : B, f (- x) = - f x a, b, c: B
f a * (f b + f c) = f a * f b + f a * f c
apply distribute_l.Qed.Endfrom_another_ring.(* Section from_stdlib_semiring_theory. Context `(H: @semi_ring_theory R Rzero Rone Rplus Rmult Re) `{!@Setoid R Re} `{!Proper (Re ==> Re ==> Re) Rplus} `{!Proper (Re ==> Re ==> Re) Rmult}. Add Ring R2: H. Definition from_stdlib_semiring_theory: @SemiRing R Re Rplus Rmult Rzero Rone. Proof. repeat (constructor; try assumption); repeat intro ; unfold equiv, mon_unit, sg_op, zero_is_mon_unit, plus_is_sg_op, one_is_mon_unit, mult_is_sg_op, zero, mult, plus; ring. Qed.End from_stdlib_semiring_theory.Section from_stdlib_ring_theory. Context `(H: @ring_theory R Rzero Rone Rplus Rmult Rminus Rnegate Re) `{!@Setoid R Re} `{!Proper (Re ==> Re ==> Re) Rplus} `{!Proper (Re ==> Re ==> Re) Rmult} `{!Proper (Re ==> Re) Rnegate}. Add Ring R3: H. Definition from_stdlib_ring_theory: @Ring R Re Rplus Rmult Rzero Rone Rnegate. Proof. repeat (constructor; try assumption); repeat intro ; unfold equiv, mon_unit, sg_op, zero_is_mon_unit, plus_is_sg_op, one_is_mon_unit, mult_is_sg_op, mult, plus, negate; ring. Qed.End from_stdlib_ring_theory. *)Instanceid_sr_morphism `{IsSemiCRing A}: IsSemiRingPreserving (@id A) := {}.Sectionmorphism_composition.Context `{Mult A} `{Plus A} `{One A} `{Zero A}
`{Mult B} `{Plus B} `{One B} `{Zero B}
`{Mult C} `{Plus C} `{One C} `{Zero C}
(f : A -> B) (g : B -> C).
A: Type H: Mult A H0: Plus A H1: One A H2: Zero A B: Type H3: Mult B H4: Plus B H5: One B H6: Zero B C: Type H7: Mult C H8: Plus C H9: One C H10: Zero C f: A -> B g: B -> C
IsSemiRingPreserving f ->
IsSemiRingPreserving g -> IsSemiRingPreserving (g ∘ f)
A: Type H: Mult A H0: Plus A H1: One A H2: Zero A B: Type H3: Mult B H4: Plus B H5: One B H6: Zero B C: Type H7: Mult C H8: Plus C H9: One C H10: Zero C f: A -> B g: B -> C
IsSemiRingPreserving f ->
IsSemiRingPreserving g -> IsSemiRingPreserving (g ∘ f)
split; exact _.Qed.
A: Type H: Mult A H0: Plus A H1: One A H2: Zero A B: Type H3: Mult B H4: Plus B H5: One B H6: Zero B C: Type H7: Mult C H8: Plus C H9: One C H10: Zero C f: A -> B g: B -> C
forallIsEquiv0 : IsEquiv f,
IsSemiRingPreserving f -> IsSemiRingPreserving f^-1
A: Type H: Mult A H0: Plus A H1: One A H2: Zero A B: Type H3: Mult B H4: Plus B H5: One B H6: Zero B C: Type H7: Mult C H8: Plus C H9: One C H10: Zero C f: A -> B g: B -> C
forallIsEquiv0 : IsEquiv f,
IsSemiRingPreserving f -> IsSemiRingPreserving f^-1