Skip to content

Commit

Permalink
bump mathlib
Browse files Browse the repository at this point in the history
  • Loading branch information
YaelDillies committed Nov 10, 2023
1 parent 6de02e3 commit 9d99eb2
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 125 deletions.
5 changes: 0 additions & 5 deletions LeanCamCombi.lean
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,10 @@ import LeanCamCombi.Mathlib.Data.Nat.Factors
import LeanCamCombi.Mathlib.Data.Nat.Lattice
import LeanCamCombi.Mathlib.Data.Nat.Order.Lemmas
import LeanCamCombi.Mathlib.Data.Nat.Squarefree
import LeanCamCombi.Mathlib.Data.Set.Equitable
import LeanCamCombi.Mathlib.Data.Set.Finite
import LeanCamCombi.Mathlib.Data.Set.Image
import LeanCamCombi.Mathlib.Data.Set.Pointwise.SMul
import LeanCamCombi.Mathlib.Data.Set.Prod
import LeanCamCombi.Mathlib.Data.Sym.Sym2
import LeanCamCombi.Mathlib.Data.ZMod.Defs
import LeanCamCombi.Mathlib.Data.ZMod.Quotient
import LeanCamCombi.Mathlib.GroupTheory.GroupAction.Defs
Expand All @@ -70,7 +68,6 @@ import LeanCamCombi.Mathlib.GroupTheory.Subgroup.Stabilizer
import LeanCamCombi.Mathlib.GroupTheory.Subgroup.ZPowers
import LeanCamCombi.Mathlib.GroupTheory.Submonoid.Membership
import LeanCamCombi.Mathlib.GroupTheory.Submonoid.Operations
import LeanCamCombi.Mathlib.GroupTheory.Torsion
import LeanCamCombi.Mathlib.LinearAlgebra.AffineSpace.FiniteDimensional
import LeanCamCombi.Mathlib.LinearAlgebra.AffineSpace.Independent
import LeanCamCombi.Mathlib.Logic.Basic
Expand All @@ -80,11 +77,9 @@ import LeanCamCombi.Mathlib.MeasureTheory.Measure.MeasureSpace
import LeanCamCombi.Mathlib.NumberTheory.MaricaSchoenheim
import LeanCamCombi.Mathlib.Order.Category.BoolAlg
import LeanCamCombi.Mathlib.Order.ConditionallyCompleteLattice.Basic
import LeanCamCombi.Mathlib.Order.Disjoint
import LeanCamCombi.Mathlib.Order.Hom.Lattice
import LeanCamCombi.Mathlib.Order.Hom.Set
import LeanCamCombi.Mathlib.Order.LocallyFinite
import LeanCamCombi.Mathlib.Order.Partition.Equipartition
import LeanCamCombi.Mathlib.Order.Partition.Finpartition
import LeanCamCombi.Mathlib.Order.Sublattice
import LeanCamCombi.Mathlib.Order.SupClosed
Expand Down
8 changes: 4 additions & 4 deletions LeanCamCombi/Kneser/CauchyDavenport.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2023 Yaël Dillies, Bhavik Mehta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies, Bhavik Mehta
-/
import Mathlib.Combinatorics.Additive.Etransform
import Mathlib.Combinatorics.Additive.ETransform
import LeanCamCombi.Mathlib.Algebra.Group.Defs
import LeanCamCombi.Mathlib.GroupTheory.MinOrder
import LeanCamCombi.Kneser.Mathlib
Expand Down Expand Up @@ -138,8 +138,8 @@ lemma Finset.min_le_card_mul (hs : s.Nonempty) (ht : t.Nonempty) :
⟨inter_subset_left _ _, fun h =>
hsg <|
eq_of_superset_of_card_ge (h.trans <| inter_subset_right _ _) (card_smul_finset _ _).le⟩
replace aux1 := card_mono (mulEtransformLeft.fst_mul_snd_subset g (s, t))
replace aux2 := card_mono (mulEtransformRight.fst_mul_snd_subset g (s, t))
replace aux1 := card_mono (mulETransformLeft.fst_mul_snd_subset g (s, t))
replace aux2 := card_mono (mulETransformRight.fst_mul_snd_subset g (s, t))
-- If the left translate of `t` by `g⁻¹` is disjoint from `t`, then we're easily done.
obtain hgt | hgt := disjoint_or_nonempty_inter t (g⁻¹ • t)
· rw [← card_smul_finset g⁻¹ t]
Expand All @@ -149,7 +149,7 @@ lemma Finset.min_le_card_mul (hs : s.Nonempty) (ht : t.Nonempty) :
-- Else, we're done by induction on either `(s', t')` or `(s'', t'')` depending on whether
-- `|s| + |t| ≤ |s'| + |t'|` or `|s| + |t| < |s''| + |t''|`. One of those two inequalities must
-- hold since `2 * (|s| + |t|) = |s'| + |t'| + |s''| + |t''|`.
obtain hstg | hstg := le_or_lt_of_add_le_add (MulEtransform.card g (s, t)).ge
obtain hstg | hstg := le_or_lt_of_add_le_add (MulETransform.card g (s, t)).ge
· exact
(ih _ _ hgs (hgt.mono inter_subset_union) <| devosMulRel_of_le_of_le aux1 hstg hsg).imp
(WithTop.coe_le_coe.2 aux1).trans' fun h => hstg.trans <| h.trans <| add_le_add_right aux1 _
Expand Down
2 changes: 1 addition & 1 deletion LeanCamCombi/Kneser/Impact.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2023 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-/
import Mathlib.Combinatorics.Additive.Etransform
import Mathlib.Combinatorics.Additive.ETransform
import LeanCamCombi.Mathlib.Data.Finset.Pointwise
import LeanCamCombi.Mathlib.Data.Set.Finite
import LeanCamCombi.Mathlib.Data.Nat.Lattice
Expand Down
6 changes: 3 additions & 3 deletions LeanCamCombi/Kneser/KneserRuzsa.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2023 Mantas Bakšys, Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mantas Bakšys, Yaël Dillies
-/
import Mathlib.Combinatorics.Additive.Etransform
import Mathlib.Combinatorics.Additive.ETransform
import LeanCamCombi.Mathlib.Algebra.Order.Ring.Canonical
import LeanCamCombi.Mathlib.Data.Finset.Basic
import LeanCamCombi.Mathlib.Data.Finset.Card
Expand Down Expand Up @@ -158,8 +158,8 @@ lemma le_card_mul_add_card_mulStab_mul (hs : s.Nonempty) (ht : t.Nonempty) :
refine'
Nat.find_min' _
⟨_, _, mem_inter.2 ⟨hbt' _, _⟩, (hs' _).trans <| subset_union_left _ _,
(mulDysonEtransform.subset _ (s' b, t' b)).trans <| hst' _,
(mulDysonEtransform.card _ _).trans <| hstcard _, rfl⟩
(mulDysonETransform.subset _ (s' b, t' b)).trans <| hst' _,
(mulDysonETransform.card _ _).trans <| hstcard _, rfl⟩
rwa [mem_inv_smul_finset_iff, smul_eq_mul, inv_mul_cancel_right]

/-- **Kneser's multiplication lemma**: A lower bound on the size of `s * t` in terms of its
Expand Down
14 changes: 4 additions & 10 deletions LeanCamCombi/Mathlib/Combinatorics/SimpleGraph/Containment.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Authors: Yaël Dillies
-/
import Mathlib.Algebra.BigOperators.Basic
import LeanCamCombi.Mathlib.Combinatorics.SimpleGraph.Subgraph
import LeanCamCombi.Mathlib.Data.Sym.Sym2

/-!
# Containment of graphs
Expand Down Expand Up @@ -208,13 +207,8 @@ noncomputable def labelledCopyCount (G : SimpleGraph α) (H : SimpleGraph β) :

@[simp] lemma labelledCopyCount_of_isEmpty [IsEmpty α] (G : SimpleGraph α) (H : SimpleGraph β) :
G.labelledCopyCount H = 1 := by
classical
have : Unique {f : G →g H // Injective f} :=
{ default := ⟨default, isEmptyElim⟩
uniq := fun _ ↦ Subsingleton.elim _ _ }
rw [labelledCopyCount]
sorry
-- exact @Fintype.card_unique _ (this) _
convert Fintype.card_unique
exact { default := ⟨default, isEmptyElim⟩, uniq := fun _ ↦ Subsingleton.elim _ _ }

@[simp] lemma labelledCopyCount_eq_zero : G.labelledCopyCount H = 0 ↔ ¬ G ⊑ H := by
simp [labelledCopyCount, IsContained, Fintype.card_eq_zero_iff]
Expand All @@ -225,9 +219,9 @@ noncomputable def labelledCopyCount (G : SimpleGraph α) (H : SimpleGraph β) :
/-- There's more labelled copies of `H` of-`G` than unlabelled ones. -/
lemma copyCount_le_labelledCopyCount : G.copyCount H ≤ G.labelledCopyCount H := by
rw [copyCount, ←Fintype.card_coe]
refine' Fintype.card_le_of_injective (fun H' ↦
refine Fintype.card_le_of_injective (fun H' ↦
⟨H'.val.hom.comp (mem_filter.1 H'.2).2.some.toHom,
Subtype.coe_injective.comp (mem_filter.1 H'.2).2.some.injective⟩) _
Subtype.coe_injective.comp (mem_filter.1 H'.2).2.some.injective⟩) ?_
sorry

end LabelledCopyCount
Expand Down
3 changes: 0 additions & 3 deletions LeanCamCombi/Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ namespace SimpleGraph

namespace Subgraph

-- TODO: Replace `coe_Adj`
alias coe_adj := coe_Adj

instance (G : SimpleGraph V) (H : Subgraph G) [DecidableRel H.Adj] : DecidableRel H.coe.Adj :=
fun a b ↦ ‹DecidableRel H.Adj› _ _

Expand Down
20 changes: 0 additions & 20 deletions LeanCamCombi/Mathlib/Data/Nat/Factorization/Basic.lean
Original file line number Diff line number Diff line change
@@ -1,21 +1 @@
import Mathlib.Data.Nat.Factorization.Basic
import LeanCamCombi.Mathlib.Data.Nat.Factors

namespace Nat
variable {n p : ℕ}

-- TODO: Rename `Nat.factors` to `Nat.primeFactorsList`
-- TODO: Protect `Nat.Prime.factorization`

def primeFactors (n : ℕ) : Finset ℕ := n.factors.toFinset

@[simp] lemma support_factorization' (n : ℕ) : (factorization n).support = n.primeFactors := rfl
@[simp] lemma toFinset_factors (n : ℕ) : n.factors.toFinset = n.primeFactors := rfl

@[simp] lemma mem_primeFactors : p ∈ n.primeFactors ↔ p.Prime ∧ p ∣ n ∧ n ≠ 0 := by
simp_rw [←toFinset_factors, List.mem_toFinset, mem_factors']

lemma mem_primeFactors_of_ne_zero (hn : n ≠ 0) : p ∈ n.primeFactors ↔ p.Prime ∧ p ∣ n := by
simp [hn]

end Nat
10 changes: 1 addition & 9 deletions LeanCamCombi/Mathlib/Data/Nat/Factors.lean
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
import Mathlib.Data.Nat.Factors

namespace Nat
variable {p n : ℕ}

@[simp] lemma mem_factors' : p ∈ n.factors ↔ p.Prime ∧ p ∣ n ∧ n ≠ 0 := by
cases n <;> simp [mem_factors, *]

end Nat
-- TODO: Rename `Nat.factors` to `Nat.primeFactorsList`
1 change: 0 additions & 1 deletion LeanCamCombi/Mathlib/Data/Nat/Squarefree.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib.Data.Nat.Squarefree
import LeanCamCombi.Mathlib.Data.Nat.Factorization.Basic
import LeanCamCombi.Mathlib.Data.Nat.Order.Lemmas

open Finset
Expand Down
10 changes: 0 additions & 10 deletions LeanCamCombi/Mathlib/Data/Set/Equitable.lean

This file was deleted.

14 changes: 0 additions & 14 deletions LeanCamCombi/Mathlib/Data/Sym/Sym2.lean

This file was deleted.

10 changes: 0 additions & 10 deletions LeanCamCombi/Mathlib/GroupTheory/Torsion.lean

This file was deleted.

8 changes: 0 additions & 8 deletions LeanCamCombi/Mathlib/Order/Disjoint.lean

This file was deleted.

12 changes: 0 additions & 12 deletions LeanCamCombi/Mathlib/Order/Partition/Equipartition.lean

This file was deleted.

1 change: 0 additions & 1 deletion LeanCamCombi/VanDenBergKesten.lean
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import Mathlib.Data.Finset.Sort
import Mathlib.Data.Finset.Sups
import Mathlib.Data.Fintype.Basic
import Mathlib.Order.UpperLower.Basic
import LeanCamCombi.Mathlib.Order.Disjoint

/-!
# Set family certificates
Expand Down
28 changes: 14 additions & 14 deletions lake-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,43 @@
[{"git":
{"url": "https://github.com/leanprover-community/mathlib4.git",
"subDir?": null,
"rev": "874ff0574c19582d3d275d1c803846549cd53dce",
"rev": "9e03d9ced7ba4d2bf95f9ed7da0e3a3ffbc81d9e",
"opts": {},
"name": "mathlib",
"inputRev?": null,
"inherited": false}},
{"git":
{"url": "https://github.com/leanprover/doc-gen4",
"subDir?": null,
"rev": "8bccb92b531248af1b6692d65486e8640c8bcd10",
"rev": "e859e2f777521f82050b8f28e0205491a4ead0f5",
"opts": {},
"name": "«doc-gen4»",
"inputRev?": "main",
"inherited": false}},
{"git":
{"url": "https://github.com/leanprover/std4",
"subDir?": null,
"rev": "9bfbd2a12ee9cf2e159a8a6b4d1ef6c149728f66",
"rev": "fb07d160aff0e8bdf403a78a5167fc7acf9c8227",
"opts": {},
"name": "std",
"inputRev?": "main",
"inherited": true}},
{"git":
{"url": "https://github.com/leanprover-community/quote4",
"subDir?": null,
"rev": "396201245bf244f9d78e9007a02dd1c388193d27",
"rev": "511eb96eca98a7474683b8ae55193a7e7c51bc39",
"opts": {},
"name": "Qq",
"inputRev?": "master",
"inherited": true}},
{"git":
{"url": "https://github.com/leanprover-community/aesop",
"subDir?": null,
"rev": "cb87803274405db79ec578fc07c4730c093efb90",
"opts": {},
"name": "aesop",
"inputRev?": "master",
"inherited": true}},
{"git":
{"url": "https://github.com/leanprover/lean4-cli",
"subDir?": null,
Expand All @@ -49,14 +57,6 @@
"name": "proofwidgets",
"inputRev?": "v0.0.21",
"inherited": true}},
{"git":
{"url": "https://github.com/leanprover-community/aesop",
"subDir?": null,
"rev": "cb87803274405db79ec578fc07c4730c093efb90",
"opts": {},
"name": "aesop",
"inputRev?": "master",
"inherited": true}},
{"git":
{"url": "https://github.com/xubaiw/CMark.lean",
"subDir?": null,
Expand All @@ -68,9 +68,9 @@
{"git":
{"url": "https://github.com/fgdorais/lean4-unicode-basic",
"subDir?": null,
"rev": "f09250282cea3ed8c010f430264d9e8e50d7bc32",
"rev": "4ecf4f1f98d14d03a9e84fa1c082630fa69df88b",
"opts": {},
"name": "«lean4-unicode-basic»",
"name": "UnicodeBasic",
"inputRev?": "main",
"inherited": true}},
{"git":
Expand Down

0 comments on commit 9d99eb2

Please sign in to comment.