homogeneous_prime_not_prime
⟷
Counterexamples.HomogeneousPrimeNotPrime
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)
(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: Johan Commelin, Eric Wieser, Jujian Zhang
-/
import RingTheory.GradedAlgebra.HomogeneousIdeal
-import Data.Zmod.Basic
+import Data.ZMod.Basic
import Tactic.DeriveFintype
#align_import homogeneous_prime_not_prime from "leanprover-community/mathlib"@"08b081ea92d80e3a41f899eea36ef6d56e0f1db0"
@@ -126,7 +126,7 @@ theorem grading.left_inv : Function.LeftInverse (coeLinearMap (grading R)) gradi
cases' zz with a b
unfold grading.decompose
simp only [AddMonoidHom.coe_mk, map_add, coe_linear_map_of, Subtype.coe_mk, Prod.mk_add_mk,
- add_zero, add_sub_cancel'_right]
+ add_zero, add_sub_cancel]
#align counterexample.counterexample_not_prime_but_homogeneous_prime.grading.left_inv Counterexample.CounterexampleNotPrimeButHomogeneousPrime.grading.left_inv
instance : GradedAlgebra (grading R)
@@ -142,7 +142,7 @@ def i : Ideal (R × R) :=
Ideal.span {((2, 2) : R × R)}
#align counterexample.counterexample_not_prime_but_homogeneous_prime.I Counterexample.CounterexampleNotPrimeButHomogeneousPrime.i
-/- ./././Mathport/Syntax/Translate/Basic.lean:339:40: warning: unsupported option class.instance_max_depth -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:340:40: warning: unsupported option class.instance_max_depth -/
set_option class.instance_max_depth 34
theorem i_not_prime : ¬i.IsPrime := by
@@ -152,7 +152,7 @@ theorem i_not_prime : ¬i.IsPrime := by
decide
#align counterexample.counterexample_not_prime_but_homogeneous_prime.I_not_prime Counterexample.CounterexampleNotPrimeButHomogeneousPrime.i_not_prime
-/- ./././Mathport/Syntax/Translate/Basic.lean:339:40: warning: unsupported option class.instance_max_depth -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:340:40: warning: unsupported option class.instance_max_depth -/
-- this is what we change the max instance depth for, it's only 2 above the default
set_option class.instance_max_depth 32
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -115,7 +115,7 @@ theorem grading.right_inv : Function.RightInverse (coeLinearMap (grading R)) gra
induction' zz using DirectSum.induction_on with i zz d1 d2 ih1 ih2
· simp only [map_zero]
·
- rcases i with (_ | ⟨⟨⟩⟩) <;> rcases zz with ⟨⟨a, b⟩, hab : _ = _⟩ <;> dsimp at hab <;>
+ rcases i with (_ | ⟨⟨⟩⟩) <;> rcases zz with ⟨⟨a, b⟩, hab : _ = _⟩ <;> dsimp at hab <;>
cases hab <;>
decide!
· simp only [map_add, ih1, ih2]
@@ -169,8 +169,7 @@ theorem homogeneous_mem_or_mem {x y : R × R} (hx : SetLike.Homogeneous (grading
by
simp only [I, Ideal.mem_span_singleton] at hxy ⊢
cases x; cases y
- obtain ⟨_ | ⟨⟨⟩⟩, hx : _ = _⟩ := hx <;> obtain ⟨_ | ⟨⟨⟩⟩, hy : _ = _⟩ := hy <;>
- dsimp at hx hy <;>
+ obtain ⟨_ | ⟨⟨⟩⟩, hx : _ = _⟩ := hx <;> obtain ⟨_ | ⟨⟨⟩⟩, hy : _ = _⟩ := hy <;> dsimp at hx hy <;>
cases hx <;>
cases hy <;>
clear hx hy <;>
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,9 +3,9 @@ Copyright (c) 2022 Jujian Zhang. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin, Eric Wieser, Jujian Zhang
-/
-import Mathbin.RingTheory.GradedAlgebra.HomogeneousIdeal
-import Mathbin.Data.Zmod.Basic
-import Mathbin.Tactic.DeriveFintype
+import RingTheory.GradedAlgebra.HomogeneousIdeal
+import Data.Zmod.Basic
+import Tactic.DeriveFintype
#align_import homogeneous_prime_not_prime from "leanprover-community/mathlib"@"08b081ea92d80e3a41f899eea36ef6d56e0f1db0"
@@ -142,7 +142,7 @@ def i : Ideal (R × R) :=
Ideal.span {((2, 2) : R × R)}
#align counterexample.counterexample_not_prime_but_homogeneous_prime.I Counterexample.CounterexampleNotPrimeButHomogeneousPrime.i
-/- ./././Mathport/Syntax/Translate/Basic.lean:334:40: warning: unsupported option class.instance_max_depth -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:339:40: warning: unsupported option class.instance_max_depth -/
set_option class.instance_max_depth 34
theorem i_not_prime : ¬i.IsPrime := by
@@ -152,7 +152,7 @@ theorem i_not_prime : ¬i.IsPrime := by
decide
#align counterexample.counterexample_not_prime_but_homogeneous_prime.I_not_prime Counterexample.CounterexampleNotPrimeButHomogeneousPrime.i_not_prime
-/- ./././Mathport/Syntax/Translate/Basic.lean:334:40: warning: unsupported option class.instance_max_depth -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:339:40: warning: unsupported option class.instance_max_depth -/
-- this is what we change the max instance depth for, it's only 2 above the default
set_option class.instance_max_depth 32
mathlib commit https://github.com/leanprover-community/mathlib/commit/32a7e535287f9c73f2e4d2aef306a39190f0b504
@@ -81,7 +81,7 @@ theorem grading.one_mem : (1 : R × R) ∈ grading R 0 :=
Eq.refl (1, 1).fst
#align counterexample.counterexample_not_prime_but_homogeneous_prime.grading.one_mem Counterexample.CounterexampleNotPrimeButHomogeneousPrime.grading.one_mem
-theorem grading.mul_mem :
+theorem grading.hMul_mem :
∀ ⦃i j : Two⦄ {a b : R × R} (ha : a ∈ grading R i) (hb : b ∈ grading R j),
a * b ∈ grading R (i + j)
| 0, 0, a, b, (ha : a.1 = a.2), (hb : b.1 = b.2) => show a.1 * b.1 = a.2 * b.2 by rw [ha, hb]
@@ -89,7 +89,7 @@ theorem grading.mul_mem :
show a.1 * b.1 = 0 by rw [hb, MulZeroClass.mul_zero]
| 1, 0, a, b, (ha : a.1 = 0), hb => show a.1 * b.1 = 0 by rw [ha, MulZeroClass.zero_mul]
| 1, 1, a, b, (ha : a.1 = 0), hb => show a.1 * b.1 = 0 by rw [ha, MulZeroClass.zero_mul]
-#align counterexample.counterexample_not_prime_but_homogeneous_prime.grading.mul_mem Counterexample.CounterexampleNotPrimeButHomogeneousPrime.grading.mul_mem
+#align counterexample.counterexample_not_prime_but_homogeneous_prime.grading.mul_mem Counterexample.CounterexampleNotPrimeButHomogeneousPrime.grading.hMul_mem
end
@@ -132,7 +132,7 @@ theorem grading.left_inv : Function.LeftInverse (coeLinearMap (grading R)) gradi
instance : GradedAlgebra (grading R)
where
one_mem := grading.one_mem R
- mul_mem := grading.mul_mem R
+ hMul_mem := grading.hMul_mem R
decompose' := grading.decompose
left_inv := by convert grading.left_inv
right_inv := by convert grading.right_inv
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,16 +2,13 @@
Copyright (c) 2022 Jujian Zhang. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin, Eric Wieser, Jujian Zhang
-
-! This file was ported from Lean 3 source module homogeneous_prime_not_prime
-! leanprover-community/mathlib commit 08b081ea92d80e3a41f899eea36ef6d56e0f1db0
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.RingTheory.GradedAlgebra.HomogeneousIdeal
import Mathbin.Data.Zmod.Basic
import Mathbin.Tactic.DeriveFintype
+#align_import homogeneous_prime_not_prime from "leanprover-community/mathlib"@"08b081ea92d80e3a41f899eea36ef6d56e0f1db0"
+
/-!
# A homogeneous prime that is homogeneously prime but not prime
mathlib commit https://github.com/leanprover-community/mathlib/commit/bf2428c9486c407ca38b5b3fb10b87dad0bc99fa
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin, Eric Wieser, Jujian Zhang
! This file was ported from Lean 3 source module homogeneous_prime_not_prime
-! leanprover-community/mathlib commit 328375597f2c0dd00522d9c2e5a33b6a6128feeb
+! leanprover-community/mathlib commit 08b081ea92d80e3a41f899eea36ef6d56e0f1db0
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -15,6 +15,9 @@ import Mathbin.Tactic.DeriveFintype
/-!
# A homogeneous prime that is homogeneously prime but not prime
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
In `src/ring_theory/graded_algebra/radical.lean`, we assumed that the underline grading is indexed
by a `linear_ordered_cancel_add_comm_monoid` to prove that a homogeneous ideal is prime if and only
if it is homogeneously prime. This file is aimed to show that even if this assumption isn't strictly
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -93,7 +93,6 @@ theorem grading.mul_mem :
end
--- mathport name: exprR
local notation "R" => ZMod 4
/-- `R² ≅ {(a, a) | a ∈ R} ⨁ {(0, b) | b ∈ R}` by `(x, y) ↦ (x, x) + (0, y - x)`. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/a3209ddf94136d36e5e5c624b10b2a347cc9d090
mul
-div
cancellation lemmas (#11530)
Lemma names around cancellation of multiplication and division are a mess.
This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the GroupWithZero
lemma name, the Group
lemma, the AddGroup
lemma name).
| Statement | New name | Old name | |
@@ -134,7 +134,7 @@ theorem grading.left_inv : Function.LeftInverse (coeLinearMap (grading R)) gradi
cases' zz with a b
unfold grading.decompose
simp only [AddMonoidHom.coe_mk, ZeroHom.coe_mk, map_add, coeLinearMap_of, Prod.mk_add_mk,
- add_zero, add_sub_cancel'_right]
+ add_zero, add_sub_cancel]
#align counterexample.counterexample_not_prime_but_homogeneous_prime.grading.left_inv Counterexample.CounterexampleNotPrimeButHomogeneousPrime.grading.left_inv
instance : GradedAlgebra (grading R) where
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -144,7 +144,7 @@ instance : GradedAlgebra (grading R) where
left_inv := by convert grading.left_inv
right_inv := by convert grading.right_inv
--- porting note: `I` upper case
+-- Porting note: `I` upper case
set_option linter.uppercaseLean3 false
/-- The counterexample is the ideal `I = span {(2, 2)}`. -/
(· op ·) a
by (a op ·)
(#8843)
I used the regex \(\(· (.) ·\) (.)\)
, replacing with ($2 $1 ·)
.
@@ -65,7 +65,7 @@ def submoduleZ : Submodule R (R × R) where
carrier := {zz | zz.1 = zz.2}
zero_mem' := rfl
add_mem' := @fun _ _ ha hb => congr_arg₂ (· + ·) ha hb
- smul_mem' a _ hb := congr_arg ((· * ·) a) hb
+ smul_mem' a _ hb := congr_arg (a * ·) hb
#align counterexample.counterexample_not_prime_but_homogeneous_prime.submodule_z Counterexample.CounterexampleNotPrimeButHomogeneousPrime.submoduleZ
/-- The grade 1 part of `R²` is `{(0, b) | b ∈ R}`. -/
This is the supremum of
along with some minor fixes from failures on nightly-testing as Mathlib master
is merged into it.
Note that some PRs for changes that are already compatible with the current toolchain and will be necessary have already been split out: #8380.
I am hopeful that in future we will be able to progressively merge adaptation PRs into a bump/v4.X.0
branch, so we never end up with a "big merge" like this. However one of these adaptation PRs (#8056) predates my new scheme for combined CI, and it wasn't possible to keep that PR viable in the meantime.
In particular this includes adjustments for the Lean PRs
We can get rid of all the
local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue [lean4#2220](https://github.com/leanprover/lean4/pull/2220)
macros across Mathlib (and in any projects that want to write natural number powers of reals).
Changes the default behaviour of simp
to (config := {decide := false})
. This makes simp
(and consequentially norm_num
) less powerful, but also more consistent, and less likely to blow up in long failures. This requires a variety of changes: changing some previously by simp
or norm_num
to decide
or rfl
, or adding (config := {decide := true})
.
This changed the behaviour of simp
so that simp [f]
will only unfold "fully applied" occurrences of f
. The old behaviour can be recovered with simp (config := { unfoldPartialApp := true })
. We may in future add a syntax for this, e.g. simp [!f]
; please provide feedback! In the meantime, we have made the following changes:
(config := { unfoldPartialApp := true })
in some places, to recover the old behaviour@[eqns]
to manually adjust the equation lemmas for a particular definition, recovering the old behaviour just for that definition. See #8371, where we do this for Function.comp
and Function.flip
.This change in Lean may require further changes down the line (e.g. adding the !f
syntax, and/or upstreaming the special treatment for Function.comp
and Function.flip
, and/or removing this special treatment). Please keep an open and skeptical mind about these changes!
Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Mauricio Collares <mauricio@collares.org>
@@ -175,7 +175,7 @@ theorem homogeneous_mem_or_mem {x y : R × R} (hx : SetLike.Homogeneous (grading
-- Porting note: added `h2` for later use; the proof is hideous
have h2 : Prime (2:R) := by
unfold Prime
- simp only [true_and]
+ refine ⟨by decide, by decide, ?_⟩
intro a b
have aux2 : (Fin.mk 2 _ : R) = 2 := rfl
have aux3 : (Fin.mk 3 _ : R) = -1 := rfl
cliqueFree_of_replaceVertex_cliqueFree
is still quite long.
@@ -58,7 +58,7 @@ instance : LinearOrderedAddCommMonoid Two :=
delta Two WithZero; decide }
section
-variable (R : Type _) [CommRing R]
+variable (R : Type*) [CommRing R]
/-- The grade 0 part of `R²` is `{(a, a) | a ∈ R}`. -/
def submoduleZ : Submodule R (R × R) where
This PR starts the construction of the cochain complex of morphisms from a cochain complex to another.
@@ -23,9 +23,9 @@ statement is false.
We achieve this by considering the ring `R=ℤ/4ℤ`. We first give the two element set `ι = {0, 1}` a
structure of linear ordered additive commutative monoid by setting `0 + 0 = 0` and `_ + _ = 1` and
`0 < 1`. Then we use `ι` to grade `R²` by setting `{(a, a) | a ∈ R}` to have grade `0`; and
-`{(0, b) | b ∈ R}` to have grade 1. Then the ideal `I = span {(0, 2)} ⊆ ℤ/4ℤ` is homogeneous and not
-prime. But it is homogeneously prime, i.e. if `(a, b), (c, d)` are two homogeneous elements then
-`(a, b) * (c, d) ∈ I` implies either `(a, b) ∈ I` or `(c, d) ∈ I`.
+`{(0, b) | b ∈ R}` to have grade 1. Then the ideal `I = span {(2, 2)} ⊆ ℤ/4ℤ × ℤ/4ℤ` is homogeneous
+and not prime. But it is homogeneously prime, i.e. if `(a, b), (c, d)` are two homogeneous elements
+then `(a, b) * (c, d) ∈ I` implies either `(a, b) ∈ I` or `(c, d) ∈ I`.
## Tags
MulZeroClass.
in mul_zero
/zero_mul
(#6682)
Search&replace MulZeroClass.mul_zero
-> mul_zero
, MulZeroClass.zero_mul
-> zero_mul
.
These were introduced by Mathport, as the full name of mul_zero
is actually MulZeroClass.mul_zero
(it's exported with the short name).
@@ -89,9 +89,9 @@ theorem grading.mul_mem :
a * b ∈ grading R (i + j)
| 0, 0, a, b, (ha : a.1 = a.2), (hb : b.1 = b.2) => show a.1 * b.1 = a.2 * b.2 by rw [ha, hb]
| 0, 1, a, b, (_ : a.1 = a.2), (hb : b.1 = 0) =>
- show a.1 * b.1 = 0 by rw [hb, MulZeroClass.mul_zero]
- | 1, 0, a, b, (ha : a.1 = 0), _ => show a.1 * b.1 = 0 by rw [ha, MulZeroClass.zero_mul]
- | 1, 1, a, b, (ha : a.1 = 0), _ => show a.1 * b.1 = 0 by rw [ha, MulZeroClass.zero_mul]
+ show a.1 * b.1 = 0 by rw [hb, mul_zero]
+ | 1, 0, a, b, (ha : a.1 = 0), _ => show a.1 * b.1 = 0 by rw [ha, zero_mul]
+ | 1, 1, a, b, (ha : a.1 = 0), _ => show a.1 * b.1 = 0 by rw [ha, zero_mul]
#align counterexample.counterexample_not_prime_but_homogeneous_prime.grading.mul_mem Counterexample.CounterexampleNotPrimeButHomogeneousPrime.grading.mul_mem
end
@@ -2,17 +2,14 @@
Copyright (c) 2022 Jujian Zhang. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin, Eric Wieser, Jujian Zhang
-
-! This file was ported from Lean 3 source module homogeneous_prime_not_prime
-! leanprover-community/mathlib commit 328375597f2c0dd00522d9c2e5a33b6a6128feeb
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.Divisibility.Prod
import Mathlib.RingTheory.GradedAlgebra.HomogeneousIdeal
import Mathlib.Data.ZMod.Basic
import Mathlib.Tactic.DeriveFintype
+#align_import homogeneous_prime_not_prime from "leanprover-community/mathlib"@"328375597f2c0dd00522d9c2e5a33b6a6128feeb"
+
/-!
# A homogeneous ideal that is homogeneously prime but not prime
@@ -49,14 +49,14 @@ abbrev Two :=
WithZero Unit
#align counterexample.counterexample_not_prime_but_homogeneous_prime.two Counterexample.CounterexampleNotPrimeButHomogeneousPrime.Two
-instance Two.LinearOrder : LinearOrder Two :=
+instance Two.instLinearOrder : LinearOrder Two :=
inferInstance
-instance Two.AddCommMonoid : AddCommMonoid Two :=
+instance Two.instAddCommMonoid : AddCommMonoid Two :=
inferInstance
instance : LinearOrderedAddCommMonoid Two :=
- { Two.LinearOrder, Two.AddCommMonoid with
+ { Two.instLinearOrder, Two.instAddCommMonoid with
add_le_add_left := by
delta Two WithZero; decide }
section
@@ -107,7 +107,7 @@ def grading.decompose : R × R →+ DirectSum Two fun i => grading R i where
of (grading R ·) 0 ⟨(zz.1, zz.1), rfl⟩ +
of (grading R ·) 1 ⟨(0, zz.2 - zz.1), rfl⟩
map_zero' := by
- refine' Dfinsupp.ext (fun (i : Two) =>
+ refine' DFinsupp.ext (fun (i : Two) =>
Option.casesOn i _ (fun (i_1 : Unit) => PUnit.casesOn i_1 _)) <;> rfl
map_add' := by
rintro ⟨a1, b1⟩ ⟨a2, b2⟩
The unported dependencies are