math / data /lean /OAI /Probability /InvariantIsing /Magnetic /MagneticCouplingField.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
1.99 kB
import OAI.Probability.InvariantIsing.Magnetic.MagneticPopulationCoupling
namespace OAI
/-! The field contribution changes by at most the transportation cost
when an interior profile is averaged across field populations. -/
noncomputable section
open scoped BigOperators
namespace InvariantIsing
lemma transportedMagnetization_field_term {A B : Type*} [Fintype A] [Fintype B]
(w : A β†’ B β†’ ℝ) (Ξ΄ c : B β†’ ℝ) (mag : A β†’ ℝ) (hΞ΄ : βˆ€ b, 0 < Ξ΄ b) :
(βˆ‘ b, Ξ΄ b*c b*transportedMagnetization w Ξ΄ mag b)=
βˆ‘ a, βˆ‘ b, w a b*c b*mag a := by
calc
_ = βˆ‘ b, c b*(βˆ‘ a, w a b*mag a) := by
apply Finset.sum_congr rfl
intro b _
dsimp only [transportedMagnetization]
field_simp [(hΞ΄ b).ne']
_ = βˆ‘ b, βˆ‘ a, w a b*c b*mag a := by
simp_rw [Finset.mul_sum]
apply Finset.sum_congr rfl
intro b _
apply Finset.sum_congr rfl
intro a _
ring
_ = _ := Finset.sum_comm
lemma transportedMagnetization_field_cost {A B : Type*} [Fintype A] [Fintype B]
(w : A β†’ B β†’ ℝ) (Ξ³ b : A β†’ ℝ) (Ξ΄ c : B β†’ ℝ) (mag : A β†’ ℝ)
(hw : βˆ€ a j, 0 ≀ w a j) (hΞ΄ : βˆ€ j, 0 < Ξ΄ j)
(hrow : βˆ€ a, βˆ‘ j, w a j=Ξ³ a) (hm : βˆ€ a, |mag a| ≀ 1) :
(βˆ‘ a, Ξ³ a*b a*mag a)-(βˆ‘ j, Ξ΄ j*c j*transportedMagnetization w Ξ΄ mag j) ≀
βˆ‘ a, βˆ‘ j, w a j* |b a-c j| := by
have hsource : (βˆ‘ a, Ξ³ a*b a*mag a)=βˆ‘ a, βˆ‘ j, w a j*b a*mag a := by
simp_rw [← Finset.sum_mul,hrow]
rw [hsource,transportedMagnetization_field_term w Ξ΄ c mag hΞ΄,← Finset.sum_sub_distrib]
apply Finset.sum_le_sum
intro a _
rw [← Finset.sum_sub_distrib]
apply Finset.sum_le_sum
intro j _
calc
_ = w a j*(b a-c j)*mag a := by ring
_ ≀ |w a j*(b a-c j)*mag a| := le_abs_self _
_ = w a j* |b a-c j| * |mag a| := by rw [abs_mul,abs_mul,abs_of_nonneg (hw a j)]
_ ≀ _ := mul_le_of_le_one_right (mul_nonneg (hw a j) (abs_nonneg _)) (hm a)
end InvariantIsing
end
end OAI