cfahlgren1's picture
download
raw
4.03 kB
import Mathlib.Tactic.FieldSimp
import Mathlib.Tactic.IntervalCases
import Mathlib.Tactic.Ring
import OAI.Analysis.Laughlin.FourBody.Basic
namespace OAI
namespace Laughlin.Certificate
def arithmeticScale : ℚ := 2^64 * (Nat.factorial 24 : ℚ)
def yEntryIntegral (D r s t : ℕ) (e f : ℕ × ℕ × ℤ) : ℤ :=
let (p,j,a) := e
let (q,l,b) := f
let i := p+j-t
let k := q+l-t
let T := p+j+k
if D ≤ T then
a*b*V r D T p j k*V s D T q l i *
(2 : ℤ)^((65-2*(T : ℤ)+(p : ℤ)+(q : ℤ)-(t : ℤ)+((r+s)/2 : ℕ)).toNat) *
(i.factorial : ℤ)*(k.factorial : ℤ)*(t.factorial : ℤ) *
((24 : ℕ).descFactorial (24-(T-D)) : ℤ)
else 0
theorem yEntry_eq_integral (D r s t : ℕ) (e f : ℕ × ℕ × ℤ)
(ht : t ≤ 16) (hT : e.1 + e.2.1 + (f.1 + f.2.1 - t) ≤ 24) :
yEntry D r s t e f = (yEntryIntegral D r s t e f : ℚ) / arithmeticScale := by
rcases e with ⟨p,j,a⟩
rcases f with ⟨q,l,b⟩
dsimp at hT
let T := p+j+(q+l-t)
let z : ℤ := 1-2*((p : ℤ)+(j : ℤ)+(q+l-t : ℕ))+(p : ℤ)+(q : ℤ)-(t : ℤ)+((r : ℤ)+(s : ℤ))/2
have hz : 0 ≤ 64+z := by dsimp [z,T]; omega
have hexp : 65-2*((p : ℤ)+(j : ℤ)+(q+l-t : ℕ))+(p : ℤ)+(q : ℤ)-(t : ℤ)+((r : ℤ)+(s : ℤ))/2 = 64+z := by dsimp [z]; ring
have hp : (2 : ℚ)^((64+z).toNat) = (2 : ℚ)^64 * (2 : ℚ)^z := by
rw [← zpow_natCast, Int.toNat_of_nonneg hz, zpow_add₀ (by norm_num)]
norm_num
have hTD : T-D ≤ 24 := by dsimp [T]; omega
have hf : ((T-D).factorial : ℚ) * ((24 : ℕ).descFactorial (24-(T-D)) : ℚ) = (Nat.factorial 24 : ℚ) := by
have hn := Nat.factorial_mul_descFactorial (n := 24) (k := 24-(T-D)) (by omega)
rw [Nat.sub_sub_self hTD] at hn
exact_mod_cast hn
dsimp [yEntry, yEntryIntegral]
split_ifs with hd
· change _ = _ / arithmeticScale
rw [hexp]
push_cast
rw [hp]
change _ = _ / ((2 : ℚ)^64 * (Nat.factorial 24 : ℚ))
rw [← hf]
have hn : ((T-D).factorial : ℚ) ≠ 0 := by positivity
have hm : ((24 : ℕ).descFactorial (24-(T-D)) : ℚ) ≠ 0 := by
intro h
rw [h, mul_zero] at hf
exact (ne_of_gt (show (0 : ℚ) < (Nat.factorial 24 : ℚ) by positivity)) hf.symm
change _ = _ / ((2 : ℚ)^64 * (((T-D).factorial : ℚ) * ((24 : ℕ).descFactorial (24-(T-D)) : ℚ)))
field_simp
ring
· simp
def yRowIntegral (D r s : ℕ) (row : ℕ × ℤ × List (ℕ × ℕ × ℤ)) : ℤ :=
(row.2.2.map (fun e => (row.2.2.map (fun f => yEntryIntegral D r s row.1 e f)).sum)).sum
private theorem sum_integral {Element : Type*} (xs : List Element) (f : Element → ℤ) (c : ℚ) :
(xs.map (fun x => (f x : ℚ)/c)).sum = ((xs.map f).sum : ℚ)/c := by
induction xs with
| nil => simp
| cons x xs ih => simp [ih, add_div]
theorem yRow_eq_integral (D r s : ℕ) (row : ℕ × ℤ × List (ℕ × ℕ × ℤ))
(ht : row.1 ≤ 16)
(hT : ∀ e ∈ row.2.2, ∀ f ∈ row.2.2,
e.1 + e.2.1 + (f.1 + f.2.1 - row.1) ≤ 24) :
yRow D r s row = (yRowIntegral D r s row : ℚ) / arithmeticScale := by
unfold yRow yRowIntegral
calc
_ = (row.2.2.map (fun e => (row.2.2.map (fun f =>
(yEntryIntegral D r s row.1 e f : ℚ)/arithmeticScale)).sum)).sum := by
congr 1
apply List.map_congr_left
intro e he
congr 1
apply List.map_congr_left
intro f hf
exact yEntry_eq_integral D r s row.1 e f ht (hT e he f hf)
_ = _ := by simp_rw [sum_integral]
theorem rows_integral_bounds : ∀ row ∈ rows, row.1 ≤ 16 ∧
∀ e ∈ row.2.2, ∀ f ∈ row.2.2,
e.1 + e.2.1 + (f.1 + f.2.1 - row.1) ≤ 24 := by
decide +kernel
theorem source_yRow_eq_integral (D r s n : ℕ) (hn : n < 7) :
yRow D r s (rows[n]!) = (yRowIntegral D r s (rows[n]!) : ℚ) / arithmeticScale := by
have hm : rows[n]! ∈ rows := by
interval_cases n <;> decide +kernel
exact yRow_eq_integral D r s _ (rows_integral_bounds _ hm).1 (rows_integral_bounds _ hm).2
end Laughlin.Certificate
end OAI

Xet Storage Details

Size:
4.03 kB
·
Xet hash:
842abcc89a57f14c9b96ddf61f8bd1bebbd4e926384c2fbc7f5a928715665434

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.