Download data/lean/OAI/Probability/CriticalPercolation/Modular/ClusterTransportFinite.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 7.18 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/Modular/ClusterTransportFinite.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/CriticalPercolation/Modular/ClusterTransportFinite.lean
-
curl -L -o ClusterTransportFinite.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/Modular/ClusterTransportFinite.lean
7.18 kB
| import Mathlib | |
| import OAI.Probability.CriticalPercolation.Modular.ClusterTransportSums | |
| namespace OAI | |
| section | |
| noncomputable section | |
| open Set MeasureTheory Filter | |
| open scoped Classical BigOperators Topology | |
| namespace CriticalPercolation.FiniteClusters | |
| variable {V E : Type*} (G : BondGraph V E) | |
| lemma transport_row_zero (r s : β) (p : β) (Ο : Set E) (u : V) (e : E) | |
| (he : e β G.incidentEdges (G.vertexBall u r)) : transport G r s p Ο u e = 0 := by | |
| unfold transport weight | |
| by_cases hs : small G r Ο u | |
| Β· have hi : e β G.incidentEdges (G.cluster Ο u) := by | |
| rintro β¨v,hv,hveβ© | |
| exact he β¨v,small_cluster_subset G hs hv,hveβ© | |
| rw [ite_eq_right hi] | |
| Β· simp only [hs,ite_false,zero_mul,ite_self] | |
| lemma transport_column_zero (r s : β) (p : β) (Ο : Set E) (u : V) (e : E) | |
| (hu : u β G.vertexBall (G.ends e).out.1 r βͺ G.vertexBall (G.ends e).out.2 r) : | |
| transport G r s p Ο u e = 0 := by | |
| unfold transport weight | |
| by_cases hs : small G r Ο u | |
| Β· have hi : e β G.incidentEdges (G.cluster Ο u) := by | |
| intro he | |
| have he' : u β G.cluster Ο (G.ends e).out.1 βͺ G.cluster Ο (G.ends e).out.2 := | |
| Set.ext_iff.mp (incidentRoots G Ο e) u |>.mp he | |
| rcases he' with h | h | |
| Β· exact hu (Or.inl (G.vertexBall_comm.mp (small_cluster_subset G hs h.symm))) | |
| Β· exact hu (Or.inr (G.vertexBall_comm.mp (small_cluster_subset G hs h.symm))) | |
| rw [ite_eq_right hi] | |
| Β· simp only [hs,ite_false,zero_mul,ite_self] | |
| lemma mass_le_one (s : β) (Ο : Set E) (v : V) : mass G s Ο v β€ 1 := by | |
| by_cases hn : size G Ο v = 0 | |
| Β· simp [mass,hn] | |
| Β· have hp : (0:β) < size G Ο v := Nat.cast_pos.mpr (Nat.pos_of_ne_zero hn) | |
| apply (div_le_one hp).mpr | |
| exact (cappedMass_le_one _ _).trans (by exact_mod_cast Nat.one_le_iff_ne_zero.mpr hn) | |
| lemma weight_le_one (r s : β) (Ο : Set E) (v : V) : weight G r s Ο v β€ 1 := by | |
| unfold weight | |
| split_ifs | |
| Β· exact mass_le_one G s Ο v | |
| Β· norm_num | |
| lemma transport_bound (r s : β) {p : β} (hp : p β Ioo 0 1) | |
| (Ο : Set E) (u : V) (e : E) : |transport G r s p Ο u e| β€ 1/p := by | |
| unfold transport | |
| split_ifs | |
| Β· rw [abs_mul,abs_of_nonneg (weight_nonneg G r s Ο u)] | |
| exact (mul_le_mul (weight_le_one G r s Ο u) (coefficient_abs_le hp Ο e) | |
| (abs_nonneg _) (by norm_num)).trans_eq (one_mul _) | |
| Β· simpa only [abs_zero] using div_nonneg (show (0:β)β€1 by norm_num) hp.1.le | |
| lemma transport_aut (Ο : G.Aut) (r s : β) (p : β) (Ο : Set E) (u : V) (e : E) : | |
| transport G r s p (Ο.edge '' Ο) (Ο.vertex u) (Ο.edge e) = transport G r s p Ο u e := by | |
| simp only [transport,weight,incidentCluster_aut G Ο,small_aut G Ο,mass_aut G Ο,coefficient_aut G Ο] | |
| variable [Countable V] [Countable E] | |
| lemma measurable_weight (r s : β) (u : V) : Measurable (fun Ο => weight G r s Ο u) := | |
| (measurable_mass G s u).ite (measurable_small G r u).setOf measurable_const | |
| lemma measurable_transport (r s : β) (p : β) (u : V) (e : E) : | |
| Measurable (fun Ο => transport G r s p Ο u e) := | |
| ((measurable_weight G r s u).mul (measurable_coefficient p e)).ite | |
| (measurable_incidentCluster G u e) measurable_const | |
| lemma integrable_transport (r s : β) (p : unitInterval) (hp : (p:β) β Ioo 0 1) (u : V) (e : E) : | |
| Integrable (fun Ο => transport G r s p Ο u e) (G.law p) := by | |
| apply Integrable.mono' (integrable_const (1/(p:β))) (measurable_transport G r s p u e).aestronglyMeasurable | |
| exact Eventually.of_forall (fun Ο => transport_bound G r s hp Ο u e) | |
| def expectedTransport (r s : β) (p : unitInterval) (u : V) (e : E) : β := | |
| β« Ο, transport G r s p Ο u e βG.law p | |
| lemma expectedTransport_aut (Ο : G.Aut) (r s : β) (p : unitInterval) (u : V) (e : E) : | |
| expectedTransport G r s p (Ο.vertex u) (Ο.edge e) = expectedTransport G r s p u e := by | |
| unfold expectedTransport | |
| conv_lhs => rw [β G.law_map_aut p Ο] | |
| rw [integral_map (BernoulliProduct.measurable_image_equiv Ο.edge).aemeasurable | |
| (measurable_transport G r s p (Ο.vertex u) (Ο.edge e)).aestronglyMeasurable] | |
| apply integral_congr_ae | |
| exact Eventually.of_forall (fun Ο => transport_aut G Ο r s p Ο u e) | |
| omit [Countable V] [Countable E] in | |
| lemma expectedTransport_row_zero (r s : β) (p : unitInterval) (u : V) (e : E) | |
| (he : e β G.incidentEdges (G.vertexBall u r)) : expectedTransport G r s p u e = 0 := by | |
| unfold expectedTransport | |
| simp only [transport_row_zero G r s p _ u e he,integral_zero] | |
| omit [Countable V] [Countable E] in | |
| lemma expectedTransport_column_zero (r s : β) (p : unitInterval) (u : V) (e : E) | |
| (hu : u β G.vertexBall (G.ends e).out.1 r βͺ G.vertexBall (G.ends e).out.2 r) : | |
| expectedTransport G r s p u e = 0 := by | |
| unfold expectedTransport | |
| simp only [transport_column_zero G r s p _ u e hu,integral_zero] | |
| omit [Countable V] [Countable E] in | |
| lemma expectedTransport_row_finite (hl : G.LocallyFinite) (r s : β) (p : unitInterval) (u : V) : | |
| (Function.support (expectedTransport G r s p u)).Finite := by | |
| apply (G.finite_incident hl (G.vertexBall_finite hl u r)).subset | |
| intro e he | |
| by_contra hn | |
| exact he (expectedTransport_row_zero G r s p u e hn) | |
| omit [Countable V] [Countable E] in | |
| lemma expectedTransport_column_finite (hl : G.LocallyFinite) (r s : β) (p : unitInterval) (e : E) : | |
| (Function.support (fun u => expectedTransport G r s p u e)).Finite := by | |
| apply ((G.vertexBall_finite hl (G.ends e).out.1 r).union | |
| (G.vertexBall_finite hl (G.ends e).out.2 r)).subset | |
| intro u hu | |
| by_contra hn | |
| exact hu (expectedTransport_column_zero G r s p u e hn) | |
| lemma expectedTransport_sum_out (hl : G.LocallyFinite) (r s : β) (p : unitInterval) | |
| (hp : (p:β) β Ioo 0 1) (u : V) : | |
| (β' e, expectedTransport G r s p u e) = β« Ο, β' e, transport G r s p Ο u e βG.law p := by | |
| have hI := G.finite_incident hl (G.vertexBall_finite hl u r) | |
| rw [tsum_eq_sum (s := hI.toFinset) (fun e he => expectedTransport_row_zero G r s p u e | |
| (fun h => he (hI.mem_toFinset.mpr h)))] | |
| unfold expectedTransport | |
| rw [β integral_finsetSum _ (fun e _ => integrable_transport G r s p hp u e)] | |
| apply integral_congr_ae | |
| apply Eventually.of_forall | |
| intro Ο | |
| exact (tsum_eq_sum (s := hI.toFinset) (fun e he => transport_row_zero G r s p Ο u e | |
| (fun h => he (hI.mem_toFinset.mpr h)))).symm | |
| lemma expectedTransport_sum_in (hl : G.LocallyFinite) (r s : β) (p : unitInterval) | |
| (hp : (p:β) β Ioo 0 1) (e : E) : | |
| (β' u, expectedTransport G r s p u e) = β« Ο, β' u, transport G r s p Ο u e βG.law p := by | |
| have hB := (G.vertexBall_finite hl (G.ends e).out.1 r).union | |
| (G.vertexBall_finite hl (G.ends e).out.2 r) | |
| rw [tsum_eq_sum (s := hB.toFinset) (fun u hu => expectedTransport_column_zero G r s p u e | |
| (fun h => hu (hB.mem_toFinset.mpr h)))] | |
| unfold expectedTransport | |
| rw [β integral_finsetSum _ (fun u _ => integrable_transport G r s p hp u e)] | |
| apply integral_congr_ae | |
| apply Eventually.of_forall | |
| intro Ο | |
| exact (tsum_eq_sum (s := hB.toFinset) (fun u hu => transport_column_zero G r s p Ο u e | |
| (fun h => hu (hB.mem_toFinset.mpr h)))).symm | |
| end CriticalPercolation.FiniteClusters | |
| end | |
| end | |
| end OAI | |