Download data/lean/OAI/GroupTheory/SimpleOvergroups/ArrayOperations.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.18 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/GroupTheory/SimpleOvergroups/ArrayOperations.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/GroupTheory/SimpleOvergroups/ArrayOperations.lean
-
curl -L -o ArrayOperations.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/GroupTheory/SimpleOvergroups/ArrayOperations.lean
4.18 kB
| import Mathlib | |
| import OAI.GroupTheory.SimpleOvergroups.ArrayNames | |
| import OAI.GroupTheory.SimpleOvergroups.EnlargementCore | |
| namespace OAI | |
| namespace SimpleFInftyOvergroups.EffectiveNames.Array | |
| noncomputable section | |
| open scoped Classical | |
| variable {A G X D V Y : Type*} | |
| def product (cmul : A β A β A) (op : G β X β X) (p : Name A G) (q : Name A X) : Name A X := | |
| p.flatMap fun a => q.map fun b => (cmul a.1 b.1,op a.2 b.2) | |
| @[simp] theorem product_nil (cmul : A β A β A) (op : G β X β X) (q : Name A X) : | |
| product cmul op [] q = [] := rfl | |
| @[simp] theorem product_cons (cmul : A β A β A) (op : G β X β X) | |
| (a : A Γ G) (p : Name A G) (q : Name A X) : | |
| product cmul op (a::p) q = (q.map fun b => (cmul a.1 b.1,op a.2 b.2)) ++ product cmul op p q := rfl | |
| theorem product_bound (cmul : A β A β A) (op : G β X β X) | |
| (gc : G β β) (xc : X β β) (hop : β g x, xc (op g x) = gc g + xc x) | |
| {p : Name A G} {q : Name A X} {b c : β} | |
| (hp : β a β p, gc a.2 β€ b) (hq : β a β q, xc a.2 β€ c) : | |
| β a β product cmul op p q, xc a.2 β€ b+c := by | |
| intro a ha | |
| obtain β¨u,hu,hvβ© := List.mem_flatMap.mp ha | |
| obtain β¨w,hw,rflβ© := List.mem_map.mp hv | |
| simpa only [hop] using Nat.add_le_add (hp u hu) (hq w hw) | |
| variable [Ring D] [Group V] | |
| variable (coeff : A β D) (group : G β V) | |
| def algebraValue (p : Name A G) : MonoidAlgebra D V := MonoidAlgebra.ofCoeff (value coeff group p) | |
| @[simp] theorem algebraValue_nil : algebraValue coeff group [] = 0 := rfl | |
| @[simp] theorem algebraValue_cons (a : A Γ G) (p : Name A G) : | |
| algebraValue coeff group (a::p) = MonoidAlgebra.single (group a.2) (coeff a.1) + algebraValue coeff group p := rfl | |
| @[simp] theorem algebraValue_append (p q : Name A G) : | |
| algebraValue coeff group (p++q) = algebraValue coeff group p + algebraValue coeff group q := by | |
| simp only [algebraValue,value_append,MonoidAlgebra.ofCoeff_add] | |
| theorem algebraValue_product (cmul : A β A β A) (mul : G β G β G) | |
| (hc : β a b, coeff (cmul a b) = coeff a * coeff b) | |
| (hg : β g h, group (mul g h) = group g * group h) (p q : Name A G) : | |
| algebraValue coeff group (product cmul mul p q) = algebraValue coeff group p * algebraValue coeff group q := by | |
| induction p with | |
| | nil => simp | |
| | cons a p ih => | |
| rw [product_cons,algebraValue_append,ih,algebraValue_cons,add_mul] | |
| congr 1 | |
| clear ih | |
| induction q with | |
| | nil => simp | |
| | cons b q ih => | |
| simp only [List.map_cons,algebraValue_cons,ih,hc,hg,mul_add,MonoidAlgebra.single_mul_single] | |
| variable [MulAction V Y] (point : X β Y) | |
| theorem value_action (cmul : A β A β A) (act : G β X β X) | |
| (hc : β a b, coeff (cmul a b) = coeff a * coeff b) | |
| (ha : β g x, point (act g x) = group g β’ point x) (p : Name A G) (q : Name A X) : | |
| value coeff point (product cmul act p q) = | |
| SourceEnlargement.ringAction (algebraValue coeff group p) (value coeff point q) := by | |
| induction p with | |
| | nil => simp | |
| | cons a p ih => | |
| rw [product_cons,value_append,ih,algebraValue_cons,map_add] | |
| change _ = SourceEnlargement.ringAction (MonoidAlgebra.single (group a.2) (coeff a.1)) | |
| (value coeff point q) + SourceEnlargement.ringAction (algebraValue coeff group p) (value coeff point q) | |
| congr 1 | |
| clear ih | |
| induction q with | |
| | nil => simp | |
| | cons b q ih => | |
| simp only [List.map_cons,value_cons,ih,hc,ha,map_add,SourceEnlargement.ringAction_single] | |
| variable [Primcodable A] [Primcodable G] [Primcodable X] | |
| theorem primrec_product {cmul : A β A β A} {op : G β X β X} | |
| (hc : Primrecβ cmul) (ho : Primrecβ op) : Primrecβ (product cmul op) := by | |
| unfold product | |
| apply Primrec.list_flatMap Primrec.fst | |
| change Primrec (fun p : (Name A G Γ Name A X) Γ (A Γ G) => | |
| p.1.2.map fun b => (cmul p.2.1 b.1,op p.2.2 b.2)) | |
| apply Primrec.list_map (Primrec.snd.comp Primrec.fst) | |
| exact ((hc.comp (Primrec.fst.comp (Primrec.snd.comp Primrec.fst)) | |
| (Primrec.fst.comp Primrec.snd)).pair | |
| (ho.comp (Primrec.snd.comp (Primrec.snd.comp Primrec.fst)) | |
| (Primrec.snd.comp Primrec.snd))).toβ | |
| end | |
| end SimpleFInftyOvergroups.EffectiveNames.Array | |
| end OAI | |