Skip to content

Commit e3fe6bc

Browse files
committed
Bump mathlib
1 parent 487914a commit e3fe6bc

File tree

5 files changed

+21
-137
lines changed

5 files changed

+21
-137
lines changed

LeanCamCombi.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import LeanCamCombi.Mathlib.Probability.Combinatorics.BinomialRandomGraph.Defs
1414
import LeanCamCombi.Mathlib.Probability.Distributions.Bernoulli
1515
import LeanCamCombi.Mathlib.Probability.HasLaw
1616
import LeanCamCombi.Mathlib.Probability.ProbabilityMassFunction.Constructions
17-
import LeanCamCombi.PlainCombi.KatonaCircle
1817
import LeanCamCombi.PlainCombi.LittlewoodOfford
1918
import LeanCamCombi.PlainCombi.OrderShatter
2019
import LeanCamCombi.PlainCombi.ProbLYM

LeanCamCombi/Mathlib/Probability/Combinatorics/BinomialRandomGraph/Defs.lean

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import Mathlib.Data.Sym.Card
1313
This file defines the distribution of binomial random graphs.
1414
-/
1515

16-
open MeasureTheory Measure ProbabilityTheory unitInterval
16+
open MeasureTheory Measure ProbabilityTheory unitInterval Sym2
1717
open scoped Finset
1818

1919
namespace SimpleGraph
@@ -73,29 +73,32 @@ vertices `V`. This is the law `G(V, p)` of binomial random graphs with probabili
7373
variable (V p) in
7474
/-- The binomial distribution with parameter `p` on simple graphs with vertices `V`. -/
7575
@[expose]
76-
noncomputable def binomialRandom : Measure (SimpleGraph V) := Ber({e | ¬ e.IsDiag}, p).comap edgeSet
76+
noncomputable def binomialRandom : Measure (SimpleGraph V) := Ber(diagSetᶜ, p).comap edgeSet
7777

7878
@[inherit_doc] scoped notation "G(" V ", " p ")" => binomialRandom V p
7979

8080
section Countable
8181
variable [Countable V]
8282

8383
variable (V p) in
84-
lemma binomialRandom_eq_map : G(V, p) = map fromEdgeSet Ber({e | ¬ e.IsDiag}, p) := by
84+
lemma binomialRandom_eq_map : G(V, p) = map fromEdgeSet Ber(diagSetᶜ, p) := by
8585
refine (map_eq_comap measurable_fromEdgeSet measurableEmbedding_edgeSet ?_
8686
fromEdgeSet_edgeSet).symm
8787
filter_upwards [bernoulliOn_ae_subset] with S hS
88-
exact ⟨fromEdgeSet S, by simpa [← Set.compl_setOf, Set.subset_compl_iff_disjoint_right] using hS⟩
88+
refine ⟨fromEdgeSet S, ?_⟩
89+
simpa [Sym2.diagSet_eq_setOf_isDiag, ← Set.compl_setOf, Set.subset_compl_iff_disjoint_right]
90+
using hS
8991

90-
lemma isBernoulliOn_edgeSet_binomialRandom : IsBernoulliOn edgeSet {e | ¬ e.IsDiag} p G(V, p) where
92+
lemma isBernoulliOn_edgeSet_binomialRandom : IsBernoulliOn edgeSet diagSetᶜ p G(V, p) where
9193
map_eq := by
92-
rw [binomialRandom_eq_map, map_map (by fun_prop) (by fun_prop), map_congr, map_id]
94+
rw [binomialRandom_eq_map, map_map (by fun_prop) (by fun_prop), Measure.map_congr,
95+
Measure.map_id]
9396
filter_upwards [bernoulliOn_ae_subset] with S hS
94-
simpa [Set.subset_compl_iff_disjoint_right]
97+
simpa [Set.subset_compl_iff_disjoint_right] using hS
9598

9699
variable (p) in
97100
lemma binomialRandom_apply' (S : Set (SimpleGraph V)) :
98-
G(V, p) S = Ber({e : Sym2 V | ¬ e.IsDiag}, p) (edgeSet '' S) := by
101+
G(V, p) S = Ber(diagSetᶜ, p) (edgeSet '' S) := by
99102
rw [binomialRandom, measurableEmbedding_edgeSet.comap_apply]
100103

101104
variable (p) in
@@ -109,7 +112,8 @@ instance : IsProbabilityMeasure G(V, p) := by
109112
refine measurableEmbedding_edgeSet.isProbabilityMeasure_comap ?_
110113
filter_upwards [bernoulliOn_ae_subset] with s hs
111114
refine ⟨.fromEdgeSet s, ?_⟩
112-
simpa [← Set.disjoint_compl_right_iff_subset, ← Set.compl_setOf] using hs
115+
simpa [Sym2.diagSet_eq_setOf_isDiag, ← Set.disjoint_compl_right_iff_subset, ← Set.compl_setOf]
116+
using hs
113117

114118
variable (V) in
115119
@[simp] lemma binomialRandom_zero : G(V, 0) = dirac ⊥ := by simp [binomialRandom_eq_map]
@@ -127,11 +131,11 @@ variable (p) in
127131
cases nonempty_fintype V
128132
simp only [binomialRandom, measurableEmbedding_edgeSet.comap_apply, Set.image_singleton,
129133
edgeSet_subset_setOf_not_isDiag, bernoulliOn_singleton]
130-
rw [Set.ncard_diff (by exact fun _ ↦ not_isDiag_of_mem_edgeSet _)]
134+
rw [Set.ncard_diff (edgeSet_subset_setOf_not_isDiag _)]
131135
congr!
132136
rw [Nat.card_eq_fintype_card, ← Sym2.card_subtype_not_diag, Fintype.card_eq_nat_card,
133137
← Nat.card_coe_set_eq]
134-
rfl
138+
simp [diagSet_compl_eq_setOf_not_isDiag]
135139

136140
/-! ### Binomial random graphs -/
137141

@@ -162,7 +166,7 @@ lemma IsBinomialRandom.inf (hG : IsBinomialRandom G p P) (hY : IsBinomialRandom
162166
variable [Countable V]
163167

164168
lemma IsBinomialRandom.isBernoulliOn_edgeSet (hG : IsBinomialRandom G p P) :
165-
IsBernoulliOn (fun ω ↦ (G ω).edgeSet) {e | ¬ e.IsDiag} p P :=
169+
IsBernoulliOn (fun ω ↦ (G ω).edgeSet) diagSetᶜ p P :=
166170
isBernoulliOn_edgeSet_binomialRandom.comp hG
167171

168172
lemma IsBinomialRandom.sup (hG : IsBinomialRandom G p P) (hY : IsBinomialRandom H q P) :

LeanCamCombi/PlainCombi/KatonaCircle.lean

Lines changed: 0 additions & 119 deletions
This file was deleted.

LeanCamCombi/PlainCombi/ProbLYM.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Ching-Tsun Chou, Chris Wong
55
-/
66
import Mathlib.Algebra.BigOperators.Field
7-
import LeanCamCombi.PlainCombi.KatonaCircle
7+
import Mathlib.Combinatorics.KatonaCircle
88

99
/-!
1010
# The LYM inequality using probability theory

lake-manifest.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"type": "git",
66
"subDir": null,
77
"scope": "",
8-
"rev": "786ca91ad0b41b6ee048e3dcdd23cc71807fddbb",
8+
"rev": "273f7dbc986d4d1fdc23eaaf954f52219af652f9",
99
"name": "mathlib",
1010
"manifestFile": "lake-manifest.json",
1111
"inputRev": null,
@@ -35,7 +35,7 @@
3535
"type": "git",
3636
"subDir": null,
3737
"scope": "leanprover-community",
38-
"rev": "6e3bb4bf31f731ab28891fe229eb347ec7d5dad3",
38+
"rev": "55071afabe2966180b96a6a01f7fdc6661bf7bb4",
3939
"name": "importGraph",
4040
"manifestFile": "lake-manifest.json",
4141
"inputRev": "main",
@@ -55,7 +55,7 @@
5555
"type": "git",
5656
"subDir": null,
5757
"scope": "leanprover-community",
58-
"rev": "ea86e311a31a4dfa2abf3d7c0664b8c28499369e",
58+
"rev": "d64436048ff3caeee542c4ee8b1a8b85ea635145",
5959
"name": "aesop",
6060
"manifestFile": "lake-manifest.json",
6161
"inputRev": "master",
@@ -75,7 +75,7 @@
7575
"type": "git",
7676
"subDir": null,
7777
"scope": "leanprover-community",
78-
"rev": "26884086fb66f99b56ed363c5e54bfcc70238599",
78+
"rev": "44cdfa76dc744fb0cd356457dcdcc5366ec647ac",
7979
"name": "batteries",
8080
"manifestFile": "lake-manifest.json",
8181
"inputRev": "main",

0 commit comments

Comments
 (0)