cfahlgren1/math / lean /OAI /Combinatorics /Chromatic /GradedAlgebra /ElementaryExpressionBounds.lean
cfahlgren1's picture
download
raw
2.45 kB
import Mathlib
import OAI.Combinatorics.Chromatic.GradedAlgebra.HomogeneousElementaryExpressions
namespace OAI
section
namespace ElementaryPositivity.QuantumTorus
open Classical
open WallUnits
noncomputable section
variable {M V:Type*} [AddCommGroup M] [Fintype V] [DecidableEq V]
variable (v:(LaurentSeries ℚ)ˣ) (Ω:M →+ M →+ ℤ)
local instance elementaryExpressionBoundsRing : Ring (Torus v Ω) := Torus.instRing v Ω
local instance elementaryExpressionBoundsAddCommMonoid : AddCommMonoid (Torus v Ω) := (Torus.instRing v Ω).toAddCommMonoid
local instance elementaryExpressionBoundsAddGroup : AddGroup (Torus v Ω) := (Torus.instRing v Ω).toAddGroup
lemma independentElement_cutSupported_scaled (ell:M →+ ℤ) (K:ℤ) (w:V → M)
(hw:∀x,ell (w x) ≤ K) (k:ℕ) : CutSupported v Ω ell ((k:ℤ)*K) (independentElement v Ω w k) := by
intro m hm
have hn:independentElement v Ω w k m≠0:=Finsupp.mem_support_iff.mp hm
simp only [independentElement,Finsupp.finsetSum_apply] at hn
obtain ⟨s,_,hs⟩:=Finset.exists_ne_zero_of_sum_ne_zero hn
unfold independentTerm at hs
split_ifs at hs with hc
· have hms:m=∑x∈s,w x:=by
by_contra h
exact hs (Finsupp.single_eq_of_ne h)
rw [hms,map_sum]
calc
∑x∈s,ell (w x) ≤ ∑_x∈s,K := Finset.sum_le_sum fun x _=>hw x
_ = (k:ℤ)*K := by simp [hc.2]
· exact (hs rfl).elim
lemma ElementaryExpr.cutSupported_scaled {k:ℕ} (f:ElementaryExpr k) (ell:M →+ ℤ) (K:ℤ)
(w:V → M) (hw:∀x,ell (w x) ≤ K) : CutSupported v Ω ell ((k:ℤ)*K) (f.eval v Ω w) := by
induction f with
| zero k => exact cutSupported_zero v Ω ell _
| one => simpa [eval] using cutSupported_one v Ω ell
| atom k => exact independentElement_cutSupported_scaled v Ω ell K w hw k
| add f g hf hg => exact cutSupported_add v Ω ell _ hf hg
| neg f hf => exact cutSupported_neg v Ω ell _ hf
| mul f g hf hg => simpa only [eval,Nat.cast_add,add_mul] using cutSupported_mul v Ω ell _ _ hf hg
lemma ElementaryExpr.weight {k:ℕ} (f:ElementaryExpr k) (ell:M →+ ℤ) (K:ℤ)
(w:V → M) (hw:∀x,ell (w x)=K) (m:M) (hm:m∈(f.eval v Ω w).support) : ell m=(k:ℤ)*K := by
have h1:=f.cutSupported_scaled v Ω ell K w (fun x=>(hw x).le) m hm
have h2:=f.cutSupported_scaled v Ω (-ell) (-K) w (fun x=>by simp [hw x]) m hm
change -ell m ≤ (k:ℤ)*(-K) at h2
linarith
end
end ElementaryPositivity.QuantumTorus
end
end OAI

Xet Storage Details

Size:
2.45 kB
·
Xet hash:
80b93d131644b9e1cb3841e9ffe6853ea9cd76d3e4d77f72c3920018e2d7800b

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