File size: 4,183 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | 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
|