Buckets:
| import OAI.Probability.SignedSweeps.TupleNorm | |
| namespace OAI | |
| noncomputable section | |
| namespace SignedSweeps | |
| open scoped BigOperators TensorProduct | |
| open Module | |
| open scoped BigOperators | |
| attribute [local instance] Classical.propDecidable | |
| variable (π : Type*) [Field π] {E : Type*} [AddCommGroup E] [Module π E] | |
| {A B : Type*} [Fintype A] [Fintype B] | |
| def finiteMean (f : A β E) : E := (Fintype.card A : π)β»ΒΉ β’ β x, f x | |
| lemma finiteMean_congr {f g : A β E} (h : β x, f x = g x) : | |
| finiteMean π f = finiteMean π g := by unfold finiteMean; simp only [h] | |
| lemma finiteMean_equiv (e : A β B) (f : B β E) : | |
| finiteMean π (fun x => f (e x)) = finiteMean π f := by | |
| rw [finiteMean, finiteMean, Fintype.card_congr e, e.sum_comp] | |
| lemma finiteMean_const [CharZero π] [Nonempty A] (x : E) : finiteMean π (fun _ : A => x) = x := by | |
| rw [finiteMean, Finset.sum_const, Finset.card_univ, β Nat.cast_smul_eq_nsmul π, | |
| smul_smul, inv_mul_cancelβ, one_smul] | |
| exact_mod_cast Fintype.card_ne_zero | |
| lemma finiteMean_prod (f : A Γ B β E) : | |
| finiteMean π f = finiteMean π (fun a => finiteMean π (fun b => f (a,b))) := by | |
| simp only [finiteMean, Fintype.card_prod, Nat.cast_mul, mul_inv_rev, Fintype.sum_prod_type, | |
| β Finset.smul_sum, smul_smul, mul_comm] | |
| lemma linearMap_finiteMean {F : Type*} [AddCommGroup F] [Module π F] | |
| (T : E ββ[π] F) (f : A β E) : | |
| T (finiteMean π f) = finiteMean π (fun a => T (f a)) := by | |
| simp only [finiteMean, map_smul, map_sum] | |
| end SignedSweeps | |
| end | |
| noncomputable section | |
| namespace SignedSweeps | |
| open scoped BigOperators TensorProduct | |
| open Module | |
| open scoped BigOperators | |
| attribute [local instance] Classical.propDecidable | |
| variable {π R : Type*} [Field π] [CharZero π] [Ring R] [Algebra π R] | |
| lemma finiteMean_reverse_prod (t : β) (A : Fin t β Type*) [β i, Fintype (A i)] | |
| [β i, Nonempty (A i)] (f : β i, A i β R) : | |
| finiteMean π (fun a : β i, A i => ((List.ofFn fun i => f i (a i)).reverse).prod) = | |
| ((List.ofFn fun i => finiteMean π (f i)).reverse).prod := by | |
| induction t with | |
| | zero => | |
| simp only [List.ofFn_zero, List.reverse_nil, List.prod_nil] | |
| exact finiteMean_const π 1 | |
| | succ t ih => | |
| rw [β finiteMean_equiv π (Fin.consEquiv A), finiteMean_prod] | |
| have hc (a : A 0) (b : β i : Fin t, A i.succ) : | |
| ((List.ofFn fun i => f i (Fin.consEquiv A (a,b) i)).reverse).prod = | |
| ((List.ofFn fun i : Fin t => f i.succ (b i)).reverse).prod * f 0 a := by | |
| rw [List.ofFn_succ, List.reverse_cons, List.prod_append, List.prod_singleton] | |
| simp only [Fin.consEquiv_apply, Fin.cons_zero, Fin.cons_succ] | |
| simp only [hc] | |
| have hr (a : A 0) : | |
| finiteMean π (fun b : β i : Fin t, A i.succ => | |
| ((List.ofFn fun i : Fin t => f i.succ (b i)).reverse).prod * f 0 a) = | |
| ((List.ofFn fun i : Fin t => finiteMean π (f i.succ)).reverse).prod * f 0 a := by | |
| change finiteMean π (fun b : β i : Fin t, A i.succ => | |
| LinearMap.mulRight π (f 0 a) | |
| (((List.ofFn fun i : Fin t => f i.succ (b i)).reverse).prod)) = _ | |
| rw [β linearMap_finiteMean, ih] | |
| rfl | |
| simp only [hr] | |
| change finiteMean π (fun a : A 0 => | |
| LinearMap.mulLeft π | |
| (((List.ofFn fun i : Fin t => finiteMean π (f i.succ)).reverse).prod) | |
| (f 0 a)) = _ | |
| rw [β linearMap_finiteMean] | |
| rw [List.ofFn_succ, List.reverse_cons, List.prod_append, List.prod_singleton] | |
| rfl | |
| end SignedSweeps | |
| end | |
| noncomputable section | |
| namespace SignedSweeps | |
| open scoped BigOperators TensorProduct | |
| open Module | |
| open scoped BigOperators | |
| attribute [local instance] Classical.propDecidable | |
| abbrev SweepSettings (d : β) := β i : Fin d, coordinateSubgroup d i | |
| def sampleSweep (d : β) (a : SweepSettings d) : SymmetricGroup (2 ^ d) := | |
| ((List.ofFn fun i => (a i).1).reverse).prod | |
| lemma representation_sampleSweep_average {π E : Type*} [Field π] [CharZero π] | |
| [AddCommGroup E] [Module π E] (d : β) (Ο : Representation π (SymmetricGroup (2 ^ d)) E) : | |
| finiteMean π (fun a : SweepSettings d => Ο (sampleSweep d a)) = | |
| ((List.ofFn fun i : Fin d => (Fintype.card (coordinateSubgroup d i) : π)β»ΒΉ β’ | |
| β g : coordinateSubgroup d i, Ο g.1).reverse).prod := by | |
| have he (a : SweepSettings d) : Ο (sampleSweep d a) = | |
| ((List.ofFn fun i : Fin d => Ο (a i).1).reverse).prod := by | |
| simp only [sampleSweep, map_list_prod, List.map_reverse, List.map_ofFn, Function.comp_def] | |
| simp only [he] | |
| exact finiteMean_reverse_prod d (fun i => coordinateSubgroup d i) (fun i g => Ο g.1) | |
| lemma sweepOperator_eq_sampleMean {d : β} (lam : Partition (2 ^ d)) : | |
| sweepOperator lam = finiteMean β (fun a : SweepSettings d => spechtRepresentation lam (sampleSweep d a)) := | |
| (representation_sampleSweep_average d (spechtRepresentation lam)).symm | |
| lemma tupleSweep_eq_sampleMean (I : Type*) [Fintype I] (d : β) : | |
| tupleSweep I d = finiteMean β (fun a : SweepSettings d => tupleRepresentation I (2 ^ d) (sampleSweep d a)) := | |
| (representation_sampleSweep_average d (tupleRepresentation I (2 ^ d))).symm | |
| lemma subsetSweep_eq_sampleMean (d : β) : | |
| subsetSweep d = finiteMean β (fun a : SweepSettings d => subsetRepresentation (Fin (2 ^ d)) (sampleSweep d a)) := | |
| (representation_sampleSweep_average d (subsetRepresentation (Fin (2 ^ d)))).symm | |
| end SignedSweeps | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 5.47 kB
- Xet hash:
- 35ac1e4834ea51a854f6dd88a2fabfb900c418eb8a1d90da2c9cba43a8614a35
Β·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.