algebra.punit_instances
⟷
Mathlib.Algebra.PUnitInstances
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kenny Lau
-/
import Algebra.Module.Basic
-import Algebra.GcdMonoid.Basic
+import Algebra.GCDMonoid.Basic
import Algebra.GroupRingAction.Basic
import GroupTheory.GroupAction.Defs
import Order.CompleteBooleanAlgebra
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -115,7 +115,7 @@ theorem norm_unit_eq : normUnit x = 1 :=
#align punit.norm_unit_eq PUnit.norm_unit_eq
-/
-instance : CanonicallyOrderedAddMonoid PUnit := by
+instance : CanonicallyOrderedAddCommMonoid PUnit := by
refine'
{ PUnit.commRing, PUnit.completeBooleanAlgebra with
exists_add_of_le := fun _ _ _ => ⟨star, Subsingleton.elim _ _⟩ .. } <;>
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,11 +3,11 @@ Copyright (c) 2019 Kenny Lau. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kenny Lau
-/
-import Mathbin.Algebra.Module.Basic
-import Mathbin.Algebra.GcdMonoid.Basic
-import Mathbin.Algebra.GroupRingAction.Basic
-import Mathbin.GroupTheory.GroupAction.Defs
-import Mathbin.Order.CompleteBooleanAlgebra
+import Algebra.Module.Basic
+import Algebra.GcdMonoid.Basic
+import Algebra.GroupRingAction.Basic
+import GroupTheory.GroupAction.Defs
+import Order.CompleteBooleanAlgebra
#align_import algebra.punit_instances from "leanprover-community/mathlib"@"be24ec5de6701447e5df5ca75400ffee19d65659"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,11 +2,6 @@
Copyright (c) 2019 Kenny Lau. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kenny Lau
-
-! This file was ported from Lean 3 source module algebra.punit_instances
-! leanprover-community/mathlib commit be24ec5de6701447e5df5ca75400ffee19d65659
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Algebra.Module.Basic
import Mathbin.Algebra.GcdMonoid.Basic
@@ -14,6 +9,8 @@ import Mathbin.Algebra.GroupRingAction.Basic
import Mathbin.GroupTheory.GroupAction.Defs
import Mathbin.Order.CompleteBooleanAlgebra
+#align_import algebra.punit_instances from "leanprover-community/mathlib"@"be24ec5de6701447e5df5ca75400ffee19d65659"
+
/-!
# Instances on punit
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -43,31 +43,39 @@ instance : CommGroup PUnit := by
intros <;>
exact Subsingleton.elim _ _
+#print PUnit.one_eq /-
@[simp, to_additive]
theorem one_eq : (1 : PUnit) = unit :=
rfl
#align punit.one_eq PUnit.one_eq
#align punit.zero_eq PUnit.zero_eq
+-/
+#print PUnit.mul_eq /-
@[simp, to_additive]
theorem mul_eq : x * y = unit :=
rfl
#align punit.mul_eq PUnit.mul_eq
#align punit.add_eq PUnit.add_eq
+-/
+#print PUnit.div_eq /-
-- `sub_eq` simplifies `punit.sub_eq`, but the latter is eligible for `dsimp`
@[simp, nolint simp_nf, to_additive]
theorem div_eq : x / y = unit :=
rfl
#align punit.div_eq PUnit.div_eq
#align punit.sub_eq PUnit.sub_eq
+-/
+#print PUnit.inv_eq /-
-- `neg_eq` simplifies `punit.neg_eq`, but the latter is eligible for `dsimp`
@[simp, nolint simp_nf, to_additive]
theorem inv_eq : x⁻¹ = unit :=
rfl
#align punit.inv_eq PUnit.inv_eq
#align punit.neg_eq PUnit.neg_eq
+-/
instance : CommRing PUnit := by
refine' { PUnit.commGroup, PUnit.addCommGroup with natCast := fun _ => PUnit.unit .. } <;>
@@ -89,20 +97,26 @@ instance : NormalizedGCDMonoid PUnit := by
intros <;>
exact Subsingleton.elim _ _
+#print PUnit.gcd_eq /-
@[simp]
theorem gcd_eq : gcd x y = unit :=
rfl
#align punit.gcd_eq PUnit.gcd_eq
+-/
+#print PUnit.lcm_eq /-
@[simp]
theorem lcm_eq : lcm x y = unit :=
rfl
#align punit.lcm_eq PUnit.lcm_eq
+-/
+#print PUnit.norm_unit_eq /-
@[simp]
theorem norm_unit_eq : normUnit x = 1 :=
rfl
#align punit.norm_unit_eq PUnit.norm_unit_eq
+-/
instance : CanonicallyOrderedAddMonoid PUnit := by
refine'
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -39,7 +39,7 @@ instance : CommGroup PUnit := by
inv := fun _ => star
div := fun _ _ => star
npow := fun _ _ => star
- zpow := fun _ _ => star.. } <;>
+ zpow := fun _ _ => star .. } <;>
intros <;>
exact Subsingleton.elim _ _
@@ -70,7 +70,7 @@ theorem inv_eq : x⁻¹ = unit :=
#align punit.neg_eq PUnit.neg_eq
instance : CommRing PUnit := by
- refine' { PUnit.commGroup, PUnit.addCommGroup with natCast := fun _ => PUnit.unit.. } <;>
+ refine' { PUnit.commGroup, PUnit.addCommGroup with natCast := fun _ => PUnit.unit .. } <;>
intros <;>
exact Subsingleton.elim _ _
@@ -85,7 +85,7 @@ instance : NormalizedGCDMonoid PUnit := by
gcd_dvd_left := fun _ _ => ⟨star, Subsingleton.elim _ _⟩
gcd_dvd_right := fun _ _ => ⟨star, Subsingleton.elim _ _⟩
dvd_gcd := fun _ _ _ _ _ => ⟨star, Subsingleton.elim _ _⟩
- gcd_mul_lcm := fun _ _ => ⟨1, Subsingleton.elim _ _⟩.. } <;>
+ gcd_mul_lcm := fun _ _ => ⟨1, Subsingleton.elim _ _⟩ .. } <;>
intros <;>
exact Subsingleton.elim _ _
@@ -107,7 +107,7 @@ theorem norm_unit_eq : normUnit x = 1 :=
instance : CanonicallyOrderedAddMonoid PUnit := by
refine'
{ PUnit.commRing, PUnit.completeBooleanAlgebra with
- exists_add_of_le := fun _ _ _ => ⟨star, Subsingleton.elim _ _⟩.. } <;>
+ exists_add_of_le := fun _ _ _ => ⟨star, Subsingleton.elim _ _⟩ .. } <;>
intros <;>
trivial
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -43,36 +43,18 @@ instance : CommGroup PUnit := by
intros <;>
exact Subsingleton.elim _ _
-/- warning: punit.one_eq -> PUnit.one_eq is a dubious translation:
-lean 3 declaration is
- Eq.{succ u_1} PUnit.{succ u_1} (OfNat.ofNat.{u_1} PUnit.{succ u_1} 1 (OfNat.mk.{u_1} PUnit.{succ u_1} 1 (One.one.{u_1} PUnit.{succ u_1} (MulOneClass.toHasOne.{u_1} PUnit.{succ u_1} (Monoid.toMulOneClass.{u_1} PUnit.{succ u_1} (DivInvMonoid.toMonoid.{u_1} PUnit.{succ u_1} (Group.toDivInvMonoid.{u_1} PUnit.{succ u_1} (CommGroup.toGroup.{u_1} PUnit.{succ u_1} PUnit.commGroup.{u_1})))))))) PUnit.unit.{succ u_1}
-but is expected to have type
- Eq.{1} PUnit.{1} (OfNat.ofNat.{0} PUnit.{1} 1 (One.toOfNat1.{0} PUnit.{1} PUnit.instOnePUnit)) PUnit.unit.{1}
-Case conversion may be inaccurate. Consider using '#align punit.one_eq PUnit.one_eqₓ'. -/
@[simp, to_additive]
theorem one_eq : (1 : PUnit) = unit :=
rfl
#align punit.one_eq PUnit.one_eq
#align punit.zero_eq PUnit.zero_eq
-/- warning: punit.mul_eq -> PUnit.mul_eq is a dubious translation:
-lean 3 declaration is
- forall (x : PUnit.{succ u}) (y : PUnit.{succ u}), Eq.{succ u} PUnit.{succ u} (HMul.hMul.{u, u, u} PUnit.{succ u} PUnit.{succ u} PUnit.{succ u} (instHMul.{u} PUnit.{succ u} (MulOneClass.toHasMul.{u} PUnit.{succ u} (Monoid.toMulOneClass.{u} PUnit.{succ u} (DivInvMonoid.toMonoid.{u} PUnit.{succ u} (Group.toDivInvMonoid.{u} PUnit.{succ u} (CommGroup.toGroup.{u} PUnit.{succ u} PUnit.commGroup.{u})))))) x y) PUnit.unit.{succ u}
-but is expected to have type
- forall {x : PUnit.{1}} {y : PUnit.{1}}, Eq.{1} PUnit.{1} (HMul.hMul.{0, 0, 0} PUnit.{1} PUnit.{1} PUnit.{1} (instHMul.{0} PUnit.{1} PUnit.instMulPUnit) x y) PUnit.unit.{1}
-Case conversion may be inaccurate. Consider using '#align punit.mul_eq PUnit.mul_eqₓ'. -/
@[simp, to_additive]
theorem mul_eq : x * y = unit :=
rfl
#align punit.mul_eq PUnit.mul_eq
#align punit.add_eq PUnit.add_eq
-/- warning: punit.div_eq -> PUnit.div_eq is a dubious translation:
-lean 3 declaration is
- forall (x : PUnit.{succ u}) (y : PUnit.{succ u}), Eq.{succ u} PUnit.{succ u} (HDiv.hDiv.{u, u, u} PUnit.{succ u} PUnit.{succ u} PUnit.{succ u} (instHDiv.{u} PUnit.{succ u} (DivInvMonoid.toHasDiv.{u} PUnit.{succ u} (Group.toDivInvMonoid.{u} PUnit.{succ u} (CommGroup.toGroup.{u} PUnit.{succ u} PUnit.commGroup.{u})))) x y) PUnit.unit.{succ u}
-but is expected to have type
- forall {x : PUnit.{1}} {y : PUnit.{1}}, Eq.{1} PUnit.{1} (HDiv.hDiv.{0, 0, 0} PUnit.{1} PUnit.{1} PUnit.{1} (instHDiv.{0} PUnit.{1} PUnit.instDivPUnit) x y) PUnit.unit.{1}
-Case conversion may be inaccurate. Consider using '#align punit.div_eq PUnit.div_eqₓ'. -/
-- `sub_eq` simplifies `punit.sub_eq`, but the latter is eligible for `dsimp`
@[simp, nolint simp_nf, to_additive]
theorem div_eq : x / y = unit :=
@@ -80,12 +62,6 @@ theorem div_eq : x / y = unit :=
#align punit.div_eq PUnit.div_eq
#align punit.sub_eq PUnit.sub_eq
-/- warning: punit.inv_eq -> PUnit.inv_eq is a dubious translation:
-lean 3 declaration is
- forall (x : PUnit.{succ u}), Eq.{succ u} PUnit.{succ u} (Inv.inv.{u} PUnit.{succ u} (DivInvMonoid.toHasInv.{u} PUnit.{succ u} (Group.toDivInvMonoid.{u} PUnit.{succ u} (CommGroup.toGroup.{u} PUnit.{succ u} PUnit.commGroup.{u}))) x) PUnit.unit.{succ u}
-but is expected to have type
- forall {x : PUnit.{1}}, Eq.{1} PUnit.{1} (Inv.inv.{0} PUnit.{1} PUnit.instInvPUnit x) PUnit.unit.{1}
-Case conversion may be inaccurate. Consider using '#align punit.inv_eq PUnit.inv_eqₓ'. -/
-- `neg_eq` simplifies `punit.neg_eq`, but the latter is eligible for `dsimp`
@[simp, nolint simp_nf, to_additive]
theorem inv_eq : x⁻¹ = unit :=
@@ -113,34 +89,16 @@ instance : NormalizedGCDMonoid PUnit := by
intros <;>
exact Subsingleton.elim _ _
-/- warning: punit.gcd_eq -> PUnit.gcd_eq is a dubious translation:
-lean 3 declaration is
- forall (x : PUnit.{succ u}) (y : PUnit.{succ u}), Eq.{succ u} PUnit.{succ u} (GCDMonoid.gcd.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u} (NormalizedGCDMonoid.toGcdMonoid.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u} PUnit.normalizedGcdMonoid.{u}) x y) PUnit.unit.{succ u}
-but is expected to have type
- forall {x : PUnit.{1}} {y : PUnit.{1}}, Eq.{1} PUnit.{1} (GCDMonoid.gcd.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero (NormalizedGCDMonoid.toGCDMonoid.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero PUnit.normalizedGCDMonoid) x y) PUnit.unit.{1}
-Case conversion may be inaccurate. Consider using '#align punit.gcd_eq PUnit.gcd_eqₓ'. -/
@[simp]
theorem gcd_eq : gcd x y = unit :=
rfl
#align punit.gcd_eq PUnit.gcd_eq
-/- warning: punit.lcm_eq -> PUnit.lcm_eq is a dubious translation:
-lean 3 declaration is
- forall (x : PUnit.{succ u}) (y : PUnit.{succ u}), Eq.{succ u} PUnit.{succ u} (GCDMonoid.lcm.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u} (NormalizedGCDMonoid.toGcdMonoid.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u} PUnit.normalizedGcdMonoid.{u}) x y) PUnit.unit.{succ u}
-but is expected to have type
- forall {x : PUnit.{1}} {y : PUnit.{1}}, Eq.{1} PUnit.{1} (GCDMonoid.lcm.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero (NormalizedGCDMonoid.toGCDMonoid.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero PUnit.normalizedGCDMonoid) x y) PUnit.unit.{1}
-Case conversion may be inaccurate. Consider using '#align punit.lcm_eq PUnit.lcm_eqₓ'. -/
@[simp]
theorem lcm_eq : lcm x y = unit :=
rfl
#align punit.lcm_eq PUnit.lcm_eq
-/- warning: punit.norm_unit_eq -> PUnit.norm_unit_eq is a dubious translation:
-lean 3 declaration is
- forall (x : PUnit.{succ u}), Eq.{succ u} (Units.{u} PUnit.{succ u} (MonoidWithZero.toMonoid.{u} PUnit.{succ u} (CommMonoidWithZero.toMonoidWithZero.{u} PUnit.{succ u} (CancelCommMonoidWithZero.toCommMonoidWithZero.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u})))) (NormalizationMonoid.normUnit.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u} (normalizationMonoidOfUniqueUnits.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u} (Units.unique.{u} PUnit.{succ u} (MonoidWithZero.toMonoid.{u} PUnit.{succ u} (CommMonoidWithZero.toMonoidWithZero.{u} PUnit.{succ u} (CancelCommMonoidWithZero.toCommMonoidWithZero.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u}))) PUnit.subsingleton.{succ u})) x) (OfNat.ofNat.{u} (Units.{u} PUnit.{succ u} (MonoidWithZero.toMonoid.{u} PUnit.{succ u} (CommMonoidWithZero.toMonoidWithZero.{u} PUnit.{succ u} (CancelCommMonoidWithZero.toCommMonoidWithZero.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u})))) 1 (OfNat.mk.{u} (Units.{u} PUnit.{succ u} (MonoidWithZero.toMonoid.{u} PUnit.{succ u} (CommMonoidWithZero.toMonoidWithZero.{u} PUnit.{succ u} (CancelCommMonoidWithZero.toCommMonoidWithZero.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u})))) 1 (One.one.{u} (Units.{u} PUnit.{succ u} (MonoidWithZero.toMonoid.{u} PUnit.{succ u} (CommMonoidWithZero.toMonoidWithZero.{u} PUnit.{succ u} (CancelCommMonoidWithZero.toCommMonoidWithZero.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u})))) (MulOneClass.toHasOne.{u} (Units.{u} PUnit.{succ u} (MonoidWithZero.toMonoid.{u} PUnit.{succ u} (CommMonoidWithZero.toMonoidWithZero.{u} PUnit.{succ u} (CancelCommMonoidWithZero.toCommMonoidWithZero.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u})))) (Units.mulOneClass.{u} PUnit.{succ u} (MonoidWithZero.toMonoid.{u} PUnit.{succ u} (CommMonoidWithZero.toMonoidWithZero.{u} PUnit.{succ u} (CancelCommMonoidWithZero.toCommMonoidWithZero.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u}))))))))
-but is expected to have type
- forall {x : PUnit.{1}}, Eq.{1} (Units.{0} PUnit.{1} (MonoidWithZero.toMonoid.{0} PUnit.{1} (CommMonoidWithZero.toMonoidWithZero.{0} PUnit.{1} (CancelCommMonoidWithZero.toCommMonoidWithZero.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero)))) (NormalizationMonoid.normUnit.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero (NormalizedGCDMonoid.toNormalizationMonoid.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero PUnit.normalizedGCDMonoid) x) (OfNat.ofNat.{0} (Units.{0} PUnit.{1} (MonoidWithZero.toMonoid.{0} PUnit.{1} (CommMonoidWithZero.toMonoidWithZero.{0} PUnit.{1} (CancelCommMonoidWithZero.toCommMonoidWithZero.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero)))) 1 (One.toOfNat1.{0} (Units.{0} PUnit.{1} (MonoidWithZero.toMonoid.{0} PUnit.{1} (CommMonoidWithZero.toMonoidWithZero.{0} PUnit.{1} (CancelCommMonoidWithZero.toCommMonoidWithZero.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero)))) (InvOneClass.toOne.{0} (Units.{0} PUnit.{1} (MonoidWithZero.toMonoid.{0} PUnit.{1} (CommMonoidWithZero.toMonoidWithZero.{0} PUnit.{1} (CancelCommMonoidWithZero.toCommMonoidWithZero.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero)))) (DivInvOneMonoid.toInvOneClass.{0} (Units.{0} PUnit.{1} (MonoidWithZero.toMonoid.{0} PUnit.{1} (CommMonoidWithZero.toMonoidWithZero.{0} PUnit.{1} (CancelCommMonoidWithZero.toCommMonoidWithZero.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero)))) (DivisionMonoid.toDivInvOneMonoid.{0} (Units.{0} PUnit.{1} (MonoidWithZero.toMonoid.{0} PUnit.{1} (CommMonoidWithZero.toMonoidWithZero.{0} PUnit.{1} (CancelCommMonoidWithZero.toCommMonoidWithZero.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero)))) (DivisionCommMonoid.toDivisionMonoid.{0} (Units.{0} PUnit.{1} (MonoidWithZero.toMonoid.{0} PUnit.{1} (CommMonoidWithZero.toMonoidWithZero.{0} PUnit.{1} (CancelCommMonoidWithZero.toCommMonoidWithZero.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero)))) (CommGroup.toDivisionCommMonoid.{0} (Units.{0} PUnit.{1} (MonoidWithZero.toMonoid.{0} PUnit.{1} (CommMonoidWithZero.toMonoidWithZero.{0} PUnit.{1} (CancelCommMonoidWithZero.toCommMonoidWithZero.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero)))) (Units.instCommGroupUnitsToMonoid.{0} PUnit.{1} (CommRing.toCommMonoid.{0} PUnit.{1} PUnit.commRing.{0})))))))))
-Case conversion may be inaccurate. Consider using '#align punit.norm_unit_eq PUnit.norm_unit_eqₓ'. -/
@[simp]
theorem norm_unit_eq : normUnit x = 1 :=
rfl
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -43,39 +43,55 @@ instance : CommGroup PUnit := by
intros <;>
exact Subsingleton.elim _ _
-#print PUnit.one_eq /-
+/- warning: punit.one_eq -> PUnit.one_eq is a dubious translation:
+lean 3 declaration is
+ Eq.{succ u_1} PUnit.{succ u_1} (OfNat.ofNat.{u_1} PUnit.{succ u_1} 1 (OfNat.mk.{u_1} PUnit.{succ u_1} 1 (One.one.{u_1} PUnit.{succ u_1} (MulOneClass.toHasOne.{u_1} PUnit.{succ u_1} (Monoid.toMulOneClass.{u_1} PUnit.{succ u_1} (DivInvMonoid.toMonoid.{u_1} PUnit.{succ u_1} (Group.toDivInvMonoid.{u_1} PUnit.{succ u_1} (CommGroup.toGroup.{u_1} PUnit.{succ u_1} PUnit.commGroup.{u_1})))))))) PUnit.unit.{succ u_1}
+but is expected to have type
+ Eq.{1} PUnit.{1} (OfNat.ofNat.{0} PUnit.{1} 1 (One.toOfNat1.{0} PUnit.{1} PUnit.instOnePUnit)) PUnit.unit.{1}
+Case conversion may be inaccurate. Consider using '#align punit.one_eq PUnit.one_eqₓ'. -/
@[simp, to_additive]
theorem one_eq : (1 : PUnit) = unit :=
rfl
#align punit.one_eq PUnit.one_eq
#align punit.zero_eq PUnit.zero_eq
--/
-#print PUnit.mul_eq /-
+/- warning: punit.mul_eq -> PUnit.mul_eq is a dubious translation:
+lean 3 declaration is
+ forall (x : PUnit.{succ u}) (y : PUnit.{succ u}), Eq.{succ u} PUnit.{succ u} (HMul.hMul.{u, u, u} PUnit.{succ u} PUnit.{succ u} PUnit.{succ u} (instHMul.{u} PUnit.{succ u} (MulOneClass.toHasMul.{u} PUnit.{succ u} (Monoid.toMulOneClass.{u} PUnit.{succ u} (DivInvMonoid.toMonoid.{u} PUnit.{succ u} (Group.toDivInvMonoid.{u} PUnit.{succ u} (CommGroup.toGroup.{u} PUnit.{succ u} PUnit.commGroup.{u})))))) x y) PUnit.unit.{succ u}
+but is expected to have type
+ forall {x : PUnit.{1}} {y : PUnit.{1}}, Eq.{1} PUnit.{1} (HMul.hMul.{0, 0, 0} PUnit.{1} PUnit.{1} PUnit.{1} (instHMul.{0} PUnit.{1} PUnit.instMulPUnit) x y) PUnit.unit.{1}
+Case conversion may be inaccurate. Consider using '#align punit.mul_eq PUnit.mul_eqₓ'. -/
@[simp, to_additive]
theorem mul_eq : x * y = unit :=
rfl
#align punit.mul_eq PUnit.mul_eq
#align punit.add_eq PUnit.add_eq
--/
-#print PUnit.div_eq /-
+/- warning: punit.div_eq -> PUnit.div_eq is a dubious translation:
+lean 3 declaration is
+ forall (x : PUnit.{succ u}) (y : PUnit.{succ u}), Eq.{succ u} PUnit.{succ u} (HDiv.hDiv.{u, u, u} PUnit.{succ u} PUnit.{succ u} PUnit.{succ u} (instHDiv.{u} PUnit.{succ u} (DivInvMonoid.toHasDiv.{u} PUnit.{succ u} (Group.toDivInvMonoid.{u} PUnit.{succ u} (CommGroup.toGroup.{u} PUnit.{succ u} PUnit.commGroup.{u})))) x y) PUnit.unit.{succ u}
+but is expected to have type
+ forall {x : PUnit.{1}} {y : PUnit.{1}}, Eq.{1} PUnit.{1} (HDiv.hDiv.{0, 0, 0} PUnit.{1} PUnit.{1} PUnit.{1} (instHDiv.{0} PUnit.{1} PUnit.instDivPUnit) x y) PUnit.unit.{1}
+Case conversion may be inaccurate. Consider using '#align punit.div_eq PUnit.div_eqₓ'. -/
-- `sub_eq` simplifies `punit.sub_eq`, but the latter is eligible for `dsimp`
@[simp, nolint simp_nf, to_additive]
theorem div_eq : x / y = unit :=
rfl
#align punit.div_eq PUnit.div_eq
#align punit.sub_eq PUnit.sub_eq
--/
-#print PUnit.inv_eq /-
+/- warning: punit.inv_eq -> PUnit.inv_eq is a dubious translation:
+lean 3 declaration is
+ forall (x : PUnit.{succ u}), Eq.{succ u} PUnit.{succ u} (Inv.inv.{u} PUnit.{succ u} (DivInvMonoid.toHasInv.{u} PUnit.{succ u} (Group.toDivInvMonoid.{u} PUnit.{succ u} (CommGroup.toGroup.{u} PUnit.{succ u} PUnit.commGroup.{u}))) x) PUnit.unit.{succ u}
+but is expected to have type
+ forall {x : PUnit.{1}}, Eq.{1} PUnit.{1} (Inv.inv.{0} PUnit.{1} PUnit.instInvPUnit x) PUnit.unit.{1}
+Case conversion may be inaccurate. Consider using '#align punit.inv_eq PUnit.inv_eqₓ'. -/
-- `neg_eq` simplifies `punit.neg_eq`, but the latter is eligible for `dsimp`
@[simp, nolint simp_nf, to_additive]
theorem inv_eq : x⁻¹ = unit :=
rfl
#align punit.inv_eq PUnit.inv_eq
#align punit.neg_eq PUnit.neg_eq
--/
instance : CommRing PUnit := by
refine' { PUnit.commGroup, PUnit.addCommGroup with natCast := fun _ => PUnit.unit.. } <;>
@@ -97,26 +113,38 @@ instance : NormalizedGCDMonoid PUnit := by
intros <;>
exact Subsingleton.elim _ _
-#print PUnit.gcd_eq /-
+/- warning: punit.gcd_eq -> PUnit.gcd_eq is a dubious translation:
+lean 3 declaration is
+ forall (x : PUnit.{succ u}) (y : PUnit.{succ u}), Eq.{succ u} PUnit.{succ u} (GCDMonoid.gcd.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u} (NormalizedGCDMonoid.toGcdMonoid.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u} PUnit.normalizedGcdMonoid.{u}) x y) PUnit.unit.{succ u}
+but is expected to have type
+ forall {x : PUnit.{1}} {y : PUnit.{1}}, Eq.{1} PUnit.{1} (GCDMonoid.gcd.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero (NormalizedGCDMonoid.toGCDMonoid.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero PUnit.normalizedGCDMonoid) x y) PUnit.unit.{1}
+Case conversion may be inaccurate. Consider using '#align punit.gcd_eq PUnit.gcd_eqₓ'. -/
@[simp]
theorem gcd_eq : gcd x y = unit :=
rfl
#align punit.gcd_eq PUnit.gcd_eq
--/
-#print PUnit.lcm_eq /-
+/- warning: punit.lcm_eq -> PUnit.lcm_eq is a dubious translation:
+lean 3 declaration is
+ forall (x : PUnit.{succ u}) (y : PUnit.{succ u}), Eq.{succ u} PUnit.{succ u} (GCDMonoid.lcm.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u} (NormalizedGCDMonoid.toGcdMonoid.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u} PUnit.normalizedGcdMonoid.{u}) x y) PUnit.unit.{succ u}
+but is expected to have type
+ forall {x : PUnit.{1}} {y : PUnit.{1}}, Eq.{1} PUnit.{1} (GCDMonoid.lcm.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero (NormalizedGCDMonoid.toGCDMonoid.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero PUnit.normalizedGCDMonoid) x y) PUnit.unit.{1}
+Case conversion may be inaccurate. Consider using '#align punit.lcm_eq PUnit.lcm_eqₓ'. -/
@[simp]
theorem lcm_eq : lcm x y = unit :=
rfl
#align punit.lcm_eq PUnit.lcm_eq
--/
-#print PUnit.norm_unit_eq /-
+/- warning: punit.norm_unit_eq -> PUnit.norm_unit_eq is a dubious translation:
+lean 3 declaration is
+ forall (x : PUnit.{succ u}), Eq.{succ u} (Units.{u} PUnit.{succ u} (MonoidWithZero.toMonoid.{u} PUnit.{succ u} (CommMonoidWithZero.toMonoidWithZero.{u} PUnit.{succ u} (CancelCommMonoidWithZero.toCommMonoidWithZero.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u})))) (NormalizationMonoid.normUnit.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u} (normalizationMonoidOfUniqueUnits.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u} (Units.unique.{u} PUnit.{succ u} (MonoidWithZero.toMonoid.{u} PUnit.{succ u} (CommMonoidWithZero.toMonoidWithZero.{u} PUnit.{succ u} (CancelCommMonoidWithZero.toCommMonoidWithZero.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u}))) PUnit.subsingleton.{succ u})) x) (OfNat.ofNat.{u} (Units.{u} PUnit.{succ u} (MonoidWithZero.toMonoid.{u} PUnit.{succ u} (CommMonoidWithZero.toMonoidWithZero.{u} PUnit.{succ u} (CancelCommMonoidWithZero.toCommMonoidWithZero.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u})))) 1 (OfNat.mk.{u} (Units.{u} PUnit.{succ u} (MonoidWithZero.toMonoid.{u} PUnit.{succ u} (CommMonoidWithZero.toMonoidWithZero.{u} PUnit.{succ u} (CancelCommMonoidWithZero.toCommMonoidWithZero.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u})))) 1 (One.one.{u} (Units.{u} PUnit.{succ u} (MonoidWithZero.toMonoid.{u} PUnit.{succ u} (CommMonoidWithZero.toMonoidWithZero.{u} PUnit.{succ u} (CancelCommMonoidWithZero.toCommMonoidWithZero.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u})))) (MulOneClass.toHasOne.{u} (Units.{u} PUnit.{succ u} (MonoidWithZero.toMonoid.{u} PUnit.{succ u} (CommMonoidWithZero.toMonoidWithZero.{u} PUnit.{succ u} (CancelCommMonoidWithZero.toCommMonoidWithZero.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u})))) (Units.mulOneClass.{u} PUnit.{succ u} (MonoidWithZero.toMonoid.{u} PUnit.{succ u} (CommMonoidWithZero.toMonoidWithZero.{u} PUnit.{succ u} (CancelCommMonoidWithZero.toCommMonoidWithZero.{u} PUnit.{succ u} PUnit.cancelCommMonoidWithZero.{u}))))))))
+but is expected to have type
+ forall {x : PUnit.{1}}, Eq.{1} (Units.{0} PUnit.{1} (MonoidWithZero.toMonoid.{0} PUnit.{1} (CommMonoidWithZero.toMonoidWithZero.{0} PUnit.{1} (CancelCommMonoidWithZero.toCommMonoidWithZero.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero)))) (NormalizationMonoid.normUnit.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero (NormalizedGCDMonoid.toNormalizationMonoid.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero PUnit.normalizedGCDMonoid) x) (OfNat.ofNat.{0} (Units.{0} PUnit.{1} (MonoidWithZero.toMonoid.{0} PUnit.{1} (CommMonoidWithZero.toMonoidWithZero.{0} PUnit.{1} (CancelCommMonoidWithZero.toCommMonoidWithZero.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero)))) 1 (One.toOfNat1.{0} (Units.{0} PUnit.{1} (MonoidWithZero.toMonoid.{0} PUnit.{1} (CommMonoidWithZero.toMonoidWithZero.{0} PUnit.{1} (CancelCommMonoidWithZero.toCommMonoidWithZero.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero)))) (InvOneClass.toOne.{0} (Units.{0} PUnit.{1} (MonoidWithZero.toMonoid.{0} PUnit.{1} (CommMonoidWithZero.toMonoidWithZero.{0} PUnit.{1} (CancelCommMonoidWithZero.toCommMonoidWithZero.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero)))) (DivInvOneMonoid.toInvOneClass.{0} (Units.{0} PUnit.{1} (MonoidWithZero.toMonoid.{0} PUnit.{1} (CommMonoidWithZero.toMonoidWithZero.{0} PUnit.{1} (CancelCommMonoidWithZero.toCommMonoidWithZero.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero)))) (DivisionMonoid.toDivInvOneMonoid.{0} (Units.{0} PUnit.{1} (MonoidWithZero.toMonoid.{0} PUnit.{1} (CommMonoidWithZero.toMonoidWithZero.{0} PUnit.{1} (CancelCommMonoidWithZero.toCommMonoidWithZero.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero)))) (DivisionCommMonoid.toDivisionMonoid.{0} (Units.{0} PUnit.{1} (MonoidWithZero.toMonoid.{0} PUnit.{1} (CommMonoidWithZero.toMonoidWithZero.{0} PUnit.{1} (CancelCommMonoidWithZero.toCommMonoidWithZero.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero)))) (CommGroup.toDivisionCommMonoid.{0} (Units.{0} PUnit.{1} (MonoidWithZero.toMonoid.{0} PUnit.{1} (CommMonoidWithZero.toMonoidWithZero.{0} PUnit.{1} (CancelCommMonoidWithZero.toCommMonoidWithZero.{0} PUnit.{1} PUnit.cancelCommMonoidWithZero)))) (Units.instCommGroupUnitsToMonoid.{0} PUnit.{1} (CommRing.toCommMonoid.{0} PUnit.{1} PUnit.commRing.{0})))))))))
+Case conversion may be inaccurate. Consider using '#align punit.norm_unit_eq PUnit.norm_unit_eqₓ'. -/
@[simp]
theorem norm_unit_eq : normUnit x = 1 :=
rfl
#align punit.norm_unit_eq PUnit.norm_unit_eq
--/
instance : CanonicallyOrderedAddMonoid PUnit := by
refine'
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -148,7 +148,7 @@ instance : SMulCommClass R S PUnit :=
⟨fun _ _ _ => rfl⟩
@[to_additive]
-instance [SMul R S] : IsScalarTower R S PUnit :=
+instance instIsScalarTowerOfSMul [SMul R S] : IsScalarTower R S PUnit :=
⟨fun _ _ _ => rfl⟩
instance smulWithZero [Zero R] : SMulWithZero R PUnit := by
Similar to #12486, which did this for Algebra.Algebra.Basic
.
Splits Algebra.Module.Defs
off Algebra.Module.Basic
. Most imports only need the Defs file, which has significantly smaller imports. The remaining Algebra.Module.Basic
is now a grab-bag of unrelated results, and should probably be split further or rehomed.
This is mostly motivated by the wasted effort during minimization upon encountering Algebra.Module.Basic.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
@@ -3,9 +3,9 @@ Copyright (c) 2019 Kenny Lau. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kenny Lau
-/
-import Mathlib.Algebra.Module.Basic
import Mathlib.Algebra.GCDMonoid.Basic
import Mathlib.Algebra.GroupRingAction.Basic
+import Mathlib.Algebra.Module.Defs
import Mathlib.GroupTheory.GroupAction.Defs
import Mathlib.Order.CompleteBooleanAlgebra
... or reduce its scope (the full removal is not as obvious).
@@ -18,8 +18,6 @@ This file collects facts about algebraic structures on the one-element type, e.g
commutative ring.
-/
-set_option autoImplicit true
-
namespace PUnit
@[to_additive]
@@ -50,21 +48,21 @@ theorem one_eq : (1 : PUnit) = unit :=
-- note simp can prove this when the Boolean ring structure is introduced
@[to_additive]
-theorem mul_eq : x * y = unit :=
+theorem mul_eq {x y : PUnit} : x * y = unit :=
rfl
#align punit.mul_eq PUnit.mul_eq
#align punit.add_eq PUnit.add_eq
-- `sub_eq` simplifies `PUnit.sub_eq`, but the latter is eligible for `dsimp`
@[to_additive (attr := simp, nolint simpNF)]
-theorem div_eq : x / y = unit :=
+theorem div_eq {x y : PUnit} : x / y = unit :=
rfl
#align punit.div_eq PUnit.div_eq
#align punit.sub_eq PUnit.sub_eq
-- `neg_eq` simplifies `PUnit.neg_eq`, but the latter is eligible for `dsimp`
@[to_additive (attr := simp, nolint simpNF)]
-theorem inv_eq : x⁻¹ = unit :=
+theorem inv_eq {x : PUnit} : x⁻¹ = unit :=
rfl
#align punit.inv_eq PUnit.inv_eq
#align punit.neg_eq PUnit.neg_eq
@@ -98,12 +96,12 @@ instance normalizedGCDMonoid : NormalizedGCDMonoid PUnit where
normalize_lcm := by intros; rfl
-- Porting note (#10618): simpNF lint: simp can prove this @[simp]
-theorem gcd_eq : gcd x y = unit :=
+theorem gcd_eq {x y : PUnit} : gcd x y = unit :=
rfl
#align punit.gcd_eq PUnit.gcd_eq
-- Porting note (#10618): simpNF lint: simp can prove this @[simp]
-theorem lcm_eq : lcm x y = unit :=
+theorem lcm_eq {x y : PUnit} : lcm x y = unit :=
rfl
#align punit.lcm_eq PUnit.lcm_eq
@@ -129,6 +127,8 @@ instance : LinearOrderedAddCommMonoidWithTop PUnit :=
{ PUnit.instCompleteBooleanAlgebra, PUnit.linearOrderedCancelAddCommMonoid with
top_add' := fun _ => rfl }
+variable {R S : Type*}
+
@[to_additive]
instance smul : SMul R PUnit :=
⟨fun _ _ => unit⟩
inst
prefix to instance names (#11238)
This is not exhaustive; it largely does not rename instances that relate to algebra, and only focuses on the "core" order files.
@@ -114,19 +114,19 @@ theorem norm_unit_eq {x : PUnit} : normUnit x = 1 :=
instance canonicallyOrderedAddCommMonoid : CanonicallyOrderedAddCommMonoid PUnit := by
refine'
- { PUnit.commRing, PUnit.completeBooleanAlgebra with
+ { PUnit.commRing, PUnit.instCompleteBooleanAlgebra with
exists_add_of_le := fun {_ _} _ => ⟨unit, Subsingleton.elim _ _⟩.. } <;>
intros <;>
trivial
instance linearOrderedCancelAddCommMonoid : LinearOrderedCancelAddCommMonoid PUnit where
__ := PUnit.canonicallyOrderedAddCommMonoid
- __ := PUnit.linearOrder
+ __ := PUnit.instLinearOrder
le_of_add_le_add_left _ _ _ _ := trivial
add_le_add_left := by intros; rfl
instance : LinearOrderedAddCommMonoidWithTop PUnit :=
- { PUnit.completeBooleanAlgebra, PUnit.linearOrderedCancelAddCommMonoid with
+ { PUnit.instCompleteBooleanAlgebra, PUnit.linearOrderedCancelAddCommMonoid with
top_add' := fun _ => rfl }
@[to_additive]
@@ -97,12 +97,12 @@ instance normalizedGCDMonoid : NormalizedGCDMonoid PUnit where
normalize_gcd := by intros; rfl
normalize_lcm := by intros; rfl
--- Porting notes (#10618): simpNF lint: simp can prove this @[simp]
+-- Porting note (#10618): simpNF lint: simp can prove this @[simp]
theorem gcd_eq : gcd x y = unit :=
rfl
#align punit.gcd_eq PUnit.gcd_eq
--- Porting notes (#10618): simpNF lint: simp can prove this @[simp]
+-- Porting note (#10618): simpNF lint: simp can prove this @[simp]
theorem lcm_eq : lcm x y = unit :=
rfl
#align punit.lcm_eq PUnit.lcm_eq
@@ -97,12 +97,12 @@ instance normalizedGCDMonoid : NormalizedGCDMonoid PUnit where
normalize_gcd := by intros; rfl
normalize_lcm := by intros; rfl
---Porting note: simpNF lint: simp can prove this @[simp]
+-- Porting notes (#10618): simpNF lint: simp can prove this @[simp]
theorem gcd_eq : gcd x y = unit :=
rfl
#align punit.gcd_eq PUnit.gcd_eq
---Porting note: simpNF lint: simp can prove this @[simp]
+-- Porting notes (#10618): simpNF lint: simp can prove this @[simp]
theorem lcm_eq : lcm x y = unit :=
rfl
#align punit.lcm_eq PUnit.lcm_eq
@@ -97,12 +97,12 @@ instance normalizedGCDMonoid : NormalizedGCDMonoid PUnit where
normalize_gcd := by intros; rfl
normalize_lcm := by intros; rfl
---porting notes: simpNF lint: simp can prove this @[simp]
+--Porting note: simpNF lint: simp can prove this @[simp]
theorem gcd_eq : gcd x y = unit :=
rfl
#align punit.gcd_eq PUnit.gcd_eq
---porting notes: simpNF lint: simp can prove this @[simp]
+--Porting note: simpNF lint: simp can prove this @[simp]
theorem lcm_eq : lcm x y = unit :=
rfl
#align punit.lcm_eq PUnit.lcm_eq
@@ -23,7 +23,7 @@ set_option autoImplicit true
namespace PUnit
@[to_additive]
-instance commGroup: CommGroup PUnit where
+instance commGroup : CommGroup PUnit where
mul _ _ := unit
one := unit
inv _ := unit
@@ -69,7 +69,7 @@ theorem inv_eq : x⁻¹ = unit :=
#align punit.inv_eq PUnit.inv_eq
#align punit.neg_eq PUnit.neg_eq
-instance commRing: CommRing PUnit where
+instance commRing : CommRing PUnit where
__ := PUnit.commGroup
__ := PUnit.addCommGroup
left_distrib := by intros; rfl
@@ -78,10 +78,10 @@ instance commRing: CommRing PUnit where
mul_zero := by intros; rfl
natCast _ := unit
-instance cancelCommMonoidWithZero: CancelCommMonoidWithZero PUnit := by
+instance cancelCommMonoidWithZero : CancelCommMonoidWithZero PUnit := by
refine' { PUnit.commRing with .. }; intros; exact Subsingleton.elim _ _
-instance normalizedGCDMonoid: NormalizedGCDMonoid PUnit where
+instance normalizedGCDMonoid : NormalizedGCDMonoid PUnit where
gcd _ _ := unit
lcm _ _ := unit
normUnit _ := 1
@@ -112,14 +112,14 @@ theorem norm_unit_eq {x : PUnit} : normUnit x = 1 :=
rfl
#align punit.norm_unit_eq PUnit.norm_unit_eq
-instance canonicallyOrderedAddCommMonoid: CanonicallyOrderedAddCommMonoid PUnit := by
+instance canonicallyOrderedAddCommMonoid : CanonicallyOrderedAddCommMonoid PUnit := by
refine'
{ PUnit.commRing, PUnit.completeBooleanAlgebra with
exists_add_of_le := fun {_ _} _ => ⟨unit, Subsingleton.elim _ _⟩.. } <;>
intros <;>
trivial
-instance linearOrderedCancelAddCommMonoid: LinearOrderedCancelAddCommMonoid PUnit where
+instance linearOrderedCancelAddCommMonoid : LinearOrderedCancelAddCommMonoid PUnit where
__ := PUnit.canonicallyOrderedAddCommMonoid
__ := PUnit.linearOrder
le_of_add_le_add_left _ _ _ _ := trivial
Renames:
CanonicallyOrderedMonoid
->
CanonicallyOrderedCommMonoid
CanonicallyOrderedAddMonoid
->
CanonicallyOrderedAddCommMonoid
CanonicallyLinearOrderedMonoid
->
CanonicallyLinearOrderedCommMonoid
CanonicallyLinearOrderedAddMonoid
->
CanonicallyLinearOrderedAddCommMonoid
@@ -112,7 +112,7 @@ theorem norm_unit_eq {x : PUnit} : normUnit x = 1 :=
rfl
#align punit.norm_unit_eq PUnit.norm_unit_eq
-instance canonicallyOrderedAddMonoid: CanonicallyOrderedAddMonoid PUnit := by
+instance canonicallyOrderedAddCommMonoid: CanonicallyOrderedAddCommMonoid PUnit := by
refine'
{ PUnit.commRing, PUnit.completeBooleanAlgebra with
exists_add_of_le := fun {_ _} _ => ⟨unit, Subsingleton.elim _ _⟩.. } <;>
@@ -120,7 +120,7 @@ instance canonicallyOrderedAddMonoid: CanonicallyOrderedAddMonoid PUnit := by
trivial
instance linearOrderedCancelAddCommMonoid: LinearOrderedCancelAddCommMonoid PUnit where
- __ := PUnit.canonicallyOrderedAddMonoid
+ __ := PUnit.canonicallyOrderedAddCommMonoid
__ := PUnit.linearOrder
le_of_add_le_add_left _ _ _ _ := trivial
add_le_add_left := by intros; rfl
norm_num
was passing the wrong syntax node to elabSimpArgs
when elaborating, which essentially had the effect of ignoring all arguments it was passed, i.e. norm_num [add_comm]
would not try to commute addition in the simp step.
The fix itself is very simple (though not obvious to debug!), probably using TSyntax more would help avoid such issues in future.
Due to this bug many norm_num [blah]
became rw [blah]; norm_num
or similar, sometimes with porting notes, sometimes not, we fix these porting notes and other regressions during the port also.
Interestingly cancel_denoms
uses norm_num [<- mul_assoc]
internally, so cancel_denoms
also got stronger with this change.
@@ -48,7 +48,8 @@ theorem one_eq : (1 : PUnit) = unit :=
#align punit.one_eq PUnit.one_eq
#align punit.zero_eq PUnit.zero_eq
-@[to_additive (attr := simp)]
+-- note simp can prove this when the Boolean ring structure is introduced
+@[to_additive]
theorem mul_eq : x * y = unit :=
rfl
#align punit.mul_eq PUnit.mul_eq
Autoimplicits are highly controversial and also defeat the performance-improving work in #6474.
The intent of this PR is to make autoImplicit
opt-in on a per-file basis, by disabling it in the lakefile and enabling it again with set_option autoImplicit true
in the few files that rely on it.
That also keeps this PR small, as opposed to attempting to "fix" files to not need it any more.
I claim that many of the uses of autoImplicit
in these files are accidental; situations such as:
variables
are in scope, but pasting the lemma in the wrong sectionHaving set_option autoImplicit false
as the default prevents these types of mistake being made in the 90% of files where autoImplicit
s are not used at all, and causes them to be caught by CI during review.
I think there were various points during the port where we encouraged porters to delete the universes u v
lines; I think having autoparams for universe variables only would cover a lot of the cases we actually use them, while avoiding any real shortcomings.
A Zulip poll (after combining overlapping votes accordingly) was in favor of this change with 5:5:18
as the no:dontcare:yes
vote ratio.
While this PR was being reviewed, a handful of files gained some more likely-accidental autoImplicits. In these places, set_option autoImplicit true
has been placed locally within a section, rather than at the top of the file.
@@ -18,6 +18,8 @@ This file collects facts about algebraic structures on the one-element type, e.g
commutative ring.
-/
+set_option autoImplicit true
+
namespace PUnit
@[to_additive]
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -131,7 +131,7 @@ instance smul : SMul R PUnit :=
⟨fun _ _ => unit⟩
@[to_additive (attr := simp)]
-theorem smul_eq {R : Type _} (y : PUnit) (r : R) : r • y = unit :=
+theorem smul_eq {R : Type*} (y : PUnit) (r : R) : r • y = unit :=
rfl
#align punit.smul_eq PUnit.smul_eq
#align punit.vadd_eq PUnit.vadd_eq
@@ -2,11 +2,6 @@
Copyright (c) 2019 Kenny Lau. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kenny Lau
-
-! This file was ported from Lean 3 source module algebra.punit_instances
-! leanprover-community/mathlib commit 6cb77a8eaff0ddd100e87b1591c6d3ad319514ff
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.Module.Basic
import Mathlib.Algebra.GCDMonoid.Basic
@@ -14,6 +9,8 @@ import Mathlib.Algebra.GroupRingAction.Basic
import Mathlib.GroupTheory.GroupAction.Defs
import Mathlib.Order.CompleteBooleanAlgebra
+#align_import algebra.punit_instances from "leanprover-community/mathlib"@"6cb77a8eaff0ddd100e87b1591c6d3ad319514ff"
+
/-!
# Instances on PUnit
@@ -108,7 +108,7 @@ theorem lcm_eq : lcm x y = unit :=
#align punit.lcm_eq PUnit.lcm_eq
@[simp]
-theorem norm_unit_eq {x: PUnit} : normUnit x = 1 :=
+theorem norm_unit_eq {x : PUnit} : normUnit x = 1 :=
rfl
#align punit.norm_unit_eq PUnit.norm_unit_eq
Now that leanprover/lean4#2210 has been merged, this PR:
set_option synthInstance.etaExperiment true
commands (and some etaExperiment%
term elaborators)set_option maxHeartbeats
commandsCo-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Matthew Ballard <matt@mrb.email>
@@ -37,6 +37,12 @@ instance commGroup: CommGroup PUnit where
mul_left_inv := by intros; rfl
mul_comm := by intros; rfl
+-- shortcut instances
+@[to_additive] instance : One PUnit where one := ()
+@[to_additive] instance : Mul PUnit where mul _ _ := ()
+@[to_additive] instance : Div PUnit where div _ _ := ()
+@[to_additive] instance : Inv PUnit where inv _ := ()
+
@[to_additive (attr := simp)]
theorem one_eq : (1 : PUnit) = unit :=
rfl
@@ -25,12 +25,12 @@ namespace PUnit
@[to_additive]
instance commGroup: CommGroup PUnit where
- mul := fun _ _ => unit
+ mul _ _ := unit
one := unit
- inv := fun _ => unit
- div := fun _ _ => unit
- npow := fun _ _ => unit
- zpow := fun _ _ => unit
+ inv _ := unit
+ div _ _ := unit
+ npow _ _ := unit
+ zpow _ _ := unit
mul_assoc := by intros; rfl
one_mul := by intros; rfl
mul_one := by intros; rfl
@@ -63,28 +63,29 @@ theorem inv_eq : x⁻¹ = unit :=
#align punit.inv_eq PUnit.inv_eq
#align punit.neg_eq PUnit.neg_eq
-instance commRing: CommRing PUnit :=
- { PUnit.commGroup, PUnit.addCommGroup with
- left_distrib := by intros; rfl
- right_distrib := by intros; rfl
- zero_mul := by intros; rfl
- mul_zero := by intros; rfl
- natCast := fun _ => unit }
+instance commRing: CommRing PUnit where
+ __ := PUnit.commGroup
+ __ := PUnit.addCommGroup
+ left_distrib := by intros; rfl
+ right_distrib := by intros; rfl
+ zero_mul := by intros; rfl
+ mul_zero := by intros; rfl
+ natCast _ := unit
instance cancelCommMonoidWithZero: CancelCommMonoidWithZero PUnit := by
- refine' { PUnit.commRing with .. } ; intros ; exact Subsingleton.elim _ _
+ refine' { PUnit.commRing with .. }; intros; exact Subsingleton.elim _ _
instance normalizedGCDMonoid: NormalizedGCDMonoid PUnit where
- gcd := fun _ _ => unit
- lcm := fun _ _ => unit
- normUnit := fun _ => 1
- normUnit_zero := by rfl
+ gcd _ _ := unit
+ lcm _ _ := unit
+ normUnit _ := 1
+ normUnit_zero := rfl
normUnit_mul := by intros; rfl
normUnit_coe_units := by intros; rfl
- gcd_dvd_left := fun _ _ => ⟨unit, Subsingleton.elim _ _⟩
- gcd_dvd_right := fun _ _ => ⟨unit, Subsingleton.elim _ _⟩
- dvd_gcd := fun {_ _} _ _ _ => ⟨unit, Subsingleton.elim _ _⟩
- gcd_mul_lcm := fun _ _ => ⟨1, Subsingleton.elim _ _⟩
+ gcd_dvd_left _ _ := ⟨unit, Subsingleton.elim _ _⟩
+ gcd_dvd_right _ _ := ⟨unit, Subsingleton.elim _ _⟩
+ dvd_gcd {_ _} _ _ _ := ⟨unit, Subsingleton.elim _ _⟩
+ gcd_mul_lcm _ _ := ⟨1, Subsingleton.elim _ _⟩
lcm_zero_left := by intros; rfl
lcm_zero_right := by intros; rfl
normalize_gcd := by intros; rfl
@@ -107,16 +108,16 @@ theorem norm_unit_eq {x: PUnit} : normUnit x = 1 :=
instance canonicallyOrderedAddMonoid: CanonicallyOrderedAddMonoid PUnit := by
refine'
- { PUnit.commRing, PUnit.completeBooleanAlgebra with
- exists_add_of_le := fun {_ _} _ => ⟨unit, Subsingleton.elim _ _⟩.. } <;>
- intros <;>
+ { PUnit.commRing, PUnit.completeBooleanAlgebra with
+ exists_add_of_le := fun {_ _} _ => ⟨unit, Subsingleton.elim _ _⟩.. } <;>
+ intros <;>
trivial
-instance linearOrderedCancelAddCommMonoid: LinearOrderedCancelAddCommMonoid PUnit := by
- refine'
- { PUnit.canonicallyOrderedAddMonoid, PUnit.linearOrder with
- le_of_add_le_add_left := fun _ _ _ _ => trivial
- add_le_add_left := by intros; rfl }
+instance linearOrderedCancelAddCommMonoid: LinearOrderedCancelAddCommMonoid PUnit where
+ __ := PUnit.canonicallyOrderedAddMonoid
+ __ := PUnit.linearOrder
+ le_of_add_le_add_left _ _ _ _ := trivial
+ add_le_add_left := by intros; rfl
instance : LinearOrderedAddCommMonoidWithTop PUnit :=
{ PUnit.completeBooleanAlgebra, PUnit.linearOrderedCancelAddCommMonoid with
The unported dependencies are