Skip to content

Commit

Permalink
Bump mathlib
Browse files Browse the repository at this point in the history
  • Loading branch information
YaelDillies committed Dec 20, 2024
1 parent 83c242f commit f80d672
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 89 deletions.
4 changes: 1 addition & 3 deletions LeanCamCombi.lean
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import LeanCamCombi.Mathlib.Algebra.Algebra.Operations
import LeanCamCombi.Mathlib.Algebra.Group.Pointwise.Set.BigOperators
import LeanCamCombi.Mathlib.Algebra.Module.Submodule.Defs
import LeanCamCombi.Mathlib.Algebra.MvPolynomial.Basic
import LeanCamCombi.Mathlib.Algebra.MvPolynomial.CommRing
import LeanCamCombi.Mathlib.Algebra.MvPolynomial.Degrees
import LeanCamCombi.Mathlib.Algebra.MvPolynomial.Equiv
import LeanCamCombi.Mathlib.Algebra.Order.Monoid.Unbundled.Pow
Expand All @@ -57,16 +58,13 @@ import LeanCamCombi.Mathlib.Combinatorics.SimpleGraph.Maps
import LeanCamCombi.Mathlib.Combinatorics.SimpleGraph.Multipartite
import LeanCamCombi.Mathlib.Combinatorics.SimpleGraph.Subgraph
import LeanCamCombi.Mathlib.Data.Finset.Basic
import LeanCamCombi.Mathlib.Data.Finset.Image
import LeanCamCombi.Mathlib.Data.Finset.PosDiffs
import LeanCamCombi.Mathlib.Data.Finset.Powerset
import LeanCamCombi.Mathlib.Data.List.DropRight
import LeanCamCombi.Mathlib.Data.Multiset.Basic
import LeanCamCombi.Mathlib.Data.Nat.Defs
import LeanCamCombi.Mathlib.Data.Nat.GCD.Basic
import LeanCamCombi.Mathlib.Data.Prod.Lex
import LeanCamCombi.Mathlib.Data.Set.Basic
import LeanCamCombi.Mathlib.Data.Set.Function
import LeanCamCombi.Mathlib.Data.Set.Pairwise.Lattice
import LeanCamCombi.Mathlib.Data.Set.Pointwise.SMul
import LeanCamCombi.Mathlib.GroupTheory.OrderOfElement
Expand Down
39 changes: 1 addition & 38 deletions LeanCamCombi/GrowthInGroups/ChevalleyComplex.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import LeanCamCombi.Mathlib.Algebra.MvPolynomial.Equiv
import LeanCamCombi.Mathlib.Algebra.Order.Monoid.Unbundled.Pow
import LeanCamCombi.Mathlib.Algebra.Polynomial.Degree.Lemmas
import LeanCamCombi.Mathlib.AlgebraicGeometry.PrimeSpectrum.Basic
import LeanCamCombi.Mathlib.Data.Finset.Image
import LeanCamCombi.Mathlib.Data.Nat.Defs
import LeanCamCombi.Mathlib.Data.Prod.Lex
import LeanCamCombi.Mathlib.Data.Set.Basic
import LeanCamCombi.Mathlib.Order.Monotone.Basic
import LeanCamCombi.GrowthInGroups.CoeffMem
import LeanCamCombi.GrowthInGroups.ConstructibleSetData
Expand Down Expand Up @@ -685,43 +685,6 @@ lemma exists_constructibleSetData_comap_C_toSet_eq_toSet'
((δ_casesOn_succ k _ _ _).symm.trans_le (δ_le_δ le_rfl _ this))
simp+contextual [mul_add, Nat.one_le_iff_ne_zero]

theorem MvPolynomial.degrees_map_le {σ S} [CommSemiring S] (p : MvPolynomial σ R) (f : R →+* S) :
(MvPolynomial.map f p).degrees ≤ p.degrees := by
classical
dsimp only [MvPolynomial.degrees]
apply Finset.sup_mono
apply MvPolynomial.support_map_subset

theorem MvPolynomial.degrees_sub {σ R} [CommRing R] [DecidableEq σ] (p q : MvPolynomial σ R) :
(p - q).degrees ≤ p.degrees ⊔ q.degrees := by
simp_rw [MvPolynomial.degrees_def]; exact AddMonoidAlgebra.supDegree_sub_le

lemma Set.diff_inter_right_comm {α} {s t u : Set α} : s \ t ∩ u = (s ∩ u) \ t := by
ext; simp [and_right_comm]

noncomputable
def MvPolynomial.commAlgEquiv (R S₁ S₂ : Type*) [CommSemiring R] :
MvPolynomial S₁ (MvPolynomial S₂ R) ≃ₐ[R] MvPolynomial S₂ (MvPolynomial S₁ R) :=
(MvPolynomial.sumAlgEquiv R S₁ S₂).symm.trans
((MvPolynomial.renameEquiv _ (Equiv.sumComm S₁ S₂)).trans (MvPolynomial.sumAlgEquiv R S₂ S₁))

lemma MvPolynomial.commAlgEquiv_C {R S₁ S₂ : Type*} [CommSemiring R] (p) :
MvPolynomial.commAlgEquiv R S₁ S₂ (.C p) = .map MvPolynomial.C p := by
suffices (MvPolynomial.commAlgEquiv R S₁ S₂).toAlgHom.comp
(IsScalarTower.toAlgHom R (MvPolynomial S₂ R) _) =
MvPolynomial.mapAlgHom (Algebra.ofId _ _) by
exact DFunLike.congr_fun this p
ext x : 1
simp [commAlgEquiv]

lemma MvPolynomial.commAlgEquiv_C_X {R S₁ S₂ : Type*} [CommSemiring R] (i) :
MvPolynomial.commAlgEquiv R S₁ S₂ (.C (.X i)) = .X i := by
simp [commAlgEquiv_C]

lemma MvPolynomial.commAlgEquiv_X {R S₁ S₂ : Type*} [CommSemiring R] (i) :
MvPolynomial.commAlgEquiv R S₁ S₂ (.X i) = .C (.X i) := by
simp [commAlgEquiv]

lemma chevalley_mvPolynomial_mvPolynomial
{n m : ℕ} (f : MvPolynomial (Fin m) R →ₐ[R] MvPolynomial (Fin n) R)
(k : ℕ) (d : Multiset (Fin n))
Expand Down
7 changes: 7 additions & 0 deletions LeanCamCombi/Mathlib/Algebra/MvPolynomial/CommRing.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Mathlib.Algebra.MvPolynomial.CommRing

namespace MvPolynomial

lemma degrees_sub_le {σ R} [CommRing R] [DecidableEq σ] (p q : MvPolynomial σ R) :
(p - q).degrees ≤ p.degrees ∪ q.degrees := by
simp_rw [degrees_def]; exact AddMonoidAlgebra.supDegree_sub_le
7 changes: 7 additions & 0 deletions LeanCamCombi/Mathlib/Algebra/MvPolynomial/Degrees.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ import LeanCamCombi.Mathlib.Algebra.Algebra.Operations
namespace MvPolynomial
variable {R σ : Type*} [CommSemiring R] {m n : Multiset σ} {p : MvPolynomial σ R}

lemma degrees_map_le {σ S} [CommSemiring S] (p : MvPolynomial σ R) (f : R →+* S) :
(MvPolynomial.map f p).degrees ≤ p.degrees := by
classical
dsimp only [MvPolynomial.degrees]
apply Finset.sup_mono
apply MvPolynomial.support_map_subset

variable (R σ n) in
def degreesLE : Submodule R (MvPolynomial σ R) where
carrier := {p | p.degrees ≤ n}
Expand Down
19 changes: 19 additions & 0 deletions LeanCamCombi/Mathlib/Algebra/MvPolynomial/Equiv.lean
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,23 @@ lemma isEmptyRingEquiv_eq_coeff_zero {σ R : Type*} [CommSemiring R] [IsEmpty σ
obtain ⟨x, rfl⟩ := (isEmptyRingEquiv R σ).symm.surjective x
simp

noncomputable
def commAlgEquiv (R S₁ S₂ : Type*) [CommSemiring R] :
MvPolynomial S₁ (MvPolynomial S₂ R) ≃ₐ[R] MvPolynomial S₂ (MvPolynomial S₁ R) :=
(sumAlgEquiv R S₁ S₂).symm.trans ((renameEquiv _ (.sumComm S₁ S₂)).trans (sumAlgEquiv R S₂ S₁))

lemma commAlgEquiv_C {R S₁ S₂ : Type*} [CommSemiring R] (p) :
commAlgEquiv R S₁ S₂ (.C p) = .map C p := by
suffices (commAlgEquiv R S₁ S₂).toAlgHom.comp
(IsScalarTower.toAlgHom R (MvPolynomial S₂ R) _) = mapAlgHom (Algebra.ofId _ _) by
exact DFunLike.congr_fun this p
ext x : 1
simp [commAlgEquiv]

lemma commAlgEquiv_C_X {R S₁ S₂ : Type*} [CommSemiring R] (i) :
commAlgEquiv R S₁ S₂ (.C (.X i)) = .X i := by simp [commAlgEquiv_C]

lemma commAlgEquiv_X {R S₁ S₂ : Type*} [CommSemiring R] (i) :
commAlgEquiv R S₁ S₂ (.X i) = .C (.X i) := by simp [commAlgEquiv]

end MvPolynomial
11 changes: 0 additions & 11 deletions LeanCamCombi/Mathlib/Data/Finset/Image.lean

This file was deleted.

26 changes: 0 additions & 26 deletions LeanCamCombi/Mathlib/Data/Nat/GCD/Basic.lean

This file was deleted.

3 changes: 3 additions & 0 deletions LeanCamCombi/Mathlib/Data/Set/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import Mathlib.Data.Set.Basic
namespace Set
variable {α : Type*} {s : Set α} {a : α}

lemma diff_inter_right_comm (s t u : Set α) : s \ t ∩ u = (s ∩ u) \ t := by
ext; simp [and_right_comm]

lemma insert_diff_self_of_mem (ha : a ∈ s) : insert a (s \ {a}) = s := by aesop

lemma insert_erase_invOn :
Expand Down
8 changes: 0 additions & 8 deletions LeanCamCombi/Mathlib/Data/Set/Function.lean

This file was deleted.

6 changes: 3 additions & 3 deletions lake-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "git",
"subDir": null,
"scope": "",
"rev": "70fca3cdda5c8edf6a780dcfc8d49b3d0dd1faad",
"rev": "9c324ade60adf9b37f4f7b49776bd2bb3a82d5e9",
"name": "«doc-gen4»",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
Expand All @@ -15,7 +15,7 @@
"type": "git",
"subDir": null,
"scope": "",
"rev": "933ad5493803f4c495f252678466ede6e1e2ee79",
"rev": "d70be405955bb990940792e1305e77fa17b6abea",
"name": "mathlib",
"manifestFile": "lake-manifest.json",
"inputRev": null,
Expand Down Expand Up @@ -105,7 +105,7 @@
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "43bcb1964528411e47bfa4edd0c87d1face1fce4",
"rev": "a4a08d92be3de00def5298059bf707c72dfd3c66",
"name": "aesop",
"manifestFile": "lake-manifest.json",
"inputRev": "master",
Expand Down

0 comments on commit f80d672

Please sign in to comment.